astrolabsoftware / fink-science-portal

Fink Science Portal
https://fink-portal.org
Apache License 2.0
7 stars 4 forks source link

Support newer Python and package versions #575

Closed karpov-sv closed 7 months ago

karpov-sv commented 7 months ago

Tested with Python 3.11 and latest versions of all packages. Fresh environment with (hopefully) only really necessary packages. fink-science is 5.6.2 as in corresponding PR.

Most of changes are backwards-compatible (so would work on current environment too) except for Flask that at some point of 1.0->2.0 transition (current is 3.0) renamed send_file arguments for giving the download file name.

The conversion of types in API calls is isolated into request_api endpoint which directly provide dataframe, json object, or just raw output (used only for cutouts).

The code is also slightly cleaned up from deprecated constructs like np.alltrue

Minor optimization is done for loading preview cutout - it now avoids extra API call, as it is not really necessary.

JulienPeloton commented 7 months ago

Thanks @karpov-sv ! Let me install the new environment on the dev server, and come back to this for feedback.

karpov-sv commented 7 months ago

I really hope I resolved the conflict correctly!..