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 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205
|
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[project]
name = "TatSu"
dynamic = ["version"]
authors = [
{name = "Juancarlo AƱez", email = "apalala@gmail.com"},
]
description = "TatSu takes a grammar in a variation of EBNF as input, and outputs a memoizing PEG/Packrat parser in Python."
readme = "README.rst"
requires-python = ">=3.12"
keywords = []
license = {file = "LICENSE"}
classifiers = [
"Development Status :: 5 - Production/Stable",
"License :: OSI Approved :: BSD License",
"Natural Language :: English",
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"Environment :: Console",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Programming Language :: Python :: 3.15",
"Topic :: Software Development :: Code Generators",
"Topic :: Software Development :: Compilers",
"Topic :: Software Development :: Interpreters",
"Topic :: Text Processing :: General",
]
dependencies = []
[project.optional-dependencies]
colorization = ["colorama"]
parproc = ["rich"]
[dependency-groups]
dev = [
"pip",
"docutils",
"colorama",
"hatch",
"ipython",
"mypy",
"progress",
"psutil",
"pytest",
"pytest-cov",
"pytest-rerunfailures",
"pytest-xdist",
"rich",
"rst2html5",
"ruff",
"sphinx",
"sphinx-rtd-theme",
"ty",
"types-decorator",
]
[project.scripts]
tatsu = "tatsu:main"
g2e = "tatsu.g2e:main"
[project.urls]
Homepage = "https://github.com/neogeny/TatSu"
Repository = "https://github.com/neogeny/TatSu"
Documentation = "https://tatsu.readthedocs.io/en/stable/"
Questions = "https://stackoverflow.com/questions/tagged/tatsu"
[tool.hatch.version]
path = "tatsu/_version.py"
[tool.hatch.build.targets.wheel]
packages = ["tatsu"]
[tool.hatch.build.targets.sdist]
#ignore-vcs = true
#include = [
# "/tatsu",
# "/docs",
# "/test",
# "/grammar",
# "/examples",
# "*.yaml",
#]
exclude = [
"/parsers",
"/deprecated",
"/examples/markdown",
"req*.txt",
]
[tool.hatch.envs.default]
env-vars = {CFLAGS = "-I/opt/homebrew/include", LDFLAGS = "-L/opt/homebrew/lib"}
[tool.hatch.build.targets.sdist.force-include]
"./tatsu" = "tatsu"
[tool.hatch.envs.hatch-test]
default-args = ["test"]
dependencies = [
"mypy",
"pytest",
"pytest-cov",
"pytest-rerunfailures",
"pytest-xdist", # For parallel execution
"ruff",
"ty",
]
# Set default arguments for the pytest command
extra-args = ["-v", "--cov"]
# Enable built-in features
randomize = false # Randomize test order
parallel = false # Run tests in parallel
retries = 0
[tool.pytest.ini_options]
# minversion = "6.0"
#addopts = "-ra -q"
addopts = "-q --ignore=.venv"
testpaths = [
"tests",
]
norecursedirs = [
"*.egg",
".git",
".tox",
".venv",
"build",
"dist",
]
[tool.mypy]
python_version = 3.14
#ignore_missing_imports = true
exclude = "parsers|docs|dist|build|tmp"
[tool.ty.rules]
unused-ignore-comment = "ignore" # needed for mypy
[tool.ruff]
line-length = 88
# The minimum Python version to support
# target-version = "py311"
# Files or directories to exclude from linting/formatting
exclude = [
".git",
"__pycache__",
"dist",
]
[tool.coverage.run]
omit = [
"/private/*", # note: don't know how this gets into coverage
"test/*",
"tatsu/diagrams.py",
"**/test.py",
]
data_file = ".cache/coverage/.coverage"
parallel = false
[tool.coverage.report]
ignore_errors = true
[tool.hatch.envs.test]
# non-lint packages included for the benefit of `ty`
dependencies = [
"colorama",
"psutil",
"pytest",
"rich",
"ruff",
"ty",
]
[tool.hatch.envs.test.scripts]
version = "echo `python --version`"
lint = "ruff check -q --preview tatsu test examples"
types = "ty check tatsu"
more_types = "mypy --install-types --exclude dist --exclude parsers ."
tests = "pytest"
checks = [
"version",
"lint",
"types",
"more_types",
"tests"
]
run = [
"version",
"lint",
"types",
"more_types",
"tests"
]
[[tool.hatch.envs.test.matrix]]
python = ["3.12", "3.13", "3.14", "3.15"]
|