This repository has been archived by the owner on Jan 5, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* update pre-commit config * update args for new brainreg version * lint * update manifest * Bump version: 0.0.5-rc0 → 0.0.5-rc1 * update testing * update packaging * update requirements * update manifest * move entry point to pyproject.toml * update hub preview version * update release for use with setuptools_scm * migrate from BG to neuroinformatics actions * add setuptools_scm to dev requirements * reduce number of tested version * update python versions tested * update release
- Loading branch information
1 parent
de4e607
commit f1ba83c
Showing
12 changed files
with
187 additions
and
175 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 |
---|---|---|
@@ -0,0 +1,4 @@ | ||
[flake8] | ||
ignore = E203, E231, W503, E722 | ||
max-line-length = 79 | ||
exclude = __init__.py,build,.eggs |
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 |
---|---|---|
|
@@ -16,6 +16,6 @@ jobs: | |
uses: actions/checkout@v2 | ||
|
||
- name: napari hub Preview Page Builder | ||
uses: chanzuckerberg/[email protected].5 | ||
uses: chanzuckerberg/[email protected] | ||
with: | ||
hub-ref: main |
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,59 +1,98 @@ | ||
name: tests | ||
|
||
on: [push, pull_request] | ||
on: | ||
push: | ||
branches: | ||
- '*' | ||
tags: | ||
- '*' | ||
pull_request: | ||
|
||
jobs: | ||
linting: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: brainglobe/actions/lint@v1 | ||
- uses: neuroinformatics-unit/actions/lint@v1.2.0 | ||
|
||
manifest: | ||
name: Check Manifest | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: brainglobe/actions/check_manifest@v1 | ||
- uses: neuroinformatics-unit/actions/check_manifest@v1.2.0 | ||
|
||
test: | ||
needs: [linting, manifest] | ||
needs: [ linting, manifest ] | ||
name: ${{ matrix.os }} py${{ matrix.python-version }} | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
# Run all supported Python versions on linux and windows | ||
# Run all supported Python versions on linux | ||
python-version: ["3.8", "3.9", "3.10"] | ||
os: [ubuntu-latest, windows-latest] | ||
os: [ubuntu-latest] | ||
# Test on Windows and macOS on only one OS to save time (and CI minutes) | ||
include: | ||
- os: macos-latest | ||
python-version: "3.10" | ||
- os: windows-latest | ||
python-version: "3.10" | ||
|
||
steps: | ||
# Setup pyqt libraries | ||
- uses: tlambert03/setup-qt-libs@v1 | ||
# Run tests | ||
- uses: brainglobe/actions/test@v1 | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
deploy: | ||
# this will run when you have tagged a commit, starting with "v*" | ||
# and requires that you have put your twine API key in your | ||
# github secrets (see readme for details) | ||
needs: [test] | ||
runs-on: ubuntu-latest | ||
if: contains(github.ref, 'tags') | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: "3.x" | ||
# these libraries enable testing on Qt on linux | ||
- uses: tlambert03/setup-qt-libs@v1 | ||
|
||
# strategy borrowed from vispy for installing opengl libs on windows | ||
- name: Install Windows OpenGL | ||
if: runner.os == 'Windows' | ||
run: | | ||
git clone --depth 1 https://github.com/pyvista/gl-ci-helpers.git | ||
powershell gl-ci-helpers/appveyor/install_opengl.ps1 | ||
# note: if you need dependencies from conda, considering using | ||
# setup-miniconda: https://github.com/conda-incubator/setup-miniconda | ||
# and | ||
# tox-conda: https://github.com/tox-dev/tox-conda | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install -U setuptools setuptools_scm wheel twine | ||
- name: Build and publish | ||
python -m pip install setuptools tox tox-gh-actions | ||
# this runs the platform-specific tests declared in tox.ini | ||
- name: Test with tox | ||
uses: GabrielBB/xvfb-action@v1 | ||
with: | ||
run: python -m tox | ||
env: | ||
TWINE_USERNAME: __token__ | ||
TWINE_PASSWORD: ${{ secrets.TWINE_API_KEY }} | ||
run: | | ||
git tag | ||
python setup.py sdist bdist_wheel | ||
twine upload dist/* | ||
PLATFORM: ${{ matrix.platform }} | ||
|
||
- name: Coverage | ||
uses: codecov/codecov-action@v2 | ||
|
||
build_sdist_wheels: | ||
name: Build source distribution | ||
needs: [test] | ||
if: github.event_name == 'push' && github.ref_type == 'tag' | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: neuroinformatics-unit/actions/build_sdist_wheels@main | ||
|
||
|
||
upload_all: | ||
name: Publish build distributions | ||
needs: [build_sdist_wheels] | ||
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +0,0 @@ | ||
__version__ = "0.0.5-rc0" | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,77 @@ | ||
[project] | ||
name = "brainreg-napari" | ||
authors = [{name = "Adam Tyson, Stephen Lenzi", email= "[email protected]"}] | ||
description = "Multi-atlas whole-brain microscopy registration" | ||
readme = "README.md" | ||
requires-python = ">=3.8.0" | ||
dynamic = ["version"] | ||
classifiers = [ | ||
"Development Status :: 4 - Beta", | ||
"Framework :: napari", | ||
"Topic :: Scientific/Engineering :: Image Recognition", | ||
"Intended Audience :: Developers", | ||
"Intended Audience :: Science/Research", | ||
"Programming Language :: Python", | ||
"Programming Language :: Python :: 3", | ||
"Programming Language :: Python :: 3.8", | ||
"Programming Language :: Python :: 3.9", | ||
"Programming Language :: Python :: 3.10", | ||
"Operating System :: OS Independent", | ||
] | ||
|
||
license = {text = "BSD-3-Clause"} | ||
dependencies = [ | ||
"napari", | ||
"napari-plugin-engine >= 0.1.4", | ||
"magicgui", | ||
"qtpy", | ||
"brainglobe-napari-io", | ||
"brainreg", | ||
"brainreg-segment", | ||
"pooch>1", # For sample data | ||
] | ||
|
||
[project.optional-dependencies] | ||
dev = [ | ||
"black", | ||
"pytest-cov", | ||
"pytest", | ||
"pytest-qt", | ||
"napari", | ||
"pyqt5", | ||
"tox", | ||
"gitpython", | ||
"coverage>=5.0.3", | ||
"bump2version", | ||
"pre-commit", | ||
"flake8", | ||
"check-manifest", | ||
"setuptools_scm", | ||
] | ||
|
||
[project.urls] | ||
homepage = "https://brainglobe.info" | ||
bug_tracker = "https://github.com/brainglobe/brainreg-napari/issues" | ||
documentation = "https://docs.brainglobe.info/brainreg-napari" | ||
source_code = "https://github.com/brainglobe/brainreg-napari" | ||
user_support = "https://forum.image.sc/tag/brainglobe" | ||
twitter = "https://twitter.com/brain_globe" | ||
|
||
[project.entry-points."napari.manifest"] | ||
brainreg-napari = "brainreg_napari:napari.yaml" | ||
|
||
[build-system] | ||
requires = [ | ||
"setuptools>=45", | ||
"wheel", | ||
"setuptools_scm[toml]>=6.2", | ||
] | ||
build-backend = "setuptools.build_meta" | ||
|
||
[tool.setuptools_scm] | ||
|
||
[tool.black] | ||
target-version = ['py38', 'py39', 'py310'] | ||
skip-string-normalization = false | ||
line-length = 79 | ||
exclude = ''' | ||
|
@@ -8,10 +81,7 @@ exclude = ''' | |
| \.git | ||
| \.hg | ||
| \.mypy_cache | ||
| \.tox | ||
| \.venv | ||
| _build | ||
| buck-out | ||
| build | ||
| dist | ||
)/ | ||
|
Oops, something went wrong.