Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 43 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,46 @@ jobs:
uses: mikepenz/action-junit-report@v2
with:
report_paths: "junit/test-results*.xml"

build:
name: Build distribution 📦
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.x"
- name: Install pypa/build
run: >-
python3 -m pip install build --user
- name: Build a binary wheel and a source tarball
run: python3 -m build
- name: Store the distribution packages
uses: actions/upload-artifact@v4
with:
name: python-package-distributions
path: dist/

publish-to-pypi:
name: >-
Publish Python 🐍 distribution 📦 to PyPI
if: startsWith(github.ref, 'refs/tags/') # only publish to PyPI on tag pushes
needs:
- build
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/project/multiscale_spatial_image/
permissions:
id-token: write # IMPORTANT: mandatory for trusted publishing

steps:
- name: Download all the dists
uses: actions/download-artifact@v4
with:
name: python-package-distributions
path: dist/
- name: Publish distribution 📦 to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ examples/dask-worker-space/
.pixi/
examples/Cell_Colony.zarr/
.idea/
_version.py

# Byte-compiled / optimized / DLL files
__pycache__/
16 changes: 3 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -251,19 +251,9 @@ We use the standard [GitHub flow].

This section is relevant only for maintainers.

1. Pull `git`'s `main` branch.
2. `pixi install -a`
3. `pixi run pre-commit-install`
4. `pixi run -e test test`
5. `pixi shell`
6. `hatch version <new-version>`
7. `git add .`
8. `git commit -m "ENH: Bump version to <version>"`
9. `hatch build`
10. `hatch publish`
11. `git push upstream main`
12. Create a new tag and Release via the GitHub UI. Auto-generate release notes
and add additional notes as needed.
Create a new tag and Release via the GitHub UI. Auto-generate release notes and
add additional notes as needed. The version number is automatically updated via
[hatch-vcs](https://hatch.pypa.io/latest/plugins/build/hooks/vcs/).

[spatial-image]: https://github.com/spatial-image/spatial-image
[Xarray]: https://xarray.pydata.org/en/stable/
Expand Down
4 changes: 0 additions & 4 deletions multiscale_spatial_image/__about__.py

This file was deleted.

2 changes: 0 additions & 2 deletions multiscale_spatial_image/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,8 @@
"to_multiscale",
"itk_image_to_multiscale",
"skip_non_dimension_nodes",
"__version__",
]

from .__about__ import __version__
from .multiscale_spatial_image import MultiscaleSpatialImage
from .to_multiscale import Methods, to_multiscale, itk_image_to_multiscale
from .utils import skip_non_dimension_nodes
7 changes: 5 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[build-system]
requires = ["hatchling"]
requires = ["hatchling", "hatch-vcs"]
build-backend = "hatchling.build"

[project]
Expand Down Expand Up @@ -76,7 +76,10 @@ notebooks = [
line-length = 88

[tool.hatch.version]
path = "multiscale_spatial_image/__about__.py"
source = "vcs"

[tool.hatch.build.hooks.vcs]
version-file = "multiscale_spatial_image/_version.py"

[tool.pixi.workspace]
channels = ["conda-forge"]
Expand Down
Loading