diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 57724f0c..1197d1bc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,7 +15,7 @@ jobs: strategy: matrix: os: [ubuntu-latest, windows-latest] - python-version: ['3.8', '3.11'] + python-version: ['3.9', '3.11'] steps: - uses: actions/checkout@v4 @@ -39,7 +39,7 @@ jobs: uses: coverallsapp/github-action@v2 with: file: coverage.xml - if: ${{ matrix.python-version == 3.8 && matrix.os == 'ubuntu-latest' }} + if: ${{ matrix.python-version == 3.9 && matrix.os == 'ubuntu-latest' }} env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/python-publish.yml b/.github/workflows/python-publish.yml index 87b8ad19..3473fecc 100644 --- a/.github/workflows/python-publish.yml +++ b/.github/workflows/python-publish.yml @@ -17,7 +17,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v4 with: - python-version: '3.8' + python-version: '3.9' - name: Install dependencies run: | python -m pip install --upgrade pip diff --git a/README.md b/README.md index d0018dd9..727254f5 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ This project is a library for running [System Dynamics](http://en.wikipedia.org/wiki/System_dynamics) (SD) models in Python, with the purpose of improving integration of *Big Data* and *Machine Learning* into the SD workflow. -**The current version needs to run at least Python 3.8.** +**The current version needs to run at least Python 3.9.** ## Resources diff --git a/docs/conf.py b/docs/conf.py index fa1193b6..3b98ca8c 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -152,7 +152,7 @@ ] intersphinx_mapping = { - 'python': ('https://docs.python.org/3.8', None), + 'python': ('https://docs.python.org/3.9', None), 'pysdcookbook': ('http://pysd-cookbook.readthedocs.org/en/latest/', None), 'pandas': ('https://pandas.pydata.org/docs/', None), 'xarray': ('https://docs.xarray.dev/en/stable/', None), diff --git a/docs/installation.rst b/docs/installation.rst index 3df59b6a..154199d5 100644 --- a/docs/installation.rst +++ b/docs/installation.rst @@ -37,7 +37,7 @@ In the source directory use the command: Required Dependencies --------------------- -PySD requires **Python 3.8** or above. +PySD requires **Python 3.9** or above. PySD builds on the core Python data analytics stack, and the following third party libraries: @@ -45,7 +45,7 @@ PySD builds on the core Python data analytics stack, and the following third par * Scipy * Pandas (with Excel support: `pip install pandas[excel]`) * Parsimonious -* xarray +* xarray >= 2023.09 * lxml * regex * chardet diff --git a/docs/whats_new.rst b/docs/whats_new.rst index cf239fbc..f0506cec 100644 --- a/docs/whats_new.rst +++ b/docs/whats_new.rst @@ -7,7 +7,7 @@ New Features Breaking changes ~~~~~~~~~~~~~~~~ -- Remove support for Python 3.7. (`@enekomartinmartinez `_) +- Remove support for Python 3.7 and 3.8. (`@enekomartinmartinez `_) - Update the cellrange retrievel to be compatible with :py:mod:`openpyxl` >= 3.1. It breaks the code for lower versions. (`@enekomartinmartinez `_) Deprecations @@ -27,7 +27,7 @@ Performance Internal Changes ~~~~~~~~~~~~~~~~ - Update libraries used for building documentation and `.readthedocs.yml`. (`@enekomartinmartinez `_) -- Avoid conflicting :py:mod:`xarray` versions. (`@enekomartinmartinez `_) +- Force to use :py:mod:`xarray` >= 2023.09. (`@enekomartinmartinez `_) - Use `pandas[excel]` instead of xlrd dependency in the requirements. (`@gdrosos `_) diff --git a/pysd/pysd.py b/pysd/pysd.py index 2ef1d695..66e103ce 100644 --- a/pysd/pysd.py +++ b/pysd/pysd.py @@ -11,11 +11,11 @@ from pysd.py_backend.model import Model -if sys.version_info[:2] < (3, 8): # pragma: no cover +if sys.version_info[:2] < (3, 9): # pragma: no cover raise RuntimeError( "\n\n" + "Your Python version is no longer supported by PySD.\n" - + "The current version needs to run at least Python 3.8." + + "The current version needs to run at least Python 3.9." + " You are running:\n\tPython " + sys.version + "\nPlease update your Python version or use the last " diff --git a/requirements.txt b/requirements.txt index 9e3e9cc1..2d303804 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,7 +1,7 @@ numpy<1.24 pandas[excel] parsimonious -xarray!=2023.8,!=2023.9 +xarray>=2023.9 lxml regex chardet diff --git a/setup.py b/setup.py index ba654124..8fc393e2 100755 --- a/setup.py +++ b/setup.py @@ -6,7 +6,7 @@ setup( name='pysd', version=__version__, - python_requires='>=3.8', + python_requires='>=3.9', author='PySD contributors', packages=find_packages(exclude=['docs', 'tests', 'dist', 'build']), url='https://github.com/SDXorg/pysd', @@ -22,7 +22,6 @@ 'Topic :: Scientific/Engineering :: Information Analysis', 'Intended Audience :: Science/Research', - 'Programming Language :: Python :: 3.8', 'Programming Language :: Python :: 3.9', 'Programming Language :: Python :: 3.10', 'Programming Language :: Python :: 3.11', diff --git a/tests/pytest_types/data/pytest_data.py b/tests/pytest_types/data/pytest_data.py index 0a761223..0f213308 100644 --- a/tests/pytest_types/data/pytest_data.py +++ b/tests/pytest_types/data/pytest_data.py @@ -109,7 +109,7 @@ def test_invalid_interp_method(self): xr.DataArray([1, 2], {"dim": ["A", "B"]}, ["dim"]) ]), xr.DataArray( - [[[1, 2], [1, 2]], [[10, 20], [10, 20]], [[1, 2], [1, 2]]], + [[[1, 1], [2, 2]], [[10, 10], [20, 20]], [[1, 1], [2, 2]]], {"time": [1, 20, 40], "dim":["A", "B"], "dim2": ["C", "D"]}, ["time", "dim", "dim2"]) ) diff --git a/tests/pytest_types/lookup/pytest_lookups.py b/tests/pytest_types/lookup/pytest_lookups.py index 740c0607..be5379fd 100644 --- a/tests/pytest_types/lookup/pytest_lookups.py +++ b/tests/pytest_types/lookup/pytest_lookups.py @@ -68,7 +68,7 @@ xr.DataArray([1, 2], {"dim": ["A", "B"]}, ["dim"]) ]), xr.DataArray( - [[[1, 2], [1, 2]], [[10, 20], [10, 20]], [[1, 2], [1, 2]]], + [[[1, 1], [2, 2]], [[10, 10], [20, 20]], [[1, 1], [2, 2]]], { "lookup_dim": [1, 20, 40], "dim":["A", "B"],