Skip to content

Commit

Permalink
Remove Python 3.8 support (#51)
Browse files Browse the repository at this point in the history
Update pre-commit and github actions for consistency across packages.
  • Loading branch information
jkanche authored Dec 9, 2024
1 parent 7b89a0b commit d9e8f5e
Show file tree
Hide file tree
Showing 9 changed files with 110 additions and 205 deletions.
13 changes: 6 additions & 7 deletions .github/workflows/build-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,12 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
with:
submodules: true
- uses: actions/checkout@v4

- name: Set up Python 3.9
uses: actions/setup-python@v2
- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: 3.9
python-version: 3.12
cache: 'pip'

- name: Install Python dependencies
Expand All @@ -34,7 +32,8 @@ jobs:
touch ./docs/_build/html/.nojekyll
- name: GH Pages Deployment
uses: JamesIves/[email protected]
if: github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/')
uses: JamesIves/github-pages-deploy-action@v4
with:
branch: gh-pages # The branch the action should deploy to.
folder: ./docs/_build/html
Expand Down
146 changes: 0 additions & 146 deletions .github/workflows/publish-pypi.yml

This file was deleted.

62 changes: 62 additions & 0 deletions .github/workflows/pypi-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: Publish to PyPI

on:
push:
tags:
- "*"

jobs:
build_wheels:
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
# macos-13 is an intel runner, higher macos's are apple silicon
# At some point, maybe get this to work on windows-latest
os: [ubuntu-latest, macos-13, macos-latest]

steps:
- uses: actions/checkout@v4
with:
submodules: true

- name: Build wheels
uses: pypa/[email protected]
env:
CIBW_ARCHS_LINUX: x86_64 # remove this later so we build for all linux archs
CIBW_PROJECT_REQUIRES_PYTHON: ">=3.9"
CIBW_SKIP: pp*

- uses: actions/upload-artifact@v4
with:
name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }}
path: ./wheelhouse/*.whl

build_sdist:
name: Build source distribution
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Build sdist
run: pipx run build --sdist

- uses: actions/upload-artifact@v4
with:
name: cibw-sdist
path: dist/*.tar.gz

upload_pypi:
needs: [build_wheels, build_sdist]
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v4
with:
pattern: cibw-*
path: dist
merge-multiple: true

- uses: pypa/[email protected]
with:
user: __token__
password: ${{ secrets.PYPI_PASSWORD }}
34 changes: 34 additions & 0 deletions .github/workflows/pypi-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Test the library

on:
push:
branches:
- master
pull_request:

jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [ '3.9', '3.10', '3.11', '3.12', '3.13' ]

name: Python ${{ matrix.python-version }}
steps:
- uses: actions/checkout@v4
with:
submodules: true

- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'

- name: Get latest CMake
uses: lukka/get-cmake@latest

- name: Test with tox
run: |
pip install tox
tox
51 changes: 0 additions & 51 deletions .github/workflows/run-tests.yml

This file was deleted.

5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Changelog

## Version 0.6.0

- chore: Remove Python 3.8 (EOL).
- precommit: Replace docformatter with ruff's formatter.

## Version 0.5.1

- Added parser for delayed sparse objects backed by H5
Expand Down
1 change: 1 addition & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@
"sphinx.ext.ifconfig",
"sphinx.ext.mathjax",
"sphinx.ext.napoleon",
"sphinx_autodoc_typehints",
]

# Add any paths that contain templates here, relative to this directory.
Expand Down
1 change: 1 addition & 0 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ furo
# sphinx_rtd_theme
myst-parser[linkify]
sphinx>=3.2.1
sphinx-autodoc-typehints
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ package_dir =
=src

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

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

0 comments on commit d9e8f5e

Please sign in to comment.