Skip to content

Commit d484231

Browse files
authored
Fix setuptools-scm integration (#167)
* Full checkout for packaging * Don't hardcode version for sphinx builds * Fix README * Add contributing.rst to docs * Fix link
1 parent f299d3d commit d484231

6 files changed

Lines changed: 18 additions & 5 deletions

File tree

.github/workflows/python-publish.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ jobs:
2121

2222
steps:
2323
- uses: actions/checkout@v4
24+
with:
25+
# Fetch full history for setuptools-scm
26+
fetch-depth: 0
2427

2528
- uses: actions/setup-python@v5
2629
with:
@@ -56,7 +59,8 @@ jobs:
5659
# ALTERNATIVE: if your GitHub Release name is the PyPI project version string
5760
# ALTERNATIVE: exactly, uncomment the following line instead:
5861
# url: https://pypi.org/project/YOURPROJECT/${{ github.event.release.name }}
59-
62+
env:
63+
SETUPTOOLS_SCM_OVERRIDES_FOR_PETAB_GUI: '{"local_scheme": "no-local-version"}'
6064
steps:
6165
- name: Retrieve release distributions
6266
uses: actions/download-artifact@v4

.readthedocs.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,10 @@ build:
2222
os: "ubuntu-24.04"
2323
tools:
2424
python: "3.11"
25+
jobs:
26+
post_checkout:
27+
# Avoid setuptools-scm dirty Git index issues
28+
- git reset --hard HEAD
29+
- git clean -fdx
30+
# Enforce fail_on_shallow for setuptools-scm
31+
- export SETUPTOOLS_SCM_OVERRIDES_FOR_${READTHEDOCS_PROJECT//-/_}='{scm.git.pre_parse="fail_on_shallow"}'

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ pip install petab_gui
2121
To install the latest development version from GitHub, run:
2222

2323
```bash
24-
pip3 install git+https://github.com/PaulJonasJost/PEtab_GUI/
24+
pip install git+https://github.com/PaulJonasJost/PEtab_GUI/
2525
```
2626

2727
### From a local copy
@@ -52,7 +52,7 @@ The PEtabGUI provides a Python-based graphical user interface that simplifies
5252
the creation, editing, and validation of PEtab parameter estimation problems.
5353

5454
- **Unified Environment**
55-
- Integrates all PEtab components (SBML/PySB models, conditions, observables,
55+
- Integrates all PEtab components (SBML models, conditions, observables,
5656
measurements, parameters, and visualization files).
5757
- Supports drag-and-drop import of YAML or individual component files.
5858
- Automatically resolves mismatches and converts matrix-format experimental data

docs/source/conf.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
#
33
# For the full list of built-in configuration values, see the documentation:
44
# https://www.sphinx-doc.org/en/master/usage/configuration.html
5+
from importlib.metadata import version as get_version
56

67
rst_prolog = """
78
.. |petab_doc_url| replace:: https://petab.readthedocs.io/en/latest/index.html
@@ -13,7 +14,7 @@
1314
project = "PEtab GUI"
1415
copyright = "2025, Paul Jonas Jost, Frank T. Bergmann"
1516
author = "Paul Jonas Jost, Frank T. Bergmann"
16-
release = "0.1.3"
17+
release: str = get_version("petab-gui")
1718

1819
# -- General configuration ---------------------------------------------------
1920
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration

docs/source/contributing.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ Filing an Issue
4242
----------------
4343

4444
If you encounter any bugs or have feature requests, please file an issue on GitHub.
45-
[Open a new issue](https://github.com/PaulJonasJost/PEtab_GUI/issues/new/choose).
45+
`Open a new issue <https://github.com/PaulJonasJost/PEtab_GUI/issues/new/choose>`__.
4646

4747
When filing an issue, provide as much detail as possible,
4848
including steps to reproduce the issue, expected behavior, and any relevant logs or screenshots.

docs/source/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,3 +55,4 @@ To get started with PEtab GUI, check out the :doc:`installation instructions <re
5555
:caption: Development
5656

5757
GitHub Repository <https://github.com/PaulJonasJost/PEtab_GUI>
58+
contributing

0 commit comments

Comments
 (0)