-
Notifications
You must be signed in to change notification settings - Fork 0
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
task/WP-109-remove-unused-django-fields #887
Conversation
Codecov Report
@@ Coverage Diff @@
## main #887 +/- ##
==========================================
+ Coverage 63.33% 69.67% +6.34%
==========================================
Files 427 220 -207
Lines 12245 6111 -6134
Branches 2514 1812 -702
==========================================
- Hits 7755 4258 -3497
+ Misses 4284 1779 -2505
+ Partials 206 74 -132
Flags with carried forward coverage won't be shown. Click here to find out more.
|
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.
Requested changes: remove all the unused code.
Question: edit profile leads to https://accounts.tacc.utexas.edu/profile, which shows the deleted fields. Is this ok?
Also, ran migrations locally:
root@07dc05f0e902:/srv/www/portal/server# python3 manage.py makemigrations
Migrations for 'accounts':
portal/apps/accounts/migrations/0006_auto_20231017_1944.py
- Remove field bio from portalprofile
- Remove field orcid_id from portalprofile
- Remove field professional_level from portalprofile
- Remove field website from portalprofile
root@07dc05f0e902:/srv/www/portal/server# python3 manage.py migrate
Operations to perform:
Apply all migrations: accounts, admin, auth, contenttypes, datafiles, googledrive, impersonate, notifications, onboarding, portal_auth, portal_licenses, portal_messages, projects, sessions, termsandconditions, webhooks, workspace
Running migrations:
Applying accounts.0006_auto_20231017_1944... OK
@@ -65,8 +65,8 @@ export const ProfileInformation = () => { | |||
{ Header: 'Institution', accessor: 'institution' }, | |||
{ Header: 'Country of Residence', accessor: 'country' }, | |||
{ Header: 'Country of Citizenship', accessor: 'citizenship' }, | |||
{ Header: 'Ethnicity', accessor: 'ethnicity' }, | |||
{ Header: 'Gender', accessor: 'gender' }, | |||
// { Header: 'Ethnicity', accessor: 'ethnicity' }, |
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.
can we remove these instead of commenting them oout
website: 'http://owais.io', | ||
orcid_id: 'test', | ||
professional_level: 'Staff (support, administration, etc)', | ||
// ethnicity: 'Asian', |
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.
same here, delete this unused code
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.
Good question, I believe those values (on https://accounts.tacc.utexas.edu/profile) are different than the values that we're deleting on the backend. I say this because when I look at the api response on https://cep.test/accounts/api/profile/data/, those values are either empty strings or null for my profile, whereas on https://accounts.tacc.utexas.edu/profile, they are filled out. So my guess is this is separate from the PortalProfile data.
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.
Changes look good! Just want to undo that change to the init migration
('ethnicity', models.CharField(max_length=255)), | ||
('gender', models.CharField(max_length=255)), |
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.
We want to keep old migrations unaltered, and rather all our future changes can be handled by additional migrations
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.
LGTM
@tjgrafft - server side unit tests are failing. Once this is fixed and tests pass, I can merge.
|
Should be fixed now with this new commit |
Overview
Many fields connected to the PortalProfile model in the Django backend are no longer used by the portal. Remove all that are no longer needed from the model, and include related migrations.
Related
Changes
Testing
UI
Notes