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

Add dropdowns for the adapter and dataset names #165

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

chelseatroy
Copy link
Contributor

Once upon a time, in order to make an Imagery Request, researchers needed to type in the name of the adapter and dataset they wanted to use. But the thing is, only a finite set of values work for these fields. So here are some dropdowns for those fields instead!

Copy link
Contributor

@yuenmichelle1 yuenmichelle1 left a comment

Choose a reason for hiding this comment

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

It seems like tests are failing and/or ERRORing out due to new changes in models. We might want to fix the tests before merging this in.

@@ -8,17 +8,26 @@


class ImageryRequest(models.Model):
adapter_name = models.CharField(max_length=64, null=False)
dataset_name = models.CharField(max_length=64, null=False)
adapter_choices = (
Copy link
Contributor

@yuenmichelle1 yuenmichelle1 May 31, 2022

Choose a reason for hiding this comment

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

I think SOMETHING_choices should be an array of tuples.

Suggested change
adapter_choices = (
adapter_choices = [
('US Geological Survey', 'usgs')
]

adapter_choices = (
('US Geological Survey', 'usgs')
)
dataset_choices = (
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
dataset_choices = (
dataset_choices = [
("landsat_8_c1","LANDSAT_8_C1"),
("landsat_tm_c1","LANDSAT_TM_C1"),
("landsat_etm_c1","LANDSAT_ETM_C1")
]

@yuenmichelle1

This comment was marked as resolved.

@yuenmichelle1
Copy link
Contributor

yuenmichelle1 commented May 31, 2022

oh! i know why tests are failing. these can easily be fixed by doing a find and replace all and change any reference of wgs to wrs (due to the change in the imagery request model), except do not find and replace for the migration files.

we should also create a new migration
python manage.py makemigrations and

NOTE TO SELF: upon deployment to prod double check that db has updated with new table name change on imagery_request (if not, run python manage.py migrate)

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.

2 participants