Skip to content

Commit 2435fa5

Browse files
Merge pull request #5 from NGO-Algorithm-Audit/main
update publishing
2 parents 44eb25e + b42e2da commit 2435fa5

File tree

3 files changed

+10
-4
lines changed

3 files changed

+10
-4
lines changed

.github/workflows/publish.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ jobs:
1111
- uses: actions/checkout@v3
1212
with:
1313
fetch-depth: 0 # Required for setuptools_scm to determine version
14-
14+
- name: Fetch tags
15+
run: git fetch --tags
1516
- name: Set up Python
1617
uses: actions/setup-python@v4
1718
with:
@@ -20,7 +21,7 @@ jobs:
2021
- name: Install dependencies
2122
run: |
2223
python -m pip install --upgrade pip
23-
pip install build twine
24+
pip install build twine setuptools setuptools_scm
2425
2526
- name: Build and test package
2627
run: |

pyproject.toml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ build-backend = "setuptools.build_meta"
44

55
[project]
66
name = "python-synthpop"
7-
version = "0.0.2"
87
description = "Python implementation of the R package synthpop for generating synthetic data"
98
authors = [
109
{name = "Algorithm Audit"}
1110
]
11+
dynamic = ["version"]
1212
requires-python = ">=3.8"
1313
dependencies = [
1414
"numpy>=1.20.0",
@@ -24,3 +24,7 @@ license = {file = "LICENSE"}
2424
dev = [
2525
"pytest>=7.0.0",
2626
]
27+
28+
[tool.setuptools_scm]
29+
version_scheme = "post-release"
30+
local_scheme = "dirty-tag"

setup.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55

66
setup(
77
name="python-synthpop",
8-
version="0.0.2",
8+
use_scm_version=True, # Dynamically use Git tags for versioning
9+
setup_requires=["setuptools_scm"], # Ensure setuptools_scm is available
910
author="Algorithm Audit",
1011
description="Python implementation of the R package synthpop for generating synthetic data",
1112
long_description=long_description,

0 commit comments

Comments
 (0)