Open echedey-ls opened 4 months ago
@echedey-ls As I mentioned elsewhere, setuptools-scm has served me well for simplifying and streamlining Python versioning in a pyproject.toml file for package configuration. It is even mentioned by the Python Packaging Authority for setuptools-based builds that use SCM:
https://setuptools.pypa.io/en/latest/userguide/pyproject_config.html .
If you desire to take this on, then I’d be happy to advise further and review.
See also: https://github.com/NREL/PVDegradationTools/pull/37
Yes, I completely agree with you. It makes much more sense to use the same packaging infrastructure all along the pvlib organization - that is using setuptools-scm and dropping versioneer among other changes this repo would need. Right now I'm pursuing that path, thou it isn't going exactly well.
I've seen the pvdeg
package, but it's pinned to Python versions lower than 3.12. This specific problem I'm trying to address is specific to python 3.12.
You're gonna laugh at me: the problem is that latest shapely before v2 is 1.8.5, and that one does NOT support Py3.12. Source: https://pypi.org/project/shapely/1.8.5.post1/#files
The least Pythonic Python moment be like :(
EDIT: @kandersolar , may I push #4 forward? It would also help my PR at https://github.com/pvlib/pvlib-python/pull/2106
You're gonna laugh at me: the problem is that latest shapely before v2 is 1.8.5, and that one does NOT support Py3.12. Source: https://pypi.org/project/shapely/1.8.5.post1/#files
@echedey-ls People may call me paranoid, but this is why I don't promise compatibility of pvfit
with future Python releases: https://github.com/markcampanelli/pvfit/blob/v0.0.1/pyproject.toml#L15
It's pretty hard to predict the future of complex systems :).
Yep, shapely is the issue. Sorry @echedey-ls you had to figure it out on your own -- I should have opened an issue documenting it long ago :)
Help on #4 would certainly be welcome, but beware -- it is no small task. I've tried several times to make progress on that PR, but I get lost every time and say "some day when I have a week of free time, I will work on this".
I think at this point we should try to break down the broader "get rid of shapely" task into smaller pieces and then work on them one PR at a time, instead of trying to do it all in one big PR. If you are interested in helping with this, that would be great!
A pretty noob question here. What is the challenge in bumping the shapely version to 2.0.5? If we keep aside the removal of shapely completely what stops for pinning the requirement to shapely version 2.0.5. I have just added a 3.12 python test matrix to my workspace and this seems to be breaking for me.
Shapely 2.0 changed many parts of its API, meaning that code written for Shapely 1. does not work with Shapely 2.\. So we cannot simply update the allowed version of shapely--perhaps the installation would succeed, but trying to use it would just result in errors. See also https://github.com/SunPower/pvfactors/issues/126
There are two ways forward here: either the code needs to be rewritten to be compatible with 2.*, or the dependency on shapely needs to be removed entirely.
Describe the bug I can't install solarfactors on Ubuntu 22.04 LTS.
To Reproduce Steps to reproduce the behavior:
Output:
Expected behavior solarfactors to be installed correctly on Python 3.12
Screenshots N/A
Versions:
pvlib.__version__
: N/Apandas.__version__
: N/AAdditional context Versioneer issue for Py3.12, version giving the error matches some comment: https://github.com/python-versioneer/python-versioneer/issues/375 Versioneer updating guidelines: https://github.com/python-versioneer/python-versioneer/blob/master/UPGRADING.md
User error: https://groups.google.com/g/pvlib-python/c/0h-h7LBCvtQ
I found the error
It is due to the pinned version of shapely. Shapely <2 does limit the setuptools version to <63, which relies in features removed in Py3.12