diff --git a/.github/workflows/post-process.yml b/.github/workflows/post-process.yml index 60889a3..fc8a94a 100644 --- a/.github/workflows/post-process.yml +++ b/.github/workflows/post-process.yml @@ -34,7 +34,6 @@ jobs: max-parallel: 6 matrix: version: - - { python: "3.9", resolution: highest, extras: testing } - { python: "3.10", resolution: lowest-direct, extras: testing } - { python: "3.11", resolution: highest, extras: testing } - { python: "3.12", resolution: lowest-direct, extras: testing } @@ -43,10 +42,6 @@ jobs: - macos-latest - windows-latest - macos-14 - exclude: - - {version: { - python: "3.9" }, - os: macos-14 } runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/testing.yaml b/.github/workflows/testing.yaml index 0522a69..00e9a92 100644 --- a/.github/workflows/testing.yaml +++ b/.github/workflows/testing.yaml @@ -23,7 +23,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v5 with: - python-version: 3.11 + python-version: "3.11" cache: pip - name: Run pre-commit run: | @@ -36,7 +36,7 @@ jobs: max-parallel: 6 matrix: # for most PRs, test the min and max supported python on every platform, test all python on ubuntu - python-version: ["3.9", "3.12"] + python-version: ["3.10", "3.12"] os: - ubuntu-latest - macos-latest @@ -47,10 +47,6 @@ jobs: python-version: "3.10" - os: ubuntu-latest python-version: "3.11" - # no python 3.9 on the macos-14 runner - exclude: - - os: macos-14 - python-version: "3.9" runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 @@ -77,7 +73,7 @@ jobs: - name: Setup Python uses: actions/setup-python@v5 with: - python-version: 3.9 + python-version: "3.10" - name: Install tox run: | python -m pip install tox diff --git a/.github/workflows/upgrade_dependencies.yml b/.github/workflows/upgrade_dependencies.yml index 2180493..b49711c 100644 --- a/.github/workflows/upgrade_dependencies.yml +++ b/.github/workflows/upgrade_dependencies.yml @@ -6,7 +6,7 @@ on: workflow_dispatch: # Allow running on-demand schedule: # Runs on the 10th day of every month at 8:00 UTC (4:00 Eastern) - - cron: '0 8 10 * *' + - cron: "0 8 10 * *" jobs: upgrade: @@ -14,9 +14,9 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: ['ubuntu-latest', 'macos-latest', 'windows-latest'] + os: ["ubuntu-latest", "macos-latest", "windows-latest"] package: ["."] - python-version: ["3.9", "3.10", "3.11", "3.12"] + python-version: ["3.10", "3.11", "3.12"] steps: - uses: actions/checkout@v4 with: @@ -24,7 +24,7 @@ jobs: - uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} - cache: 'pip' + cache: "pip" - name: Upgrade Python dependencies shell: bash run: | diff --git a/README.md b/README.md index a7a4698..5f33fdf 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ [![Read the Docs](https://img.shields.io/readthedocs/pyeql)](https://pyeql.readthedocs.io/en/latest/) [![testing](https://github.com/KingsburyLab/pyeql/workflows/testing/badge.svg)](https://github.com/KingsburyLab/pyeql/actions?query=workflow%3Atesting) [![codecov](https://codecov.io/gh/KingsburyLab/pyeql/branch/main/graph/badge.svg?token=I7RP0QML6S)](https://codecov.io/gh/KingsburyLab/pyeql) -![Supported python versions](https://img.shields.io/badge/python-3.9%20%7C%203.10%20%7C%203.11%20%7C%203.12-blue) +![Supported python versions](https://img.shields.io/badge/python-3.10%20%7C%203.11%20%7C%203.12-blue) [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.8332915.svg)](https://doi.org/10.5281/zenodo.8332915) [![PyPI version](https://badge.fury.io/py/pyEQL.svg)](https://badge.fury.io/py/pyEQL) [![status](https://joss.theoj.org/papers/bdd9e247ea9736a0fdbbd5fe12bef7a6/status.svg)](https://joss.theoj.org/papers/bdd9e247ea9736a0fdbbd5fe12bef7a6) @@ -65,7 +65,7 @@ Detailed documentation is available at [https://pyeql.readthedocs.io/](https://p ### Dependencies -- Python 3.9+. This project will attempt to adhere to NumPy's +- Python 3.10+. This project will attempt to adhere to NumPy's [NEP 29](https://numpy.org/neps/nep-0029-deprecation_policy.html) deprecation policy for older version of Python. - [pint](https://github.com/hgrecco/pint) - for units-aware calculations diff --git a/docs/requirements.txt b/docs/requirements.txt index 3c48c08..1e58384 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -4,7 +4,7 @@ pint>=0.19 numpy scipy -pymatgen>=2023.10.11 +pymatgen>=2024.9.10 iapws monty maggma diff --git a/pyproject.toml b/pyproject.toml index 08756c0..9f26863 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -18,12 +18,12 @@ classifiers=[ "Topic :: Scientific/Engineering", ] license = {file = "LICENSE"} -requires-python = ">=3.9" +requires-python = ">=3.10" dependencies = [ "pint>=0.19", "numpy>1.26,<2", "scipy>=1.12", - "pymatgen==2024.5.1", + "pymatgen>=2024.9.10", "iapws>=1.5.3", "monty>=2024.7.12", "maggma>=0.67.0", diff --git a/tests/test_phreeqc.py b/tests/test_phreeqc.py index fcec742..e89e753 100644 --- a/tests/test_phreeqc.py +++ b/tests/test_phreeqc.py @@ -131,7 +131,7 @@ def test_conductivity(s1): # even an empty solution should have some conductivity assert s1.conductivity > 0 - for conc, cond in zip([0.001, 0.05, 0.1], [123.68, 111.01, 106.69]): + for conc, cond in zip([0.001, 0.05, 0.1], [123.68, 111.01, 106.69], strict=False): s1 = Solution({"Na+": f"{conc} mol/L", "Cl-": f"{conc} mol/L"}) assert np.isclose( s1.conductivity.to("S/m").magnitude, conc * cond / 10, atol=0.5 @@ -142,7 +142,7 @@ def test_conductivity(s1): assert np.isclose(s1.conductivity.to("mS/cm").magnitude, 145, atol=10) # MgCl2 - for conc, cond in zip([0.001, 0.05, 0.1], [124.15, 114.49, 97.05]): + for conc, cond in zip([0.001, 0.05, 0.1], [124.15, 114.49, 97.05], strict=False): s1 = Solution({"Mg+2": f"{conc} mol/L", "Cl-": f"{2*conc} mol/L"}) assert np.isclose( s1.conductivity.to("S/m").magnitude, 2 * conc * cond / 10, atol=1 @@ -232,7 +232,7 @@ def test_equilibrate(s1, s2, s5_pH, s6_Ca, caplog): set(s5_pH.components.keys()) s5_pH.equilibrate() assert np.isclose(s5_pH.get_total_amount("Ca", "mol").magnitude, 0.001) - assert np.isclose(s5_pH.get_total_amount("C(4)", "mol").magnitude, 0.001) + assert np.isclose(s5_pH.get_total_amount("C(4)", "mol").magnitude, 0.001, atol=1e-7) # due to the large pH shift, water mass and density need not be perfectly conserved assert np.isclose(s5_pH.solvent_mass.magnitude, orig_solv_mass, atol=1e-3) assert np.isclose(s5_pH.density.magnitude, orig_density, atol=1e-3)