-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: Setup CI testing, linting, and formatting (#56)
* ci: Setup CI and linting/testing * test: Add initial test * fix: setting float nan/inf * fix: prefer double quotes * fix: Actually handle nan * chore: Run ruff format * chore: Apply linting * docs: Add developement instructions to README.md
- Loading branch information
Showing
10 changed files
with
344 additions
and
215 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,40 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
Lint: | ||
runs-on: macos-14 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.12" | ||
- run: | | ||
pip install uv | ||
uv pip install --system ruff | ||
ruff check | ||
Test: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- run: | | ||
pip install uv | ||
uv pip install --system . | ||
uv pip install --system pytest inline-snapshot | ||
- name: Run tests | ||
run: pytest ./tests --color=yes |
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,9 +1,8 @@ | ||
"""A Jupyter widget for Niivue based on anywidget.""" | ||
|
||
import importlib.metadata | ||
|
||
from ._constants import SliceType, DragMode, MuliplanarType # noqa | ||
from ._widget import AnyNiivue # noqa | ||
from ._constants import DragMode, MuliplanarType, SliceType # noqa: F401 | ||
from ._widget import AnyNiivue # noqa: F401 | ||
|
||
try: | ||
__version__ = importlib.metadata.version("ipyniivue") | ||
except importlib.metadata.PackageNotFoundError: | ||
__version__ = "unknown" | ||
__version__ = importlib.metadata.version("ipyniivue") |
Oops, something went wrong.