Skip to content

Commit

Permalink
Bump minimum required version of pandas to 1.5
Browse files Browse the repository at this point in the history
  • Loading branch information
danielhuppmann committed Aug 22, 2023
1 parent c85d17a commit 2a0d7e8
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/pytest-legacy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
- name: Install specific out-dated version of dependencies
# Update the package requirements when changing minimum dependency versions
# Please also add a section "Dependency changes" to the release notes
run: pip install pandas==1.2.0 numpy==1.19.0 matplotlib==3.5.0 iam-units==2020.4.21 xlrd==2.0 pint==0.13
run: pip install pandas==1.5.0 numpy==1.19.0 matplotlib==3.5.0 iam-units==2020.4.21 xlrd==2.0 pint==0.13

- name: Install other dependencies and package
run: pip install .[tests,optional_plotting,optional_io_formats,tutorials]
Expand Down
4 changes: 3 additions & 1 deletion RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
# Next Release

The next release must bump the major version number.
Reactivate tests for Python 3.11 once ixmp4 0.3 is released.
Reactivate tests for Python 3.11 once ixmp4 0.3 is released.

## Dependency changes

Support for Python 3.7-3.9 was removed due to an incompatible dependency.

PR [#766](https://github.com/IAMconsortium/pyam/pull/766) added the **ixmp4** package
for better integration with the IIASA scenario database infrastructure.

Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ install_requires =
httpx[http2]
openpyxl
# remove exception in test_io.py when changing requirement to pandas ≥ 1.5
pandas >= 1.2.0
pandas >= 1.5.0
scipy
pint >= 0.13
PyYAML
Expand Down
6 changes: 1 addition & 5 deletions tests/test_io.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,7 @@ def test_io_csv_none(test_df_year):
"model_a,scen_a,World,Primary Energy|Coal,EJ/yr,0.5,3.0\n"
"model_a,scen_b,World,Primary Energy,EJ/yr,2.0,7.0\n"
)
try:
assert test_df_year.to_csv(lineterminator="\n") == exp
# special treatment for pandas < 1.5 (used in the legacy tests)
except TypeError:
assert test_df_year.to_csv(line_terminator="\n") == exp
assert test_df_year.to_csv(lineterminator="\n") == exp


@pytest.mark.parametrize(
Expand Down

0 comments on commit 2a0d7e8

Please sign in to comment.