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

Support Python 3.12 #825

Merged
merged 11 commits into from
Mar 1, 2024
4 changes: 2 additions & 2 deletions .github/workflows/build-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ jobs:
docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: '3.10'

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ jobs:
name: ${{ matrix.os }} py${{ matrix.python-version }}

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: actions/setup-python@v4
- uses: actions/setup-python@v5

- name: Cache Python packages
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: |
~/.cache/pip
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pytest-legacy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: '3.10'

Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/pytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ jobs:
python-version:
- '3.10'
- '3.11'
- '3.12'

fail-fast: false

Expand All @@ -39,16 +40,16 @@ jobs:

# run tests without Matplotlib & CodeCode tests on earlier Python versions
- name: Test with pytest
if: ${{ matrix.python-version != '3.11' }}
if: ${{ matrix.python-version != '3.12' }}
run: pytest tests

# run tests with Matplotlib & CodeCov on latest Python version
- name: Test with pytest including Matplotlib & Codecov
if: ${{ matrix.python-version == '3.11' }}
if: ${{ matrix.python-version == '3.12' }}
run: pytest tests --mpl --cov=./ --cov-report=xml

- name: Upload coverage report to Codecov
if: ${{ matrix.os == 'ubuntu-latest' && matrix.python-version == '3.11' }}
if: ${{ matrix.os == 'ubuntu-latest' && matrix.python-version == '3.12' }}
uses: codecov/codecov-action@v3
with:
file: ./coverage.xml
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ pyam: analysis & visualization <br /> of integrated-assessment and macro-energy

<!-- replace python version by dynamic reference to pypi once Python versions are configured there -->
[![Code style: ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/charliermarsh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)
[![python](https://img.shields.io/badge/python-≥3.10,<3.12-blue?logo=python&logoColor=white)](https://github.com/IAMconsortium/pyam)
[![python](https://img.shields.io/badge/python-≥3.10,<3.13-blue?logo=python&logoColor=white)](https://github.com/IAMconsortium/pyam)
[![pytest](https://img.shields.io/github/actions/workflow/status/iamconsortium/pyam/pytest.yml?logo=GitHub&label=pytest)](https://github.com/IAMconsortium/pyam/actions/workflows/pytest.yml)
[![ReadTheDocs](https://readthedocs.org/projects/pyam-iamc/badge/?version=latest)](https://pyam-iamc.readthedocs.io/en/latest/?badge=latest)
[![codecov](https://codecov.io/gh/IAMconsortium/pyam/branch/main/graph/badge.svg)](https://codecov.io/gh/IAMconsortium/pyam)
Expand Down
1 change: 1 addition & 0 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Next release

- [#825](https://github.com/IAMconsortium/pyam/pull/825) Add support for Python 3.12
- [#824](https://github.com/IAMconsortium/pyam/pull/824) Update ixmp4 requirement to >=0.7.1
- [#821](https://github.com/IAMconsortium/pyam/pull/821) Introduce ruff
- [#818](https://github.com/IAMconsortium/pyam/pull/818) Use context manager for reading Excel file
Expand Down
2 changes: 1 addition & 1 deletion docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Release v\ |version|.
.. |ruff| image:: https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/charliermarsh/ruff/main/assets/badge/v2.json
:target: https://github.com/astral-sh/ruff

.. |python| image:: https://img.shields.io/badge/python-≥3.10,<3.12-blue?logo=python&logoColor=white
.. |python| image:: https://img.shields.io/badge/python-≥3.10,<3.13-blue?logo=python&logoColor=white
:target: https://github.com/IAMconsortium/pyam

.. |pytest| image:: https://img.shields.io/github/actions/workflow/status/iamconsortium/pyam/pytest.yml?logo=GitHub&label=pytest
Expand Down
10 changes: 5 additions & 5 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ classifiers =
[options]
packages = pyam
include_package_data = True
python_requires = >=3.10, <3.12
python_requires = >=3.10, <3.13

# NOTE TO DEVS
# If you change a minimum version below, please explicitly implement the change
Expand All @@ -28,23 +28,23 @@ python_requires = >=3.10, <3.12
install_requires =
iam-units >= 2020.4.21
ixmp4 >= 0.7.1
numpy >= 1.23.0, < 1.24
numpy >= 1.23.0
# requests included via ixmp4
# httpx[http2] included via ixmp4
openpyxl
pandas >= 2.0.0
pint >= 0.13
PyYAML
matplotlib >= 3.6.0, < 3.7.1
matplotlib >= 3.6.0
scipy >= 1.10.0
seaborn >= 0.11
six
setuptools >= 41
setuptools >= 69
setuptools_scm
wquantiles
xlsxwriter
setup_requires =
setuptools >= 41
setuptools >= 69
setuptools_scm

[options.extras_require]
Expand Down
Binary file modified tests/expected_figs/test_add_panel_label.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/expected_figs/test_barplot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/expected_figs/test_barplot_h.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/expected_figs/test_barplot_rc.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/expected_figs/test_barplot_stacked.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/expected_figs/test_barplot_stacked_net_line.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/expected_figs/test_barplot_stacked_order_by_list.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/expected_figs/test_barplot_stacked_order_by_rc.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/expected_figs/test_barplot_title.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/expected_figs/test_boxplot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/expected_figs/test_boxplot_hue.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/expected_figs/test_line_PYAM_COLORS.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/expected_figs/test_line_color.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/expected_figs/test_line_color_fill_between.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/expected_figs/test_line_color_fill_between_interpolate.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/expected_figs/test_line_color_final_ranges.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/expected_figs/test_line_filter_title.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/expected_figs/test_line_linestyle_legend.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/expected_figs/test_line_marker_legend.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/expected_figs/test_line_no_legend.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/expected_figs/test_line_plot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/expected_figs/test_line_plot_1_var.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/expected_figs/test_line_plot_2_vars.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/expected_figs/test_line_plot_bottom_legend.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/expected_figs/test_line_plot_cmap_color_arg.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/expected_figs/test_line_plot_dict_legend.png
Binary file modified tests/expected_figs/test_line_plot_label.png
Binary file modified tests/expected_figs/test_line_plot_label_color.png
Binary file modified tests/expected_figs/test_line_plot_order_by_dict.png
Binary file modified tests/expected_figs/test_line_plot_order_by_rc.png
Binary file modified tests/expected_figs/test_line_rm_legend_label.png
Binary file modified tests/expected_figs/test_line_single_color.png
Binary file modified tests/expected_figs/test_line_update_rc.png
Binary file modified tests/expected_figs/test_pie_plot_colors.png
Binary file modified tests/expected_figs/test_pie_plot_labels.png
Binary file modified tests/expected_figs/test_pie_plot_legend.png
Binary file modified tests/expected_figs/test_pie_plot_other.png
Binary file modified tests/expected_figs/test_scatter.png
Binary file modified tests/expected_figs/test_scatter_meta.png
Binary file modified tests/expected_figs/test_scatter_variables_with_meta_color.png
Binary file modified tests/expected_figs/test_scatter_with_lines.png
Binary file modified tests/expected_figs/test_stackplot.png
Binary file modified tests/expected_figs/test_stackplot_missing_zero_issue_266.png
Binary file modified tests/expected_figs/test_stackplot_negative.png
Binary file modified tests/expected_figs/test_stackplot_negative_emissions.png
Binary file modified tests/expected_figs/test_stackplot_order_by_list.png
Binary file modified tests/expected_figs/test_stackplot_order_by_rc.png
Binary file modified tests/expected_figs/test_stackplot_other.png
Loading