Skip to content

Commit a88722b

Browse files
committed
feat: migrate from Poetry to uv package management
- Replace Poetry with uv for dependency management and building - Update pyproject.toml to use PEP 621 project metadata format - Switch build backend from poetry-core to hatchling - Add GitHub Actions workflow for CI/CD with uv - Configure Renovate for automated dependency updates - Remove poetry.lock, add uv.lock for dependency resolution - Update project version to 0.3.0 - Add proper package build configuration with hatchling - Configure uv indexes for PyPI and TestPyPI publishing - Update README.md This modernizes the project tooling while maintaining all existing functionality and dependencies.
1 parent da02449 commit a88722b

File tree

6 files changed

+738
-692
lines changed

6 files changed

+738
-692
lines changed

.github/renovate.json

Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
1+
{
2+
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
3+
"extends": [
4+
"config:recommended",
5+
":dependencyDashboard",
6+
":semanticCommits",
7+
":automergeDigest",
8+
":automergeBranch"
9+
],
10+
"timezone": "UTC",
11+
"schedule": [
12+
"before 4am on monday"
13+
],
14+
"labels": [
15+
"dependencies",
16+
"renovate"
17+
],
18+
"platformAutomerge": true,
19+
"baseBranchPatterns": [
20+
"master"
21+
],
22+
"packageRules": [
23+
{
24+
"description": "Auto-merge minor and patch updates for all dependencies",
25+
"matchUpdateTypes": [
26+
"minor",
27+
"patch"
28+
],
29+
"automerge": true,
30+
"automergeType": "pr",
31+
"platformAutomerge": true
32+
},
33+
{
34+
"description": "Major updates always require manual review",
35+
"matchUpdateTypes": [
36+
"major"
37+
],
38+
"automerge": false,
39+
"labels": [
40+
"dependencies",
41+
"major-update"
42+
]
43+
},
44+
{
45+
"description": "FastAPI framework updates",
46+
"matchPackageNames": [
47+
"fastapi",
48+
"starlette",
49+
"uvicorn"
50+
],
51+
"automerge": false,
52+
"labels": [
53+
"framework",
54+
"dependencies"
55+
]
56+
},
57+
{
58+
"description": "Group Python dependencies",
59+
"matchManagers": [
60+
"pip_requirements",
61+
"pip_setup",
62+
"pipenv",
63+
"poetry",
64+
"pep621"
65+
],
66+
"groupName": "python dependencies",
67+
"groupSlug": "python-deps"
68+
},
69+
{
70+
"description": "Group GitHub Actions",
71+
"matchManagers": [
72+
"github-actions"
73+
],
74+
"groupName": "github-actions",
75+
"automerge": true
76+
}
77+
],
78+
"pep621": {
79+
"enabled": true
80+
},
81+
"rangeStrategy": "auto",
82+
"prHourlyLimit": 2,
83+
"prConcurrentLimit": 5,
84+
"rebaseWhen": "behind-base-branch",
85+
"semanticCommits": "enabled",
86+
"commitMessagePrefix": "chore(deps):",
87+
"commitMessageAction": "update",
88+
"commitMessageTopic": "{{depName}}",
89+
"commitMessageExtra": "to {{newVersion}}",
90+
"prBodyTemplate": "This PR contains the following updates:\n\n| Package | Type | Update | Change |\n|---------|------|--------|---------|\n{{#each upgrades as |upgrade|}}\n| {{upgrade.depName}} | {{upgrade.depType}} | {{upgrade.updateType}} | `{{upgrade.currentVersion}}` → `{{upgrade.newVersion}}` |\n{{/each}}\n\n---\n\n### Release Notes\n{{#each upgrades as |upgrade|}}\n{{#if upgrade.hasReleaseNotes}}\n<details>\n<summary>{{upgrade.depName}}</summary>\n\n{{upgrade.releaseNotes}}\n</details>\n{{/if}}\n{{/each}}\n\n---\n\n This PR has been generated by Renovate Bot.",
91+
"vulnerabilityAlerts": {
92+
"enabled": true,
93+
"labels": [
94+
"security",
95+
"dependencies"
96+
],
97+
"automerge": false
98+
},
99+
"osvVulnerabilityAlerts": true,
100+
"lockFileMaintenance": {
101+
"enabled": true,
102+
"schedule": [
103+
"before 4am on monday"
104+
]
105+
}
106+
}

.github/workflows/build-test.yml

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
name: Build and Test (Native)
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
tags-ignore:
8+
- '**'
9+
paths-ignore:
10+
- '**.md'
11+
12+
env:
13+
PYTHON_VERSION: '3.13'
14+
UV_VERSION: '0.5.11'
15+
16+
jobs:
17+
test:
18+
runs-on: ubuntu-latest
19+
20+
steps:
21+
- name: Checkout code
22+
uses: actions/checkout@v4
23+
24+
- name: Set up Python
25+
uses: actions/setup-python@v5
26+
with:
27+
python-version: ${{ env.PYTHON_VERSION }}
28+
29+
- name: Install uv
30+
uses: astral-sh/setup-uv@v6
31+
with:
32+
version: ${{ env.UV_VERSION }}
33+
34+
- name: Install dependencies
35+
run: |
36+
uv sync --all-groups
37+
38+
- name: Run tests with coverage
39+
env:
40+
FASTAPI_TESTING_PORT_RANGE_START: 8001
41+
FASTAPI_TESTING_PORT_RANGE_END: 9000
42+
run: |
43+
uv run pytest -v --tb=short --cov=src/authly --cov-report=xml --cov-report=term
44+
45+
- name: Upload coverage reports to Codecov
46+
uses: codecov/codecov-action@v5
47+
with:
48+
token: ${{ secrets.CODECOV_TOKEN }}
49+
slug: descoped/authly
50+
51+
build:
52+
runs-on: ubuntu-latest
53+
needs: test
54+
55+
steps:
56+
- name: Checkout code
57+
uses: actions/checkout@v4
58+
59+
- name: Set up Python
60+
uses: actions/setup-python@v5
61+
with:
62+
python-version: ${{ env.PYTHON_VERSION }}
63+
64+
- name: Install uv
65+
uses: astral-sh/setup-uv@v6
66+
with:
67+
version: ${{ env.UV_VERSION }}
68+
69+
- name: Build package
70+
run: |
71+
uv build

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,11 @@ A lightweight, async-first testing framework designed specifically for FastAPI a
1414

1515
## Installation
1616

17+
```bash
18+
uv add fastapi-testing
19+
```
20+
21+
Or with pip:
1722
```bash
1823
pip install fastapi-testing
1924
```

0 commit comments

Comments
 (0)