Skip to content

Conversation

@valeriupredoi
Copy link
Contributor

@valeriupredoi valeriupredoi commented Feb 27, 2024

Description

Closes #2349

As @schlunma correctly points out in the issue, Pandas have not fixed a bug in 2.2.1 either, bug nicely described by Manu in #2305 (original PR with first pin):

This PR fixes recent test failures that are caused by a bug in pandas. This bug breaks the round function that we use to round to the nearest second:

new_datetimes = (year_month_day + day_float).round(
'S'
).dt.to_pydatetime()

In addition, this removes the use of two deprecated features:

  1. Replace 'S' by 's' (see https://pandas.pydata.org/pandas-docs/stable/user_guide/timeseries.html#offset-aliases)
  2. Surround DatetimeProperties.to_pydatetime by np.array as recommended in the deprecation message. Unfortunately, this does not remove the warning, but hopefully this will avoid problems in the future.

Link to documentation:


Before you get started

Checklist

It is the responsibility of the author to make sure the pull request is ready to review. The icons indicate whether the item will be subject to the 🛠 Technical or 🧪 Scientific review.


To help with the number pull requests:

@valeriupredoi valeriupredoi added installation Installation problem testing labels Feb 27, 2024
@codecov
Copy link

codecov bot commented Feb 27, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 94.11%. Comparing base (c9a5982) to head (c540c68).

❗ Current head c540c68 differs from pull request most recent head 7d6d3c7. Consider uploading reports for the commit 7d6d3c7 to get more accurate results

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2353   +/-   ##
=======================================
  Coverage   94.11%   94.11%           
=======================================
  Files         241      241           
  Lines       13381    13381           
=======================================
  Hits        12594    12594           
  Misses        787      787           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@schlunma schlunma added this to the v2.11.0 milestone Feb 27, 2024
Copy link
Contributor

@schlunma schlunma left a comment

Choose a reason for hiding this comment

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

Thanks V!

@valeriupredoi
Copy link
Contributor Author

Cheers Manu 🍺

@valeriupredoi valeriupredoi merged commit 2be264d into main Feb 27, 2024
@valeriupredoi valeriupredoi deleted the pin_pandas_yet_again branch February 27, 2024 17:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

installation Installation problem testing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[CI/GA] Tests fail with new issue (1 test)

3 participants