From 62ca01bb62a9f54f3bcb2e01faa6f891711bec0d Mon Sep 17 00:00:00 2001 From: barneydobson Date: Thu, 21 Nov 2024 18:09:12 +0000 Subject: [PATCH 1/2] Update pyproject.toml copied from sa --- pyproject.toml | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 6773128..1b5fff6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,9 +1,9 @@ [build-system] -requires = ["setuptools", "setuptools-scm"] -build-backend = "setuptools.build_meta" - -[tool.setuptools.packages.find] -exclude = ["htmlcov"] # Exclude the coverage report file from setuptools package finder +requires = [ + "hatch-vcs", + "hatchling", +] +build-backend = "hatchling.build" [project] name = "wsimod" @@ -61,6 +61,21 @@ doc = [ "wsimod[demos]" ] +[tool.hatch.build] +# Exclude specific files and folders (e.g., `htmlcov` for coverage report) +exclude = ["htmlcov"] + +[tool.hatch.metadata] +license = "BSD-3-clause" # Or your primary license name +license-files = [ "LICENSE"] + +[tool.hatch.version] +source = "vcs" + +[tool.hatch.build.hooks.vcs] +version-file = "_version.py" + + [tool.pytest.ini_options] addopts = "-v -p no:warnings --cov=wsimod --cov-report=html" From d82fd529a3b0b3300eeaeba39ab2e40a2ff4f549 Mon Sep 17 00:00:00 2001 From: barneydobson Date: Tue, 26 Nov 2024 09:31:39 +0000 Subject: [PATCH 2/2] Update pyproject.toml version to dynamic --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 1b5fff6..b67393f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -9,7 +9,7 @@ build-backend = "hatchling.build" name = "wsimod" description = "WSIMOD is for simulating water quality and quantity" readme = "README.md" -version = "0.4.0" +dynamic = [ "version"] license = {file = "LICENSE"} authors = [ { name = "Barnaby Dobson", email = "b.dobson@imperial.ac.uk" },