-
Notifications
You must be signed in to change notification settings - Fork 28
Feat/filter in request #266
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
missings tests on global settings configuration and all test for pagination in message
…or specifiy new message name
04197f2
to
2248f0d
Compare
legau
reviewed
Feb 15, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For the added fields in grpc actions I would suggest going the other way around and delegating this to the genericservices themselves to have more flexibility
something like :
class Service:
def _extra_action_fields(self) -> list[ProtoField]:
return []
class GenericService(Service):
filterset_class = MyFilterSet
pagination_class = MyPagination
@classmethod
def _additional_action_fields(self):
...
filter_field = ProtoField(...)
pagination_field = ProtoField(...)
...
return [*super()._extra_action_fields(), filter_field, pagination_field]
class GrpcAction:
def make_proto_rpc(..., service):
self.create_proto_message(..., additional_fields=service._additional_action_fields())
class ProtoMessage:
def create(..., additional_fields: list[ProtoField]):
...
Co-authored-by: Léni <[email protected]>
Co-authored-by: Léni <[email protected]>
Adapt filter doc for plugin system Adapt pagination doc for plugin system Add generation plugin doc Add MessageNameConstructor doc Add DEFAULT_MESSAGE_NAME_CONSTRUCTOR and DEFAULT_GENERATION_PLUGINS and their doc
d1c61ef
to
fae180e
Compare
legau
reviewed
Feb 23, 2024
4cc9fb3
to
405d8f8
Compare
Update docs/features/grpc-action.rst Co-authored-by: Léni <[email protected]> Update docs/features/grpc-action.rst Co-authored-by: Léni <[email protected]> Update docs/features/grpc-action.rst Co-authored-by: Léni <[email protected]> Update docs/features/pagination.rst Co-authored-by: Léni <[email protected]> Update docs/features/pagination.rst Co-authored-by: Léni <[email protected]> Update docs/features/pagination.rst Co-authored-by: Léni <[email protected]> Update docs/features/filters.rst Co-authored-by: Léni <[email protected]> Update docs/settings.rst Co-authored-by: Léni <[email protected]> Update docs/settings.rst Co-authored-by: Léni <[email protected]> Update docs/settings.rst Co-authored-by: Léni <[email protected]> Update docs/settings.rst Co-authored-by: Léni <[email protected]> Follow review and class names Update docs/features/proto-generation.rst Co-authored-by: Léni <[email protected]> adapt test to class renaming
405d8f8
to
7c0c48a
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Before merging need: