From 1b8a10ef2a0ec28e2e951622b47ecd8cc2e8599f Mon Sep 17 00:00:00 2001 From: Alessandro Felder Date: Thu, 15 Aug 2024 11:39:45 +0100 Subject: [PATCH] Update supported Python versions (#22) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Update actions/download-artifact to v4 (#10) * Update actions/download-artifact to v4 * Bumped pypa/gh-action-pypi-publish to v1.8.0 * Use latest minor version of pypi upload action (#11) * pin specific patch version for pypi upload action (#12) * reuse pypi upload action (#13) * Update pypi_upload step in workflow * pass secret PyPI upload key as input to upload_pypi step * use v2 for all reusable NIU actions including the update upload_pypi one. * run CI on both types of Mac (#16) * run CI on both types of Mac * Fix link in readme * [pre-commit.ci] pre-commit autoupdate (#18) updates: - [github.com/pre-commit/pre-commit-hooks: v4.4.0 → v4.6.0](https://github.com/pre-commit/pre-commit-hooks/compare/v4.4.0...v4.6.0) - https://github.com/charliermarsh/ruff-pre-commit → https://github.com/astral-sh/ruff-pre-commit - [github.com/astral-sh/ruff-pre-commit: v0.0.292 → v0.5.0](https://github.com/astral-sh/ruff-pre-commit/compare/v0.0.292...v0.5.0) - [github.com/psf/black: 23.9.1 → 24.4.2](https://github.com/psf/black/compare/23.9.1...24.4.2) - [github.com/pre-commit/mirrors-mypy: v1.5.1 → v1.10.1](https://github.com/pre-commit/mirrors-mypy/compare/v1.5.1...v1.10.1) Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> * Add a standardised contact section to the readme * [pre-commit.ci] pre-commit autoupdate updates: - [github.com/astral-sh/ruff-pre-commit: v0.5.0 → v0.5.6](https://github.com/astral-sh/ruff-pre-commit/compare/v0.5.0...v0.5.6) - [github.com/psf/black: 24.4.2 → 24.8.0](https://github.com/psf/black/compare/24.4.2...24.8.0) - [github.com/pre-commit/mirrors-mypy: v1.10.1 → v1.11.1](https://github.com/pre-commit/mirrors-mypy/compare/v1.10.1...v1.11.1) * move toml to 3.12 * move actions to 3.12 --------- Co-authored-by: viktorpm <50667179+viktorpm@users.noreply.github.com> Co-authored-by: Niko Sirmpilatze Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Adam Tyson --- .github/workflows/test_and_deploy.yml | 21 +++++++++------------ .pre-commit-config.yaml | 10 +++++----- README.md | 5 ++++- pyproject.toml | 16 +++++----------- 4 files changed, 23 insertions(+), 29 deletions(-) diff --git a/.github/workflows/test_and_deploy.yml b/.github/workflows/test_and_deploy.yml index 9204127..223d73c 100644 --- a/.github/workflows/test_and_deploy.yml +++ b/.github/workflows/test_and_deploy.yml @@ -27,14 +27,16 @@ jobs: strategy: matrix: # Run all supported Python versions on linux - python-version: ["3.9", "3.10", "3.11"] + python-version: ["3.10", "3.11", "3.12"] os: [ubuntu-latest] - # Include one windows and macos run + # Include one windows and ARM/Intel macos run include: - - os: macos-latest - python-version: "3.10" + - os: macos-13 # Intel Mac + python-version: "3.12" + - os: macos-latest # ARM Mac + python-version: "3.12" - os: windows-latest - python-version: "3.10" + python-version: "3.11" steps: # Run tests @@ -56,11 +58,6 @@ jobs: needs: [build_sdist_wheels] runs-on: ubuntu-latest steps: - - uses: actions/download-artifact@v3 + - uses: neuroinformatics-unit/actions/upload_pypi@v2 with: - name: artifact - path: dist - - uses: pypa/gh-action-pypi-publish@v1.5.0 - with: - user: __token__ - password: ${{ secrets.BTB_UPLOAD_API_KEY }} + secret-pypi-key: ${{ secrets.BTB_UPLOAD_API_KEY }} diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 0d4da41..1a04567 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -4,7 +4,7 @@ ci: autoupdate_schedule: monthly repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.4.0 + rev: v4.6.0 hooks: - id: check-docstring-first - id: check-executables-have-shebangs @@ -15,16 +15,16 @@ repos: args: [--fix=lf] - id: requirements-txt-fixer - id: trailing-whitespace - - repo: https://github.com/charliermarsh/ruff-pre-commit - rev: v0.0.292 + - repo: https://github.com/astral-sh/ruff-pre-commit + rev: v0.5.6 hooks: - id: ruff - repo: https://github.com/psf/black - rev: 23.9.1 + rev: 24.8.0 hooks: - id: black - repo: https://github.com/pre-commit/mirrors-mypy - rev: v1.5.1 + rev: v1.11.1 hooks: - id: mypy additional_dependencies: diff --git a/README.md b/README.md index c7fce06..ac0ee5c 100644 --- a/README.md +++ b/README.md @@ -27,7 +27,7 @@ Build unbiased anatomical templates from individual images `brainglobe-template-builder` aims to: - Offer an intuitive Python interface to the [optimised ANTs template construction pipeline](#template-construction-with-ants). - Support 3D volumetric microscopy images, such as STPT and LSM. -- Generate templates compatible with the [BrainGlobe ecosystem](https://brainglobe.info/), especially the [BrainGlobe Atlas API](https://brainglobe.info/documentation/bg-atlasapi/index.html). +- Generate templates compatible with the [BrainGlobe ecosystem](https://brainglobe.info/), especially the [BrainGlobe Atlas API](https://brainglobe.info/documentation/brainglobe-atlasapi/index.html). > **Warning** > - Early development phase. Stay tuned @@ -107,6 +107,9 @@ ANTs includes a template construction piepline - implemented in the [antsMultiva An [optimsed implementation of the above pipeline](https://github.com/CoBrALab/optimized_antsMultivariateTemplateConstruction/tree/master), developed by the [CoBra lab](https://www.cobralab.ca/), lies at the core of the `brainglobe-template-builder`'s functionality. +## Seeking help or contributing +We are always happy to help users of our tools, and welcome any contributions. If you would like to get in contact with us for any reason, please see the [contact page of our website](https://brainglobe.info/contact.html). + ## License ⚖️ [BSD 3-Clause](https://opensource.org/license/bsd-3-clause/) diff --git a/pyproject.toml b/pyproject.toml index 009628d..71def27 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -3,7 +3,7 @@ name = "brainglobe-template-builder" authors = [{ name = "Niko Sirmpilatze", email = "niko.sirbiladze@gmail.com" }] description = "Build unbiased anatomical templates from individual images" readme = "README.md" -requires-python = ">=3.9.0" +requires-python = ">=3.10.0" dynamic = ["version"] license = { text = "BSD-3-Clause" } @@ -12,9 +12,9 @@ classifiers = [ "Development Status :: 2 - Pre-Alpha", "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", "Operating System :: OS Independent", "License :: OSI Approved :: BSD License", ] @@ -65,7 +65,7 @@ exclude = ["tests", "docs*"] addopts = "--cov=brainglobe_template_builder" [tool.black] -target-version = ['py39', 'py310', 'py311'] +target-version = ['py310', 'py311', 'py312'] skip-string-normalization = false line-length = 79 @@ -90,23 +90,17 @@ exclude = ["__init__.py", "build", ".eggs", "scripts"] select = ["I", "E", "F"] fix = true -[tool.cibuildwheel] -build = "cp39-* cp310-* cp311-*" - -[tool.cibuildwheel.macos] -archs = ["x86_64", "arm64"] - [tool.tox] legacy_tox_ini = """ [tox] -envlist = py{39,310,311} +envlist = py{310,311,312} isolated_build = True [gh-actions] python = - 3.9: py39 3.10: py310 3.11: py311 + 3.12: py312 [testenv] extras =