Skip to content

Commit aaca179

Browse files
authored
chore: remove Python 3.8 support (#50)
1 parent bb230b5 commit aaca179

File tree

8 files changed

+116
-166
lines changed

8 files changed

+116
-166
lines changed

.github/workflows/pypi-publish.yml

Lines changed: 38 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -9,43 +9,44 @@ on:
99

1010
jobs:
1111
build:
12-
1312
runs-on: ubuntu-latest
1413

1514
steps:
16-
- uses: actions/checkout@v2
17-
- name: Set up Python 3.9
18-
uses: actions/setup-python@v2
19-
with:
20-
python-version: 3.9
21-
- name: Install dependencies
22-
run: |
23-
python -m pip install --upgrade pip
24-
pip install flake8 pytest tox
25-
# - name: Lint with flake8
26-
# run: |
27-
# # stop the build if there are Python syntax errors or undefined names
28-
# flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
29-
# # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
30-
# # flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
31-
- name: Test with tox
32-
run: |
33-
tox
34-
- name: Build docs
35-
run: |
36-
tox -e docs
37-
- run: touch ./docs/_build/html/.nojekyll
38-
- name: GH Pages Deployment
39-
uses: JamesIves/[email protected]
40-
with:
41-
branch: gh-pages # The branch the action should deploy to.
42-
folder: ./docs/_build/html
43-
clean: true # Automatically remove deleted files from the deploy branch
44-
- name: Build Project and Publish
45-
run: |
46-
python -m tox -e clean,build
47-
- name: Publish package
48-
uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29
49-
with:
50-
user: __token__
51-
password: ${{ secrets.PYPI_PASSWORD }}
15+
- uses: actions/checkout@v4
16+
17+
- name: Set up Python 3.11
18+
uses: actions/setup-python@v5
19+
with:
20+
python-version: 3.11
21+
22+
- name: Install dependencies
23+
run: |
24+
python -m pip install --upgrade pip
25+
pip install tox
26+
27+
- name: Test with tox
28+
run: |
29+
tox
30+
31+
- name: Build docs
32+
run: |
33+
tox -e docs
34+
35+
- run: touch ./docs/_build/html/.nojekyll
36+
37+
- name: GH Pages Deployment
38+
uses: JamesIves/github-pages-deploy-action@v4
39+
with:
40+
branch: gh-pages # The branch the action should deploy to.
41+
folder: ./docs/_build/html
42+
clean: true # Automatically remove deleted files from the deploy branch
43+
44+
- name: Build Project and Publish
45+
run: |
46+
python -m tox -e clean,build
47+
48+
- name: Publish package
49+
uses: pypa/[email protected]
50+
with:
51+
user: __token__
52+
password: ${{ secrets.PYPI_PASSWORD }}

.github/workflows/pypi-test.yml

Lines changed: 20 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,33 @@
1-
# This workflow will install Python dependencies, run tests and lint with a single version of Python
2-
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
3-
4-
name: Test the library
1+
name: Run tests
52

63
on:
74
push:
8-
branches: [ master ]
5+
branches: [master]
96
pull_request:
10-
branches: [ master ]
7+
branches: [master]
118

129
jobs:
1310
build:
14-
1511
runs-on: ubuntu-latest
1612
strategy:
1713
matrix:
18-
python-version: [ '3.8', '3.9', '3.10', '3.11', '3.12' ]
14+
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
1915

2016
name: Python ${{ matrix.python-version }}
2117
steps:
22-
- uses: actions/checkout@v2
23-
- name: Setup Python
24-
uses: actions/setup-python@v2
25-
with:
26-
python-version: ${{ matrix.python-version }}
27-
cache: 'pip'
28-
- name: Install dependencies
29-
run: |
30-
python -m pip install --upgrade pip
31-
pip install flake8 pytest tox
32-
# - name: Lint with flake8
33-
# run: |
34-
# # stop the build if there are Python syntax errors or undefined names
35-
# flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
36-
# # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
37-
# # flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
38-
- name: Test with tox
39-
run: |
40-
tox
18+
- uses: actions/checkout@v4
19+
20+
- name: Setup Python
21+
uses: actions/setup-python@v5
22+
with:
23+
python-version: ${{ matrix.python-version }}
24+
cache: "pip"
25+
26+
- name: Install dependencies
27+
run: |
28+
python -m pip install --upgrade pip
29+
pip install tox
30+
31+
- name: Test with tox
32+
run: |
33+
tox

.pre-commit-config.yaml

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -17,26 +17,27 @@ repos:
1717
- id: mixed-line-ending
1818
args: ['--fix=auto'] # replace 'auto' with 'lf' to enforce Linux/Mac line endings or 'crlf' for Windows
1919

20-
- repo: https://github.com/PyCQA/docformatter
21-
rev: v1.7.5
22-
hooks:
23-
- id: docformatter
24-
additional_dependencies: [tomli]
25-
args: [--in-place, --wrap-descriptions=120, --wrap-summaries=120]
26-
# --config, ./pyproject.toml
20+
# - repo: https://github.com/PyCQA/docformatter
21+
# rev: master
22+
# hooks:
23+
# - id: docformatter
24+
# additional_dependencies: [tomli]
25+
# args: [--in-place, --wrap-descriptions=120, --wrap-summaries=120]
26+
# # --config, ./pyproject.toml
2727

28-
- repo: https://github.com/psf/black
29-
rev: 24.8.0
30-
hooks:
31-
- id: black
32-
language_version: python3
28+
# - repo: https://github.com/psf/black
29+
# rev: 24.8.0
30+
# hooks:
31+
# - id: black
32+
# language_version: python3
3333

3434
- repo: https://github.com/astral-sh/ruff-pre-commit
3535
# Ruff version.
3636
rev: v0.6.8
3737
hooks:
3838
- id: ruff
3939
args: [--fix, --exit-non-zero-on-fix]
40+
- id: ruff-format
4041

4142
## If like to embrace black styles even in the docs:
4243
# - repo: https://github.com/asottile/blacken-docs

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# Changelog
22

3+
## Version 0.5.0
4+
5+
- chore: Remove Python 3.8 (EOL)
6+
- precommit: Replace docformatter with ruff's formatter
7+
38
## Version 0.4.7
49

510
- Fix package version issues to support Python<=3.9. Mostly related to how anndata dependencies are versioned in the MuData package discussed [here](https://github.com/scverse/mudata/issues/82).

pyproject.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@ extend-ignore = ["F821"]
1616
[tool.ruff.pydocstyle]
1717
convention = "google"
1818

19+
[tool.ruff.format]
20+
docstring-code-format = true
21+
docstring-code-line-length = 20
22+
1923
[tool.ruff.per-file-ignores]
2024
"__init__.py" = ["E402", "F401"]
2125

setup.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ package_dir =
4141
=src
4242

4343
# Require a min/specific Python version (comma-separated conditions)
44-
python_requires = >=3.8
44+
python_requires = >=3.9
4545

4646
# Add here dependencies of your project (line-separated), e.g. requests>=2.2,<3.0.
4747
# Version specifiers like >=2.2,<3.0 avoid problems due to API changes in

0 commit comments

Comments
 (0)