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

Drop python 3.7 support, bump Scipy, Pint, h5py requirements #284

Merged
merged 5 commits into from
Sep 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 3 additions & 6 deletions .github/workflows/build_upload_pypi_wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
strategy:
matrix:
os: [windows-latest, macos-latest, ubuntu-latest]
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11']
python-version: ['3.8', '3.9', '3.10', '3.11']
include:
- os: windows-latest
wheelname: win
Expand All @@ -19,15 +19,12 @@ jobs:
- os: ubuntu-latest
wheelname: manylinux
# Build wheels against the lowest compatible Numpy version
- python-version: 3.7
manylinux-version-tag: cp37
numpy-version: 1.14.5
- python-version: 3.8
manylinux-version-tag: cp38
numpy-version: 1.17.3
numpy-version: 1.19.5
- python-version: 3.9
manylinux-version-tag: cp39
numpy-version: 1.19.3
numpy-version: 1.19.5
- python-version: 3.10
manylinux-version-tag: cp310
numpy-version: 1.21.3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/create-landing-page.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
ref: gh-pages
- uses: actions/setup-python@v4
with:
python-version: 3.7
python-version: 3.8
- name: Update pip and install dependencies
run: |
python -m pip install --upgrade pip
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/run_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@ jobs:
run: |
python -m pip install --upgrade pip
python -m pip install -r tests_and_analysis/ci_requirements.txt
- name: Run tests, skip Python 3.8, 3.9, 3.10 unless workflow dispatch
- name: Run tests, skip Python 3.9, 3.10 unless workflow dispatch
if: github.event_name != 'workflow_dispatch'
env:
TOX_SKIP_ENV: '.*?(py38|py39|py310).*?'
TOX_SKIP_ENV: '.*?(py39|py310).*?'
shell: bash -l {0}
run: python -m tox
- name: Run tests, workflow dispatch so test all Python versions
Expand Down Expand Up @@ -67,7 +67,7 @@ jobs:
- uses: actions/checkout@v3
- uses: conda-incubator/setup-miniconda@v2
with:
python-version: 3.7
python-version: 3.8
- name: Update pip and install dependencies
shell: bash -l {0}
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- uses: actions/checkout@v3
- uses: conda-incubator/setup-miniconda@v2
with:
python-version: 3.7
python-version: 3.8
- name: Install llvm on Macos
if: startsWith(matrix.os, 'macos')
run: brew install llvm
Expand Down
2 changes: 1 addition & 1 deletion .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ sphinx:

# Optionally set the version of Python and requirements required to build your docs
python:
version: 3.7
version: 3.8
install:
- requirements: doc/requirements.txt
- method: pip
Expand Down
2 changes: 1 addition & 1 deletion doc/source/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Installation

.. contents:: :local:

Euphonic has been tested on Python 3.7 - 3.10.
Euphonic has been tested on Python 3.8 - 3.10.

Pip
===
Expand Down
10 changes: 5 additions & 5 deletions release_tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Use conda to set up the python environments to run in
requires = tox-conda
# The python environments to run the tests in
envlist = pypi-py37-min,pypi-py37,conda-py38-old-np,{pypi,conda}-{py38,py39,py310,py311},pypisource-{py37,py311}
envlist = pypi-py38-min,conda-py38-old-np,{pypi,conda}-{py38,py39,py310,py311},pypisource-{py38,py311}
# Skip the execution of setup.py as we do it with the correct version in commands_pre below
skipsdist = True

Expand All @@ -11,7 +11,7 @@ changedir = tests_and_analysis/test
test_command = python run_tests.py --report

# Test PyPI source distribution
[testenv:pypisource-{py37,py311}]
[testenv:pypisource-{py38,py311}]
install_command = python -m pip install {opts} {packages}
deps =
numpy
Expand All @@ -24,7 +24,7 @@ commands_pre =
commands = {[testenv]test_command}


[testenv:pypi-{py37,py38,py39,py310,py311}]
[testenv:pypi-{py38,py39,py310,py311}]
install_command = python -m pip install {opts} {packages}
deps =
numpy
Expand All @@ -36,10 +36,10 @@ commands_pre =
--only-binary 'euphonic'
commands = {[testenv]test_command}

[testenv:pypi-py37-min]
[testenv:pypi-py38-min]
install_command = python -m pip install --force-reinstall {opts} {packages}
deps =
numpy==1.14.5
numpy==1.19.5
commands_pre =
python -m pip install --force-reinstall \
-r{toxinidir}/tests_and_analysis/minimum_euphonic_requirements.txt
Expand Down
9 changes: 4 additions & 5 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,17 +138,16 @@ def run_setup():
packages=packages,
include_package_data=True,
install_requires=[
'numpy>=1.14.5',
'scipy>=1.1.0',
'scipy>=1.10', # requires numpy >= 1.19.5
'seekpath>=1.1.0',
'spglib>=1.9.4',
'pint>=0.10.1',
'importlib_resources>=1.3.0',
'pint>=0.19',
'importlib_resources>=1.3.0', # equivalent to Python 3.9
'threadpoolctl>=1.0.0'
],
extras_require={
'matplotlib': ['matplotlib>=2.2.2'],
'phonopy_reader': ['h5py>=2.8.0', 'PyYAML>=3.13'],
'phonopy_reader': ['h5py>=2.10.0', 'PyYAML>=3.13'],
'brille': ['brille>=0.7.0']
},
entry_points={'console_scripts': [
Expand Down
8 changes: 4 additions & 4 deletions tests_and_analysis/minimum_euphonic_requirements.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
numpy==1.14.5
scipy==1.1.0
numpy==1.19.5
scipy==1.10.0
spglib==1.9.4.2
seekpath==1.1.0
pint==0.10.1
pint==0.19.0
importlib_resources==1.3.0
matplotlib==2.2.2
h5py==2.8.0
h5py==2.10.0
PyYAML==3.13
threadpoolctl==1.0.0
19 changes: 9 additions & 10 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[tox]
requires = tox-conda
# The python environments to run the tests in
envlist = py38,py39,py310,py311,py37-{base,matplotlib,phonopy_reader,brille,all},py37-minrequirements-linux
envlist = py38,py39,py310,py311,py38-{base,matplotlib,phonopy_reader,brille,all},py38-minrequirements-linux
# Skip the execution of setup.py as we do it with the correct arg in commands_pre below
skipsdist = True

Expand Down Expand Up @@ -29,7 +29,7 @@ commands =
{[testenv]test_command} --cov

# Test with no extras
[testenv:py37-base]
[testenv:py38-base]
install_command = {[testenv:py310]install_command}
deps = {[testenv:py310]deps}
commands_pre =
Expand All @@ -40,7 +40,7 @@ commands_pre =
commands = {[testenv]test_command} --cov -m "not (phonopy_reader or matplotlib or brille)"

# Test with matplotlib extra only
[testenv:py37-matplotlib]
[testenv:py38-matplotlib]
install_command = {[testenv:py310]install_command}
deps = {[testenv:py310]deps}
commands_pre =
Expand All @@ -51,7 +51,7 @@ commands_pre =
commands = {[testenv]test_command} --cov -m "matplotlib and not multiple_extras"

# Test with phonopy_reader extra only
[testenv:py37-phonopy_reader]
[testenv:py38-phonopy_reader]
install_command = {[testenv:py310]install_command}
deps = {[testenv:py310]deps}
commands_pre =
Expand All @@ -62,7 +62,7 @@ commands_pre =
commands = {[testenv]test_command} --cov -m "phonopy_reader and not multiple_extras"

# Test with brille extra only
[testenv:py37-brille]
[testenv:py38-brille]
install_command = {[testenv:py310]install_command}
deps = {[testenv:py310]deps}
commands_pre =
Expand All @@ -73,7 +73,7 @@ commands_pre =
commands = {[testenv]test_command} --cov -m "brille and not multiple_extras"

# Run remaining tests that require multiple extras
[testenv:py37-all]
[testenv:py38-all]
install_command = {[testenv:py310]install_command}
deps = {[testenv:py310]deps}
commands_pre =
Expand All @@ -84,21 +84,20 @@ commands_pre =
commands =
{[testenv]test_command} --cov -m multiple_extras

[testenv:py37-minrequirements-linux]
[testenv:py38-minrequirements-linux]
whitelist_externals = rm
install_command =
python -m pip install --force-reinstall {opts} {packages}
platform =
linux: linux
deps =
numpy==1.14.5
numpy==1.19.5
commands_pre =
python -m pip install --force-reinstall \
-r{toxinidir}/tests_and_analysis/minimum_euphonic_requirements.txt
python -m pip install --force-reinstall \
-r{toxinidir}/tests_and_analysis/tox_requirements.txt
# Force rebuild of euphonic extension to avoid Numpy clash
# (it still exists from py37 env)
# Force rebuild of euphonic extension to avoid Numpy clash
rm -rf {toxinidir}/build
python -m pip install '{toxinidir}[matplotlib,phonopy_reader,brille]'
commands = {[testenv]test_command}