-
Notifications
You must be signed in to change notification settings - Fork 192
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
Rename name
column of Computer
database table to label
#4882
Rename name
column of Computer
database table to label
#4882
Conversation
I started the deprecation path for this change in However, on the other hand, currently there is an inconsistency where in the ORM one has to use |
19ad33a
to
00ecb44
Compare
Codecov Report
@@ Coverage Diff @@
## develop #4882 +/- ##
===========================================
+ Coverage 80.08% 80.10% +0.02%
===========================================
Files 514 517 +3
Lines 36576 36617 +41
===========================================
+ Hits 29288 29327 +39
- Misses 7288 7290 +2
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
00ecb44
to
1e53cc9
Compare
All other database models already use `label` so using the same for the `Computer` model is more consistent. The `name` attribute was already deprecated in the ORM in `aiida-core==1.0.0` and replaced by `label`. Here we apply the actual database migration to also perform the change in the database models. A new migration is also added for existing archives as the metadata needs to update the key `name` to `label` for the `Computer` entity and the data needs to be updated as well.
1e53cc9
to
48c2c0b
Compare
@ramirezfranciscof @chrisjsewell this is now ready for review |
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 @sphuber !
I went through the files and the changes all look fine.
It's a pity that we we could not do a deprecation for the querybuilder and the REST API, so some people might run into issues, but this change needs to happen and it should happen in 2.0.
I notice that the file tests/static/graphs/graph1.aiida
was deleted - was this just no longer needed?
'display_name': 'Name', | ||
'help_text': 'Name of the object', | ||
'label': { | ||
'display_name': 'Label', |
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.
to be fully consistent, one might argue that display_name
should become display_label
.
but I'm ok with keeping this inconsistency
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 notice that the file
tests/static/graphs/graph1.aiida
was deleted - was this just no longer needed?
It wasn't deleted, it was just migrated since it needed to also perform the name
-> label
change in the archive. Due to the new archive format that is already there, the size was just reduced.
Fixes #2926
All other database models already use
label
so using the same for theComputer
model is more consistent. Thename
attribute was alreadydeprecated in the ORM in
aiida-core==1.0.0
and replaced bylabel
.Here we apply the actual database migration to also perform the change
in the database models.