Merge feat/flatten-padelnomics: UV workspace monorepo structure
Restructures padelnomics to match the quart_saas_boilerplate template: web/ workspace member holds source, tests, and scripts. Dockerfile, Makefile updated to web/src/ paths. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -3,9 +3,9 @@ FROM debian:bookworm-slim AS css-build
|
||||
ADD https://github.com/tailwindlabs/tailwindcss/releases/latest/download/tailwindcss-linux-x64 /usr/local/bin/tailwindcss
|
||||
RUN chmod +x /usr/local/bin/tailwindcss
|
||||
WORKDIR /app
|
||||
COPY src/ ./src/
|
||||
RUN tailwindcss -i ./src/padelnomics/static/css/input.css \
|
||||
-o ./src/padelnomics/static/css/output.css --minify
|
||||
COPY web/src/ ./web/src/
|
||||
RUN tailwindcss -i ./web/src/padelnomics/static/css/input.css \
|
||||
-o ./web/src/padelnomics/static/css/output.css --minify
|
||||
|
||||
# Build stage
|
||||
FROM python:3.12-slim AS build
|
||||
@@ -13,9 +13,9 @@ COPY --from=ghcr.io/astral-sh/uv:0.8 /uv /uvx /bin/
|
||||
WORKDIR /app
|
||||
ENV UV_COMPILE_BYTECODE=1 UV_LINK_MODE=copy
|
||||
COPY uv.lock pyproject.toml README.md ./
|
||||
COPY src/ ./src/
|
||||
COPY web/ ./web/
|
||||
RUN --mount=type=cache,target=/root/.cache/uv \
|
||||
uv sync --no-dev --frozen
|
||||
uv sync --no-dev --frozen --package padelnomics
|
||||
|
||||
# Runtime stage
|
||||
FROM python:3.12-slim AS runtime
|
||||
@@ -24,7 +24,7 @@ RUN useradd -m -u 1000 appuser
|
||||
WORKDIR /app
|
||||
RUN mkdir -p /app/data && chown -R appuser:appuser /app
|
||||
COPY --from=build --chown=appuser:appuser /app .
|
||||
COPY --from=css-build /app/src/padelnomics/static/css/output.css ./src/padelnomics/static/css/output.css
|
||||
COPY --from=css-build /app/web/src/padelnomics/static/css/output.css ./web/src/padelnomics/static/css/output.css
|
||||
USER appuser
|
||||
ENV PYTHONUNBUFFERED=1
|
||||
ENV DATABASE_PATH=/app/data/app.db
|
||||
|
||||
@@ -6,7 +6,7 @@ bin/tailwindcss:
|
||||
chmod +x bin/tailwindcss
|
||||
|
||||
css-build: bin/tailwindcss
|
||||
$(TAILWIND) -i src/padelnomics/static/css/input.css -o src/padelnomics/static/css/output.css --minify
|
||||
$(TAILWIND) -i web/src/padelnomics/static/css/input.css -o web/src/padelnomics/static/css/output.css --minify
|
||||
|
||||
css-watch: bin/tailwindcss
|
||||
$(TAILWIND) -i src/padelnomics/static/css/input.css -o src/padelnomics/static/css/output.css --watch
|
||||
$(TAILWIND) -i web/src/padelnomics/static/css/input.css -o web/src/padelnomics/static/css/output.css --watch
|
||||
|
||||
@@ -1,31 +1,10 @@
|
||||
[project]
|
||||
name = "padelnomics"
|
||||
version = "0.1.0"
|
||||
description = "Plan, finance, and build your padel business"
|
||||
readme = "README.md"
|
||||
requires-python = ">=3.11"
|
||||
dependencies = [
|
||||
"quart>=0.19.0",
|
||||
"aiosqlite>=0.19.0",
|
||||
"python-dotenv>=1.0.0",
|
||||
"itsdangerous>=2.1.0",
|
||||
"jinja2>=3.1.0",
|
||||
"hypercorn>=0.17.0",
|
||||
"paddle-python-sdk>=1.13.0",
|
||||
"mistune>=3.0.0",
|
||||
"resend>=2.22.0",
|
||||
"weasyprint>=68.1",
|
||||
[tool.uv.workspace]
|
||||
members = [
|
||||
"web",
|
||||
]
|
||||
|
||||
[build-system]
|
||||
requires = ["hatchling"]
|
||||
build-backend = "hatchling.build"
|
||||
|
||||
[tool.hatch.build.targets.wheel]
|
||||
packages = ["src/padelnomics"]
|
||||
|
||||
[tool.uv]
|
||||
dev-dependencies = [
|
||||
[dependency-groups]
|
||||
dev = [
|
||||
"hypothesis>=6.151.6",
|
||||
"playwright>=1.58.0",
|
||||
"pytest>=8.0.0",
|
||||
@@ -45,6 +24,6 @@ ignore = ["E501"]
|
||||
|
||||
[tool.pytest.ini_options]
|
||||
asyncio_mode = "auto"
|
||||
testpaths = ["tests"]
|
||||
testpaths = ["web/tests"]
|
||||
markers = ["visual: Playwright visual tests (require browser install)"]
|
||||
addopts = "-m 'not visual'"
|
||||
|
||||
40
padelnomics/uv.lock
generated
40
padelnomics/uv.lock
generated
@@ -6,6 +6,22 @@ resolution-markers = [
|
||||
"python_full_version < '3.13'",
|
||||
]
|
||||
|
||||
[manifest]
|
||||
members = [
|
||||
"padelnomics",
|
||||
]
|
||||
|
||||
[manifest.dependency-groups]
|
||||
dev = [
|
||||
{ name = "hypothesis", specifier = ">=6.151.6" },
|
||||
{ name = "playwright", specifier = ">=1.58.0" },
|
||||
{ name = "pytest", specifier = ">=8.0.0" },
|
||||
{ name = "pytest-asyncio", specifier = ">=0.23.0" },
|
||||
{ name = "pytest-playwright", specifier = ">=0.7.2" },
|
||||
{ name = "respx", specifier = ">=0.22.0" },
|
||||
{ name = "ruff", specifier = ">=0.3.0" },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "aiofiles"
|
||||
version = "25.1.0"
|
||||
@@ -667,7 +683,7 @@ wheels = [
|
||||
[[package]]
|
||||
name = "padelnomics"
|
||||
version = "0.1.0"
|
||||
source = { editable = "." }
|
||||
source = { editable = "web" }
|
||||
dependencies = [
|
||||
{ name = "aiosqlite" },
|
||||
{ name = "hypercorn" },
|
||||
@@ -681,17 +697,6 @@ dependencies = [
|
||||
{ name = "weasyprint" },
|
||||
]
|
||||
|
||||
[package.dev-dependencies]
|
||||
dev = [
|
||||
{ name = "hypothesis" },
|
||||
{ name = "playwright" },
|
||||
{ name = "pytest" },
|
||||
{ name = "pytest-asyncio" },
|
||||
{ name = "pytest-playwright" },
|
||||
{ name = "respx" },
|
||||
{ name = "ruff" },
|
||||
]
|
||||
|
||||
[package.metadata]
|
||||
requires-dist = [
|
||||
{ name = "aiosqlite", specifier = ">=0.19.0" },
|
||||
@@ -706,17 +711,6 @@ requires-dist = [
|
||||
{ name = "weasyprint", specifier = ">=68.1" },
|
||||
]
|
||||
|
||||
[package.metadata.requires-dev]
|
||||
dev = [
|
||||
{ name = "hypothesis", specifier = ">=6.151.6" },
|
||||
{ name = "playwright", specifier = ">=1.58.0" },
|
||||
{ name = "pytest", specifier = ">=8.0.0" },
|
||||
{ name = "pytest-asyncio", specifier = ">=0.23.0" },
|
||||
{ name = "pytest-playwright", specifier = ">=0.7.2" },
|
||||
{ name = "respx", specifier = ">=0.22.0" },
|
||||
{ name = "ruff", specifier = ">=0.3.0" },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "pillow"
|
||||
version = "12.1.1"
|
||||
|
||||
25
padelnomics/web/pyproject.toml
Normal file
25
padelnomics/web/pyproject.toml
Normal file
@@ -0,0 +1,25 @@
|
||||
[project]
|
||||
name = "padelnomics"
|
||||
version = "0.1.0"
|
||||
description = "Plan, finance, and build your padel business"
|
||||
readme = "../README.md"
|
||||
requires-python = ">=3.11"
|
||||
dependencies = [
|
||||
"quart>=0.19.0",
|
||||
"aiosqlite>=0.19.0",
|
||||
"python-dotenv>=1.0.0",
|
||||
"itsdangerous>=2.1.0",
|
||||
"jinja2>=3.1.0",
|
||||
"hypercorn>=0.17.0",
|
||||
"paddle-python-sdk>=1.13.0",
|
||||
"mistune>=3.0.0",
|
||||
"resend>=2.22.0",
|
||||
"weasyprint>=68.1",
|
||||
]
|
||||
|
||||
[build-system]
|
||||
requires = ["hatchling"]
|
||||
build-backend = "hatchling.build"
|
||||
|
||||
[tool.hatch.build.targets.wheel]
|
||||
packages = ["src/padelnomics"]
|
||||
@@ -8,7 +8,15 @@ from pathlib import Path
|
||||
|
||||
from quart import Blueprint, flash, g, redirect, render_template, request, session, url_for
|
||||
|
||||
from ..core import capture_waitlist_email, config, csrf_protect, execute, fetch_one, is_disposable_email, waitlist_gate
|
||||
from ..core import (
|
||||
capture_waitlist_email,
|
||||
config,
|
||||
csrf_protect,
|
||||
execute,
|
||||
fetch_one,
|
||||
is_disposable_email,
|
||||
waitlist_gate,
|
||||
)
|
||||
from ..i18n import SUPPORTED_LANGS, get_translations
|
||||
|
||||
# Blueprint with its own template folder
|
||||
@@ -18,7 +18,15 @@ from ..auth.routes import (
|
||||
mark_token_used,
|
||||
update_user,
|
||||
)
|
||||
from ..core import config, csrf_protect, execute, fetch_one, is_disposable_email, is_plausible_phone, send_email
|
||||
from ..core import (
|
||||
config,
|
||||
csrf_protect,
|
||||
execute,
|
||||
fetch_one,
|
||||
is_disposable_email,
|
||||
is_plausible_phone,
|
||||
send_email,
|
||||
)
|
||||
from ..i18n import get_translations
|
||||
|
||||
bp = Blueprint(
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user