pacificclimate / pdp

The PCIC Data Portal - Server software to run the entire web application
GNU General Public License v3.0
1 stars 2 forks source link

Python 3 upgrade #212

Open cairosanders opened 3 years ago

cairosanders commented 3 years ago

Unfortunately I did not finish the python 3 upgrade, but here's what I did and where someone can start off.

Pydap Handlers and Responses

For the switch to Python 3 I moved the pydap API source from pydap-pdp (py2) to mainline pydap 3.2.2(py3). For the handlers and responses maintained by PCIC I consolidated them into one repo, pydap-extras and transitioned them to python 3. The handlers and responses that were added are:

Handlers

  1. sql = pydap_extras.handlers.sql:SQLHandler
  2. csv = pydap_extras.handlers.csv:CSVHandler
  3. rsql = pydap_extras.handlers.pcic:RawPcicSqlHandler
  4. csql = pydap_extras.handlers.pcic:ClimoPcicSqlHandler
  5. hdf5 = pydap_extras.handlers.hdf5:HDF5Handler

Responses

  1. nc = pydap_extras.responses.netcdf:NCResponse
  2. xlsx = pydap_extras.responses.xlsx:XLSXResponse
  3. aaigrid is started on the branch aaigrid-response if it turns out it's needed

ORCA

Part of pdp_util was replaced by ORCA and you can see where it is used in the RasterServer here.

PDP Progress

First I updated pdp_util (using mainline pydap) and added Orca.

I mostly only made syntax and library changes for the actual PDP on a branch called py3-update. The pdp pytests reveal bugs in pydap-extras and I started handling them on a branch called pdp-test-bugs. Also, the latest release of pdp_util is set to use modelmeta==0.3.0, but this is too late of a version of modelmeta to access pcic_meta. To start testing python 3 changes I made a branch off pdp_util:master that uses modelmeta==0.1.0 called py3-modelmeta-0.1.0. Hopefully , once pcic_meta is updated then the master branch can be used instead.