-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpyproject.toml
153 lines (130 loc) · 4.25 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
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
[build-system]
build-backend = "hatchling.build"
requires = ["hatchling"]
[project]
name = "reactpy_utils"
description = "A collection of utilities for ReactPy."
readme = "README.md"
keywords = ["React", "ReactJS", "ReactPy", "components"]
license = "MIT"
authors = [{ name = "Steve Jones", email = "[email protected]" }]
requires-python = ">=3.9"
classifiers = [
"Development Status :: 4 - Beta",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Operating System :: OS Independent",
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"Topic :: Multimedia :: Graphics",
"Topic :: Software Development :: Widget Sets",
"Topic :: Software Development :: User Interfaces",
"Environment :: Web Environment",
"Typing :: Typed",
]
dependencies = ["reactpy>=1.0.0", "reactpy_router>=1.0.3", "typing_extensions", "pydantic"]
dynamic = ["version"]
[project.urls]
Changelog = "https://stevej2608.github.io/reactpy-utils/latest/about/changelog/"
Documentation = "https://github.com/stevej2608/reactpy-utils#readme"
Source = "https://github.com/stevej2608/reactpy-utils"
[tool.hatch.version]
path = "src/reactpy_utils/__init__.py"
[tool.hatch.build.targets.sdist]
include = ["/src"]
[tool.hatch.metadata]
license-files = { paths = ["LICENSE.md"] }
[tool.hatch.envs.default]
installer = "uv"
# >>> Hatch Tests <<<
[tool.hatch.envs.hatch-test]
extra-dependencies = ["pytest-sugar", "anyio", "reactpy[testing,starlette]", "pytest-cov", "cryptography", "python-dotenv", "lorem"]
randomize = true
matrix-name-format = "{variable}-{value}"
[[tool.hatch.envs.hatch-test.matrix]]
python = ["3.9", "3.10", "3.11", "3.12"]
# >>> Hatch Documentation Scripts <<<
[tool.hatch.envs.docs]
template = "docs"
detached = true
dependencies = [
"mkdocs",
"mkdocs-git-revision-date-localized-plugin",
"mkdocs-material==9.4.0",
"mkdocs-include-markdown-plugin",
"linkcheckmd",
"mkdocs-spellcheck[all]",
"mkdocs-git-authors-plugin",
"mkdocs-minify-plugin",
"mike",
"mkdocstrings[python]",
"black",
"reactpy_utils @ {root:uri}",
]
[tool.hatch.envs.docs.scripts]
serve = ["cd docs && mkdocs serve"]
build = ["cd docs && mkdocs build --strict"]
linkcheck = [
"linkcheckMarkdown docs/ -v -r",
"linkcheckMarkdown README.md -v -r",
"linkcheckMarkdown CHANGELOG.md -v -r",
]
deploy_latest = ["cd docs && mike deploy --push --update-aliases {args} latest"]
deploy_develop = ["cd docs && mike deploy --push develop"]
# >>> Generic Tools <<<
[tool.ruff]
line-length = 120
format.preview = true
lint.extend-ignore = [
"A001", # Variable is shadowing a Python builtin
"A002", # Argument is shadowing a Python builtin
"ARG001", # Unused function argument
"ARG002", # Unused method argument
"ARG004", # Unused static method argument
"FBT001", # Boolean-typed positional argument in function definition
"FBT002", # Boolean default positional argument in function definition
"FURB116", # Replace `hex` call with f-string
"N802", # Function name should be lowercase
"N806", # Variable in function should be lowercase
"PLR2004", # Magic value used in comparison
"PLW2901", # for loop variableoverwritten by assignment target
"PLR6301", # Method `could be a function, class method, or static method
"SIM115", # Use context handler for opening files
"SLF001", # Private member accessed
"TID252" # Prefer absolute imports over relative imports
]
lint.preview = true
extend-exclude = [".venv/*", ".eggs/*", "build/*"]
[tool.pylint.master]
init-hook = 'import sys; sys.path.append(".")'
disable = [
"C0114", # missing-module-docstring
"C0103", # invalid-name
"C0115", # missing-class-docstring
"C0116", # missing-function-docstring
"W0622", # redefined-builtin"
]
max-line-length=120
[tool.pytest.ini_options]
testpaths = ["tests"]
addopts = """\
--strict-config
--strict-markers
"""
# log_cli = true
# log_cli_level = "INFO"
filterwarnings = "ignore::DeprecationWarning"
[tool.coverage.run]
branch = true
parallel = true
source = ["src/", "tests/"]
[tool.coverage.paths]
source = ["src/"]
[tool.coverage.report]
exclude_lines = [
"no cov",
"if __name__ == .__main__.:",
"if TYPE_CHECKING:",
]