diff --git a/.github/workflows/test_and_deploy.yml b/.github/workflows/test_and_deploy.yml index 368e839..0649eb1 100644 --- a/.github/workflows/test_and_deploy.yml +++ b/.github/workflows/test_and_deploy.yml @@ -1,15 +1,29 @@ name: tests -on: [push, pull_request] +on: + push: + branches: + - "main" + tags: + - "v**" + pull_request: + workflow_dispatch: jobs: - lint: + linting: + name: Check Linting runs-on: ubuntu-latest steps: - uses: neuroinformatics-unit/actions/lint@v2 + manifest: + name: Check Manifest + runs-on: ubuntu-latest + steps: + - uses: neuroinformatics-unit/actions/check_manifest@v2 + test: - needs: lint + 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..18039b7 --- /dev/null +++ b/MANIFEST.in @@ -0,0 +1,8 @@ +exclude .pre-commit-config.yaml + +include LICENSE +include README.md + +graft imio *.py + +prune tests diff --git a/pyproject.toml b/pyproject.toml index c400c3e..0826dc5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -3,7 +3,7 @@ name = "imio" description = "Loading and saving of image data." readme = "README.md" authors = [ - {name = "Charly Rousseau, Adam Tyson", email = "code@adamltyson.com"}, + { name = "Charly Rousseau, Adam Tyson", email = "code@adamltyson.com" }, ] classifiers = [ "Development Status :: 3 - Alpha", @@ -24,6 +24,7 @@ dependencies = [ "nibabel >= 2.1.0", "numpy", "psutil", + "pyarrow", "pynrrd", "scikit-image", "tifffile", @@ -35,19 +36,10 @@ dynamic = ['version'] Homepage = "https://github.com/brainglobe/imio" [project.optional-dependencies] -dev = [ - "black", - "pre-commit", - "pytest", - "pytest-cov", -] +dev = ["black", "pre-commit", "pytest", "pytest-cov"] [build-system] -requires = [ - "setuptools>=45", - "wheel", - "setuptools_scm[toml]>=6.2", -] +requires = ["setuptools>=45", "wheel", "setuptools_scm[toml]>=6.2"] build-backend = "setuptools.build_meta" [tool.setuptools] @@ -72,7 +64,7 @@ filterwarnings = [ "ignore:`np.uint0` is a deprecated alias for `np.uintp`", "ignore:`np.void0` is a deprecated alias for `np.void`", "ignore:`np.bytes0` is a deprecated alias for `np.bytes_`", - "ignore:`np.str0` is a deprecated alias for `np.str_`" + "ignore:`np.str0` is a deprecated alias for `np.str_`", ] [tool.black] @@ -82,6 +74,26 @@ line-length = 79 [tool.ruff] line-length = 79 -exclude = ["__init__.py","build",".eggs"] +exclude = ["__init__.py", "build", ".eggs"] select = ["I", "E", "F"] fix = true + +[tool.tox] +legacy_tox_ini = """ +[tox] +envlist = py{38,39,310,311} + +[gh-actions] +python = + 3.8: py38 + 3.9: py39 + 3.10: py310 + 3.11: py311 + +[testenv] +extras = + dev +commands = + pytest -v --color=yes --cov=imio --cov-report=xml + +""" diff --git a/tox.ini b/tox.ini deleted file mode 100644 index 978bb51..0000000 --- a/tox.ini +++ /dev/null @@ -1,15 +0,0 @@ -[tox] -envlist = py{38,39,310,311} - -[gh-actions] -python = - 3.8: py38 - 3.9: py39 - 3.10: py310 - 3.11: py311 - -[testenv] -extras = - dev -commands = - pytest -v --color=yes --cov=imio --cov-report=xml