Skip to content

Commit 90d803d

Browse files
committed
refactor(autorun): improve type-hints so that its final return value has the correct type, regardless default_value is provided or not
refactor(view): improve type-hints so that its final return value has the correct type, regardless `default_value` is provided or not refactor(combine_reducers): use `make_immutable` instead of `make_dataclass` test(view): write tests for `store.view`
1 parent 4499656 commit 90d803d

File tree

13 files changed

+601
-187
lines changed

13 files changed

+601
-187
lines changed

.github/workflows/integration_delivery.yml

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
path: |
2424
~/.cache
2525
~/.local
26-
key: poetry-${{ hashFiles('poetry.lock') }}
26+
key: poetry-${{ hashFiles('poetry.lock') }}-${{ env.PYTHON_VERSION}}
2727

2828
- uses: actions/setup-python@v5
2929
name: Setup Python
@@ -61,7 +61,7 @@ jobs:
6161
path: |
6262
~/.cache
6363
~/.local
64-
key: poetry-${{ hashFiles('poetry.lock') }}
64+
key: poetry-${{ hashFiles('poetry.lock') }}-${{ env.PYTHON_VERSION}}
6565

6666
- name: Type Check
6767
run: poetry run poe typecheck
@@ -75,8 +75,8 @@ jobs:
7575
- uses: actions/checkout@v4
7676
name: Checkout
7777

78-
- uses: actions/setup-python@v5
79-
name: Setup Python
78+
- name: Setup Python
79+
uses: actions/setup-python@v5
8080
with:
8181
python-version: ${{ env.PYTHON_VERSION }}
8282
architecture: x64
@@ -88,7 +88,7 @@ jobs:
8888
path: |
8989
~/.cache
9090
~/.local
91-
key: poetry-${{ hashFiles('poetry.lock') }}
91+
key: poetry-${{ hashFiles('poetry.lock') }}-${{ env.PYTHON_VERSION}}
9292

9393
- name: Lint
9494
run: poetry run poe lint
@@ -105,8 +105,8 @@ jobs:
105105
- uses: actions/checkout@v4
106106
name: Checkout
107107

108-
- uses: actions/setup-python@v5
109-
name: Setup Python
108+
- name: Setup Python
109+
uses: actions/setup-python@v5
110110
with:
111111
python-version: ${{ env.PYTHON_VERSION }}
112112
architecture: x64
@@ -118,7 +118,7 @@ jobs:
118118
path: |
119119
~/.cache
120120
~/.local
121-
key: poetry-${{ hashFiles('poetry.lock') }}
121+
key: poetry-${{ hashFiles('poetry.lock') }}-${{ env.PYTHON_VERSION}}
122122

123123
- name: Run Tests
124124
run: poetry run poe test
@@ -141,7 +141,7 @@ jobs:
141141
with:
142142
file: ./coverage.xml
143143
flags: integration
144-
fail_ci_if_error: true
144+
fail_ci_if_error: false
145145
token: ${{ secrets.CODECOV_TOKEN }}
146146

147147
build:
@@ -150,8 +150,8 @@ jobs:
150150
- dependencies
151151
runs-on: ubuntu-latest
152152
outputs:
153-
version: ${{ steps.extract_version.outputs.VERSION }}
154-
name: ${{ steps.extract_version.outputs.NAME }}
153+
version: ${{ steps.extract-version.outputs.VERSION }}
154+
name: ${{ steps.extract-version.outputs.NAME }}
155155
steps:
156156
- uses: actions/checkout@v4
157157
name: Checkout
@@ -169,22 +169,21 @@ jobs:
169169
path: |
170170
~/.cache
171171
~/.local
172-
key: poetry-${{ hashFiles('poetry.lock') }}
172+
key: poetry-${{ hashFiles('poetry.lock') }}-${{ env.PYTHON_VERSION}}
173173

174174
- name: Extract Version
175-
id: extract_version
175+
id: extract-version
176176
run: |
177177
echo "VERSION=$(poetry version --short)" >> "$GITHUB_OUTPUT"
178-
echo "NAME=$(poetry version | cut -d' ' -f1)" >> "$GITHUB_OUTPUT"
179178
echo "VERSION=$(poetry version --short)"
179+
echo "NAME=$(poetry version | cut -d' ' -f1)" >> "$GITHUB_OUTPUT"
180180
echo "NAME=$(poetry version | cut -d' ' -f1)"
181181
182182
- name: Extract Version from CHANGELOG.md
183-
id: extract_changelog_version
184183
run: |
185184
VERSION_CHANGELOG=$(sed -n '3 s/## Version //p' CHANGELOG.md)
186185
echo "VERSION_CHANGELOG=$VERSION_CHANGELOG"
187-
if [ "${{ steps.extract_version.outputs.VERSION }}" != "$VERSION_CHANGELOG" ]; then
186+
if [ "${{ steps.extract-version.outputs.VERSION }}" != "$VERSION_CHANGELOG" ]; then
188187
echo "Error: Version extracted from CHANGELOG.md does not match the version in pyproject.toml"
189188
exit 1
190189
else
@@ -193,11 +192,10 @@ jobs:
193192
194193
- name: Extract Version from Tag
195194
if: startsWith(github.ref, 'refs/tags/v')
196-
id: extract_tag_version
197195
run: |
198196
VERSION_TAG=$(sed 's/^v//' <<< ${{ github.ref_name }})
199197
echo "VERSION_TAG=$VERSION_TAG"
200-
if [ "${{ steps.extract_version.outputs.VERSION }}" != "$VERSION_TAG" ]; then
198+
if [ "${{ steps.extract-version.outputs.VERSION }}" != "$VERSION_TAG" ]; then
201199
echo "Error: Version extracted from tag does not match the version in pyproject.toml"
202200
exit 1
203201
else
@@ -232,7 +230,7 @@ jobs:
232230
- build
233231
runs-on: ubuntu-latest
234232
environment:
235-
name: release
233+
name: pypi
236234
url: https://pypi.org/p/${{ needs.build.outputs.name }}
237235
permissions:
238236
id-token: write
@@ -265,7 +263,9 @@ jobs:
265263
runs-on: ubuntu-latest
266264
environment:
267265
name: release
268-
url: https://pypi.org/p/${{ needs.build.outputs.name }}
266+
url:
267+
https://github.com/${{ github.repository }}/releases/tag/v${{
268+
needs.build.outputs.version }}
269269
permissions:
270270
contents: write
271271
steps:

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
# Changelog
22

3+
## Version 0.15.2
4+
5+
- refactor(autorun): improve type-hints so that its final return value has the correct
6+
type, regardless `default_value` is provided or not
7+
- refactor(view): improve type-hints so that its final return value has the correct
8+
type, regardless `default_value` is provided or not
9+
- refactor(combine_reducers): use `make_immutable` instead of `make_dataclass`
10+
- test(view): write tests for `store.view`
11+
312
## Version 0.15.1
413

514
- feat(core): add `view` method to `Store` to allow computing a derived value from

0 commit comments

Comments
 (0)