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

Does the "data" argument in api_v1_0.plot_v1_0() make any sense? #773

Closed douglatornell closed 1 year ago

douglatornell commented 4 years ago

https://github.com/DFO-Ocean-Navigator/Ocean-Data-Map-Project/blob/ea00877de046c1de02c598d03642232799f6ba50/routes/api_v1_0.py#L515-L517 looks like it is intended for use by Python code to get the data underlying the a plot, but there is no way for such a call to provide a request object outside of the app running, is there? So, what is the purpose of this code?

https://github.com/DFO-Ocean-Navigator/Ocean-Data-Map-Project/blob/ea00877de046c1de02c598d03642232799f6ba50/routes/api_v1_0.py#L532-L539 can't be reached due to L515-L517. That's a good thing because it is bugged by it's use of resp rather than response. If I am reading this bit correctly in context, if it worked, it would return the PNG image as JSON. What is the purpose of that?

I think that both of these fragments of code are hold-overs from history that no longer have purpose and should be deleted, but perhaps there's something that I am missing. @htmlboss can you shed any light on this?

JustinElms commented 1 year ago

The "data" argument was removed when migrating to FastAPI.