robintw / Py6S

A Python interface to the 6S Radiative Transfer Model
GNU Lesser General Public License v3.0
186 stars 105 forks source link

Py6s pysolar dependency is too old #78

Closed NewbieOfUESTC closed 3 years ago

NewbieOfUESTC commented 3 years ago

Py6s has dependency on Pysolar 0.6 which is a release 7 years ago.

  1. Current Pysolar active one is 0.9 and API are completely different.
  2. it was a broken package (from pypi or conda channel, I also checked the source code archive and it supportted my assumption) In my case, I was using pysolar and py6s at the same time and I cannot use pysolar 0.6 If I wanna continue using both together I have to make a patch the source code dynamically, that looks weird.
  3. Also, some bugs are reported as below. https://github.com/pingswept/pysolar/issues/99

Please consider switch to newer pysolar repo or remove the dependency.

robintw commented 3 years ago

Thanks - I'm aware that an old version of Pysolar is in use. This is because until recently we were still supporting Python 2 for Py6S (due to some users being stuck on Python 2 in HPC settings), and newer versions of Pysolar don't support Python 2.

Upgrading the Pysolar dependency and dealing with the new Pysolar API is on the todo list - I will try and get to it as soon as I can, but I have to prioritise paid work.

NewbieOfUESTC commented 3 years ago

I tried to replace 2 function in the geometry.py. geometry.py.txt

robintw commented 3 years ago

I've just merged in code to support the new version (I decided to just require v0.9 or later, and not support v0.6 any more). I'll be releasing a new version within the next few days, but in the meantime you can install directly from Github if you want to use it immediately.