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..0d95878 --- /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 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