diff --git a/.github/workflows/test_and_deploy.yml b/.github/workflows/test_and_deploy.yml index b051f3bf..08b0fd46 100644 --- a/.github/workflows/test_and_deploy.yml +++ b/.github/workflows/test_and_deploy.yml @@ -22,8 +22,6 @@ jobs: python-version: "3.10" - os: windows-latest python-version: "3.9" - - os: ubuntu-latest - python-version: "3.8" steps: - uses: neuroinformatics-unit/actions/test@v1 diff --git a/MANIFEST.in b/MANIFEST.in index 7b741275..599f2f1e 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,3 +1,6 @@ include LICENSE include README.md include requirements.txt + +exclude .codecov.yml +prune tutorials diff --git a/README.md b/README.md index 30a28276..cafd8178 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ [![Wheel](https://img.shields.io/pypi/wheel/bg-atlasapi.svg)](https://pypi.org/project/bg-atlasapi) [![Development Status](https://img.shields.io/pypi/status/brainatlas-api.svg)](https://github.com/SainsburyWellcomeCentre/brainatlas-api) [![Downloads](https://pepy.tech/badge/bg-atlasapi)](https://pepy.tech/project/bg-atlasapi) -[![Tests](https://img.shields.io/github/workflow/status/brainglobe/bg-atlasapi/tests)]( +[![Tests](https://img.shields.io/github/actions/workflow/status/brainglobe/bg-atlasapi/test_and_deploy.yml?branch=main)]( https://github.com/brainglobe/bg-atlasapi/actions) [![codecov](https://codecov.io/gh/brainglobe/bg-atlasapi/branch/master/graph/badge.svg?token=WTFPFW0TE4)](https://codecov.io/gh/brainglobe/bg-atlasapi) [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/python/black) diff --git a/bg_atlasapi/__init__.py b/bg_atlasapi/__init__.py index 56f04385..30bf062a 100644 --- a/bg_atlasapi/__init__.py +++ b/bg_atlasapi/__init__.py @@ -1,5 +1,12 @@ -__author__ = """brainglobe""" -__version__ = "1.0.2" +from importlib.metadata import PackageNotFoundError, metadata + +try: + __version__ = metadata("bg-atlasapi")["Version"] + __author__ = metadata("bg-atlasapi")["Author"] + del metadata +except PackageNotFoundError: + # package is not installed + pass from bg_atlasapi.bg_atlas import BrainGlobeAtlas diff --git a/docs/img/brainglobe_list.png b/docs/img/brainglobe_list.png deleted file mode 100644 index 24a4883d..00000000 Binary files a/docs/img/brainglobe_list.png and /dev/null differ diff --git a/pyproject.toml b/pyproject.toml index 83586e02..2bd3dd38 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -12,12 +12,11 @@ classifiers = [ "Intended Audience :: Science/Research", "Operating System :: OS Independent", "Programming Language :: Python", - "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.9", ] -requires-python = ">=3.8" +requires-python = ">=3.9" dependencies = [ "bg-space >= 0.5.0", "click", @@ -32,15 +31,14 @@ dependencies = [ dynamic = ["version"] [project.urls] -"Homepage" = "https://brainglobe.info/atlas-api" +"Homepage" = "https://brainglobe.info/documentation/bg-atlasapi/index.html" "Source Code" = "https://github.com/brainglobe/bg-atlasapi" "Bug Tracker" = "https://github.com/brainglobe/bg-atlasapi/issues" -"Documentation" = "https://docs.brainglobe.info/bg-atlasapi" +"Documentation" = "https://brainglobe.info/documentation/bg-atlasapi/index.html" [project.optional-dependencies] dev = [ "check-manifest", - "gitpython", "pre-commit", "pytest", "pytest-cov", @@ -74,7 +72,7 @@ markers = [ ] [tool.black] -target-version = ['py38', 'py39', 'py310', 'py311'] +target-version = ['py39', 'py310', 'py311'] skip-string-normalization = false line-length = 79 @@ -95,8 +93,20 @@ exclude = ["__init__.py","build",".eggs"] select = ["I", "E", "F"] fix = true -[tool.cibuildwheel] -build = "cp38-* cp39-* cp310-* cp311-*" +[tool.tox] +legacy_tox_ini = """ +# For more information about tox, see https://tox.readthedocs.io/en/latest/ +[tox] +envlist = py{38,39,310,311} + +[gh-actions] +python = + 3.9: py39 + 3.10: py310 + 3.11: py311 -[tool.cibuildwheel.macos] -archs = ["x86_64", "arm64"] +[testenv] +extras = + dev +commands = pytest -v --color=yes --cov=bg_atlasapi --cov-report=xml +""" diff --git a/tox.ini b/tox.ini deleted file mode 100644 index 63134dd7..00000000 --- a/tox.ini +++ /dev/null @@ -1,15 +0,0 @@ -# For more information about tox, see https://tox.readthedocs.io/en/latest/ -[tox] -envlist = py{37,38,39,310} - -[gh-actions] -python = - 3.7: py37 - 3.8: py38 - 3.9: py39 - 3.10: py310 - -[testenv] -extras = - dev -commands = pytest -v --color=yes --cov=bg_atlasapi --cov-report=xml