-
Notifications
You must be signed in to change notification settings - Fork 0
Backend model changes (add ORCID ID) #199
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
Conversation
This is going to have a migration conflict with PR #184, so should merge that one first and then order this one. This is because I added a migration to convert the dataset authors (started out with a command but wanted a more automated way to do the conversion to include name and ORCID ID). |
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.
Pull Request Overview
This PR adds ORCID ID support to the user model and updates the dataset authors system to store author information as objects containing both name and ORCID ID fields, transitioning from a simple string-based format.
- Adds
orcid_id
field to the User model for storing researcher identifiers - Converts dataset authors from string format to object format with name and ORCID ID fields
- Includes data migration to convert existing author data to the new object format
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.
Show a summary per file
File | Description |
---|---|
gateway/sds_gateway/users/models.py | Adds orcid_id CharField to User model |
gateway/sds_gateway/users/migrations/0011_user_orcid_id_alter_user_is_approved.py | Django migration adding ORCID ID field and updating user approval default |
gateway/sds_gateway/api_methods/models.py | Adds get_authors_display() method for backward compatibility with new author object format |
gateway/sds_gateway/api_methods/migrations/0016_convert_dataset_authors_to_object_format.py | Data migration converting existing author strings to object format |
gateway/sds_gateway/users/migrations/max_migration.txt | Updates migration tracking file |
gateway/sds_gateway/api_methods/migrations/max_migration.txt | Updates migration tracking file |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
gateway/sds_gateway/api_methods/migrations/0016_convert_dataset_authors_to_object_format.py
Show resolved
Hide resolved
gateway/sds_gateway/users/migrations/0011_user_orcid_id_alter_user_is_approved.py
Outdated
Show resolved
Hide resolved
Note: @lucaspar run reverse migration 0016 |
…, command for updating authors field to new format)
4d618e6
to
e24d240
Compare
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.
thanks
@lucaspar run reverse migration
0016_reverse_authors_to_string_format
in QA to check it works.