From dd6398aace6388ce52f57eec97bdec026068349a Mon Sep 17 00:00:00 2001 From: willGraham01 <1willgraham@gmail.com> Date: Tue, 6 Feb 2024 13:38:17 +0000 Subject: [PATCH 1/2] Bring in line with other package CIs --- .github/workflows/test_and_deploy.yml | 15 ++++++++---- MANIFEST.in | 11 +++++++++ pyproject.toml | 33 +++++++++++++++++++++++++++ tox.ini | 28 ----------------------- 4 files changed, 55 insertions(+), 32 deletions(-) create mode 100644 MANIFEST.in delete mode 100644 tox.ini diff --git a/.github/workflows/test_and_deploy.yml b/.github/workflows/test_and_deploy.yml index 7d3a31d..8bd634c 100644 --- a/.github/workflows/test_and_deploy.yml +++ b/.github/workflows/test_and_deploy.yml @@ -2,11 +2,12 @@ name: tests on: push: - branches: [ main ] + branches: + - "main" tags: - - '*' + - 'v*' pull_request: - branches: [ '*' ] + workflow_dispatch: jobs: linting: @@ -14,8 +15,14 @@ jobs: steps: - uses: neuroinformatics-unit/actions/lint@v1 + manifest: + name: Check Manifest + runs-on: ubuntu-latest + steps: + - uses: neuroinformatics-unit/actions/check_manifest@v2 + test: - needs: [linting] + needs: [linting, manifest] name: ${{ matrix.os }} py${{ matrix.python-version }} runs-on: ${{ matrix.os }} strategy: diff --git a/MANIFEST.in b/MANIFEST.in new file mode 100644 index 0000000..fc9d53f --- /dev/null +++ b/MANIFEST.in @@ -0,0 +1,11 @@ +include LICENSE +include README.md + +exclude .pre-commit-config.yaml +exclude codecov.yml + +include .napari/config.yml + +graft brainglobe_segmentation + +prune tests \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 621ddc2..8f0634c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -83,3 +83,36 @@ line-length = 79 exclude = ["__init__.py", "build", ".eggs"] select = ["I", "E", "F"] fix = true + +[tool.tox] +legacy_tox_ini = """ +# For more information about tox, see https://tox.readthedocs.io/en/latest/ +[tox] +envlist = py{38,39,310} + +[gh-actions] +python = + 3.8: py38 + 3.9: py39 + 3.10: py310 + +[testenv] +passenv = + CI + GITHUB_ACTIONS + DISPLAY + XAUTHORITY + NUMPY_EXPERIMENTAL_ARRAY_FUNCTION + PYVISTA_OFF_SCREEN +deps = + pytest # https://docs.pytest.org/en/latest/contents.html + pytest-cov # https://pytest-cov.readthedocs.io/en/latest/ + pytest-qt # https://pytest-qt.readthedocs.io/en/latest/ + coverage + napari + pyqt5 + magicgui + +commands = pytest -v --color=yes --cov=brainglobe_segmentation --cov-report=xml + +""" diff --git a/tox.ini b/tox.ini deleted file mode 100644 index 031ceba..0000000 --- a/tox.ini +++ /dev/null @@ -1,28 +0,0 @@ -# For more information about tox, see https://tox.readthedocs.io/en/latest/ -[tox] -envlist = py{38,39,310} - -[gh-actions] -python = - 3.8: py38 - 3.9: py39 - 3.10: py310 - -[testenv] -passenv = - CI - GITHUB_ACTIONS - DISPLAY - XAUTHORITY - NUMPY_EXPERIMENTAL_ARRAY_FUNCTION - PYVISTA_OFF_SCREEN -deps = - pytest # https://docs.pytest.org/en/latest/contents.html - pytest-cov # https://pytest-cov.readthedocs.io/en/latest/ - pytest-qt # https://pytest-qt.readthedocs.io/en/latest/ - coverage - napari - pyqt5 - magicgui - -commands = pytest -v --color=yes --cov=brainglobe_segmentation --cov-report=xml From df4bee0e9b75c82dc5e9063f914a28179c17ecbe Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 6 Feb 2024 13:39:42 +0000 Subject: [PATCH 2/2] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- MANIFEST.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MANIFEST.in b/MANIFEST.in index fc9d53f..0d95878 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -8,4 +8,4 @@ include .napari/config.yml graft brainglobe_segmentation -prune tests \ No newline at end of file +prune tests