-
Notifications
You must be signed in to change notification settings - Fork 8
Revise the version of Pandas being targeted #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
Comments
I've been investigating the removal of the pinning of some of the dependencies, in particular,
finest.coords["finest_timeslice"] = index will need to become: finest = finest.drop_vars({"month", "finest_timeslice", "day", "hour"}).assign_coords(finest_timeslice=index) as In summary, even though we can increase Adapting MUSE to use the newest versions of |
Thanks. I often regret that we moved to xarray, rather than just sticking to pandas, as xarray constantly undergoes massive updates. I think we need the tool should be sustained in the long-term and that an upgrade to the newest packages seems crucial at this stage. I would leave to @ahawkes final considerations, as the refactoring time, if we decide to go for it, may require a conversation on the engagement plans. |
I think Thinking in the future, I think it is important not to kick the can down the road and when incompatibilities arise with any new version of any package, we fix them rather than pinning to an older version because that only makes the tool to accumulate technical debt until it explodes. Anyway, let's thing about it and maybe we can have a chat about how to best proceed. |
I've already started to work on this. Fixed a couple of issues, but I'm stuck in another. I've posted a question in StackOverflow in case someone can point me in the right direction: https://stackoverflow.com/questions/76471238/why-i-cannot-add-a-dataarray-to-an-existing-dataset-with-a-multiindex |
@sgiarols , it seems I might have hit a bug in 'xarray'. See pydata/xarray#7921 . I'm not sure if I will be able to help fixing it, but I'll keep an eye. If this is really a bug and is fixed, then I've the feeling our work refactoring 'muse' to work with the latest versions of 'xarray' and 'pandas' will be much easier. In the meantime, I'll work on other stuff. |
Following on this, the minimum working example meant to reproduce our problem that I described in pydata/xarray#7921 is working fine. It is unclear why it is not working for us. I suspect the culprit is in the timeslices, which are a really complex structure and might have been created in a way not fully compatible with the current way of doing things. I'm trying to get to a minimum working example that works with our structure. |
@sgiarols I'm going to pack this as it has been identified as a proper bug and added to the list of bugs to be sorted out related to indexes (see https://github.com/pydata/xarray/projects/1#card-89778835). Until that is sorted out, there's really not much point on us trying to make MUSE to work with modern versions of pandas and xarray. I will move to other stuff. |
While experimenting with extending the CI workflow (#119) to test on a matrix of python versions (3.8 - 3.11) and platforms (Linux, Windows and MacOS), tests failed for Python versions 3.10 and 3.11 on all platforms.
The cause of failure in each of these combinations was the targeting of
pandas<=1.3
. As per the documentation, Pandas 1.3 does not support Python versions 3.10+. The minimum version of Pandas which supports up to Python 3.11 is Pandas 1.5.Suggest investigating if MUSE's dependency of
pandas<=1.3
is still relevant and, is possible, switch to targetingpandas>=1.5
.The text was updated successfully, but these errors were encountered: