Skip to content

Commit 6f79d39

Browse files
authored
Merge pull request #397 from BiAPoL/modernize-CI
Modernize ci to use git tags for versioning and updated tox workflow
2 parents 62720bc + 0c575ff commit 6f79d39

File tree

4 files changed

+34
-24
lines changed

4 files changed

+34
-24
lines changed

pyproject.toml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ testing = [
6363
"User Support" = "https://github.com/BiAPoL/napari-clusters-plotter/issues"
6464

6565
[build-system]
66-
requires = ["setuptools>=42.0.0", "wheel"]
66+
requires = ["setuptools>=42.0.0", "wheel", "setuptools_scm"]
6767
build-backend = "setuptools.build_meta"
6868

6969
[tool.setuptools]
@@ -75,8 +75,9 @@ where = ["src"]
7575
[tool.setuptools.package-data]
7676
"*" = ["*.yaml"]
7777

78-
[tool.setuptools.dynamic]
79-
version = {attr = "napari_clusters_plotter.__version__"}
78+
[tool.setuptools_scm]
79+
write_to = "src/napari_clusters_plotter/_version.py"
80+
fallback_version = "0.0.1+nogit"
8081

8182
[tool.black]
8283
line-length = 79

src/napari_clusters_plotter/__init__.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
__version__ = "0.8.0"
1+
try:
2+
from ._version import version as __version__
3+
except ImportError:
4+
__version__ = "unknown"
25

36
from ._dim_reduction_and_clustering import (
47
ClusteringWidget,
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# file generated by setuptools-scm
2+
# don't change, don't track in version control
3+
4+
__all__ = ["__version__", "__version_tuple__", "version", "version_tuple"]
5+
6+
TYPE_CHECKING = False
7+
if TYPE_CHECKING:
8+
from typing import Tuple, Union
9+
10+
VERSION_TUPLE = Tuple[Union[int, str], ...]
11+
else:
12+
VERSION_TUPLE = object
13+
14+
version: str
15+
__version__: str
16+
__version_tuple__: VERSION_TUPLE
17+
version_tuple: VERSION_TUPLE
18+
19+
__version__ = version = "0.8.2.dev372+g7a6588e.d20250514"
20+
__version_tuple__ = version_tuple = (0, 8, 2, "dev372", "g7a6588e.d20250514")

tox.ini

Lines changed: 6 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# For more information about tox, see https://tox.readthedocs.io/en/latest/
22
[tox]
3-
envlist = python{39, 310, 311, 312, 313}-{linux,macos,windows}
3+
envlist = py{39, 310,311,312,313}-{linux,macos,windows}
4+
isolated_build=true
45

56
[gh-actions]
67
python =
@@ -13,8 +14,8 @@ python =
1314
[gh-actions:env]
1415
PLATFORM =
1516
ubuntu-latest: linux
16-
#macos-latest: macos
17-
#windows-latest: windows
17+
macos-latest: macos
18+
windows-latest: windows
1819

1920
[testenv]
2021
platform =
@@ -28,21 +29,6 @@ passenv =
2829
XAUTHORITY
2930
NUMPY_EXPERIMENTAL_ARRAY_FUNCTION
3031
PYVISTA_OFF_SCREEN
31-
deps =
32-
pytest # https://docs.pytest.org/en/latest/contents.html
33-
pytest-cov # https://pytest-cov.readthedocs.io/en/latest/
34-
pytest-xvfb ; sys_platform == 'linux'
35-
# you can remove these if you don't use them
36-
napari
37-
magicgui
38-
pytest-qt
39-
qtpy
40-
pyqt5
41-
scikit-learn
42-
pandas
43-
umap-learn
44-
napari-tools-menu
45-
napari-skimage-regionprops>=0.2.0
46-
hdbscan
47-
deprecated
32+
extras =
33+
testing
4834
commands = pytest -v --color=yes --cov=napari_clusters_plotter --cov-report=xml

0 commit comments

Comments
 (0)