Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate from poetry to uv #56

Merged
merged 1 commit into from
Sep 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,13 @@ jobs:
steps:
- uses: actions/checkout@v4

- run: pipx install poetry
- run: pipx inject poetry poetry-plugin-export
- run: pipx install uv

- uses: actions/setup-python@v5
with:
python-version: "3.12"
cache: "poetry"

- run: poetry export -f requirements.txt -o requirements.txt --without=dev
- run: uv export --no-dev --no-hashes --format requirements-txt > requirements.txt

- uses: neobrains/space-pipe@v0.5
with:
Expand Down
8 changes: 3 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,11 @@ jobs:
steps:
- uses: actions/checkout@v4

- run: pipx install poetry
- run: pipx inject poetry poetry-plugin-export
- run: pipx install uv

- uses: actions/setup-python@v5
with:
python-version: "3.12"
cache: "poetry"

- run: poetry export -f requirements.txt -o requirements.txt --without=dev
- run: poetry install
- run: uv export --no-dev --no-hashes --format requirements-txt > requirements.txt
- run: uv sync
16 changes: 8 additions & 8 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
- id: trailing-whitespace
- id: check-yaml

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.4.9
rev: v0.6.5
hooks:
- id: ruff
args: [--fix]
- id: ruff-format

- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.10.0
rev: v1.11.2
hooks:
- id: mypy
entry: mypy main.py
pass_filenames: false

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
- id: trailing-whitespace
- id: check-yaml
4 changes: 1 addition & 3 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
{
"python.formatting.provider": "black"
}
{}
2 changes: 1 addition & 1 deletion Spacefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ micros:
engine: python3.9
primary: true
run: uvicorn main:app
dev: .venv/bin/uvicorn main:app --reload
dev: .venv/bin/uvicorn main:app
public_routes:
- "/*"
1,586 changes: 0 additions & 1,586 deletions poetry.lock

This file was deleted.

37 changes: 16 additions & 21 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,26 +1,21 @@
[tool.poetry]
authors = ["Weiliang Li <to.be.impressive@gmail.com>"]
description = ""
license = "MIT"
[project]
description = "A simple ecies demo based on FastAPI"
name = "eciespy-demo"
package-mode = false
version = "0.1.0"

[tool.poetry.dependencies]
python = "^3.9"
readme = "README.md"
requires-python = ">=3.9"

eciespy = "^0.4.0"
dependencies = [
"eciespy>=0.4.2",
"fastapi>=0.114.2",
"python-multipart>=0.0.9",
"uvicorn>=0.30.6",
"uvloop>=0.20.0",
]

# server
fastapi = "^0.111.0"
python-multipart = "^0.0.9"
uvicorn = "^0.30.0"
uvloop = "^0.20.0"

[tool.poetry.group.dev.dependencies]
mypy = "^1.10.1"
ruff = "^0.4.8"

[build-system]
build-backend = "poetry.core.masonry.api"
requires = ["poetry-core>=1.0.0"]
[tool.uv]
dev-dependencies = [
"mypy>=1.11.2",
"ruff>=0.6.5",
]
708 changes: 708 additions & 0 deletions uv.lock

Large diffs are not rendered by default.