Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make package version dynamic #114

Merged
merged 8 commits into from
Jan 11, 2024
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install black isort
python -m pip install .[lint]

- name: Run "black --check"
run: |
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ jobs:

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install ruff==0.0.282 pytest pytest-cov wheel build coverage
python -m pip install --upgrade pip build
pip install .[test,lint]

- name: Lint with ruff
run: |
Expand All @@ -57,7 +57,6 @@ jobs:

- name: Run tests
run: |
pip install .[test]
pytest
coverage lcov -o coverage.lcov

Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ venv*
build/
dist/
*.whl
/src/sdx_datamodel/_version.py

# Ignore files generated by coverage tools.
/.coverage
Expand Down
20 changes: 17 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
[build-system]
requires = ["setuptools >= 61.0", "setuptools-scm"]
requires = [
"setuptools >= 61.0",
"setuptools-scm >= 6.2",
"build >= 1.0.3"
]
build-backend = "setuptools.build_meta"

[project]
name = "sdx-datamodel"
version = "2.0.4"
description = "Topology and request description data model in JSON"
dynamic = [ "version" ]
authors = [
{ name = "Y. Xin", email = "[email protected]" }
]
description = "Topology and request description data model in JSON"
readme = "README.md"
requires-python = ">=3.8"
license = { file = "LICENSE" }
Expand All @@ -34,10 +38,20 @@ test = [
"jsonschema >= 4.19.0",
"jsonref >= 1.1.0",
]
lint = [
"ruff == 0.1.11",
"black == 23.*",
"isort == 5.*",
]

[options.packages.find]
where = "."

[tool.setuptools_scm]
# Write version info collected from git to a file. This happens when
# we run `python -m build`.
write_to = "src/sdx_datamodel/_version.py"

[tool.pytest.ini_options]
addopts = "--cov --cov-report html --cov-report term-missing"
testpaths = [
Expand Down