DFO-Ocean-Navigator / Ocean-Data-Map-Project

The Ocean Navigator is an online tool that is used to help visualise scientific research data. a users guide is available at https://dfo-ocean-navigator.github.io/Ocean-Navigator-Manual/ and the tool is live at
http://navigator.oceansdata.ca
GNU General Public License v3.0
49 stars 20 forks source link

Code cleanup: Remove conditional checks for velocity magnitudes #237

Open Jeffreydaw opened 6 years ago

Jeffreydaw commented 6 years ago

This issue has been created to track the locations in the code where we need to fix the water velocity references.

Because the API checks to see if there have been 2 or more variables requested as a way to determine if the user wants to view water velocity it makes it hard add new features such as divergence. because of this, we need to change all places in the code where there is a check for 2 variables or more than 1 variable. If you find any references to such code please log it here so that when we go to fix this issue it is easy to find all references.

Jeffreydaw commented 6 years ago

https://github.com/DFO-Ocean-Navigator/Ocean-Data-Map-Project/blob/beef304e1414807d8fe1c2fbda31faad4100b124/plotting/transect.py#L69-L99

Jeffreydaw commented 6 years ago

https://github.com/DFO-Ocean-Navigator/Ocean-Data-Map-Project/blob/beef304e1414807d8fe1c2fbda31faad4100b124/plotting/transect.py#L107-L108

Jeffreydaw commented 6 years ago

https://github.com/DFO-Ocean-Navigator/Ocean-Data-Map-Project/blob/beef304e1414807d8fe1c2fbda31faad4100b124/plotting/transect.py#L187-L228

Jeffreydaw commented 6 years ago

https://github.com/DFO-Ocean-Navigator/Ocean-Data-Map-Project/blob/beef304e1414807d8fe1c2fbda31faad4100b124/plotting/map.py#L176-L179

Jeffreydaw commented 6 years ago

https://github.com/DFO-Ocean-Navigator/Ocean-Data-Map-Project/blob/beef304e1414807d8fe1c2fbda31faad4100b124/plotting/map.py#L181-L182

htmlboss commented 6 years ago

Fastest way is to search for if len(self.variables) > 1 or if len(self.variables) == 2

htmlboss commented 6 years ago

https://github.com/DFO-Ocean-Navigator/Ocean-Data-Map-Project/blob/a93d6c811b47d3869b7ce8846911621a785149a6/oceannavigator/views.py#L319-L342

nsoontie commented 6 years ago

Related issue: #231

Jeffreydaw commented 6 years ago

@NoahGallant-MUN this is an issue you could work on if you get the chance, I think it will be very API related.