Ocean-Data-Map-Project
Ocean-Data-Map-Project copied to clipboard
Code cleanup: Remove conditional checks for velocity magnitudes
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.
https://github.com/DFO-Ocean-Navigator/Ocean-Data-Map-Project/blob/beef304e1414807d8fe1c2fbda31faad4100b124/plotting/transect.py#L69-L99
https://github.com/DFO-Ocean-Navigator/Ocean-Data-Map-Project/blob/beef304e1414807d8fe1c2fbda31faad4100b124/plotting/transect.py#L107-L108
https://github.com/DFO-Ocean-Navigator/Ocean-Data-Map-Project/blob/beef304e1414807d8fe1c2fbda31faad4100b124/plotting/transect.py#L187-L228
https://github.com/DFO-Ocean-Navigator/Ocean-Data-Map-Project/blob/beef304e1414807d8fe1c2fbda31faad4100b124/plotting/map.py#L176-L179
https://github.com/DFO-Ocean-Navigator/Ocean-Data-Map-Project/blob/beef304e1414807d8fe1c2fbda31faad4100b124/plotting/map.py#L181-L182
Fastest way is to search for if len(self.variables) > 1 or if len(self.variables) == 2
https://github.com/DFO-Ocean-Navigator/Ocean-Data-Map-Project/blob/a93d6c811b47d3869b7ce8846911621a785149a6/oceannavigator/views.py#L319-L342
Related issue: #231
@NoahGallant-MUN this is an issue you could work on if you get the chance, I think it will be very API related.