Ocean-Data-Map-Project icon indicating copy to clipboard operation
Ocean-Data-Map-Project copied to clipboard

Code cleanup: Remove conditional checks for velocity magnitudes

Open Jeffreydaw opened this issue 7 years ago • 9 comments
trafficstars

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 avatar Apr 20 '18 19:04 Jeffreydaw

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

Jeffreydaw avatar Apr 20 '18 19:04 Jeffreydaw

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

Jeffreydaw avatar Apr 20 '18 19:04 Jeffreydaw

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

Jeffreydaw avatar Apr 20 '18 19:04 Jeffreydaw

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

Jeffreydaw avatar Apr 20 '18 19:04 Jeffreydaw

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

Jeffreydaw avatar Apr 20 '18 19:04 Jeffreydaw

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

htmlboss avatar Apr 21 '18 00:04 htmlboss

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

htmlboss avatar May 02 '18 17:05 htmlboss

Related issue: #231

nsoontie avatar May 07 '18 15:05 nsoontie

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

Jeffreydaw avatar Jul 19 '18 17:07 Jeffreydaw