Skip to content

Commit

Permalink
Update actions infra, pin zarr
Browse files Browse the repository at this point in the history
  • Loading branch information
benjeffery committed Jul 9, 2024
1 parent 2edadb6 commit 02153b4
Show file tree
Hide file tree
Showing 14 changed files with 128 additions and 71 deletions.
13 changes: 4 additions & 9 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@ jobs:
- run:
name: Run Python tests
command: |
# Run setup.py so that the version is defined
python3 setup.py build
python3 -m pytest --cov=tszip --cov-report=xml --cov-branch -n 2 tests
codecov
rm .coverage
Expand All @@ -40,13 +38,10 @@ jobs:
name: Build Python package
command: |
rm -fR build
python setup.py sdist
python setup.py check
python -m twine check dist/*.tar.gz
python -m venv venv
source venv/bin/activate
pip install --upgrade setuptools pip wheel
python setup.py build_ext
python setup.py egg_info
python setup.py bdist_wheel
pip install --upgrade setuptools pip wheel build
python -m build --sdist
python -m twine check dist/*.tar.gz
python -m build --wheel
pip install dist/*.tar.gz
2 changes: 1 addition & 1 deletion .github/workflows/docker/buildwheel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ echo "arch=$ARCH"
for V in "${PYTHON_VERSIONS[@]}"; do
PYBIN=/opt/python/$V/bin
rm -rf build/ # Avoid lib build by narrow Python is used by wide python
$PYBIN/python setup.py bdist_wheel
$PYBIN/python -m build --wheel
done

rm dist/*.tar.gz
2 changes: 1 addition & 1 deletion .github/workflows/docker/shared.env
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
PYTHON_VERSIONS=(
cp312-cp312
cp311-cp311
cp310-cp310
cp39-cp39
cp38-cp38
)
6 changes: 3 additions & 3 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Cancel Previous Runs
uses: styfle/cancel-workflow-action@0.11.0
uses: styfle/cancel-workflow-action@0.12.1
with:
access_token: ${{ github.token }}

- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: actions/setup-python@v4
- uses: actions/setup-python@v5
with:
python-version: "3.10"
cache: 'pip'
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,47 +11,47 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Cancel Previous Runs
uses: styfle/cancel-workflow-action@0.12.0
uses: styfle/cancel-workflow-action@0.12.1
with:
access_token: ${{ github.token }}
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
- uses: actions/setup-python@v5
- uses: pre-commit/action@v3.0.0

test:
name: Python
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
with:
submodules: true

- name: Cache conda and dependancies
id: cache
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: |
c:\Miniconda\envs\anaconda-client-env
/usr/share/miniconda/envs/anaconda-client-env
~/osx-conda
~/.profile
key: ${{ runner.os }}-${{ matrix.python}}-conda-v10-${{ hashFiles('requirements/CI-tests-conda.txt') }}
key: ${{ runner.os }}-${{ matrix.python}}-conda-v11-${{ hashFiles('requirements/CI-tests-conda.txt') }}

- name: Install Conda
uses: conda-incubator/setup-miniconda@v2
uses: conda-incubator/setup-miniconda@v3
if: steps.cache.outputs.cache-hit != 'true'
with:
activate-environment: anaconda-client-env
Expand Down
30 changes: 15 additions & 15 deletions .github/workflows/wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,22 +15,22 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
submodules: true

- name: Set up Python 3.10
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: "3.10"

- name: Build sdist
shell: bash
run: |
python setup.py sdist
python -m build --sdist
- name: Upload sdist
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: sdist
path: dist
Expand All @@ -41,7 +41,7 @@ jobs:
docker run --rm -v `pwd`:/project -w /project quay.io/pypa/manylinux2014_x86_64 bash .github/workflows/docker/buildwheel.sh
- name: Upload Wheels
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: wheels
path: dist
Expand All @@ -51,14 +51,14 @@ jobs:
runs-on: macos-latest
strategy:
matrix:
python: [3.8, 3.8, 3.9, "3.10", "3.11"]
python: [3.9, "3.10", 3.11, 3.12]
steps:
- name: Download wheels
uses: actions/download-artifact@v2
uses: actions/download-artifact@v4
with:
name: wheels
- name: Set up Python ${{ matrix.python }}
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
- name: Install wheel and test
Expand All @@ -73,15 +73,15 @@ jobs:
runs-on: windows-latest
strategy:
matrix:
python: [3.8, 3.8, 3.9, "3.10", "3.11"]
python: [3.9, "3.10", 3.11, 3.12]
wordsize: [64]
steps:
- name: Download wheels
uses: actions/download-artifact@v2
uses: actions/download-artifact@v4
with:
name: wheels
- name: Set up Python ${{ matrix.python }}
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
- name: Install wheel and test
Expand All @@ -97,14 +97,14 @@ jobs:
needs: ['manylinux']
strategy:
matrix:
python: [3.8, 3.8, 3.9, "3.10", "3.11"]
python: [3.9, "3.10", 3.11, 3.12]
steps:
- name: Download wheels
uses: actions/download-artifact@v2
uses: actions/download-artifact@v4
with:
name: wheels
- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
- name: Install wheel and test
Expand All @@ -123,7 +123,7 @@ jobs:
id-token: write
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:
- name: Automatic rebase, CI and merge
Expand All @@ -20,12 +20,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
6 changes: 6 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
--------------------
[0.2.4] - 2024-01-XX
--------------------

- tszip now supports Python 3.12, 3.8 support has been removed.

--------------------
[0.2.3] - 2023-10-30
--------------------
Expand Down
62 changes: 62 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
[build-system]
requires = ["setuptools>=45", "setuptools_scm[toml]>=6.2"]
build-backend = "setuptools.build_meta"

[project]
name = "tszip"
authors = [
{name = "Tskit Developers", email = "admin@tskit.dev"},
]
description = "Compression utilities for tree sequences"
readme = "README.md"
requires-python = ">=3.8"
license = {text = "MIT"}
classifiers = [
"Programming Language :: Python",
"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",
"Development Status :: 5 - Production/Stable",
"Environment :: Other Environment",
"Intended Audience :: Science/Research",
"Operating System :: POSIX",
"Operating System :: MacOS :: MacOS X",
"Operating System :: Microsoft :: Windows",
"Topic :: Scientific/Engineering",
"Topic :: Scientific/Engineering :: Bio-Informatics",
"License :: OSI Approved :: MIT License",
]
keywords = ["tree sequence", "tskit"]
dependencies = [
"numpy",
"humanize",
"tskit>=0.3.3",
"numcodecs>=0.6.4",
"zarr<3",
]
dynamic = ["version"]

[project.urls]
Homepage = "http://pypi.python.org/pypi/tszip"
Documentation = "https://tszip.readthedocs.io/en/latest/"
Changelog = "https://tszip.readthedocs.io/en/latest/changelog.html"
"Bug Tracker" = "https://github.com/tskit-dev/tszip/issues"
GitHub = "https://github.com/tskit-dev/tszip/"

[project.scripts]
tszip = "tszip.cli:tszip_main"
tsunzip = "tszip.cli:tsunzip_main"

[tool.setuptools]
packages = ["tszip"]
include-package-data = true

[tool.setuptools_scm]
write_to = "tszip/_version.py"

[tool.pytest.ini_options]
addopts = "-n 4"
testpaths = ["tests"]
12 changes: 6 additions & 6 deletions requirements/CI-docs.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
humanize==4.8.0
jupyter-book==0.15.1
humanize==4.10.0
jupyter-book==1.0.2
numcodecs==0.12.1
sphinx-issues==3.0.1
sphinx-issues==4.1.0
sphinx-argparse==0.4.0
setuptools_scm==8.0.4
tskit==0.5.6
zarr==2.16.1
setuptools_scm==8.1.0
tskit==0.5.8
zarr==2.18.2
16 changes: 8 additions & 8 deletions requirements/CI-tests-conda.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
humanize==4.8.0
h5py==3.7.0
msprime==1.2.0
pytest==7.4.2
pytest-cov==4.1.0
pytest-xdist==3.3.1
tskit==0.5.6
zarr==2.16.1
humanize==4.10.0
h5py==3.11.0
msprime==1.3.2
pytest==8.2.2
pytest-cov==5.0.0
pytest-xdist==3.6.1
tskit==0.5.8
zarr==2.18.2
2 changes: 1 addition & 1 deletion requirements/development.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ sphinx_rtd_theme
sphinx-issues
setuptools_scm
tskit
zarr
zarr<3
msprime
humanize
3 changes: 1 addition & 2 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ project_urls =
classifiers =
Programming Language :: Python
Programming Language :: Python :: 3
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10
Programming Language :: Python :: 3.11
Expand All @@ -39,7 +38,7 @@ platforms =

[options]
packages = tszip
python_requires = >=3.8
python_requires = >=3.9
include_package_data = True
install_requires =
numpy
Expand Down
5 changes: 0 additions & 5 deletions setup.py

This file was deleted.

0 comments on commit 02153b4

Please sign in to comment.