Skip to content

Commit 37cbc85

Browse files
authored
Merge branch 'master' into feat/autocompletion
2 parents e17a0f5 + 5f378ee commit 37cbc85

File tree

111 files changed

+1664
-2032
lines changed

Some content is hidden

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

111 files changed

+1664
-2032
lines changed

.github/workflows/build-docs.yml

Lines changed: 15 additions & 8 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
@@ -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:
@@ -52,17 +57,19 @@ jobs:
5257
uses: actions/setup-python@v5
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@v4
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

.github/workflows/deploy-docs.yml

Lines changed: 17 additions & 12 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
@@ -25,14 +28,16 @@ jobs:
2528
uses: actions/setup-python@v5
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@v4
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:
@@ -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: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ jobs:
1717
runs-on: ubuntu-latest
1818
steps:
1919
- uses: actions/labeler@v5
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: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -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/[email protected].1
37+
- uses: tiangolo/[email protected].2
3838
with:
3939
token: ${{ secrets.GITHUB_TOKEN }}
4040
latest_changes_file: docs/release-notes.md

.github/workflows/publish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -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.10.1
39+
uses: pypa/gh-action-pypi-publish@v1.12.2

.github/workflows/smokeshow.yml

Lines changed: 17 additions & 7 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"
25+
- uses: actions/checkout@v4
2126
- uses: actions/setup-python@v5
2227
with:
2328
python-version: '3.9'
24-
25-
- run: pip install smokeshow
26-
29+
- name: Setup uv
30+
uses: astral-sh/setup-uv@v4
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
2738
- uses: actions/download-artifact@v4
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.yml

Lines changed: 21 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ on:
1212
# cron every week on monday
1313
- cron: "0 0 * * 1"
1414

15+
env:
16+
UV_SYSTEM_PYTHON: 1
17+
1518
jobs:
1619
test:
1720
strategy:
@@ -41,18 +44,16 @@ jobs:
4144
uses: actions/setup-python@v5
4245
with:
4346
python-version: ${{ matrix.python-version }}
44-
# Issue ref: https://github.com/actions/setup-python/issues/436
45-
# cache: "pip"
46-
# cache-dependency-path: pyproject.toml
47-
- uses: actions/cache@v4
48-
if: ${{ runner.os != 'macOS' }}
49-
id: cache
47+
- name: Setup uv
48+
uses: astral-sh/setup-uv@v4
5049
with:
51-
path: ${{ env.pythonLocation }}
52-
key: ${{ runner.os }}-python-${{ env.pythonLocation }}-${{ hashFiles('pyproject.toml', 'requirements-tests.txt') }}
50+
version: "0.4.15"
51+
enable-cache: true
52+
cache-dependency-glob: |
53+
requirements**.txt
54+
pyproject.toml
5355
- name: Install Dependencies
54-
if: steps.cache.outputs.cache-hit != 'true'
55-
run: pip install -r requirements-tests.txt
56+
run: uv pip install -r requirements-tests.txt
5657
- name: Lint
5758
run: bash scripts/lint.sh
5859
- run: mkdir coverage
@@ -81,16 +82,22 @@ jobs:
8182
- uses: actions/setup-python@v5
8283
with:
8384
python-version: '3.8'
84-
# Issue ref: https://github.com/actions/setup-python/issues/436
85-
# cache: "pip"
86-
# cache-dependency-path: pyproject.toml
85+
- name: Setup uv
86+
uses: astral-sh/setup-uv@v4
87+
with:
88+
version: "0.4.15"
89+
enable-cache: true
90+
cache-dependency-glob: |
91+
requirements**.txt
92+
pyproject.toml
8793
- name: Get coverage files
8894
uses: actions/download-artifact@v4
8995
with:
9096
pattern: coverage-*
9197
path: coverage
9298
merge-multiple: true
93-
- run: pip install coverage[toml]
99+
- name: Install Dependencies
100+
run: uv pip install -r requirements-tests.txt
94101
- run: ls -la coverage
95102
- run: coverage combine coverage
96103
- run: coverage report

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ default_language_version:
44
python: python3.10
55
repos:
66
- repo: https://github.com/pre-commit/pre-commit-hooks
7-
rev: v4.6.0
7+
rev: v5.0.0
88
hooks:
99
- id: check-added-large-files
1010
- id: check-toml
@@ -14,7 +14,7 @@ repos:
1414
- id: end-of-file-fixer
1515
- id: trailing-whitespace
1616
- repo: https://github.com/astral-sh/ruff-pre-commit
17-
rev: v0.6.3
17+
rev: v0.8.1
1818
hooks:
1919
- id: ruff
2020
args:

data/members.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
members:
22
- login: tiangolo
33
- login: svlandeg
4+
- login: patrick91

0 commit comments

Comments
 (0)