Skip to content

Commit 8f702a1

Browse files
committed
feat: update uv version to 0.11.3 and adjust CI configuration for dynamic versioning
1 parent 439b1b2 commit 8f702a1

8 files changed

Lines changed: 354 additions & 334 deletions

File tree

.github/workflows/ci.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,14 @@ jobs:
4848
with:
4949
python-version: '3.10.6'
5050

51+
- name: Get uv version
52+
id: uv-version
53+
run: echo "uv-version=$(cat version/uv)" >> "$GITHUB_OUTPUT"
54+
5155
- name: Install uv
5256
uses: astral-sh/setup-uv@v6
5357
with:
54-
version: "0.8.17"
58+
version: ${{ steps.uv-version.outputs.uv-version }}
5559
enable-cache: true
5660

5761
- name: Install the project

.github/workflows/openapi-spec.yaml

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,17 +24,21 @@ jobs:
2424
- name: Checkout Repository
2525
uses: actions/checkout@v4
2626

27-
- name: Install uv
28-
uses: astral-sh/setup-uv@v6
29-
with:
30-
version: "0.8.17"
31-
enable-cache: true
32-
3327
- name: Setup Python
3428
uses: actions/setup-python@v5
3529
with:
3630
python-version: '3.10.6'
3731

32+
- name: Get uv version
33+
id: uv-version
34+
run: echo "uv-version=$(cat version/uv)" >> "$GITHUB_OUTPUT"
35+
36+
- name: Install uv
37+
uses: astral-sh/setup-uv@v6
38+
with:
39+
version: ${{ steps.uv-version.outputs.uv-version }}
40+
enable-cache: true
41+
3842
- name: Install the project
3943
run: uv sync --locked --dev
4044

README.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,14 +42,22 @@ Repo Features:
4242
## Prerequisites
4343

4444
* Python 3.10+
45-
* uv 0.8.17+
45+
* uv 0.11.3+
4646
* PostgreSQL 18.1+ (if you want to use PostgreSQL as database)
4747

4848
### Install uv
4949

5050
Install `uv` with the official installer by following
5151
this [link](https://docs.astral.sh/uv/getting-started/installation/).
5252

53+
You must use the current adopted version of `uv`
54+
defined [here](https://github.com/umbertogriffo/fastapi-blueprint/blob/main/version/uv).
55+
56+
If you have `uv` already installed, and it is not the right version, you can downgrade (or upgrade) `uv` through:
57+
```shell
58+
uv self update 0.11.3
59+
```
60+
5361
## Bootstrap Environment
5462

5563
To easily install the dependencies we created a make file.

NOTE.md renamed to notes/rollback-when-using-pytest.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
# Note
2-
3-
## Rollback when using pytest
1+
# Rollback when using pytest
42

53
When using `pytest` with SQLModel and a database, it's important to ensure that changes made during tests do not persist and affect other tests.
64

todo.md renamed to notes/todo.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
- Update to FastAPI 0.131.0, so Pydantic serializes each item to JSON (on Rust) for max perf. Just declare the response model - return type - https://fastapi.tiangolo.com/advanced/custom-response/#json-performance
33
- In case of DeprecationWarning `HTTP_422_UNPROCESSABLE_ENTITY` is deprecated. Use `HTTP_422_UNPROCESSABLE_CONTENT` instead in exception_handlers.py
44
- https://stackoverflow.com/questions/79789459/deprecationwarning-http-422-unprocessable-entity-is-deprecated-use-http-422
5-
- Try to replace the docker_compose.py with [just](https://github.com/casey/just)
6-
- [Moving from Sync to Async in FastAPI with SQLModelWhat you Need to Know](https://www.linkedin.com/pulse/moving-from-sync-async-fastapi-sqlmodelwhat-you-need-know-vertrees-eowtc/)
5+
- Try to replace the `docker_compose.py` with [just](https://github.com/casey/just)
6+
- [Moving from Sync to Async in FastAPI with SQLModel - What you Need to Know](https://www.linkedin.com/pulse/moving-from-sync-async-fastapi-sqlmodelwhat-you-need-know-vertrees-eowtc/)
77
- https://github.com/fastapi/fastapi/discussions/4302
88
- https://www.youtube.com/watch?v=I8WiIXMDydw
99
- https://www.youtube.com/watch?v=AtHEX76Wysw

pyproject.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ pythonpath = [
3030

3131
[tool.uv]
3232
package = true
33+
# Dependency cooldowns to mitigate supply chain attacks
34+
exclude-newer = "30 days"
3335

3436
[project.scripts]
3537
migrate-db = "utils.cli.migration:main"

uv.lock

Lines changed: 324 additions & 321 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

version/uv

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

0 commit comments

Comments
 (0)