Open iamdonovan opened 1 year ago
It looks like the setup.py
has a bunch of logic to build version string from the git repo -- I'd suggest stripping that out entirely and instead using: https://github.com/pypa/setuptools_scm
setuptools_scm
should provide all the features you'd need, and will comply with PEP440 as well. And, after an admittedly quick glance, that would let you move entirely to setup.cfg
or pyproject.toml
in line with setuptools best practices.
Thanks all! Yeah this package is old - I'm not sure I'll continue to use it or simply move the useful scripts to https://github.com/GLIMS-RGI/rgi7_scripts
What did you need from it?
Mostly the clustering tools: https://rgitools.readthedocs.io/en/latest/tools.html#merging-glacier-clusters
@iamdonovan RGItools was an over-engineered attempt to generalize workflows, I think you would be much faster in grabbing the code you need here: https://github.com/GLIMS-RGI/rgitools/blob/master/rgitools/funcs.py#L194-L375
One thing I am unhappy about in the current version of the code is that we have a hardcoded buffer in which we search for intersects: https://github.com/GLIMS-RGI/rgitools/blob/master/rgitools/funcs.py#L242 . For RGI7 I wondered if we could work in projection space (intead of LatLon space) and use a threshold in meter instead...
rgitools
fails to install using pip in environments with newer versions of setuptools, due to a conflict with PEP440:I was able to fix this by changing changing line 86 from this:
FULLVERSION = rev.lstrip('v').replace(VERSION + '-', VERSION + '+')
to this:
FULLVERSION = rev.lstrip('v').replace(VERSION + '-', VERSION + '+').replace('-', '+', 1)
This fixes the version number error, and
rgitools
installs as expected: