Skip to content

Commit

Permalink
Upgrade actions infrastructure
Browse files Browse the repository at this point in the history
  • Loading branch information
benjeffery committed Jun 24, 2024
1 parent dd693ed commit e825f97
Show file tree
Hide file tree
Showing 9 changed files with 107 additions and 122 deletions.
3 changes: 1 addition & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ orbs:
jobs:
build:
docker:
- image: cimg/python:3.8
- image: cimg/python:3.9
steps:
- checkout
- run:
Expand All @@ -16,7 +16,6 @@ jobs:
sudo apt-get install -y ninja-build libcunit1-dev valgrind clang doxygen python3-pip
# Install meson as root so we can install to the system below.
sudo pip install meson
pip install numpy==1.18.5
pip install --user -r python/requirements/development.txt
echo 'export PATH=/home/circleci/.local/bin:$PATH' >> $BASH_ENV
- run:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Install dependencies and set path
run: |
sudo apt-get update
Expand Down
21 changes: 13 additions & 8 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Cancel Previous Runs
uses: styfle/cancel-workflow-action@0.6.0
uses: styfle/cancel-workflow-action@0.12.1
with:
access_token: ${{ github.token }}
- uses: actions/checkout@v3
Expand All @@ -27,21 +27,21 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
python: [ 3.8, 3.11 ]
python: [ 3.9, 3.12 ]
os: [ macos-latest, ubuntu-latest, windows-latest ]
defaults:
run:
shell: bash
steps:
- name: Cancel Previous Runs
uses: styfle/cancel-workflow-action@0.6.0
uses: styfle/cancel-workflow-action@0.12.1
with:
access_token: ${{ github.token }}

- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4

- uses: actions/setup-python@v2
- uses: actions/setup-python@v5
with:
python-version: ${{matrix.python}}

Expand All @@ -51,9 +51,14 @@ jobs:
- name: Build module
working-directory: python
run: |
python setup.py build_ext --inplace
python -m build
python -m pip install dist/*.whl
- name: Run tests
working-directory: python
run: |
python -m pytest tests
python -m pytest python/tests
- name: Run tests (numpy < 2)
run: |
pip install numpy<2
python -m pytest python/tests
60 changes: 30 additions & 30 deletions .github/workflows/wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ jobs:
runs-on: windows-latest
strategy:
matrix:
python: [3.8, 3.9, "3.10", 3.11]
python: [3.9, "3.10", 3.11, 3.12]
wordsize: [64]
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Build wheel
env:
PYTHON: "py -${{ matrix.python }}-${{ matrix.wordsize }}"
Expand Down Expand Up @@ -49,7 +49,7 @@ jobs:
rm -rf python/kastore python/*.pyd
${PYTHON} -m pytest -v python
- name: Upload Wheels
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: win-wheel-${{ matrix.python }}-${{ matrix.wordsize }}
path: python/dist
Expand All @@ -58,12 +58,12 @@ jobs:
runs-on: macos-latest
strategy:
matrix:
python: [3.8, 3.9, "3.10", 3.11]
python: [3.9, "3.10", 3.11, 3.12]
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python }}
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
- name: Build Wheel
Expand All @@ -82,7 +82,7 @@ jobs:
rm -rf python/kastore python/*.so
python -m pytest -v python
- name: Upload Wheels
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: osx-wheel-${{ matrix.python }}
path: python/dist
Expand All @@ -91,12 +91,12 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Set up Python 3.8
uses: actions/setup-python@v2
- name: Set up Python 3.9
uses: actions/setup-python@v4
with:
python-version: 3.8
python-version: 3.9

- name: Build sdist
shell: bash
Expand All @@ -106,7 +106,7 @@ jobs:
python setup.py sdist
- name: Upload sdist
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: sdist
path: python/dist
Expand All @@ -116,12 +116,12 @@ jobs:
run: |
docker run --rm -v `pwd`:/project -w /project quay.io/pypa/manylinux2014_x86_64 bash docker/buildwheel.sh
- name: Set up Python 3.11
uses: actions/setup-python@v2
- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: 3.11
python-version: 3.12

- name: Run tests (3.11)
- name: Run tests (3.12)
run: |
python -VV
# We install in this odd way to make sure we get both deps and a local kastore
Expand All @@ -132,12 +132,12 @@ jobs:
pip install -r python/requirements/CI/tests/requirements.txt
python -m pytest -v python
- name: Set up Python 3.10
uses: actions/setup-python@v2
- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: "3.10"
python-version: 3.12

- name: Run tests (3.10)
- name: Run tests (3.11)
run: |
python -VV
# We install in this odd way to make sure we get both deps and a local kastore
Expand All @@ -148,12 +148,12 @@ jobs:
pip install -r python/requirements/CI/tests/requirements.txt
python -m pytest -v python
- name: Set up Python 3.9
uses: actions/setup-python@v2
- name: Set up Python 3.10
uses: actions/setup-python@v5
with:
python-version: 3.9
python-version: "3.10"

- name: Run tests (3.9)
- name: Run tests (3.10)
run: |
python -VV
# We install in this odd way to make sure we get both deps and a local kastore
Expand All @@ -164,12 +164,12 @@ jobs:
pip install -r python/requirements/CI/tests/requirements.txt
python -m pytest -v python
- name: Set up Python 3.8
uses: actions/setup-python@v2
- name: Set up Python 3.9
uses: actions/setup-python@v5
with:
python-version: 3.8
python-version: 3.9

- name: Run tests (3.8)
- name: Run tests (3.9)
run: |
python -VV
# We install in this odd way to make sure we get both deps and a local kastore
Expand All @@ -181,7 +181,7 @@ jobs:
python -m pytest -v python
- name: Upload Wheels
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: linux-wheels
path: python/dist/wheelhouse
Expand All @@ -192,7 +192,7 @@ jobs:
needs: ['windows', 'OSX', 'manylinux']
steps:
- name: Download all
uses: actions/download-artifact@v2
uses: actions/download-artifact@v4
- name: Move to dist
run: |
mkdir dist
Expand Down
24 changes: 12 additions & 12 deletions .mergify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ queue_rules:
- "#approved-reviews-by>=1"
- "#changes-requested-reviews-by=0"
- status-success=Lint
- status-success=Python (3.8, macos-latest)
- status-success=Python (3.11, macos-latest)
- status-success=Python (3.8, ubuntu-latest)
- status-success=Python (3.11, ubuntu-latest)
- status-success=Python (3.8, windows-latest)
- status-success=Python (3.11, windows-latest)
- status-success=Python (3.9, macos-latest)
- status-success=Python (3.12, macos-latest)
- status-success=Python (3.9, ubuntu-latest)
- status-success=Python (3.12, ubuntu-latest)
- status-success=Python (3.9, windows-latest)
- status-success=Python (3.12, windows-latest)
- "status-success=ci/circleci: build"

pull_request_rules:
Expand All @@ -21,12 +21,12 @@ pull_request_rules:
- base=main
- label=AUTOMERGE-REQUESTED
- status-success=Lint
- status-success=Python (3.8, macos-latest)
- status-success=Python (3.11, macos-latest)
- status-success=Python (3.8, ubuntu-latest)
- status-success=Python (3.11, ubuntu-latest)
- status-success=Python (3.8, windows-latest)
- status-success=Python (3.11, windows-latest)
- status-success=Python (3.9, macos-latest)
- status-success=Python (3.12, macos-latest)
- status-success=Python (3.9, ubuntu-latest)
- status-success=Python (3.12, ubuntu-latest)
- status-success=Python (3.9, windows-latest)
- status-success=Python (3.12, windows-latest)
- "status-success=ci/circleci: build"
actions:
queue:
Expand Down
53 changes: 48 additions & 5 deletions python/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,50 @@
[build-system]
requires = [
"setuptools>=42",
"wheel",
"oldest-supported-numpy"
requires = ["setuptools>=45", "wheel", "numpy>=2"]
build-backend = "setuptools.build_meta"

[project]
name = "kastore"
dynamic = ["version"]
authors = [
{name = "Tskit Developers", email = "admin@tskit.dev"},
]
build-backend = "setuptools.build_meta"
description = "A write-once-read-many store for simple numerical data"
readme = "README.md"
license = {text = "MIT"}
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"Topic :: Scientific/Engineering :: Bio-Informatics",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3 :: Only",
]
keywords = ["binary store", "numerical", "arrays"]
dependencies = [
"numpy>=1.7",
"humanize",
]
requires-python = ">=3.9"

[project.urls]
Homepage = "https://github.com/tskit-dev/kastore"
Documentation = "https://kastore.readthedocs.io/en/latest/"
Changelog = "https://kastore.readthedocs.io/en/latest/changelogs.html"
"Bug Tracker" = "https://github.com/tskit-dev/kastore/issues"
GitHub = "https://github.com/tskit-dev/kastore"

[project.scripts]
kastore = "kastore.__main__:main"

[tool.setuptools]
packages = ["kastore"]

[tool.setuptools.dynamic]
version = {attr = "kastore._version.kastore_version"}

[tool.pytest.ini_options]
testpaths = ["tests"]
2 changes: 2 additions & 0 deletions python/requirements/CI/tests/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
attrs
build
hypothesis
humanize
pytest
pytest-cov
numpy
mock
setuptools
50 changes: 0 additions & 50 deletions python/setup.cfg

This file was deleted.

Loading

0 comments on commit e825f97

Please sign in to comment.