-
Notifications
You must be signed in to change notification settings - Fork 757
feat: person search endpoint #9062
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
jennifer-richards
merged 5 commits into
ietf-tools:feat/rpc-api
from
jennifer-richards:rpc-person-search
Jun 27, 2025
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
43ddfba
feat: person search endpoint
jennifer-richards 35c4691
refactor: address review comments
jennifer-richards 0f107ce
chore: RpcPersonSerializer -> PersonSerializer
jennifer-richards f999285
fix: search for entire term, not word-by-word
jennifer-richards e8e8069
fix: only look at name/plain in search
jennifer-richards File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| # Copyright The IETF Trust 2025, All Rights Reserved | ||
| from rest_framework import serializers | ||
|
|
||
| from ietf.person.models import Person | ||
|
|
||
|
|
||
| class PersonSerializer(serializers.ModelSerializer): | ||
| picture = serializers.URLField(source="cdn_photo_url", read_only=True) | ||
|
|
||
| class Meta: | ||
| model = Person | ||
| fields = ["id", "plain_name", "picture"] | ||
| read_only_fields = ["id", "plain_name", "picture"] |
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
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.
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.
General question: Isn't
Rpcandrpc_are redundent because these already inviews_rpc?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.
I think so, but I didn't want to violate the convention we've been using so far in this PR. My inclination is to do a follow-up PR that refactors a bunch of this, including getting rid of the hand-crufted
rpcapi.yaml.These names aren't exposed through the API schema so the impacts both of this being a bad name and of changing the names in a later PR shouldn't impact the purple API client. We should be able to match the existing schema with a generated one, at least pretty closely.
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.
(Having the prefix in the method/class names is nice if you want to do a
from views_rpc import rpc_whateverbut I don't think we're likely to do it that way.)Uh oh!
There was an error while loading. Please reload this page.
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.
(not relevant to this PR), should
persons_by_emailshould berpc_persons_by_email?What I struggle with is difference between rpc prefixed person and non-rpc prefixed person in
views_rpc.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.
I guess we weren't as consistent as I thought at a glance. On the datatracker side, there's no such thing as an RpcPerson except where the Rpc is a prefix.
Purple has an
RpcPersonmodel that represents someone who has a role with the RPC - editor, manager, etc.