-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Revert deprecation changes * Update pyproject and subsume tox.ini * Rename package folder * bg-space to brainglobe-space everywhere * Update CI workflow to include auto-deploy on tags * Fix manifest * Lint README
- Loading branch information
1 parent
0959e87
commit 671834a
Showing
13 changed files
with
109 additions
and
99 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,33 +2,62 @@ name: Run tests | |
|
||
on: | ||
push: | ||
branches: [ main ] | ||
branches: | ||
- "main" | ||
tags: | ||
- "v**" | ||
pull_request: | ||
workflow_dispatch: | ||
|
||
concurrency: | ||
# Cancel this workflow if it is running, | ||
# and then changes are applied on top of the HEAD of the branch, | ||
# triggering another run of the workflow | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
lint: | ||
linting: | ||
name: Check Linting | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: neuroinformatics-unit/actions/lint@v1 | ||
- uses: neuroinformatics-unit/actions/lint@v2 | ||
|
||
manifest: | ||
name: Check Manifest | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: neuroinformatics-unit/actions/lint@v2 | ||
|
||
test: | ||
needs: lint | ||
name: ${{ matrix.os }} py${{ matrix.python-version }} | ||
name: Run package tests | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
# Run across a mixture of Python versions and operating systems | ||
include: | ||
- os: ubuntu-latest | ||
python-version: "3.11" | ||
- os: macos-latest | ||
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 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
build_sdist_wheel: | ||
name: Build source distribution and wheel | ||
needs: [test, linting, manifest] | ||
if: github.event_name == 'push' && github.ref_type == 'tag' | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/download-artifact@v3 | ||
with: | ||
name: artifact | ||
path: dist | ||
- uses: pypa/[email protected] | ||
with: | ||
user: __token__ | ||
password: ${{ secrets.TWINE_API_KEY }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,10 @@ | ||
include LICENSE | ||
include README.md | ||
|
||
exclude .pre-commit-config.yaml | ||
exclude .codecov.yml | ||
|
||
graft brainglobe_space | ||
|
||
prune tests | ||
prune docs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
__author__ = """Luigi Petrucco @brainglobe""" | ||
__version__ = "0.6.0" | ||
|
||
from brainglobe_space.core import AnatomicalSpace, SpaceConvention | ||
from brainglobe_space.functions import ( | ||
map_to, | ||
map_stack_to, | ||
transformation_matrix_to, | ||
transform_points_to, | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,66 +1,67 @@ | ||
[project] | ||
name = "bg_space" | ||
name = "brainglobe_space" | ||
description = "Anatomical space conventions made easy" | ||
readme = "README.md" | ||
authors = [ | ||
{name = "Luigi Petrucco", email = "[email protected]"}, | ||
] | ||
authors = [{ name = "Luigi Petrucco", email = "[email protected]" }] | ||
classifiers = [ | ||
"Development Status :: 3 - Alpha", | ||
"Intended Audience :: Science/Research", | ||
"Operating System :: OS Independent", | ||
"Programming Language :: Python", | ||
"Programming Language :: Python :: 3.8", | ||
"Programming Language :: Python :: 3.9", | ||
"Programming Language :: Python :: 3.10", | ||
"Programming Language :: Python :: 3.11", | ||
] | ||
requires-python = ">=3.8" | ||
dependencies = [ | ||
"numpy", | ||
"scipy", | ||
] | ||
requires-python = ">=3.9" | ||
dependencies = ["numpy", "scipy"] | ||
dynamic = ["version"] | ||
|
||
[project.urls] | ||
Homepage = "https://github.com/brainglobe/bg-space" | ||
Homepage = "https://github.com/brainglobe/brainglobe-space" | ||
|
||
[project.optional-dependencies] | ||
dev = [ | ||
"gitpython", | ||
"pre-commit", | ||
"pytest", | ||
"pytest-cov", | ||
] | ||
dev = ["gitpython", "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] | ||
include-package-data = true | ||
|
||
[tool.setuptools.packages.find] | ||
include = ["bg_space*"] | ||
include = ["brainglobe_space*"] | ||
|
||
[tool.setuptools_scm] | ||
|
||
[tool.pytest.ini_options] | ||
filterwarnings = [ | ||
"error", | ||
] | ||
filterwarnings = ["error"] | ||
|
||
[tool.black] | ||
target-version = ['py38', 'py39', 'py310', 'py311'] | ||
target-version = ['py39', 'py310', 'py311'] | ||
skip-string-normalization = false | ||
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{39,310,311} | ||
[gh-actions] | ||
python = | ||
3.9: py39 | ||
3.10: py310 | ||
3.11: py311 | ||
[testenv] | ||
extras = | ||
dev | ||
commands = | ||
pytest -v --color=yes --cov=brainglobe_space --cov-report=xml | ||
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters