-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Houskeeping + Migrate to uv and pyproejct.toml for environment management + Add a docker build + Add github actions for basic hiegene: ruff lint, ruff format, pip-audit + Update README
- Loading branch information
Showing
10 changed files
with
1,014 additions
and
20 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
name: Code Check | ||
on: [ push ] | ||
|
||
jobs: | ||
ruff-lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Install Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.11" | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install ruff | ||
- name: Run Ruff | ||
run: ruff check --output-format=github . | ||
|
||
ruff-format: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Install Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.11" | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install ruff | ||
- name: Ruff Format Check | ||
run: ruff format --diff | ||
|
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,16 @@ | ||
name: Pip Audit | ||
on: [ push ] | ||
|
||
jobs: | ||
pip-audit: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Install Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.11" | ||
- uses: yezz123/setup-uv@v4 | ||
- name: check | ||
run: | | ||
uv run pip-audit |
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,5 +1,8 @@ | ||
# Byte-compiled / optimized / DLL files | ||
.venv | ||
venv/ | ||
|
||
.mypy_cache/ | ||
*pretixdata* | ||
*.xlsx | ||
.ruff_cache/ | ||
|
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,12 @@ | ||
# https://docs.astral.sh/uv/guides/integration/fastapi/#deployment | ||
|
||
FROM python:slim | ||
COPY --from=ghcr.io/astral-sh/uv:latest /uv /bin/uv | ||
|
||
COPY . /app | ||
WORKDIR /app | ||
|
||
RUN uv sync --frozen --no-cache | ||
|
||
# Run the application. | ||
CMD ["/app/.venv/bin/fastapi", "run", "app/main.py", "--port", "80", "--host", "0.0.0.0"] |
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 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,4 +1,10 @@ | ||
John Smith | ||
Jane Doe | ||
German Kaiser | ||
Julius Caesar | ||
Juliet Floyd | ||
Pierce Guerrero | ||
Margot Espinoza | ||
Dallas Chambers | ||
Makayla Berger | ||
Byron Wheeler | ||
Sydney Parker | ||
Caleb Rowland | ||
Mckenna Mercado | ||
Abram Doyle |
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,16 @@ | ||
[project] | ||
name = "pyprize" | ||
version = "0.1.0" | ||
description = "Add your description here" | ||
readme = "README.md" | ||
requires-python = ">=3.12" | ||
dependencies = [ | ||
"fastapi[standard]>=0.112.2", | ||
"sqlmodel>=0.0.21", | ||
] | ||
|
||
[tool.uv] | ||
dev-dependencies = [ | ||
"pip-audit>=2.7.3", | ||
"ruff>=0.6.3", | ||
] |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.