Skip to content
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

Select anomaly name formatting #1053

Merged
merged 3 commits into from
Oct 21, 2022

Conversation

rcooper295
Copy link
Collaborator

Fixes #1018 by reformatting a few of the anomaly names to the desired case and treating them differently when the names are created for the checkboxes (don't use inflection.titleize, just replace underscores with spaces).

This requires some changes to the column names in the database. @BradleySappington made these on the dev database but @mfixstsci and/or @bhilbert4 should be aware that this will need to be done on the prod DB too before this change will work correctly.
The changes are:

  • 'dominant_msa_leakage' --> 'Dominant_MSA_Leakage'
  • 'MRS_glow' --> 'MRS_Glow'
  • 'MRS_zipper' --> 'MRS_Zipper'
    ('LRS_Contamination' was already capitalized correctly)

Screen Shot 2022-10-11 at 11 12 04 AM

@@ -81,16 +82,20 @@
'tree_rings': ['miri'],
# additional anomalies:
'other': ['fgs', 'miri', 'nircam', 'niriss', 'nirspec']}
# anomalies that shouldn't be 'titleized'
special_cases = ['Dominant_MSA_Leakage','MRS_Glow','MRS_Zipper','LRS_Contamination']
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Love this approach, much cleaner. Thank you for submitting this @rcooper295

Copy link
Collaborator

@mfixstsci mfixstsci left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, would like to test this out on the web application and inspect the database next.

@mfixstsci
Copy link
Collaborator

@rcooper295 We have your branch on the test server but need to update the anomaly database. I am going to try and add some of the anomalies you added to the page to the database and then verify they are stored on the backend. Once that is done we have a couple of things lined up that will need to be merged before we can add this in.

@mfixstsci
Copy link
Collaborator

@rcooper295 @bhilbert4 Myself and @BradleySappington went ahead and updated the database column names and added the new anomaly data to the databases to see if they accepted submissions and everything looked good. This can be merged when ready.

@mfixstsci mfixstsci merged commit b875346 into spacetelescope:develop Oct 21, 2022
@rcooper295 rcooper295 deleted the anomalyformat branch November 28, 2022 19:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Anomaly listing capitialization turns MRS into Mrs
2 participants