Skip to content

Commit 23f3eef

Browse files
authored
Merge branch 'master' into fix-remove-duplication-in-env-var-docs
2 parents fd8edca + 549596c commit 23f3eef

191 files changed

Lines changed: 3333 additions & 2903 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.env

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Environment variables automatically read by VS Code, e.g. running tests
2+
3+
# For tests, a large terminal width
4+
TERMINAL_WIDTH=3000

.github/workflows/build-docs.yml

Lines changed: 19 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ on:
77
types:
88
- opened
99
- synchronize
10+
11+
env:
12+
UV_SYSTEM_PYTHON: 1
13+
1014
jobs:
1115
changes:
1216
runs-on: ubuntu-latest
@@ -17,7 +21,7 @@ jobs:
1721
outputs:
1822
docs: ${{ steps.filter.outputs.docs }}
1923
steps:
20-
- uses: actions/checkout@v4
24+
- uses: actions/checkout@v5
2125
# For pull requests it's not necessary to checkout the code but for the main branch it is
2226
- uses: dorny/paths-filter@v3
2327
id: filter
@@ -36,6 +40,7 @@ jobs:
3640
- mkdocs.no-insiders.yml
3741
- .github/workflows/build-docs.yml
3842
- .github/workflows/deploy-docs.yml
43+
- data/**
3944
4045
build-docs:
4146
needs:
@@ -47,22 +52,24 @@ jobs:
4752
env:
4853
GITHUB_CONTEXT: ${{ toJson(github) }}
4954
run: echo "$GITHUB_CONTEXT"
50-
- uses: actions/checkout@v4
55+
- uses: actions/checkout@v5
5156
- name: Set up Python
52-
uses: actions/setup-python@v5
57+
uses: actions/setup-python@v6
5358
with:
5459
python-version: "3.11"
55-
- uses: actions/cache@v4
56-
id: cache
60+
- name: Setup uv
61+
uses: astral-sh/setup-uv@v6
5762
with:
58-
path: ${{ env.pythonLocation }}
59-
key: ${{ runner.os }}-python-docs-${{ env.pythonLocation }}-${{ hashFiles('pyproject.toml', 'requirements-docs.txt', 'requirements-docs-insiders.txt') }}-v02
63+
version: "0.4.15"
64+
enable-cache: true
65+
cache-dependency-glob: |
66+
requirements**.txt
67+
pyproject.toml
6068
- name: Install docs extras
61-
if: steps.cache.outputs.cache-hit != 'true'
62-
run: pip install -r requirements-docs.txt
69+
run: uv pip install -r requirements-docs.txt
6370
- name: Install Material for MkDocs Insiders
64-
if: ( github.event_name != 'pull_request' || github.secret_source == 'Actions' ) && steps.cache.outputs.cache-hit != 'true'
65-
run: pip install -r requirements-docs-insiders.txt
71+
if: ( github.event_name != 'pull_request' || github.secret_source == 'Actions' )
72+
run: uv pip install -r requirements-docs-insiders.txt
6673
env:
6774
TOKEN: ${{ secrets.TYPER_MKDOCS_MATERIAL_INSIDERS }}
6875
- uses: actions/cache@v4
@@ -77,6 +84,7 @@ jobs:
7784
with:
7885
name: docs-site
7986
path: ./site/**
87+
include-hidden-files: true
8088

8189
# https://github.com/marketplace/actions/alls-green#why
8290
docs-all-green: # This job does nothing and is only used for the branch protection

.github/workflows/conflict.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: "Conflict detector"
2+
on:
3+
push:
4+
pull_request_target:
5+
types: [synchronize]
6+
7+
jobs:
8+
main:
9+
permissions:
10+
contents: read
11+
pull-requests: write
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Check if PRs have merge conflicts
15+
uses: eps1lon/actions-label-merge-conflict@v3
16+
with:
17+
dirtyLabel: "conflicts"
18+
repoToken: "${{ secrets.GITHUB_TOKEN }}"
19+
commentOnDirty: "This pull request has a merge conflict that needs to be resolved."

.github/workflows/deploy-docs.yml

Lines changed: 20 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ permissions:
1212
pull-requests: write
1313
statuses: write
1414

15+
env:
16+
UV_SYSTEM_PYTHON: 1
17+
1518
jobs:
1619
deploy-docs:
1720
runs-on: ubuntu-latest
@@ -20,19 +23,21 @@ jobs:
2023
env:
2124
GITHUB_CONTEXT: ${{ toJson(github) }}
2225
run: echo "$GITHUB_CONTEXT"
23-
- uses: actions/checkout@v4
26+
- uses: actions/checkout@v5
2427
- name: Set up Python
25-
uses: actions/setup-python@v5
28+
uses: actions/setup-python@v6
2629
with:
2730
python-version: "3.11"
28-
- uses: actions/cache@v4
29-
id: cache
31+
- name: Setup uv
32+
uses: astral-sh/setup-uv@v6
3033
with:
31-
path: ${{ env.pythonLocation }}
32-
key: ${{ runner.os }}-python-github-actions-${{ env.pythonLocation }}-${{ hashFiles('requirements-github-actions.txt') }}-v01
34+
version: "0.4.15"
35+
enable-cache: true
36+
cache-dependency-glob: |
37+
requirements**.txt
38+
pyproject.toml
3339
- name: Install GitHub Actions dependencies
34-
if: steps.cache.outputs.cache-hit != 'true'
35-
run: pip install -r requirements-github-actions.txt
40+
run: uv pip install -r requirements-github-actions.txt
3641
- name: Deploy Docs Status Pending
3742
run: python ./scripts/deploy_docs_status.py
3843
env:
@@ -44,7 +49,7 @@ jobs:
4449
run: |
4550
rm -rf ./site
4651
mkdir ./site
47-
- uses: actions/download-artifact@v4
52+
- uses: actions/download-artifact@v5
4853
with:
4954
path: ./site/
5055
pattern: docs-site
@@ -55,19 +60,19 @@ jobs:
5560
# hashFiles returns an empty string if there are no files
5661
if: hashFiles('./site/*')
5762
id: deploy
58-
uses: cloudflare/pages-action@v1
63+
env:
64+
PROJECT_NAME: typertiangolo
65+
BRANCH: ${{ ( github.event.workflow_run.head_repository.full_name == github.repository && github.event.workflow_run.head_branch == 'master' && 'main' ) || ( github.event.workflow_run.head_sha ) }}
66+
uses: cloudflare/wrangler-action@v3
5967
with:
6068
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
6169
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
62-
projectName: typertiangolo
63-
directory: './site'
64-
gitHubToken: ${{ secrets.GITHUB_TOKEN }}
65-
branch: ${{ ( github.event.workflow_run.head_repository.full_name == github.repository && github.event.workflow_run.head_branch == 'master' && 'main' ) || ( github.event.workflow_run.head_sha ) }}
70+
command: pages deploy ./site --project-name=${{ env.PROJECT_NAME }} --branch=${{ env.BRANCH }}
6671
- name: Comment Deploy
6772
run: python ./scripts/deploy_docs_status.py
6873
env:
6974
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
70-
DEPLOY_URL: ${{ steps.deploy.outputs.url }}
75+
DEPLOY_URL: ${{ steps.deploy.outputs.deployment-url }}
7176
COMMIT_SHA: ${{ github.event.workflow_run.head_sha }}
7277
RUN_ID: ${{ github.run_id }}
7378
IS_DONE: "true"

.github/workflows/issue-manager.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Issue Manager
22

33
on:
44
schedule:
5-
- cron: "10 4 * * *"
5+
- cron: "13 21 * * *"
66
issue_comment:
77
types:
88
- created
@@ -16,6 +16,7 @@ on:
1616

1717
permissions:
1818
issues: write
19+
pull-requests: write
1920

2021
jobs:
2122
issue-manager:
@@ -26,7 +27,7 @@ jobs:
2627
env:
2728
GITHUB_CONTEXT: ${{ toJson(github) }}
2829
run: echo "$GITHUB_CONTEXT"
29-
- uses: tiangolo/[email protected].0
30+
- uses: tiangolo/[email protected].1
3031
with:
3132
token: ${{ secrets.GITHUB_TOKEN }}
3233
config: >
@@ -35,8 +36,8 @@ jobs:
3536
"delay": 864000,
3637
"message": "Assuming the original need was handled, this will be automatically closed now. But feel free to add more comments or create new issues or PRs."
3738
},
38-
"changes-requested": {
39+
"waiting": {
3940
"delay": 2628000,
40-
"message": "As this PR had requested changes to be applied but has been inactive for a while, it's now going to be closed. But if there's anyone interested, feel free to create a new PR."
41+
"message": "As this PR has been waiting for the original user for a while but seems to be inactive, it's now going to be closed. But if there's anyone interested, feel free to create a new PR."
4142
}
4243
}

.github/workflows/labeler.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@ jobs:
1616
pull-requests: write
1717
runs-on: ubuntu-latest
1818
steps:
19-
- uses: actions/labeler@v5
19+
- uses: actions/labeler@v6
20+
if: ${{ github.event.action != 'labeled' && github.event.action != 'unlabeled' }}
21+
- run: echo "Done adding labels"
2022
# Run this after labeler applied labels
2123
check-labels:
2224
needs:

.github/workflows/latest-changes.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
env:
2525
GITHUB_CONTEXT: ${{ toJson(github) }}
2626
run: echo "$GITHUB_CONTEXT"
27-
- uses: actions/checkout@v4
27+
- uses: actions/checkout@v5
2828
with:
2929
# To allow latest-changes to commit to the main branch
3030
token: ${{ secrets.TYPER_LATEST_CHANGES }}
@@ -34,7 +34,7 @@ jobs:
3434
if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.debug_enabled == 'true' }}
3535
with:
3636
limit-access-to-actor: true
37-
- uses: tiangolo/latest-changes@0.3.1
37+
- uses: tiangolo/latest-changes@0.4.0
3838
with:
3939
token: ${{ secrets.GITHUB_TOKEN }}
4040
latest_changes_file: docs/release-notes.md

.github/workflows/publish.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ jobs:
2121
env:
2222
GITHUB_CONTEXT: ${{ toJson(github) }}
2323
run: echo "$GITHUB_CONTEXT"
24-
- uses: actions/checkout@v4
24+
- uses: actions/checkout@v5
2525
- name: Set up Python
26-
uses: actions/setup-python@v5
26+
uses: actions/setup-python@v6
2727
with:
2828
python-version: "3.10"
2929
# Issue ref: https://github.com/actions/setup-python/issues/436
@@ -36,4 +36,4 @@ jobs:
3636
TIANGOLO_BUILD_PACKAGE: ${{ matrix.package }}
3737
run: python -m build
3838
- name: Publish
39-
uses: pypa/gh-action-pypi-publish@v1.9.0
39+
uses: pypa/gh-action-pypi-publish@v1.13.0

.github/workflows/smokeshow.yml

Lines changed: 19 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,35 +2,45 @@ name: Smokeshow
22

33
on:
44
workflow_run:
5-
workflows: [Test]
6-
types: [completed]
5+
workflows:
6+
- Test
7+
types:
8+
- completed
79

810
permissions:
911
statuses: write
1012

13+
env:
14+
UV_SYSTEM_PYTHON: 1
15+
1116
jobs:
1217
smokeshow:
1318
if: ${{ github.event.workflow_run.conclusion == 'success' }}
1419
runs-on: ubuntu-latest
15-
1620
steps:
1721
- name: Dump GitHub context
1822
env:
1923
GITHUB_CONTEXT: ${{ toJson(github) }}
2024
run: echo "$GITHUB_CONTEXT"
21-
- uses: actions/setup-python@v5
25+
- uses: actions/checkout@v5
26+
- uses: actions/setup-python@v6
2227
with:
2328
python-version: '3.9'
24-
25-
- run: pip install smokeshow
26-
27-
- uses: actions/download-artifact@v4
29+
- name: Setup uv
30+
uses: astral-sh/setup-uv@v6
31+
with:
32+
version: "0.4.15"
33+
enable-cache: true
34+
cache-dependency-glob: |
35+
requirements**.txt
36+
pyproject.toml
37+
- run: uv pip install -r requirements-github-actions.txt
38+
- uses: actions/download-artifact@v5
2839
with:
2940
name: coverage-html
3041
path: htmlcov
3142
github-token: ${{ secrets.GITHUB_TOKEN }}
3243
run-id: ${{ github.event.workflow_run.id }}
33-
3444
- run: smokeshow upload htmlcov
3545
env:
3646
SMOKESHOW_GITHUB_STATUS_DESCRIPTION: Coverage {coverage-percentage}

.github/workflows/test-redistribute.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@ jobs:
2323
env:
2424
GITHUB_CONTEXT: ${{ toJson(github) }}
2525
run: echo "$GITHUB_CONTEXT"
26-
- uses: actions/checkout@v4
26+
- uses: actions/checkout@v5
2727
- name: Set up Python
28-
uses: actions/setup-python@v5
28+
uses: actions/setup-python@v6
2929
with:
3030
python-version: "3.10"
3131
# Issue ref: https://github.com/actions/setup-python/issues/436

0 commit comments

Comments
 (0)