-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build: use poetry for dependency management
- Loading branch information
1 parent
2ec322e
commit 733614f
Showing
9 changed files
with
830 additions
and
62 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
fail_fast: true | ||
repos: | ||
- repo: local | ||
hooks: | ||
- id: black | ||
name: black | ||
entry: poetry run black | ||
language: system | ||
types: [file, python] | ||
- id: isort | ||
name: isort | ||
entry: poetry run isort | ||
language: system | ||
types: [file, python] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,8 @@ | ||
FROM python:3.10-slim | ||
FROM python:3.11.6-slim | ||
WORKDIR /app | ||
COPY ./requirements.txt /app/requirements.txt | ||
RUN pip install -r /app/requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple | ||
COPY ./ /app | ||
RUN pip install poetry && poetry config virtualenvs.create false | ||
|
||
COPY pyproject.toml poetry.lock ./ | ||
RUN poetry install --no-dev | ||
COPY . . | ||
CMD ["python", "-m", "uvicorn", "main:app", "--host", "0.0.0.0", "--port", "9000"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
pre-commit: | ||
poetry run pre-commit run | ||
|
||
run: | ||
python -m uvicorn main:app --host 0.0.0.0 --port 9000 --reload |
This file was deleted.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
[tool.poetry] | ||
name = "heimdallr" | ||
version = "v1.2.4" | ||
description = "" | ||
authors = ["Leslie Leung <lesily9@gmail.com>"] | ||
license = "GPL-3.0" | ||
readme = "README.md" | ||
|
||
[tool.poetry.dependencies] | ||
python = "^3.11" | ||
fastapi = "^0.108.0" | ||
uvicorn = "^0.25.0" | ||
requests = "^2.31.0" | ||
python-multipart = "^0.0.6" | ||
|
||
|
||
[tool.poetry.group.dev.dependencies] | ||
pre-commit = "^3.6.0" | ||
black = "^23.12.1" | ||
isort = "^5.13.2" | ||
|
||
[tool.isort] | ||
profile = "black" | ||
|
||
[build-system] | ||
requires = ["poetry-core"] | ||
build-backend = "poetry.core.masonry.api" |
This file was deleted.
Oops, something went wrong.