Skip to content

Commit 656704f

Browse files
Polish the Python SDK first-run surface (#48)
Co-authored-by: Durable Workflow <support@durable-workflow.com>
1 parent ad91dff commit 656704f

36 files changed

Lines changed: 1101 additions & 7795 deletions

.github/workflows/ci.yml

Lines changed: 18 additions & 112 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ on:
1010
permissions:
1111
contents: read
1212

13+
concurrency:
14+
group: ci-${{ github.event_name }}-${{ github.event_name == 'pull_request' && github.ref || github.sha }}
15+
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
16+
1317
jobs:
1418
action-policy:
1519
name: Central action policy preflight
@@ -41,55 +45,8 @@ jobs:
4145
--target sdk-python
4246
--workflow-directory .github/workflows
4347
44-
qualification-class:
45-
name: Determine qualification class
46-
runs-on: ubuntu-latest
47-
timeout-minutes: 5
48-
outputs:
49-
classification: ${{ steps.classify.outputs.classification }}
50-
reason: ${{ steps.classify.outputs.reason }}
51-
changed_count: ${{ steps.classify.outputs.changed_count }}
52-
steps:
53-
- uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6
54-
with:
55-
fetch-depth: 0
56-
persist-credentials: false
57-
- name: Resolve changed paths without repository API access
58-
id: classify
59-
env:
60-
SOURCE_BASE_SHA: ${{ github.event.pull_request.base.sha }}
61-
SOURCE_EVENT_NAME: ${{ github.event_name }}
62-
SOURCE_HEAD_SHA: ${{ github.event.pull_request.head.sha }}
63-
run: |
64-
python scripts/ci/classify_pr_qualification.py \
65-
--root . \
66-
--event-name "$SOURCE_EVENT_NAME" \
67-
--base-ref "$SOURCE_BASE_SHA" \
68-
--head-ref "$SOURCE_HEAD_SHA" \
69-
--github-output "$GITHUB_OUTPUT"
70-
71-
qualification-class-report:
72-
name: Qualification class — ${{ needs.qualification-class.outputs.classification }}
73-
needs: qualification-class
74-
runs-on: ubuntu-latest
75-
timeout-minutes: 2
76-
steps:
77-
- name: Report selected qualification
78-
env:
79-
CHANGED_COUNT: ${{ needs.qualification-class.outputs.changed_count }}
80-
QUALIFICATION_CLASS: ${{ needs.qualification-class.outputs.classification }}
81-
QUALIFICATION_REASON: ${{ needs.qualification-class.outputs.reason }}
82-
run: |
83-
case "$QUALIFICATION_CLASS" in
84-
focused-documentation|complete) ;;
85-
*) exit 1 ;;
86-
esac
87-
echo "::notice title=Qualification class::$QUALIFICATION_CLASS ($QUALIFICATION_REASON; $CHANGED_COUNT changed paths)"
88-
8948
regression-corpus:
9049
name: Regression corpus
91-
needs: qualification-class
92-
if: ${{ needs.qualification-class.outputs.classification == 'complete' }}
9350
runs-on: ubuntu-latest
9451
timeout-minutes: 5
9552
steps:
@@ -100,7 +57,7 @@ jobs:
10057
- uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6
10158
with:
10259
python-version: "3.12"
103-
- name: Install the official Python binding
60+
- name: Install the SDK
10461
run: pip install -e .
10562
- name: Require durable replay and codec evidence
10663
env:
@@ -115,8 +72,6 @@ jobs:
11572
run: python scripts/ci/test-validate-regression-corpus.py
11673

11774
lint:
118-
needs: qualification-class
119-
if: ${{ needs.qualification-class.outputs.classification == 'complete' }}
12075
runs-on: ubuntu-latest
12176
timeout-minutes: 10
12277
steps:
@@ -132,8 +87,6 @@ jobs:
13287

13388
avro-benchmark:
13489
name: Avro Value absolute throughput (advisory)
135-
needs: qualification-class
136-
if: ${{ needs.qualification-class.outputs.classification == 'complete' }}
13790
runs-on: ubuntu-latest
13891
timeout-minutes: 5
13992
steps:
@@ -156,8 +109,7 @@ jobs:
156109
if-no-files-found: error
157110

158111
test:
159-
needs: qualification-class
160-
if: ${{ needs.qualification-class.outputs.classification == 'complete' }}
112+
name: Python ${{ matrix.python-version }}
161113
runs-on: ubuntu-latest
162114
timeout-minutes: 15
163115
strategy:
@@ -173,8 +125,6 @@ jobs:
173125
- run: pytest tests/ -m "not integration" -q
174126

175127
package:
176-
needs: qualification-class
177-
if: ${{ needs.qualification-class.outputs.classification == 'complete' }}
178128
runs-on: ubuntu-latest
179129
timeout-minutes: 10
180130
steps:
@@ -185,51 +135,31 @@ jobs:
185135
with:
186136
python-version: "3.12"
187137
- run: pip install build twine
188-
- run: sh -n scripts/ci/check-docs-release-audit.sh
189138
- run: python -m build
190139
- name: Compare built release metadata with the exact source commit
191140
run: python scripts/check_release_metadata.py --source-ref "$(git rev-parse HEAD)" --dist dist
192141
- run: twine check dist/*
193142
- run: python scripts/smoke-built-package.py
194143

195-
cli-parity:
196-
needs: qualification-class
197-
if: ${{ needs.qualification-class.outputs.classification == 'complete' }}
198-
runs-on: ubuntu-latest
199-
timeout-minutes: 5
200-
steps:
201-
- uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6
202-
with:
203-
path: sdk-python
204-
- uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6
205-
with:
206-
python-version: "3.12"
207-
- name: Checkout public CLI integration source
208-
run: python sdk-python/scripts/ci/checkout-public-repository.py cli cli
209-
- name: Compare shared control-plane parity fixtures
210-
working-directory: sdk-python
211-
run: python scripts/check-cli-parity.py --cli ../cli
212-
213144
integration:
214-
if: ${{ needs.qualification-class.outputs.classification == 'complete' }}
215145
runs-on: ubuntu-latest
216146
timeout-minutes: 25
217-
needs: [qualification-class, lint, test]
147+
needs: [lint, test]
218148
steps:
219149
- uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6
220150
with:
221151
path: sdk-python
222152
- uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6
223153
with:
224154
python-version: "3.12"
225-
- name: Checkout public Server integration source
155+
- name: Check out public Server integration source
226156
run: python sdk-python/scripts/ci/checkout-public-repository.py server server
227157
- run: pip install -e '.[dev]'
228158
working-directory: sdk-python
229159
- name: Configure isolated Docker project
230160
working-directory: sdk-python
231161
run: python scripts/ci/configure-compose-project.py
232-
- name: Start server stack
162+
- name: Start Server stack
233163
working-directory: sdk-python
234164
run: |
235165
docker compose --project-name "$COMPOSE_PROJECT_NAME" -f docker-compose.test.yml \
@@ -264,14 +194,11 @@ jobs:
264194
if: ${{ always() }}
265195
needs:
266196
- action-policy
267-
- qualification-class
268-
- qualification-class-report
269197
- regression-corpus
270198
- lint
271199
- avro-benchmark
272200
- test
273201
- package
274-
- cli-parity
275202
- integration
276203
runs-on: ubuntu-latest
277204
timeout-minutes: 2
@@ -281,39 +208,18 @@ jobs:
281208
env:
282209
ACTION_POLICY_RESULT: ${{ needs.action-policy.result }}
283210
run: test "$ACTION_POLICY_RESULT" = success
284-
285211
- name: Require every supported Python and integration cell
286212
env:
287-
CLASSIFICATION_RESULT: ${{ needs.qualification-class.result }}
288-
CLASSIFICATION_REPORT_RESULT: ${{ needs.qualification-class-report.result }}
289-
QUALIFICATION_CLASS: ${{ needs.qualification-class.outputs.classification }}
290-
LINT_RESULT: ${{ needs.lint.result }}
291213
AVRO_BENCHMARK_RESULT: ${{ needs.avro-benchmark.result }}
292214
CORPUS_RESULT: ${{ needs.regression-corpus.result }}
293-
TEST_RESULT: ${{ needs.test.result }}
294-
PACKAGE_RESULT: ${{ needs.package.result }}
295-
PARITY_RESULT: ${{ needs.cli-parity.result }}
296215
INTEGRATION_RESULT: ${{ needs.integration.result }}
216+
LINT_RESULT: ${{ needs.lint.result }}
217+
PACKAGE_RESULT: ${{ needs.package.result }}
218+
TEST_RESULT: ${{ needs.test.result }}
297219
run: |
298-
test "$CLASSIFICATION_RESULT" = success
299-
test "$CLASSIFICATION_REPORT_RESULT" = success
300-
if [ "$QUALIFICATION_CLASS" = focused-documentation ]; then
301-
test "$LINT_RESULT" = skipped
302-
test "$AVRO_BENCHMARK_RESULT" = skipped
303-
test "$CORPUS_RESULT" = skipped
304-
test "$TEST_RESULT" = skipped
305-
test "$PACKAGE_RESULT" = skipped
306-
test "$PARITY_RESULT" = skipped
307-
test "$INTEGRATION_RESULT" = skipped
308-
echo "Focused documentation qualification selected; Docs PR checks and Public Boundary remain required."
309-
elif [ "$QUALIFICATION_CLASS" = complete ]; then
310-
test "$LINT_RESULT" = success
311-
test "$AVRO_BENCHMARK_RESULT" = success
312-
test "$CORPUS_RESULT" = success
313-
test "$TEST_RESULT" = success
314-
test "$PACKAGE_RESULT" = success
315-
test "$PARITY_RESULT" = success
316-
test "$INTEGRATION_RESULT" = success
317-
else
318-
exit 1
319-
fi
220+
test "$AVRO_BENCHMARK_RESULT" = success
221+
test "$CORPUS_RESULT" = success
222+
test "$INTEGRATION_RESULT" = success
223+
test "$LINT_RESULT" = success
224+
test "$PACKAGE_RESULT" = success
225+
test "$TEST_RESULT" = success

.github/workflows/docs-pr.yml

Lines changed: 6 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -9,20 +9,11 @@ on:
99
- 'overrides/**'
1010
- 'mkdocs.yml'
1111
- 'pyproject.toml'
12-
- 'scripts/ci/classify_docs_visual_changes.py'
13-
- 'scripts/ci/test-classify-docs-visual-changes.py'
14-
- 'scripts/ci/validate-release-docs-source.py'
15-
- 'scripts/api_reference_release.py'
16-
- 'scripts/check_api_reference_install.py'
17-
- 'scripts/release_compatibility.py'
1812
- 'scripts/check-docs-analytics.py'
1913
- 'scripts/check-docs-layout.py'
2014
- 'scripts/docstring_cross_references.py'
21-
- 'scripts/mkdocs_hooks.py'
22-
- 'scripts/qualify-docs-promotion.py'
23-
- '.github/workflows/docs.yml'
2415
- '.github/workflows/docs-pr.yml'
25-
- '.github/workflows/docs-visual.yml'
16+
- '.github/workflows/docs.yml'
2617

2718
permissions:
2819
contents: read
@@ -33,34 +24,21 @@ concurrency:
3324

3425
jobs:
3526
validate:
36-
name: Strict documentation build and rendered layout
27+
name: Build and check the developer portal
3728
runs-on: ubuntu-latest
29+
timeout-minutes: 15
3830
steps:
3931
- uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6
40-
4132
- uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6
4233
with:
4334
python-version: "3.12"
44-
45-
- name: Install package + docs deps
35+
- name: Install package and documentation dependencies
4636
run: pip install -e '.[docs]'
47-
48-
- name: Install browser for responsive layout checks
37+
- name: Install Chromium
4938
run: python -m playwright install --with-deps chromium
50-
51-
- name: Build site
39+
- name: Build and check the portal
5240
run: |
53-
python scripts/ci/test-classify-docs-visual-changes.py
5441
mkdocs build --strict
5542
python scripts/docstring_cross_references.py --site site
56-
python scripts/check_api_reference_install.py --site site
5743
python scripts/check-docs-analytics.py site
5844
python scripts/check-docs-layout.py site
59-
60-
visual-evidence:
61-
name: Supported viewport interaction evidence
62-
uses: ./.github/workflows/docs-visual.yml # local
63-
with:
64-
source_base_sha: ${{ github.event.pull_request.base.sha }}
65-
permissions:
66-
contents: read

0 commit comments

Comments
 (0)