Repository navigation
Expand file tree
/
Copy pathpyproject.toml
More file actions
95 lines (76 loc) · 1.86 KB
/
Copy pathpyproject.toml
File metadata and controls
95 lines (76 loc) · 1.86 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
[project]
name = "htmui"
dynamic = ["version"]
description = "htmy component library"
readme = "README.md"
requires-python = ">=3.12"
dependencies = [
"fastapi[standard]>=0.136.3",
"holm>=0.10.0",
"htmy[lxml]>=0.13.1",
"pydantic-settings>=2.15.0",
"typer>=0.27.1",
"uvicorn>=0.52.1",
]
[project.scripts]
htmui = "htmui.cli:app"
[dependency-groups]
dev = [
"mypy>=2.3.0",
"poethepoet>=0.48.0",
"ruff>=0.16.2",
"watchfiles>=1.2.0",
]
[tool.fastapi]
entrypoint = "app.main:app"
[build-system]
requires = ["pdm-backend"]
build-backend = "pdm.backend"
[tool.pdm.build]
excludes = ["app/"]
[tool.pdm.version]
source = "file"
path = "htmui/__init__.py"
[tool.mypy]
strict = true
show_error_codes = true
[tool.pyright]
venvPath = "."
venv = ".venv"
[tool.ruff]
line-length = 108
exclude = [
".git",
".mypy_cache",
".ruff_cache",
".venv",
"dist",
"docs",
]
lint.select = [
"B", # flake8-bugbear
"C", # flake8-comprehensions
"E", # pycodestyle errors
"F", # pyflakes
"I", # isort
"S", # flake8-bandit - we must ignore these rules in tests
"W", # pycodestyle warnings
]
[tool.poe.tasks]
build-content = "python -m app.cli build-static-content"
build-dev-css = "npx @tailwindcss/cli -i static/basecoat-base.css -o static/basecoat-dev.css"
build-prod-css = "npx @tailwindcss/cli -i ./static/basecoat-base.css -o ./static/basecoat.css --minify"
build.sequence = ["build-content", "build-prod-css"]
format = "ruff format . --check"
format-fix = "ruff format ."
lint = "ruff check ."
lint-fix = "ruff check . --fix"
mypy = "mypy ."
check.sequence = ["format", "lint", "mypy"]
check.ignore_fail = "return_non_zero"
[tool.poe.tasks.dev]
cmd = "uvicorn app.main:app --reload"
env = { CSS_FILE = "basecoat-dev.css" }
[tool.poe.tasks.prod]
cmd = "uvicorn app.main:app --reload"
env = { CSS_FILE = "basecoat.css" }