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

Update to be compatible with Pandas 2.2 #72

Merged
merged 7 commits into from
Mar 11, 2024
Merged

Update to be compatible with Pandas 2.2 #72

merged 7 commits into from
Mar 11, 2024

Conversation

ClaireDons
Copy link
Contributor

Fixed the following:

  • "ME" to "M"
  • time showing in cal.show() and breaking doctests
  • removed black and isort from dev readme

lilio/utils.py Outdated
Comment on lines 119 to 120
if "ME" or "MS" in data_freq:
data_freq = data_freq.replace("ME", "M").replace("MS", "M")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do note that this resolves to

(if "ME") or (if "MS" in data_freq)

and if "blabla" resolves to True. Anything but 0, False, None and empty iterators resolve to True.

But the whole if statement here is not needed, you can move it down to be after the if isinstance(data_freq, str):.

Copy link
Contributor

@BSchilperoort BSchilperoort left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The only comment on the code is the one I added previously.

Otherwise things look good.

Perhaps it can be nice to see if you can fix the tests on your machine with this PR from Peter: phenology/springtime#164 (comment)

Copy link

sonarcloud bot commented Mar 11, 2024

@ClaireDons ClaireDons merged commit 81683f9 into main Mar 11, 2024
16 checks passed
@ClaireDons ClaireDons deleted the pandas-update branch March 11, 2024 11:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants