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

Add python3.12 #93

Open
peterdudfield opened this issue Mar 26, 2024 · 10 comments
Open

Add python3.12 #93

peterdudfield opened this issue Mar 26, 2024 · 10 comments
Labels
good first issue Good for newcomers

Comments

@peterdudfield
Copy link
Contributor

Detailed Description

Would be good if this ran for python3.12

Possible Implementation

  • run examples locally on python 3.12
  • run tests locally
  • Add to python 3.12 to CI
@peterdudfield peterdudfield added the good first issue Good for newcomers label Mar 27, 2024
@rahul-maurya11b
Copy link

@peterdudfield sir, can i take this one ?

@OyewoleRasheed
Copy link

@peterdudfield sir, I want to work on this. I'll start by running the project's examples locally using Python 3.12 to ensure compatibility and identify any potential issues. I will be glad to get the opportunity to work on this project. I'm an Electrical Engineer passionate about climate change and I am currently working with python as I am currently taking a machine learning course in my school and also learning data science with python on World Quant University. This project is something I want to contribute to and also learn more from. Thank you sir

@suleman1412
Copy link

I'd like to tackle this issue. After attempting to run the test in Python 3.12, it appears that there's an issue with compatibility. The test didn't execute as expected due to pv-site-prediction package not being supported in Python 3.12.
Any guidance or assistance would be greatly appreciated.

@shlok191
Copy link

shlok191 commented Mar 31, 2024

@peterdudfield, I think I understand what is going wrong here! :)
There are dependencies stemming from pv-site-prediction that are bound to python versions less than 3.12.

I tried to update the dependency versioning in the pyproject.toml, but unfortunately some dependencies' latest packages still do not support 3.12 yet! I've worked quite a bit on CI/CD, and I'd be happy to add 3.12 tests to the CI. It should work eventually when the dependencies catch up, but it might show you some failures in the shorter timespan.

Should I go ahead and add tests for 3.12 to CI?

@zakwatts
Copy link
Contributor

zakwatts commented Apr 2, 2024

Hi @shlok191! Thanks for pointing this out. You are correct in that currently pv-site-prediction is bound by:

[tool.poetry.dependencies] python = "^3.10,<3.12"
which would exclude version 3.12.

Can you find out which of the dependencies dont support 3.12 yet? Before we proceed with adding the 3.12 tests, let's take a step back and review our current dependencies to pinpoint which ones specifically lack support for Python 3.12. :)

@shlok191
Copy link

shlok191 commented Apr 2, 2024

@zakwatts, absolutely!

It is the pandas-stubs library that does not support python 3.12 yet. There could potentially be more (the dependency check could just be failing at the first dependency error), but from what I see it is this library only.

Here is the official error:
pandas-stubs requires Python >=3.8,<3.12, so it will not be satisfied for Python >=3.12,<4.0

I really like what you all are working on, and I would love to help out more! Let me know if there's anything else for me to possibly help out with :)

@Clemo97
Copy link
Contributor

Clemo97 commented Jul 5, 2024

@zakwatts how did you go about finding what the issue, essentially i'm curious about the techniques you used to identify and isolate the issue to that specific library?
Also are you still working on fixing this issue as I just experienced it today and it gave me quite the headache since I just moved to Ubuntu 22.04, which has python 3.12.3 ?

@Clemo97
Copy link
Contributor

Clemo97 commented Jul 5, 2024

@peterdudfield I think @zakwatts was right in the [pv-site-prediction](https://github.com/openclimatefix/pv-site-predictionl) repo i checked the pyproject.toml file and pandas-stubs = "^1.5.2.221213" is only compatible with python 3.11 version.
Hence the error;
Screenshot from 2024-07-05 19-13-06

See here for reference https://pypi.org/project/pandas-stubs/1.5.2.221213/
I suggest upgrading pandas-stubs to the latest version pandas-stubs==2.2.2.240603 released on Jun 3 2024.

Check https://pypi.org/project/pandas-stubs/#history

I'll keep checking the other dependencies to see if any are still outdated and not compatible with the latest Python 3.12, since there's alot of them it'll take awhile

@zakwatts
Copy link
Contributor

zakwatts commented Jul 8, 2024

Hi @Clemo97! Thanks for picking this up. It was a little while ago when I did this, but essentially as i work on the pv-site-predicition model i think I knew that this was likely causing some dependency problems. Thanks for letting us know about the new version of pandas-stubs! When i get the chance i should be able to update this at somepoint and hopefully that should allow us to update Open Quartz to python 3.12. Thanks!

@Clemo97
Copy link
Contributor

Clemo97 commented Jul 9, 2024

@zakwatts Since the issue exists in pv-site-prediction, I believe the issue should be addressed there.
I'll create an issue in that repo and continue working on it, I also found more than one dependency issue apart from pandas-stubs

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

No branches or pull requests

7 participants