Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python 3.13 preparation #2201

Open
mikofski opened this issue Sep 7, 2024 · 7 comments
Open

Python 3.13 preparation #2201

mikofski opened this issue Sep 7, 2024 · 7 comments
Labels

Comments

@mikofski
Copy link
Member

mikofski commented Sep 7, 2024

Is your feature request related to a problem? Please describe.
Final release candidate of Python 3.13 announced. Requests upstream for prep

Describe the solution you'd like
As Python 3.13 to test matrix similar to RdTools

Describe alternatives you've considered
Put upper bound on Python compatibility

Additional context
See Google group discussion on py3.13rc02.

@kandersolar
Copy link
Member

@RDaxini or @IoannisSifnaios, any interest in continuous integration (CI) infrastructure management? Adding python 3.13 to the test matrix would be a good way to dip your toes into that world :)

Note that we can't start testing on 3.13 just yet since some of pvlib's dependencies (e.g. h5py) haven't released wheels for it yet. So Step 0 here is just to check in on the dependencies every once in a while. Once those wheels are available, we'll modify the GitHub Actions workflow files to include 3.13. See #1886 for an example of what that looks like.

@RDaxini
Copy link
Contributor

RDaxini commented Sep 9, 2024

@kandersolar Sure I am interested.

I was reviewing #1886 as advised and I noticed here that although some of the dependencies were unavailable in python 3.12, e.g. numba, this does not seem to have been a problem(?) ---why not?

This is not something with which I have any experience so I might just be missing/misunderstanding something obvious 😅

@kandersolar
Copy link
Member

It's a good question! The reason is that some of pvlib's dependencies are required while others are merely optional. "Required" means that pip install pvlib will fail if pip can't locate a suitable installation file for the dependency. "Optional" ones are not required for installation to succeed, but of course some pvlib functionality is not available unless the relevant dependency is installed. Our tests are configured such that tests for that functionality get skipped if the relevant optional dependency isn't installed.

You can check that the dependencies omitted in #1886 are all optional dependencies as defined in pyproject.toml:

dependencies = [
'numpy >= 1.17.3',
'pandas >= 1.3.0',
'pytz',
'requests',
'scipy >= 1.6.0',
'h5py',
]

[project.optional-dependencies]
optional = [
'cython',
'ephem',
'nrel-pysam',
'numba >= 0.17.0',
'solarfactors',
'statsmodels',
]

And just to finish the story, we did add those dependencies back in once wheels became available: #1964

@IoannisSifnaios
Copy link
Contributor

@kandersolar is there an easy way of finding which optional dependencies do not work with python 3.13? E.g., if we make a PR, would we get an error about which ones are not compatible? Or do we have to manually check each one of them to see if it is 3.13 compatible or not?

@kandersolar
Copy link
Member

Yes a PR would certainly tell you whether the package landscape is sufficiently progressed for us to start using it for pvlib. I suppose there is no harm in opening a PR now, with the expectation that it will remain open for some time waiting for the dependencies to become available. In fact the current roadblock may be whether python 3.13 itself is installable on the CI yet :P

@echedey-ls
Copy link
Contributor

We need to bring back the discussion of solarfactors again pvlib/solarfactors#16
There will certainly be problems with all the code that relies on solarfactors.

@IoannisSifnaios
Copy link
Contributor

Yes a PR would certainly tell you whether the package landscape is sufficiently progressed for us to start using it for pvlib. I suppose there is no harm in opening a PR now, with the expectation that it will remain open for some time waiting for the dependencies to become available. In fact the current roadblock may be whether python 3.13 itself is installable on the CI yet :P

Makes sense! I guess we should at least wait for the official release (1/10/2024)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants