-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
65 lines (53 loc) · 1.38 KB
/
pyproject.toml
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
[project]
name = "fh_utils"
version = "0.5.0"
description = "A collection of utilities for FastHTML projects"
readme = "README.md"
requires-python = ">=3.10"
dependencies = ["python-fasthtml>=0.8.0", "diskcache>=5.6.3", "typer>=0.12.5"]
[project.urls]
"Homepage" = "https://phihung.github.io/fh_utils/"
"Source" = "https://github.com/phihung/fh_utils"
# [tool.uv.sources]
# python-fasthtml = { git = "https://github.com/AnswerDotAI/fasthtml.git" }
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.uv]
dev-dependencies = [
"ipykernel>=6.29.5",
"pytest>=8.3.2",
"pytest-cov>=5.0.0",
"ruff>=0.0.284",
"inline-snapshot>=0.13.0",
"testbook>=0.4.2",
"dirty-equals>=0.8.0",
"tomlscript>=0.2.0",
]
[tool.ruff]
line-length = 100
target-version = "py311"
[tool.pytest.ini_options]
addopts = "--cov src --cov-branch --cov-report term --cov-report html --basetemp=local"
[project.scripts]
fh_utils = "fh_utils.cli:app"
[tool.tomlscript]
# Lint and test
test = """
uv run ruff check
uv run pytest
"""
# Publish to PyPI
publish = """
version=$(sed -n 's/^version = "\\(.*\\)"/\\1/p' pyproject.toml)
if [ -z "$version" ]; then
echo "Version not found in pyproject.toml"
exit 1
fi
# Create git tag with the extracted version
git tag "v$version"
rm -rf dist && uv build
uvx twine upload dist/*
"""
# Publish quarto docs
publish-docs = "quarto publish gh-pages docs"