diff --git a/.bumpversion.cfg b/.bumpversion.cfg deleted file mode 100644 index cbd162f..0000000 --- a/.bumpversion.cfg +++ /dev/null @@ -1,28 +0,0 @@ -[bumpversion] -current_version = 1.3.3 -commit = True -tag = False -parse = (?P\d+)\.(?P\d+)\.(?P\d+)(-(?P.*)-(?P\d+))? -serialize = - {major}.{minor}.{patch}-{release}-{build} - {major}.{minor}.{patch} - -[bumpversion:part:release] -first_value = regular -optional_value = regular -values = - alpha - beta - rc - test - regular - -[bumpversion:part:build] - -[bumpversion:file:pyproject.toml] -search = version = "{current_version}" -replace = version = "{new_version}" - -[bumpversion:file:solvis/__init__.py] -search = __version__ = '{current_version}' -replace = __version__ = '{new_version}' diff --git a/.gitignore b/.gitignore index f71be91..c906899 100644 --- a/.gitignore +++ b/.gitignore @@ -117,3 +117,6 @@ ENV/ site/ audit.txt .claude/settings.local.json + +# generated by hatch-vcs at build / editable-install time +solvis/_version.py diff --git a/pyproject.toml b/pyproject.toml index f1763cb..79e5d29 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "solvis" -version = "1.3.3" +dynamic = ["version"] description = "Analysis of opensha modular solution files." readme = "README.md" license = { text = "AGPL-3.0-or-later" } @@ -43,7 +43,6 @@ doc = [ ] dev = [ "black>=24.10.0", - "bump2version>=1.0.1", "flake8>=7.1.1", "flake8-docstrings>=1.7.0", "ipython>=8.11.0", @@ -66,9 +65,15 @@ scripts = [ ] [build-system] -requires = ["hatchling"] +requires = ["hatchling", "hatch-vcs"] build-backend = "hatchling.build" +[tool.hatch.version] +source = "vcs" + +[tool.hatch.build.hooks.vcs] +version-file = "solvis/_version.py" + [tool.hatch.build.targets.wheel] packages = ["solvis"] diff --git a/solvis/__init__.py b/solvis/__init__.py index cb92166..4b1b320 100644 --- a/solvis/__init__.py +++ b/solvis/__init__.py @@ -11,6 +11,5 @@ """ from . import utils +from ._version import __version__ from .solution import CompositeSolution, FaultSystemSolution, InversionSolution - -__version__ = '1.3.3' diff --git a/uv.lock b/uv.lock index 6857fab..238423f 100644 --- a/uv.lock +++ b/uv.lock @@ -8,7 +8,7 @@ resolution-markers = [ ] [options] -exclude-newer = "0001-01-01T00:00:00Z" # This has no effect and is included for backwards compatibility when using relative exclude-newer values. +exclude-newer = "2026-07-08T01:14:59.500045495Z" exclude-newer-span = "P1W" [options.exclude-newer-package] @@ -245,15 +245,6 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/9d/2a/9186535ce58db529927f6cf5990a849aa9e052eea3e2cfefe20b9e1802da/bracex-2.6-py3-none-any.whl", hash = "sha256:0b0049264e7340b3ec782b5cb99beb325f36c3782a32e36e876452fd49a09952", size = 11508, upload-time = "2025-06-22T19:12:29.781Z" }, ] -[[package]] -name = "bump2version" -version = "1.0.1" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/29/2a/688aca6eeebfe8941235be53f4da780c6edee05dbbea5d7abaa3aab6fad2/bump2version-1.0.1.tar.gz", hash = "sha256:762cb2bfad61f4ec8e2bdf452c7c267416f8c70dd9ecb1653fd0bbb01fa936e6", size = 36236, upload-time = "2020-10-07T18:38:40.119Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/1d/e3/fa60c47d7c344533142eb3af0b73234ef8ea3fb2da742ab976b947e717df/bump2version-1.0.1-py2.py3-none-any.whl", hash = "sha256:37f927ea17cde7ae2d7baf832f8e80ce3777624554a653006c9144f8017fe410", size = 22030, upload-time = "2020-10-07T18:38:38.148Z" }, -] - [[package]] name = "cachecontrol" version = "0.14.4" @@ -4000,7 +3991,6 @@ wheels = [ [[package]] name = "solvis" -version = "1.3.2" source = { editable = "." } dependencies = [ { name = "geopandas" }, @@ -4025,7 +4015,6 @@ vtk = [ [package.dev-dependencies] dev = [ { name = "black" }, - { name = "bump2version" }, { name = "flake8" }, { name = "flake8-docstrings" }, { name = "ipython", version = "8.39.0", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.11'" }, @@ -4077,12 +4066,11 @@ requires-dist = [ { name = "pyvista", marker = "extra == 'vtk'", specifier = ">=0.44.1" }, { name = "shapely", marker = "extra == 'demo'" }, ] -provides-extras = ["vtk", "demo"] +provides-extras = ["demo", "vtk"] [package.metadata.requires-dev] dev = [ { name = "black", specifier = ">=24.10.0" }, - { name = "bump2version", specifier = ">=1.0.1" }, { name = "flake8", specifier = ">=7.1.1" }, { name = "flake8-docstrings", specifier = ">=1.7.0" }, { name = "ipython", specifier = ">=8.11.0" },