Skip to content

Commit 0359691

Browse files
committed
Merge remote-tracking branch 'upstream/main' into os/feature/new-dev-mode
2 parents bf2c972 + dc8dc14 commit 0359691

File tree

7 files changed

+51
-22
lines changed

7 files changed

+51
-22
lines changed

.github/labeler.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,6 @@ internal:
1818
- pdm_build.py
1919
- requirements*.txt
2020
- all-globs-to-all-files:
21-
- README.md
21+
- '!README.md'
2222
- '!src/**'
2323
- '!pyproject.toml'

.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/smokeshow.yml

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,29 +8,37 @@ on:
88
permissions:
99
statuses: write
1010

11+
env:
12+
UV_SYSTEM_PYTHON: 1
13+
1114
jobs:
1215
smokeshow:
1316
if: ${{ github.event.workflow_run.conclusion == 'success' }}
1417
runs-on: ubuntu-latest
15-
1618
steps:
1719
- name: Dump GitHub context
1820
env:
1921
GITHUB_CONTEXT: ${{ toJson(github) }}
2022
run: echo "$GITHUB_CONTEXT"
23+
- uses: actions/checkout@v4
2124
- uses: actions/setup-python@v5
2225
with:
2326
python-version: '3.9'
24-
25-
- run: pip install smokeshow
26-
27+
- name: Setup uv
28+
uses: astral-sh/setup-uv@v3
29+
with:
30+
version: "0.4.15"
31+
enable-cache: true
32+
cache-dependency-glob: |
33+
requirements**.txt
34+
pyproject.toml
35+
- run: uv pip install -r requirements-github-actions.txt
2736
- uses: actions/download-artifact@v4
2837
with:
2938
name: coverage-html
3039
path: htmlcov
3140
github-token: ${{ secrets.GITHUB_TOKEN }}
3241
run-id: ${{ github.event.workflow_run.id }}
33-
3442
- run: smokeshow upload htmlcov
3543
env:
3644
SMOKESHOW_GITHUB_STATUS_DESCRIPTION: Coverage {coverage-percentage}

.github/workflows/test.yml

Lines changed: 20 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ on:
2121
required: false
2222
default: 'false'
2323

24+
env:
25+
UV_SYSTEM_PYTHON: 1
26+
2427
jobs:
2528
test:
2629
runs-on: ubuntu-latest
@@ -43,23 +46,22 @@ jobs:
4346
uses: actions/setup-python@v5
4447
with:
4548
python-version: ${{ matrix.python-version }}
46-
# Issue ref: https://github.com/actions/setup-python/issues/436
47-
# cache: "pip"
48-
# cache-dependency-path: pyproject.toml
49-
- uses: actions/cache@v4
50-
id: cache
49+
- name: Setup uv
50+
uses: astral-sh/setup-uv@v3
5151
with:
52-
path: ${{ env.pythonLocation }}
53-
key: ${{ runner.os }}-python-${{ env.pythonLocation }}-${{ hashFiles('pyproject.toml', 'requirements-tests.txt') }}
52+
version: "0.4.15"
53+
enable-cache: true
54+
cache-dependency-glob: |
55+
requirements**.txt
56+
pyproject.toml
5457
# Allow debugging with tmate
5558
- name: Setup tmate session
5659
uses: mxschmitt/action-tmate@v3
5760
if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.debug_enabled == 'true' }}
5861
with:
5962
limit-access-to-actor: true
6063
- name: Install Dependencies
61-
if: steps.cache.outputs.cache-hit != 'true'
62-
run: pip install -r requirements-tests.txt
64+
run: uv pip install -r requirements-tests.txt
6365
- name: Lint
6466
run: bash scripts/lint.sh
6567
- run: mkdir coverage
@@ -87,16 +89,21 @@ jobs:
8789
- uses: actions/setup-python@v5
8890
with:
8991
python-version: '3.8'
90-
# Issue ref: https://github.com/actions/setup-python/issues/436
91-
# cache: "pip"
92-
# cache-dependency-path: pyproject.toml
92+
- name: Setup uv
93+
uses: astral-sh/setup-uv@v3
94+
with:
95+
version: "0.4.15"
96+
enable-cache: true
97+
cache-dependency-glob: |
98+
requirements**.txt
99+
pyproject.toml
93100
- name: Get coverage files
94101
uses: actions/download-artifact@v4
95102
with:
96103
pattern: coverage-*
97104
path: coverage
98105
merge-multiple: true
99-
- run: pip install coverage[toml]
106+
- run: uv pip install -r requirements-tests.txt
100107
- run: ls -la coverage
101108
- run: coverage combine coverage
102109
- run: coverage report

release-notes.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,18 @@
22

33
## Latest Changes
44

5+
* 👷 Update `labeler.yml`. PR [#101](https://github.com/fastapi/fastapi-cli/pull/101) by [@tiangolo](https://github.com/tiangolo).
56
* 👷 Do not sync labels as it overrides manually added labels. PR [#71](https://github.com/fastapi/fastapi-cli/pull/71) by [@tiangolo](https://github.com/tiangolo).
67

8+
### Fixes
9+
10+
* 🐛 Use correct syntax for links. PR [#131](https://github.com/fastapi/fastapi-cli/pull/131) by [@patrick91](https://github.com/patrick91).
11+
712
### Internal
813

14+
* 👷 Fix smokeshow, checkout files on CI. PR [#106](https://github.com/fastapi/fastapi-cli/pull/106) by [@tiangolo](https://github.com/tiangolo).
15+
* 👷 Use uv in CI. PR [#105](https://github.com/fastapi/fastapi-cli/pull/105) by [@tiangolo](https://github.com/tiangolo).
16+
* 👷 Update `labeler.yml`. PR [#102](https://github.com/fastapi/fastapi-cli/pull/102) by [@tiangolo](https://github.com/tiangolo).
917
* ⬆ Bump tiangolo/issue-manager from 0.5.0 to 0.5.1. PR [#89](https://github.com/fastapi/fastapi-cli/pull/89) by [@dependabot[bot]](https://github.com/apps/dependabot).
1018
* 👷 Update `issue-manager.yml`. PR [#88](https://github.com/fastapi/fastapi-cli/pull/88) by [@tiangolo](https://github.com/tiangolo).
1119
* 💚 Set `include-hidden-files` to `True` when using the `upload-artifact` GH action. PR [#84](https://github.com/fastapi/fastapi-cli/pull/84) by [@svlandeg](https://github.com/svlandeg).

requirements-github-actions.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
smokeshow

src/fastapi_cli/cli.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ def callback(
4646
4747
Manage your [bold]FastAPI[/bold] projects, run your FastAPI apps, and more.
4848
49-
Read more in the docs: [link]https://fastapi.tiangolo.com/fastapi-cli/[/link].
49+
Read more in the docs: [link=https://fastapi.tiangolo.com/fastapi-cli/]https://fastapi.tiangolo.com/fastapi-cli/[/link].
5050
"""
5151

5252
log_level = logging.DEBUG if verbose else logging.INFO
@@ -133,10 +133,13 @@ def _run(
133133
tag="app",
134134
)
135135

136+
url = f"http://{host}:{port}"
137+
url_docs = f"{url}/docs"
138+
136139
toolkit.print_line()
137140
toolkit.print(
138-
f"Server started at [link=http://{host}:{port}]https://{host}:{port}[/]\n\n"
139-
f"Documentation at [link=https://{host}:{port}/docs]https://{host}:{port}/docs[/]",
141+
f"Server started at [link={url}]{url}[/]",
142+
f"Documentation at [link={url_docs}]{url_docs}[/]",
140143
tag="server",
141144
)
142145

0 commit comments

Comments
 (0)