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

chore: migrate package manager from Poetry to Rye #6

Merged
merged 4 commits into from
Jul 26, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
7 changes: 5 additions & 2 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
FROM python:3.11-buster

RUN pip install poetry

RUN poetry config virtualenvs.create false
SHELL [ "/bin/bash", "-o", "pipefail", "-c" ]
RUN curl -sSf https://rye.astral.sh/get | RYE_INSTALL_OPTION="--yes" bash

ENV RYE_HOME="/opt/rye"
ENV PATH="$RYE_HOME/shims:$PATH"
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"python.formatting.provider": "none",
"python.defaultInterpreterPath": "${workspaceFolder}/.venv/bin/python",
"python.testing.pytestArgs": [
"tests",
"-vv"
Expand Down
802 changes: 0 additions & 802 deletions poetry.lock

This file was deleted.

48 changes: 29 additions & 19 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,24 +1,34 @@
[tool.poetry]
[project]
name = "dddpy"
version = "0.9.0"
version = "0.10.0"
description = "An example of Python FastAPI Domain-Driven Design and Onion Architecture."
authors = ["iktakahiro <[email protected]>"]
authors = [{ name = "iktakahiro", email = "[email protected]" }]
dependencies = [
"sqlalchemy==2.0.9",
"pydantic==1.10.7",
"fastapi==0.111.1",
"uvicorn==0.30.3",
"shortuuid==1.0.13",
]
readme = "README.md"
requires-python = ">=3.12"

[tool.poetry.dependencies]
python = "^3.11"
SQLAlchemy = "^2.0.9"
pydantic = "^1.10.7"
fastapi = "^0.95.1"
uvicorn = "^0.21.1"
shortuuid = "^1.0.11"
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"

[tool.poetry.group.dev.dependencies]
black = "^23.3.0"
mypy = "^1.2.0"
pytest = "^7.3.1"
isort = "^5.12.0"
pylint = "^2.17.2"
[tool.rye]
managed = true
dev-dependencies = [
"black>=24.4.2",
"mypy>=1.11.0",
"pytest>=8.3.2",
"isort>=5.13.2",
"pylint>=3.2.6",
]

[build-system]
requires = ["poetry>=1.4.0"]
build-backend = "poetry.masonry.api"
[tool.hatch.metadata]
allow-direct-references = true

[tool.hatch.build.targets.wheel]
packages = ["dddpy"]
124 changes: 124 additions & 0 deletions requirements-dev.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,124 @@
# generated by rye
# use `rye lock` or `rye sync` to update this lockfile
#
# last locked with the following flags:
# pre: false
# features: []
# all-features: false
# with-sources: false
# generate-hashes: false
# universal: false

-e file:.
anyio==4.4.0
# via httpx
# via starlette
# via watchfiles
astroid==3.2.4
# via pylint
black==24.4.2
certifi==2024.7.4
# via httpcore
# via httpx
click==8.1.7
# via black
# via typer
# via uvicorn
dill==0.3.8
# via pylint
dnspython==2.6.1
# via email-validator
email-validator==2.2.0
# via fastapi
fastapi==0.111.1
# via dddpy
fastapi-cli==0.0.4
# via fastapi
greenlet==3.0.3
# via sqlalchemy
h11==0.14.0
# via httpcore
# via uvicorn
httpcore==1.0.5
# via httpx
httptools==0.6.1
# via uvicorn
httpx==0.27.0
# via fastapi
idna==3.7
# via anyio
# via email-validator
# via httpx
iniconfig==2.0.0
# via pytest
isort==5.13.2
# via pylint
jinja2==3.1.4
# via fastapi
markdown-it-py==3.0.0
# via rich
markupsafe==2.1.5
# via jinja2
mccabe==0.7.0
# via pylint
mdurl==0.1.2
# via markdown-it-py
mypy==1.11.0
mypy-extensions==1.0.0
# via black
# via mypy
packaging==24.1
# via black
# via pytest
pathspec==0.12.1
# via black
platformdirs==4.2.2
# via black
# via pylint
pluggy==1.5.0
# via pytest
pydantic==1.10.7
# via dddpy
# via fastapi
pygments==2.18.0
# via rich
pylint==3.2.6
pytest==8.3.2
python-dotenv==1.0.1
# via uvicorn
python-multipart==0.0.9
# via fastapi
pyyaml==6.0.1
# via uvicorn
rich==13.7.1
# via typer
shellingham==1.5.4
# via typer
shortuuid==1.0.13
# via dddpy
sniffio==1.3.1
# via anyio
# via httpx
sqlalchemy==2.0.9
# via dddpy
starlette==0.37.2
# via fastapi
tomlkit==0.13.0
# via pylint
typer==0.12.3
# via fastapi-cli
typing-extensions==4.12.2
# via fastapi
# via mypy
# via pydantic
# via sqlalchemy
# via typer
uvicorn==0.30.3
# via dddpy
# via fastapi
uvloop==0.19.0
# via uvicorn
watchfiles==0.22.0
# via uvicorn
websockets==12.0
# via uvicorn
93 changes: 93 additions & 0 deletions requirements.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
# generated by rye
# use `rye lock` or `rye sync` to update this lockfile
#
# last locked with the following flags:
# pre: false
# features: []
# all-features: false
# with-sources: false
# generate-hashes: false
# universal: false

-e file:.
anyio==4.4.0
# via httpx
# via starlette
# via watchfiles
certifi==2024.7.4
# via httpcore
# via httpx
click==8.1.7
# via typer
# via uvicorn
dnspython==2.6.1
# via email-validator
email-validator==2.2.0
# via fastapi
fastapi==0.111.1
# via dddpy
fastapi-cli==0.0.4
# via fastapi
greenlet==3.0.3
# via sqlalchemy
h11==0.14.0
# via httpcore
# via uvicorn
httpcore==1.0.5
# via httpx
httptools==0.6.1
# via uvicorn
httpx==0.27.0
# via fastapi
idna==3.7
# via anyio
# via email-validator
# via httpx
jinja2==3.1.4
# via fastapi
markdown-it-py==3.0.0
# via rich
markupsafe==2.1.5
# via jinja2
mdurl==0.1.2
# via markdown-it-py
pydantic==1.10.7
# via dddpy
# via fastapi
pygments==2.18.0
# via rich
python-dotenv==1.0.1
# via uvicorn
python-multipart==0.0.9
# via fastapi
pyyaml==6.0.1
# via uvicorn
rich==13.7.1
# via typer
shellingham==1.5.4
# via typer
shortuuid==1.0.13
# via dddpy
sniffio==1.3.1
# via anyio
# via httpx
sqlalchemy==2.0.9
# via dddpy
starlette==0.37.2
# via fastapi
typer==0.12.3
# via fastapi-cli
typing-extensions==4.12.2
# via fastapi
# via pydantic
# via sqlalchemy
# via typer
uvicorn==0.30.3
# via dddpy
# via fastapi
uvloop==0.19.0
# via uvicorn
watchfiles==0.22.0
# via uvicorn
websockets==12.0
# via uvicorn
Loading