Skip to content

Commit 42ce823

Browse files
committed
Merge branch 'master' into feature/CommandAliases
2 parents baed5c3 + 17d3a67 commit 42ce823

File tree

73 files changed

+3904
-289
lines changed

Some content is hidden

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

73 files changed

+3904
-289
lines changed

.github/dependabot.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ updates:
88
commit-message:
99
prefix:
1010
# Python
11-
- package-ecosystem: "pip"
11+
- package-ecosystem: "uv"
1212
directory: "/"
1313
schedule:
1414
interval: "daily"

.github/labeler.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ internal:
1818
- .pre-commit-config.yaml
1919
- pdm_build.py
2020
- requirements*.txt
21+
- uv.lock
2122
- all-globs-to-all-files:
2223
- '!docs/**'
2324
- '!typer/**'

.github/workflows/build-docs.yml

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,6 @@ on:
88
- opened
99
- synchronize
1010

11-
env:
12-
UV_SYSTEM_PYTHON: 1
13-
1411
jobs:
1512
changes:
1613
runs-on: ubuntu-latest
@@ -31,8 +28,8 @@ jobs:
3128
- README.md
3229
- docs/**
3330
- docs_src/**
34-
- requirements-docs.txt
3531
- pyproject.toml
32+
- uv.lock
3633
- mkdocs.yml
3734
- mkdocs.env.yml
3835
- .github/workflows/build-docs.yml
@@ -53,26 +50,23 @@ jobs:
5350
- name: Set up Python
5451
uses: actions/setup-python@v6
5552
with:
56-
python-version: "3.11"
53+
python-version-file: ".python-version"
5754
- name: Setup uv
5855
uses: astral-sh/setup-uv@v7
5956
with:
60-
version: "0.4.15"
6157
enable-cache: true
6258
cache-dependency-glob: |
63-
requirements**.txt
6459
pyproject.toml
60+
uv.lock
6561
- name: Install docs extras
66-
run: uv pip install -r requirements-docs.txt
67-
- uses: actions/cache@v4
62+
run: uv sync --locked --no-dev --group docs
63+
- uses: actions/cache@v5
6864
with:
6965
key: mkdocs-cards-${{ github.ref }}-v1
7066
path: .cache
71-
- name: Verify README
72-
run: python ./scripts/docs.py verify-readme
7367
- name: Build Docs
74-
run: python ./scripts/docs.py build
75-
- uses: actions/upload-artifact@v5
68+
run: uv run ./scripts/docs.py build
69+
- uses: actions/upload-artifact@v6
7670
with:
7771
name: docs-site
7872
path: ./site/**

.github/workflows/deploy-docs.yml

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

15-
env:
16-
UV_SYSTEM_PYTHON: 1
17-
1815
jobs:
1916
deploy-docs:
2017
runs-on: ubuntu-latest
@@ -27,19 +24,18 @@ jobs:
2724
- name: Set up Python
2825
uses: actions/setup-python@v6
2926
with:
30-
python-version: "3.11"
27+
python-version-file: ".python-version"
3128
- name: Setup uv
3229
uses: astral-sh/setup-uv@v7
3330
with:
34-
version: "0.4.15"
3531
enable-cache: true
3632
cache-dependency-glob: |
37-
requirements**.txt
3833
pyproject.toml
34+
uv.lock
3935
- name: Install GitHub Actions dependencies
40-
run: uv pip install -r requirements-github-actions.txt
36+
run: uv sync --locked --no-dev --group github-actions
4137
- name: Deploy Docs Status Pending
42-
run: python ./scripts/deploy_docs_status.py
38+
run: uv run ./scripts/deploy_docs_status.py
4339
env:
4440
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4541
COMMIT_SHA: ${{ github.event.workflow_run.head_sha }}
@@ -49,7 +45,7 @@ jobs:
4945
run: |
5046
rm -rf ./site
5147
mkdir ./site
52-
- uses: actions/download-artifact@v6
48+
- uses: actions/download-artifact@v7
5349
with:
5450
path: ./site/
5551
pattern: docs-site
@@ -70,14 +66,14 @@ jobs:
7066
command: pages deploy ./site --project-name=${{ env.PROJECT_NAME }} --branch=${{ env.BRANCH }}
7167
- name: Deploy Docs Status Error
7268
if: failure()
73-
run: python ./scripts/deploy_docs_status.py
69+
run: uv run ./scripts/deploy_docs_status.py
7470
env:
7571
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
7672
COMMIT_SHA: ${{ github.event.workflow_run.head_sha }}
7773
RUN_ID: ${{ github.run_id }}
7874
STATE: "error"
7975
- name: Comment Deploy
80-
run: python ./scripts/deploy_docs_status.py
76+
run: uv run ./scripts/deploy_docs_status.py
8177
env:
8278
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
8379
DEPLOY_URL: ${{ steps.deploy.outputs.deployment-url }}

.github/workflows/issue-manager.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,15 @@ jobs:
4141
"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.",
4242
"reminder": {
4343
"before": "P3D",
44-
"message": "Heads-up: this will be closed in 3 days unless theres new activity."
44+
"message": "Heads-up: this will be closed in 3 days unless there's new activity."
4545
}
46+
},
47+
"invalid": {
48+
"delay": 0,
49+
"message": "This was marked as invalid and will be closed now. If this is an error, please provide additional details."
50+
},
51+
"maybe-ai": {
52+
"delay": 0,
53+
"message": "This was marked as potentially AI generated and will be closed now. If this is an error, please provide additional details, make sure to read the docs about contributing and AI."
4654
}
4755
}

.github/workflows/pre-commit.yml

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ on:
77
- synchronize
88

99
env:
10-
IS_FORK: ${{ github.event.pull_request.head.repo.full_name != github.repository }}
10+
# Forks and Dependabot don't have access to secrets
11+
HAS_SECRETS: ${{ secrets.PRE_COMMIT != '' }}
1112

1213
jobs:
1314
pre-commit:
@@ -17,9 +18,9 @@ jobs:
1718
env:
1819
GITHUB_CONTEXT: ${{ toJson(github) }}
1920
run: echo "$GITHUB_CONTEXT"
20-
- uses: actions/checkout@v5
21+
- uses: actions/checkout@v6
2122
name: Checkout PR for own repo
22-
if: env.IS_FORK == 'false'
23+
if: env.HAS_SECRETS == 'true'
2324
with:
2425
# To be able to commit it needs to fetch the head of the branch, not the
2526
# merge commit
@@ -29,34 +30,31 @@ jobs:
2930
# A token other than the default GITHUB_TOKEN is needed to be able to trigger CI
3031
token: ${{ secrets.PRE_COMMIT }}
3132
# pre-commit lite ci needs the default checkout configs to work
32-
- uses: actions/checkout@v5
33+
- uses: actions/checkout@v6
3334
name: Checkout PR for fork
34-
if: env.IS_FORK == 'true'
35+
if: env.HAS_SECRETS == 'false'
3536
with:
3637
# To be able to commit it needs the head branch of the PR, the remote one
3738
ref: ${{ github.event.pull_request.head.sha }}
3839
fetch-depth: 0
3940
- name: Set up Python
4041
uses: actions/setup-python@v6
4142
with:
42-
python-version: "3.14"
43+
python-version-file: ".python-version"
4344
- name: Setup uv
4445
uses: astral-sh/setup-uv@v7
4546
with:
4647
cache-dependency-glob: |
47-
requirements**.txt
4848
pyproject.toml
4949
uv.lock
5050
- name: Install Dependencies
51-
run: |
52-
uv venv
53-
uv pip install -r requirements.txt
51+
run: uv sync --locked
5452
- name: Run prek - pre-commit
5553
id: precommit
5654
run: uvx prek run --from-ref origin/${GITHUB_BASE_REF} --to-ref HEAD --show-diff-on-failure
5755
continue-on-error: true
5856
- name: Commit and push changes
59-
if: env.IS_FORK == 'false'
57+
if: env.HAS_SECRETS == 'true'
6058
run: |
6159
git config user.name "github-actions[bot]"
6260
git config user.email "github-actions[bot]@users.noreply.github.com"
@@ -68,7 +66,7 @@ jobs:
6866
git push
6967
fi
7068
- uses: pre-commit-ci/lite-action@v1.1.0
71-
if: env.IS_FORK == 'true'
69+
if: env.HAS_SECRETS == 'false'
7270
with:
7371
msg: 🎨 Auto format
7472
- name: Error out on pre-commit errors

.github/workflows/publish.yml

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ jobs:
1616
- typer-cli
1717
permissions:
1818
id-token: write
19+
contents: read
1920
steps:
2021
- name: Dump GitHub context
2122
env:
@@ -25,15 +26,12 @@ jobs:
2526
- name: Set up Python
2627
uses: actions/setup-python@v6
2728
with:
28-
python-version: "3.10"
29-
# Issue ref: https://github.com/actions/setup-python/issues/436
30-
# cache: "pip"
31-
# cache-dependency-path: pyproject.toml
32-
- name: Install build dependencies
33-
run: pip install build
29+
python-version-file: ".python-version"
30+
- name: Install uv
31+
uses: astral-sh/setup-uv@v7
3432
- name: Build distribution
33+
run: uv build
3534
env:
3635
TIANGOLO_BUILD_PACKAGE: ${{ matrix.package }}
37-
run: python -m build
3836
- name: Publish
39-
uses: pypa/gh-action-pypi-publish@v1.13.0
37+
run: uv publish

.github/workflows/smokeshow.yml

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,6 @@ on:
1010
permissions:
1111
statuses: write
1212

13-
env:
14-
UV_SYSTEM_PYTHON: 1
15-
1613
jobs:
1714
smokeshow:
1815
runs-on: ubuntu-latest
@@ -24,21 +21,21 @@ jobs:
2421
- uses: actions/checkout@v6
2522
- uses: actions/setup-python@v6
2623
with:
27-
python-version: '3.13'
24+
python-version-file: ".python-version"
2825
- name: Setup uv
2926
uses: astral-sh/setup-uv@v7
3027
with:
3128
cache-dependency-glob: |
32-
requirements**.txt
3329
pyproject.toml
34-
- run: uv pip install -r requirements-github-actions.txt
35-
- uses: actions/download-artifact@v6
30+
uv.lock
31+
- run: uv sync --locked --no-dev --group github-actions
32+
- uses: actions/download-artifact@v7
3633
with:
3734
name: coverage-html
3835
path: htmlcov
3936
github-token: ${{ secrets.GITHUB_TOKEN }}
4037
run-id: ${{ github.event.workflow_run.id }}
41-
- run: smokeshow upload htmlcov
38+
- run: uv run smokeshow upload htmlcov
4239
env:
4340
SMOKESHOW_GITHUB_STATUS_DESCRIPTION: Coverage {coverage-percentage}
4441
SMOKESHOW_GITHUB_COVERAGE_THRESHOLD: 100

.github/workflows/test-cpython-nightly.yml

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ on:
55
- cron: "0 0 * * *"
66
workflow_dispatch:
77

8+
env:
9+
UV_NO_SYNC: true
10+
811
jobs:
912
test-latest-python:
1013
runs-on: ubuntu-latest
@@ -26,28 +29,23 @@ jobs:
2629
- name: Setup uv
2730
uses: astral-sh/setup-uv@v7
2831
with:
29-
version: "0.4.15"
3032
enable-cache: true
3133
cache-dependency-glob: |
32-
requirements**.txt
3334
pyproject.toml
34-
- name: Create venv with CPython
35-
run: uv venv --python ./.cpython/python .venv
35+
uv.lock
3636
- name: Install Dependencies
37-
run: uv pip install -r requirements-tests.txt
38-
- name: Activate venv
39-
run: echo "$PWD/.venv/bin" >> $GITHUB_PATH
37+
run: uv sync --locked --no-dev --group tests --python ./.cpython/python
4038
- name: Lint
41-
run: bash scripts/lint.sh
39+
run: uv run bash scripts/lint.sh
4240
- run: mkdir coverage
43-
- run: bash ./scripts/test-files.sh
41+
- run: uv run bash scripts/test-files.sh
4442
- name: Test
45-
run: bash scripts/test.sh
43+
run: uv run bash scripts/test.sh
4644
env:
4745
COVERAGE_FILE: coverage/.coverage.ubuntu-cpython-main
4846
CONTEXT: ubuntu-cpython-main
4947
- name: Store coverage files
50-
uses: actions/upload-artifact@v5
48+
uses: actions/upload-artifact@v6
5149
with:
5250
name: coverage-ubuntu-cpython-main
5351
path: coverage

.github/workflows/test-redistribute.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
- name: Set up Python
2828
uses: actions/setup-python@v6
2929
with:
30-
python-version: "3.10"
30+
python-version-file: ".python-version"
3131
# Issue ref: https://github.com/actions/setup-python/issues/436
3232
# cache: "pip"
3333
# cache-dependency-path: pyproject.toml
@@ -45,7 +45,7 @@ jobs:
4545
if: ${{ matrix.package != 'typer-cli' }}
4646
run: |
4747
cd dist/typer*/
48-
pip install -r requirements-tests.txt
48+
pip install --group tests --editable .
4949
env:
5050
TIANGOLO_BUILD_PACKAGE: ${{ matrix.package }}
5151
- name: Run source distribution tests

0 commit comments

Comments
 (0)