| 1 |
[build-system] |
| 2 |
requires = ["setuptools"] |
| 3 |
|
| 4 |
|
| 5 |
[project] |
| 6 |
name = "jinjax" |
| 7 |
version = "0.66" |
| 8 |
description = "Replace your HTML templates with Python server-Side components" |
| 9 |
authors = [ |
| 10 |
{name = "Juan Pablo Scaletti", email = "[email protected]"}, |
| 11 |
] |
| 12 |
license = { "file" = "MIT-LICENSE" } |
| 13 |
readme = "README.md" |
| 14 |
classifiers = [ |
| 15 |
"Development Status :: 4 - Beta", |
| 16 |
"Environment :: Web Environment", |
| 17 |
"Intended Audience :: Developers", |
| 18 |
"Programming Language :: Python :: 3 :: Only", |
| 19 |
"Programming Language :: Python :: 3.11", |
| 20 |
"Programming Language :: Python :: 3.12", |
| 21 |
"Programming Language :: Python :: 3.13", |
| 22 |
"Topic :: Internet :: WWW/HTTP :: Dynamic Content", |
| 23 |
"Topic :: Software Development :: Libraries", |
| 24 |
"Topic :: Software Development :: Libraries :: Python Modules", |
| 25 |
"Topic :: Software Development :: User Interfaces", |
| 26 |
"Topic :: Text Processing :: Markup :: HTML", |
| 27 |
"Typing :: Typed", |
| 28 |
] |
| 29 |
requires-python = ">=3.11,<4" |
| 30 |
dependencies = [ |
| 31 |
"jinja2 >= 3.0", |
| 32 |
"markupsafe >= 2.0", |
| 33 |
] |
| 34 |
|
| 35 |
[project.optional-dependencies] |
| 36 |
whitenoise = ["whitenoise ~= 6.9.0"] |
| 37 |
|
| 38 |
[project.urls] |
| 39 |
homepage = "https://jinjax.scaletti.dev/" |
| 40 |
repository = "https://github.com/jpsca/jinjax" |
| 41 |
documentation = "https://jinjax.scaletti.dev/guides/" |
| 42 |
|
| 43 |
[dependency-groups] |
| 44 |
dev = [ |
| 45 |
"ipdb >= 0.13", |
| 46 |
"pre-commit", |
| 47 |
"ruff >= 0.2.0", |
| 48 |
"tox-uv", |
| 49 |
"ty>=0.0.49", |
| 50 |
] |
| 51 |
test = [ |
| 52 |
"pytest >= 7.2", |
| 53 |
"pytest-cov", |
| 54 |
"ruff > 0.3", |
| 55 |
"whitenoise >= 5.3", |
| 56 |
] |
| 57 |
|
| 58 |
|
| 59 |
[tool.setuptools.packages.find] |
| 60 |
where = ["src"] |
| 61 |
|
| 62 |
[tool.coverage.run] |
| 63 |
branch = true |
| 64 |
|
| 65 |
[tool.coverage.report] |
| 66 |
exclude_lines = [ |
| 67 |
"pragma: no cover", |
| 68 |
"TYPE_CHECKING", |
| 69 |
"def __repr__", |
| 70 |
"def __str__", |
| 71 |
"raise AssertionError", |
| 72 |
"raise NotImplementedError", |
| 73 |
"if __name__ == .__main__.:" |
| 74 |
] |
| 75 |
|
| 76 |
|
| 77 |
[tool.coverage.html] |
| 78 |
directory = "covreport" |
| 79 |
exclude_lines = [ |
| 80 |
"pragma: no cover", |
| 81 |
"TYPE_CHECKING", |
| 82 |
"def __repr__", |
| 83 |
"def __str__", |
| 84 |
"raise AssertionError", |
| 85 |
"raise NotImplementedError", |
| 86 |
"if __name__ == .__main__.:" |
| 87 |
] |
| 88 |
|
| 89 |
|
| 90 |
[tool.pytest.ini_options] |
| 91 |
addopts = "--doctest-modules" |
| 92 |
|
| 93 |
|
| 94 |
[tool.tox] |
| 95 |
legacy_tox_ini = """ |
| 96 |
[tox] |
| 97 |
env_list = |
| 98 |
pypy |
| 99 |
3.14 |
| 100 |
3.13 |
| 101 |
3.12 |
| 102 |
3.11 |
| 103 |
|
| 104 |
[testenv] |
| 105 |
runner = uv-venv-lock-runner |
| 106 |
dependency_groups = |
| 107 |
dev |
| 108 |
test |
| 109 |
extras = |
| 110 |
whitenoise |
| 111 |
commands = |
| 112 |
pytest -x src/jinjax tests |
| 113 |
""" |
| 114 |
|
| 115 |
|
| 116 |
[tool.ruff] |
| 117 |
line-length = 90 |
| 118 |
indent-width = 4 |
| 119 |
target-version = "py311" |
| 120 |
exclude = [ |
| 121 |
".*", |
| 122 |
"_build", |
| 123 |
"build", |
| 124 |
"covreport", |
| 125 |
"dist", |
| 126 |
"benchmark", |
| 127 |
] |
| 128 |
include = ["*.py"] |
| 129 |
|
| 130 |
[tool.ruff.format] |
| 131 |
# Like Black, use double quotes for strings. |
| 132 |
quote-style = "double" |
| 133 |
|
| 134 |
# Like Black, indent with spaces, rather than tabs. |
| 135 |
indent-style = "space" |
| 136 |
|
| 137 |
# Like Black, respect magic trailing commas. |
| 138 |
skip-magic-trailing-comma = false |
| 139 |
|
| 140 |
# Like Black, automatically detect the appropriate line ending. |
| 141 |
line-ending = "auto" |
| 142 |
|
| 143 |
# Enable auto-formatting of code examples in docstrings. Markdown, |
| 144 |
# reStructuredText code/literal blocks and doctests are all supported. |
| 145 |
# |
| 146 |
# This is currently disabled by default, but it is planned for this |
| 147 |
# to be opt-out in the future. |
| 148 |
docstring-code-format = false |
| 149 |
|
| 150 |
# Set the line length limit used when formatting code snippets in |
| 151 |
# docstrings. |
| 152 |
# |
| 153 |
# This only has an effect when the `docstring-code-format` setting is |
| 154 |
# enabled. |
| 155 |
docstring-code-line-length = "dynamic" |
| 156 |
|
| 157 |
[tool.ruff.lint] |
| 158 |
fixable = ["ALL"] |
| 159 |
|
| 160 |
ignore = [ |
| 161 |
# x is too complex |
| 162 |
"C901", |
| 163 |
# whitespace before ':' |
| 164 |
"E203", |
| 165 |
"E501", |
| 166 |
# x defined from star imports |
| 167 |
"F405", |
| 168 |
# line break before binary operator |
| 169 |
"W505", |
| 170 |
"W605", |
| 171 |
] |
| 172 |
select = [ |
| 173 |
# bugbear |
| 174 |
"B", |
| 175 |
# mccabe"", comprehensions, commas |
| 176 |
"C", |
| 177 |
# pycodestyle errors |
| 178 |
"E", |
| 179 |
# pyflakes |
| 180 |
"F", |
| 181 |
# logging format |
| 182 |
"G", |
| 183 |
# imports |
| 184 |
"I", |
| 185 |
# quotes |
| 186 |
"Q", |
| 187 |
# pycodestyle warnings |
| 188 |
"W", |
| 189 |
] |
| 190 |
|
| 191 |
[tool.ruff.lint.isort] |
| 192 |
known-first-party = ["jinjax"] |
| 193 |
known-local-folder = ["src/jinjax"] |
| 194 |
|
| 195 |
# Use two line after imports. |
| 196 |
lines-after-imports = 2 |