-
Notifications
You must be signed in to change notification settings - Fork 6
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
Issue1 gcmd short names #52
Conversation
… geospaas.viewer.tests
…st version of Aqua platform keywords (was AQUA before)
…from ForeignKey source to ManyToManyField sources, changed __str__ method of Source to rely on platform and instrument only (not specs) and removed the field specs.
…o allow multiple sources
…de itself. Assert that the entry_title is now equal to the filename, test new use of 'platform/instrument' as list
…in the natural_keys
…t and parameter instead of source. This is still ongoing..
… some old commented code
… there is extra information linked to the connection between two models. In this case, we don't have that...
…new migrations, and updated fixtures. This also applies to #51
…tests to accomodate model changes
…d search in viewer.views.IndexView.render
…he Django server in the local web browser
Pull Request Test Coverage Report for Build 202
💛 - Coveralls |
…ged natural_key and get_by_natural_key methods of the Source model
…pt as described in #55
I'm not sure how to test the data migrations automatically (i.e., geospaas/catalog/migrations/0007b_migrate_source_data.py and |
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.
Looks ok. Just few things:
- Too many migrations - maybe some can be squashed?
- Too verbose output for some vocabularies. Is it really necessary? Looks like it kills the usability of
__str__
method (That was not in the original issue, BTW. We should try to make PRs small and focused on the issues only). - Dosn't matter since we swtich to Docker soon (hopefully) but it is better not to provide IP in Vagrantfile and ansible as it may conflict with other VMs or containers.
@@ -10,6 +10,7 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| | |||
config.vm.box_url = "https://atlas.hashicorp.com/ubuntu/trusty64" | |||
|
|||
config.vm.define "geospaas", primary: true do |geospaas| | |||
geospaas.vm.network :private_network, ip: "192.168.33.10" |
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.
This is not needed. In fact it can conflict with other VMs for other projects. If not specified, vagrant allocates free IP to the VM without conflicts.
operations = [ | ||
migrations.AddField( | ||
model_name='dataset', | ||
name='newparameters', |
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 you squash these migrations? You added newparameters
and then removed it but generated migrations in between.
@@ -131,13 +128,14 @@ class Dataset(models.Model): | |||
] | |||
) | |||
entry_title = models.CharField(max_length=220) | |||
parameters = models.ManyToManyField(Parameter, through='DatasetParameter') | |||
#parameters = models.ManyToManyField(Parameter, through='DatasetParameter') | |||
parameters = models.ManyToManyField(Parameter) |
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 you also remove the model DatasetParameter if it is not used anymore?
|
||
def test_source__str__method(self): | ||
# Assure __str__ method returns correct string | ||
expected_str = 'Platform: (Category: Earth Observation Satellites, Series Entity: , Short Name: ' \ |
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.
That looks terrible. IMHO now Source.__str__
is not usable.
@@ -42,10 +44,13 @@ class Instrument(models.Model): | |||
objects = InstrumentManager() | |||
|
|||
def __str__(self): | |||
return str(self.short_name) | |||
return 'Category: %s, Instrument Class: %s, Type: %s, Subtype: %s, Short Name: %s, ' \ |
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.
Why do we need that? What is the workflow? It looks too verbose but adds no information.
This bug was in
|
A much simple solution was proposed in #80. |
#1