From 5671ef0daaf92f89c68499b8b7305407c71e76f2 Mon Sep 17 00:00:00 2001 From: Ben Jeffery Date: Sun, 7 Sep 2025 23:27:14 +0100 Subject: [PATCH] Remove circleCI --- .circleci/config.yml | 56 ----------------------------- .github/workflows/tests.yml | 70 ++++++++++++++++++++++++++++++++++++ .github/workflows/wheels.yml | 8 ++--- CHANGELOG.md | 2 ++ pyproject.toml | 4 +-- setup.cfg | 6 ++-- 6 files changed, 81 insertions(+), 65 deletions(-) delete mode 100644 .circleci/config.yml create mode 100644 .github/workflows/tests.yml diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index 52565d84..00000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,56 +0,0 @@ -version: 2.1 - -orbs: - codecov: codecov/codecov@3.2.4 - -jobs: - build: - docker: - - image: cimg/python:3.10.13 - steps: - - checkout - - run: - name: Install dependencies and set PATH - command: | - # Need gsl-dev for msprime. Alternatively we could install via conda - sudo apt-get update - sudo apt-get install libgsl-dev - # way to set path persistently https://circleci.com/docs/2.0/env-vars/#setting-path - echo 'export PATH=/home/circleci/.local/bin:$PATH' >> $BASH_ENV - - run: - name: install dependencies - command: | - # Install uv for dependency management - pip install --user uv - # Install dependencies from pyproject.toml - uv pip install --system -r pyproject.toml --extra test --extra dev - pyenv rehash - - run: - name: Lint Python - command: | - pre-commit run --all - - save_cache: - key: tsdate-{{ checksum "data/prior_1000df.bak" }} - paths: - - data/prior_1000df.bak - - tsdate/prior_1000df.txt - - run: - name: Copy approximate_prior cache file - command: | - cp data/prior_1000df.bak data/prior_1000df.txt - - run: - name: Run Python tests - command: | - python -m pytest -vv -n0 --cov=tsdate --cov-report=xml --cov-branch tests - environment: - NUMBA_DISABLE_JIT: 1 - - codecov/upload: - token: CODECOV_TOKEN - - run: - name: Build the distribution tarball. - command: | - python -m build - - - - diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml new file mode 100644 index 00000000..a9336365 --- /dev/null +++ b/.github/workflows/tests.yml @@ -0,0 +1,70 @@ +name: Tests + +on: + pull_request: + merge_group: + push: + branches: [main, test] + +jobs: + pre-commit: + name: Lint + runs-on: ubuntu-24.04 + steps: + - name: Cancel Previous Runs + uses: styfle/cancel-workflow-action@0.12.1 + with: + access_token: ${{ github.token }} + - uses: actions/checkout@v4.2.2 + - uses: actions/setup-python@v5.4.0 + with: + python-version: '3.12' + - uses: pre-commit/action@v3.0.1 + + test: + name: Python + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + python: [ "3.10", 3.13 ] + os: [ macos-latest, ubuntu-24.04, windows-latest ] + defaults: + run: + shell: bash + steps: + - name: Cancel Previous Runs + uses: styfle/cancel-workflow-action@0.12.1 + with: + access_token: ${{ github.token }} + + - name: Checkout + uses: actions/checkout@v4.2.2 + + - name: Install uv and set the python version + uses: astral-sh/setup-uv@v6 + with: + python-version: ${{ matrix.python }} + version: "0.8.15" + + - name: Install dependencies + run: | + uv venv + uv pip install -r pyproject.toml --extra test + + - name: Run tests + run: | + NUMBA_DISABLE_JIT=1 uv run --no-sync python -m pytest -vv --cov=tsdate --cov-report=xml --cov-branch -n0 tests + + - name: Upload coverage to Codecov + uses: codecov/codecov-action@v5.4.0 + with: + token: ${{ secrets.CODECOV_TOKEN }} + fail_ci_if_error: false + flags: python-tests + name: codecov-umbrella + verbose: true + + - name: Build distribution + run: | + uv run --no-sync python -m build \ No newline at end of file diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index 4da7d852..a108bef1 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -19,7 +19,7 @@ jobs: with: submodules: true - - name: Set up Python 3.10 + - name: Set up Python uses: actions/setup-python@v5.4.0 with: python-version: "3.10" @@ -42,7 +42,7 @@ jobs: runs-on: macos-13 strategy: matrix: - python: [3.8, 3.8, 3.9, "3.10", 3.11] + python: ["3.10", 3.13] steps: - name: Download wheels uses: actions/download-artifact@v4.2.0 @@ -67,7 +67,7 @@ jobs: runs-on: windows-latest strategy: matrix: - python: [3.8, 3.9, "3.10", 3.11] + python: ["3.10", 3.13] wordsize: [64] steps: - name: Download wheels @@ -93,7 +93,7 @@ jobs: needs: ['manylinux'] strategy: matrix: - python: [3.8, 3.9, "3.10", 3.11] + python: ["3.10", 3.13] steps: - name: Download wheels uses: actions/download-artifact@v4.2.0 diff --git a/CHANGELOG.md b/CHANGELOG.md index 79a2bd68..e228256c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ ## [0.2.4] - 2025-XX-XX +- Add support for Python 3.13, minimum version is now 3.10. + ## [0.2.3] - 2025-06-07 diff --git a/pyproject.toml b/pyproject.toml index 7a70ba5e..d1e851b1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -23,11 +23,10 @@ classifiers = [ "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.8", - "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", ] dependencies = [ "tskit>=0.6.0", @@ -46,6 +45,7 @@ text = "MIT" [project.optional-dependencies] test = [ + "numcodecs>=0.6,<0.15.1", #Pinned due to https://github.com/zarr-developers/numcodecs/issues/733 "pytest==8.4.2", "pytest-xdist==3.8.0", "pytest-cov==6.3.0", diff --git a/setup.cfg b/setup.cfg index a7da9046..93884ae5 100644 --- a/setup.cfg +++ b/setup.cfg @@ -15,10 +15,10 @@ 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 + Programming Language :: Python :: 3.12 + Programming Language :: Python :: 3.13 Programming Language :: Python :: 3 :: Only License :: OSI Approved :: MIT License Development Status :: 3 - Alpha @@ -44,7 +44,7 @@ platforms = [options] packages = tsdate -python_requires = >=3.8 +python_requires = >=3.10 include_package_data = True install_requires = numpy