khaeru / sdmx

SDMX information model and client in Python
https://sdmx1.readthedocs.io
Apache License 2.0
24 stars 18 forks source link

Adjust _maybe_convert_datetime for pandas 2.2.x #156

Closed khaeru closed 8 months ago

khaeru commented 8 months ago

Pandas 2.2.0 (release 2024-01-19) deprecated "M" as an offset prefix; see the release notes. This however remains a valid frequency;

PeriodDtype(freq="M")

…still works.

Housekeeping:

PR checklist

codecov[bot] commented 8 months ago

Codecov Report

Attention: 1 lines in your changes are missing coverage. Please review.

Comparison is base (e76b520) 98.63% compared to head (7c98d01) 96.50%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #156 +/- ## ========================================== - Coverage 98.63% 96.50% -2.14% ========================================== Files 87 87 Lines 7052 7043 -9 ========================================== - Hits 6956 6797 -159 - Misses 96 246 +150 ``` | [Files](https://app.codecov.io/gh/khaeru/sdmx/pull/156?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Paul+Natsuo+Kishimoto) | Coverage Δ | | |---|---|---| | [sdmx/client.py](https://app.codecov.io/gh/khaeru/sdmx/pull/156?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Paul+Natsuo+Kishimoto#diff-c2RteC9jbGllbnQucHk=) | `92.97% <100.00%> (-4.87%)` | :arrow_down: | | [sdmx/format/\_\_init\_\_.py](https://app.codecov.io/gh/khaeru/sdmx/pull/156?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Paul+Natsuo+Kishimoto#diff-c2RteC9mb3JtYXQvX19pbml0X18ucHk=) | `100.00% <100.00%> (+3.50%)` | :arrow_up: | | [sdmx/format/xml/common.py](https://app.codecov.io/gh/khaeru/sdmx/pull/156?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Paul+Natsuo+Kishimoto#diff-c2RteC9mb3JtYXQveG1sL2NvbW1vbi5weQ==) | `100.00% <100.00%> (ø)` | | | [sdmx/tests/format/test\_format\_xml.py](https://app.codecov.io/gh/khaeru/sdmx/pull/156?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Paul+Natsuo+Kishimoto#diff-c2RteC90ZXN0cy9mb3JtYXQvdGVzdF9mb3JtYXRfeG1sLnB5) | `100.00% <100.00%> (ø)` | | | [sdmx/tests/reader/test\_reader\_xml.py](https://app.codecov.io/gh/khaeru/sdmx/pull/156?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Paul+Natsuo+Kishimoto#diff-c2RteC90ZXN0cy9yZWFkZXIvdGVzdF9yZWFkZXJfeG1sLnB5) | `100.00% <100.00%> (ø)` | | | [sdmx/tests/test\_dataset.py](https://app.codecov.io/gh/khaeru/sdmx/pull/156?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Paul+Natsuo+Kishimoto#diff-c2RteC90ZXN0cy90ZXN0X2RhdGFzZXQucHk=) | `100.00% <100.00%> (ø)` | | | [sdmx/tests/test\_dataset\_ss.py](https://app.codecov.io/gh/khaeru/sdmx/pull/156?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Paul+Natsuo+Kishimoto#diff-c2RteC90ZXN0cy90ZXN0X2RhdGFzZXRfc3MucHk=) | `100.00% <100.00%> (ø)` | | | [sdmx/tests/writer/test\_pandas.py](https://app.codecov.io/gh/khaeru/sdmx/pull/156?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Paul+Natsuo+Kishimoto#diff-c2RteC90ZXN0cy93cml0ZXIvdGVzdF9wYW5kYXMucHk=) | `100.00% <100.00%> (ø)` | | | [sdmx/writer/pandas.py](https://app.codecov.io/gh/khaeru/sdmx/pull/156?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Paul+Natsuo+Kishimoto#diff-c2RteC93cml0ZXIvcGFuZGFzLnB5) | `93.36% <95.45%> (+1.44%)` | :arrow_up: | ... and [17 files with indirect coverage changes](https://app.codecov.io/gh/khaeru/sdmx/pull/156/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Paul+Natsuo+Kishimoto)
khaeru commented 8 months ago

FYI @goatsweater—I just realized that the code from #154 used the latest release from this repo:

There is also a release of the SDMX-ML 2.1 schemas in the other/current SDMX-ML repository:

So, I've switched the code to point to the latter.