-
Notifications
You must be signed in to change notification settings - Fork 120
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
Fix ixmp4 tests and support Python 3.12 #820
Conversation
I'm wondering about the pytest-legacy workflow: won't these lines install the legacy packages first, but then update them? |
Please note that while applying ruff to the code base, I didn't take the time to make all your functions compatible with the code complexity limit we set for ixmp4. Instead, please search for Also, I'd recommend using mypy to automatically detect issues like the following: def validate(
self,
criteria: dict = None,
*,
upper_bound: float = None,
lower_bound: float = None,
exclude_on_fail: bool = False,
**kwargs,
) -> pd.DataFrame: The type hints are off. Someone could think it's okay to not set e.g. |
Sorry, looks like I missed one notebook. Feel free to cancel the tests and restart. |
No, the second |
Re @glatterf42' comment about the |
@glatterf42, thanks for the quick updates on this PR. To me it currently combines three sets of changes that should be their own PRs:
So if you don't mind, I'd suggest that you close this PR and open two new ones for points 1. and 2. above. |
As discussed just now, #821 is for ruff and we'll just remove the workaround for the failing test from here once ixmp4 releases 0.7.1, so no need for a third PR. |
Closing in favor of #821 |
Okay, then I'll open another PR with commits cherry-picked from here to support Python 3.12. Note to self: I also need to update the badge in |
Please confirm that this PR has done the following:
Description of PR
FYI @meksor, @phackstock, @danielhuppmann.
This PR fixes the test failure reported in iiasa/ixmp4#50 by configuring dask to not convert
None
tostring[pyarrow_numpy]
. This is following the suggested workaround in dask/dask#10631 (comment), which is not a sustainable solution, which might be provided by dask/dask-expr#691.Coincidentally, I ran the tests in a local venv of Python 3.12 and they all seem to pass (after adapting a matplotlib option in one tutorial), so this PR might close #798. For that, the steps suggested in setup.cfg still have to be executed because of minimum version bumps and the release notes/docs have to be updated as suggested above.
@phackstock please let me know if you want me to finish the PR or if you want to take a look (since the python support might be non-trivial and a new release would then probably be warranted).