Skip to content

Commit 99f0d2a

Browse files
Merge pull request #1156 from RonnyPfannschmidt/api-stability
experiment with griffe as api stability check/followup
2 parents 0e73054 + d1ca1e3 commit 99f0d2a

File tree

4 files changed

+241
-25
lines changed

4 files changed

+241
-25
lines changed

.github/workflows/api-check.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: API Stability Check
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches:
7+
- "*"
8+
9+
concurrency:
10+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
11+
cancel-in-progress: true
12+
13+
env:
14+
FORCE_COLOR: 1
15+
16+
jobs:
17+
api-check:
18+
name: Check API stability with griffe
19+
runs-on: ubuntu-latest
20+
21+
steps:
22+
- uses: actions/checkout@v4
23+
with:
24+
fetch-depth: 0
25+
26+
- name: Setup Python
27+
uses: actions/setup-python@v5
28+
with:
29+
python-version: '3.11'
30+
31+
- name: Install dependencies
32+
run: |
33+
pip install -U pip setuptools
34+
pip install -e .[test]
35+
36+
- name: Run griffe API check
37+
run: |
38+
griffe check setuptools_scm -ssrc -f github

pyproject.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,8 @@ test = [
6767
"rich",
6868
'typing-extensions; python_version < "3.11"',
6969
"wheel",
70+
"griffe",
71+
"flake8",
7072
]
7173
toml = [
7274
]

src/setuptools_scm/_integration/dump_version.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,14 @@
1616
# file generated by setuptools-scm
1717
# don't change, don't track in version control
1818
19-
__all__ = ["__version__", "__version_tuple__", "version", "version_tuple", "__commit_id__", "commit_id"]
19+
__all__ = [
20+
"__version__",
21+
"__version_tuple__",
22+
"version",
23+
"version_tuple",
24+
"__commit_id__",
25+
"commit_id",
26+
]
2027
2128
TYPE_CHECKING = False
2229
if TYPE_CHECKING:

0 commit comments

Comments
 (0)