File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2828 uses : mikepenz/action-junit-report@v2
2929 with :
3030 report_paths : " junit/test-results*.xml"
31+
32+ build :
33+ name : Build distribution 📦
34+ runs-on : ubuntu-latest
35+
36+ steps :
37+ - uses : actions/checkout@v4
38+ - name : Set up Python
39+ uses : actions/setup-python@v5
40+ with :
41+ python-version : " 3.x"
42+ - name : Install pypa/build
43+ run : >-
44+ python3 -m pip install build --user
45+ - name : Build a binary wheel and a source tarball
46+ run : python3 -m build
47+ - name : Store the distribution packages
48+ uses : actions/upload-artifact@v4
49+ with :
50+ name : python-package-distributions
51+ path : dist/
52+
53+ publish-to-pypi :
54+ name : >-
55+ Publish Python 🐍 distribution 📦 to PyPI
56+ if : startsWith(github.ref, 'refs/tags/') # only publish to PyPI on tag pushes
57+ needs :
58+ - build
59+ runs-on : ubuntu-latest
60+ environment :
61+ name : pypi
62+ url : https://pypi.org/project/multiscale_spatial_image/
63+ permissions :
64+ id-token : write # IMPORTANT: mandatory for trusted publishing
65+
66+ steps :
67+ - name : Download all the dists
68+ uses : actions/download-artifact@v4
69+ with :
70+ name : python-package-distributions
71+ path : dist/
72+ - name : Publish distribution 📦 to PyPI
73+ uses : pypa/gh-action-pypi-publish@release/v1
Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ examples/dask-worker-space/
1111.pixi /
1212examples /Cell_Colony.zarr /
1313.idea /
14+ _version.py
1415
1516# Byte-compiled / optimized / DLL files
1617__pycache__ /
Original file line number Diff line number Diff line change @@ -251,19 +251,9 @@ We use the standard [GitHub flow].
251251
252252This section is relevant only for maintainers.
253253
254- 1 . Pull ` git ` 's ` main ` branch.
255- 2 . ` pixi install -a `
256- 3 . ` pixi run pre-commit-install `
257- 4 . ` pixi run -e test test `
258- 5 . ` pixi shell `
259- 6 . ` hatch version <new-version> `
260- 7 . ` git add . `
261- 8 . ` git commit -m "ENH: Bump version to <version>" `
262- 9 . ` hatch build `
263- 10 . ` hatch publish `
264- 11 . ` git push upstream main `
265- 12 . Create a new tag and Release via the GitHub UI. Auto-generate release notes
266- and add additional notes as needed.
254+ Create a new tag and Release via the GitHub UI. Auto-generate release notes and
255+ add additional notes as needed. The version number is automatically updated via
256+ [ hatch-vcs] ( https://hatch.pypa.io/latest/plugins/build/hooks/vcs/ ) .
267257
268258[ spatial-image ] : https://github.com/spatial-image/spatial-image
269259[ Xarray ] : https://xarray.pydata.org/en/stable/
Load diff This file was deleted.
Original file line number Diff line number Diff line change 88 "to_multiscale" ,
99 "itk_image_to_multiscale" ,
1010 "skip_non_dimension_nodes" ,
11- "__version__" ,
1211]
1312
14- from .__about__ import __version__
1513from .multiscale_spatial_image import MultiscaleSpatialImage
1614from .to_multiscale import Methods , to_multiscale , itk_image_to_multiscale
1715from .utils import skip_non_dimension_nodes
Original file line number Diff line number Diff line change 11[build-system ]
2- requires = [" hatchling" ]
2+ requires = [" hatchling" , " hatch-vcs " ]
33build-backend = " hatchling.build"
44
55[project ]
@@ -76,7 +76,10 @@ notebooks = [
7676line-length = 88
7777
7878[tool .hatch .version ]
79- path = " multiscale_spatial_image/__about__.py"
79+ source = " vcs"
80+
81+ [tool .hatch .build .hooks .vcs ]
82+ version-file = " multiscale_spatial_image/_version.py"
8083
8184[tool .pixi .workspace ]
8285channels = [" conda-forge" ]
You can’t perform that action at this time.
0 commit comments