Skip to content

Commit

Permalink
Drop 3.8 and 3.9, default to 3.10 for most CI tasks
Browse files Browse the repository at this point in the history
  • Loading branch information
luizirber committed Nov 23, 2023
1 parent 14cb276 commit 7663b8b
Show file tree
Hide file tree
Showing 14 changed files with 30 additions and 41 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build_wheel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
- uses: actions/setup-python@v4
name: Install Python
with:
python-version: '3.9'
python-version: '3.10'

- name: Build wheels
uses: pypa/[email protected]
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build_wheel_all_archs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
- uses: actions/setup-python@v4
name: Install Python
with:
python-version: '3.9'
python-version: '3.10'

# Added due to weird error when building inside docker container
# for other platforms...
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/dev_envs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:
uses: conda-incubator/setup-miniconda@3b0f2504dd76ef23b6d31f291f4913fb60ab5ff3
with:
auto-update-conda: true
python-version: 3.9
python-version: 3.10
channels: conda-forge,bioconda
miniforge-variant: Mambaforge
miniforge-version: latest
Expand All @@ -59,6 +59,6 @@ jobs:
shell: bash -l {0}
run: mamba install 'tox>=3.27,<4' tox-conda rust git compilers pandoc

- name: run tests for 3.9
- name: run tests for 3.10
shell: bash -l {0}
run: tox -e py39
run: tox -e py310
6 changes: 3 additions & 3 deletions .github/workflows/python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-22.04, macos-latest]
py: ["3.11", "3.10", "3.9", "3.8"]
py: ["3.12", "3.11", "3.10"]
fail-fast: false

steps:
Expand Down Expand Up @@ -49,14 +49,14 @@ jobs:
uses: r-lib/actions/setup-pandoc@v2

- name: Set up IPFS
if: startsWith(runner.os, 'Linux') && (matrix.py == '3.9')
if: startsWith(runner.os, 'Linux') && (matrix.py == '3.10')
uses: ibnesayeed/setup-ipfs@master
with:
ipfs_version: 0.6
run_daemon: true

- name: Start Redis
if: startsWith(runner.os, 'Linux') && (matrix.py == '3.9')
if: startsWith(runner.os, 'Linux') && (matrix.py == '3.10')
uses: supercharge/[email protected]
with:
redis-version: 6
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ A quickstart tutorial [is available](https://sourmash.readthedocs.io/en/latest/t

### Requirements

sourmash runs under Python 3.7 and later. The base
sourmash runs under Python 3.10 and later. The base
requirements are screed, cffi, numpy, matplotlib, and scipy. Conda
(see below) will install everything necessary, and is our recommended
installation method.
Expand Down
4 changes: 2 additions & 2 deletions binder/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ channels:
- bioconda
- defaults
dependencies:
- python>=3.9
- sourmash>=4.8.2
- python>=3.10
- sourmash>=4.8.4
- screed
- matplotlib
- pandas
Expand Down
4 changes: 2 additions & 2 deletions doc/developer.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ You can get the latest development branch with:
```
git clone https://github.com/sourmash-bio/sourmash.git
```
sourmash runs under Python 3.8 and later.
sourmash runs under Python 3.10 and later.

We recommend using `conda` or `Nix` for setting up an environment for developing
new features, running tests and code quality checks.
Expand Down Expand Up @@ -87,7 +87,7 @@ running tests and checks during development.
`tox -l` lists available tasks.

You can run tests by invoking `make test` in the sourmash directory;
`tox -e py39` will run the Python tests with Python 3.9,
`tox -e py310` will run the Python tests with Python 3.10,
and `cargo test` will run the Rust tests.

## Adding new changes
Expand Down
2 changes: 1 addition & 1 deletion doc/requirements.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ in a second or so on a rather slow 2016 Mac laptop.
MinHash sketches and signatures are quite small on disk.

sourmash should run with no modification on Linux and Mac OS X,
under Python 3.8 and later. Please see [the development repository README][0]
under Python 3.10 and later. Please see [the development repository README][0]
for
information on source code, tests, and continuous integration.

Expand Down
2 changes: 1 addition & 1 deletion doc/runtime.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.7
3.10
4 changes: 2 additions & 2 deletions doc/support.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,9 @@ and our intent is that it will support as-yet unreleased versions of Python 3.x
(e.g. 3.10) moving forward.

For future versions of sourmash, we plan to follow the
[Numpy NEP 29](https://numpy.org/neps/nep-0029-deprecation_policy.html)
[Scientific Python SPEC 0](https://scientific-python.org/specs/spec-0000/)
proposal for Python version support. For example, this
would mean that we would drop support for Python 3.8 on April 14,
means that we dropped support for Python 3.9 on October 10,
2023.

### Rust API
Expand Down
2 changes: 1 addition & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,9 @@

git
stdenv.cc.cc.lib
(python312.withPackages (ps: with ps; [ virtualenv ]))
(python311.withPackages (ps: with ps; [ virtualenv tox cffi ]))
(python310.withPackages (ps: with ps; [ virtualenv ]))
(python39.withPackages (ps: with ps; [ virtualenv ]))

rust-cbindgen
maturin
Expand Down
7 changes: 3 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ classifiers = [
"Operating System :: POSIX :: Linux",
"Operating System :: MacOS :: MacOS X",
"Programming Language :: Rust",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.10",
"Topic :: Scientific/Engineering :: Bio-Informatics",
]
Expand All @@ -79,10 +79,9 @@ dependencies = [
"deprecation>=2.0.6",
"cachetools>=4,<6",
"bitstring>=3.1.9,<5",
"importlib_metadata>=3.6;python_version<'3.10'"
]

requires-python = ">=3.8"
requires-python = ">=3.10"

[metadata]
license = { text = "BSD 3-Clause License" }
Expand Down
8 changes: 0 additions & 8 deletions tests/sourmash_tst_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,6 @@
from importlib import resources
from importlib.metadata import entry_points

# Remove when we drop support for 3.8
if sys.version_info < (3, 9):
import importlib_resources as resources

# Remove when we drop support for 3.9
if sys.version_info < (3, 10):
from importlib_metadata import entry_points


SIG_FILES = [os.path.join('demo', f) for f in (
"SRR2060939_1.sig", "SRR2060939_2.sig", "SRR2241509_1.sig",
Expand Down
20 changes: 9 additions & 11 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
[tox]
env_list =
py310,
py311,
py39,
py312,
py310,
coverage,
docs,
package_description
py38,
fix_lint,
hypothesis,
khmer,
Expand Down Expand Up @@ -67,7 +66,7 @@ commands = pytest \
{posargs:.}

[testenv:khmer]
basepython = python3.8
basepython = python3.10
deps =
khmer
commands = pytest \
Expand All @@ -79,7 +78,7 @@ commands = pytest \
{posargs:.}

[testenv:khmer_master]
basepython = python3.8
basepython = python3.10
deps =
-e git+https://github.com/dib-lab/khmer.git\#egg=khmer
commands = pytest \
Expand Down Expand Up @@ -113,7 +112,7 @@ commands = sphinx-build -d "{toxworkdir}/docs_doctree" doc "{toxworkdir}/docs_ou

[testenv:package_description]
description = check that the long description is valid
basepython = python3.8
basepython = python3.10
deps = twine >= 1.12.1
# TODO installing readme-renderer[md] should not be necessary
readme-renderer[md] >= 24.0
Expand All @@ -126,7 +125,7 @@ commands = pip wheel -w {envtmpdir}/build --no-deps .

[testenv:mypy]
description = run mypy checker
basepython = python3.8
basepython = python3.10
pass_env = {[testenv]pass_env}
# without PROGRAMDATA cloning using git for Windows will fail with an `error setting certificate verify locations` error
PROGRAMDATA
Expand All @@ -135,7 +134,7 @@ commands = mypy src/sourmash

[testenv:fix_lint]
description = format the code base to adhere to our styles, and complain about what we cannot do automatically
basepython = python3.8
basepython = python3.10
pass_env = {[testenv]pass_env}
# without PROGRAMDATA cloning using git for Windows will fail with an `error setting certificate verify locations` error
PROGRAMDATA
Expand All @@ -161,7 +160,7 @@ commands = coverage combine
coverage xml -i -o {toxworkdir}/coverage.xml
coverage html -i -d {toxworkdir}/htmlcov
diff-cover --compare-branch {env:DIFF_AGAINST:origin/latest} {toxworkdir}/coverage.xml
depends = py39, py38, py37, pypy3
depends = py312, py311, py310, pypy3
parallel_show_output = True

[testenv:X]
Expand Down Expand Up @@ -198,8 +197,7 @@ source = src/sourmash/
python =
3.10: py310, docs, package_description, coverage
3.11: py311, coverage
3.9: py39, coverage
3.8: py38, coverage
3.12: py312, coverage
[flake8]
max-complexity = 22
Expand Down

0 comments on commit 7663b8b

Please sign in to comment.