Skip to content

Commit ccdd14a

Browse files
committed
updated to 0.4.0
1 parent dee6b83 commit ccdd14a

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

.github/workflows/release.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
name: Release SFLKit to PyPi and GitHub Releases
22
on:
33
push:
4-
tags:
5-
- "v*"
64
branches:
7-
- main
5+
- release
86

97
permissions:
108
contents: write
@@ -14,14 +12,19 @@ jobs:
1412
name: Release pushed tag
1513
runs-on: ubuntu-latest
1614
steps:
15+
- name: Extract version from pyproject.toml
16+
id: get_version
17+
run: |
18+
version=$(grep '^version =' pyproject.toml | sed -E "s/version = ['\"]([^'\"]+)['\"]/\\1/")
19+
echo "version=$version" >> $GITHUB_OUTPUT
1720
- name: Create GitHub release
1821
env:
1922
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2023
tag: ${{ github.ref_name }}
2124
run: |
2225
gh release create "$tag" \
2326
--repo="$GITHUB_REPOSITORY" \
24-
--title="${tag#v}" \
27+
--title="${{ steps.get_version.outputs.version }}" \
2528
--generate-notes
2629
pypi-publish:
2730
name: Upload release to PyPI
@@ -32,6 +35,7 @@ jobs:
3235
permissions:
3336
id-token: write
3437
steps:
38+
- uses: actions/checkout@v4
3539
- name: Build package distributions
3640
run: |
3741
pipx install build

tests/test_visitors.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,15 +32,15 @@ def test_generator(self):
3232
"(d + r for d in ds if any(r for r in ds))", ["ds", "r"], ["d"]
3333
)
3434
self._test_extract(
35-
'(d for d in ds if d.name == "test")', ["ds"], ["d", "d.name"]
35+
'(d for d in ds if d.name == "test")', ["ds", "d.name"], ["d"]
3636
)
3737
self._test_extract("{d for d in ds}", ["ds"], ["d"])
3838
self._test_extract("{d for d in ds if any(r for r in ds)}", ["ds"], ["d", "r"])
3939
self._test_extract(
4040
"{d + r for d in ds if any(r for r in ds)}", ["ds", "r"], ["d"]
4141
)
4242
self._test_extract(
43-
'{d for d in ds if d.name == "test"}', ["ds"], ["d", "d.name"]
43+
'{d for d in ds if d.name == "test"}', ["ds", "d.name"], ["d"]
4444
)
4545

4646
def test_lambda(self):

0 commit comments

Comments
 (0)