File: pyproject.toml

package info (click to toggle)
hatch-build-scripts 1.0.0-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 488 kB
  • sloc: python: 415; makefile: 3
file content (183 lines) | stat: -rw-r--r-- 5,123 bytes parent folder | download
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
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"

[tool.hatch.build.targets.sdist]
include = ["src/hatch_build_scripts", "docs"]
[tool.hatch.build.targets.wheel]
packages = ["src/hatch_build_scripts"]

[project]
name = "hatch_build_scripts"
version = "1.0.0"
description = "Dependency injection without the boilerplate."
readme = "README.md"
requires-python = ">=3.10,<4"
license = { file = "LICENSE.txt" }
keywords = []
authors = [{ name = "Ryan Morshead", email = "ryan.morshead@gmail.com" }]
classifiers = [
    "Development Status :: 4 - Beta",
    "Programming Language :: Python",
]
dependencies = ["pathspec", "hatchling"]
[project.urls]
Source = "https://github.com/rmorshea/hatch-build-scripts"
[project.entry-points.hatch]
build-script = "hatch_build_scripts.hooks"

[dependency-groups]
dev = [
    { include-group = "util" },
    { include-group = "docs" },
    { include-group = "lint" },
    { include-group = "test" },
]
util = ["click==8.1.7", "ipykernel==6.29.5", "copier==9.4.1"]
docs = [
    { include-group = "test" },
    "mkdocs-gen-files==0.5.0",
    "mkdocs-literate-nav==0.6.1",
    "mkdocs-material==9.5.39",
    "mkdocs-open-in-new-tab==1.0.5",
    "mkdocs==1.6.1",
    "mkdocstrings-python==1.13.0",
]
lint = [
    { include-group = "test" },
    "mdformat-admon @ git+https://github.com/rmorshea/mdformat-admon.git@0e513d7a2c265faf74441938ccbd1010660609f4",
    "mdformat-mkdocs==3.1.1",
    "mdformat-pyproject==0.0.1",
    "mdformat-tables==1.0.0",
    "mdformat==0.7.19",
    "pyright==1.1.389",
    "ruff==0.7.3",
    "yamlfix==1.17.0",
    "doccmd==2024.11.14",
]
test = [
    "coverage[toml]==7.6.1",
    "diff-cover==9.2.0",
    "pycobertura==3.3.2",
    "pytest-asyncio==0.24.0",
    "pytest-examples==0.0.13",
    "pytest==8.3.3",
    "pip>=25.1.1",
    "hatch>=1.14.1",
]

[tool.pytest.ini_options]
asyncio_mode = "auto"
asyncio_default_fixture_loop_scope = "function"

[tool.ruff]
line-length = 100

[tool.ruff.format]
docstring-code-format = true
quote-style = "double"
indent-style = "space"

[tool.ruff.lint]
preview = true
select = ["ALL"]
ignore = [
    "A005",   # Module shadowing built-in
    "ANN",    # Let pyright handle annotations
    "ANN401", # Allow Any type hints
    "ARG005", # Unused lambda argument
    "B027",   # Allow non-abstract empty methods in abstract base classes
    "B039",   # Mutable default for contextvars
    "C901",   # Ignore complexity
    "COM812", # Trailing comma
    "CPY001", # Copyright at top of file
    "D100",   # Docstring for module
    "D104",   # Ignore missing docstring for __init__.py
    "D105",   # Docstring for magic method
    "D107",   # Docstring for __init__ method
    "D203",   # One blank line before class
    "D213",   # Multi-line docstring summary second line
    "D407",   # Docstring dashes under section names
    "D413",   # Docstring blank line after last section
    "DOC201", # Return type documentation
    "DOC402", # Yield type documentation
    "DOC501", # Ignore raises missing from docstring
    "ERA001", # Commented out code
    "FBT003", # Allow boolean positional values in function calls, like `dict.get(... True)`
    "PL",     # PyLint
    "PYI",    # Stub files
    "RET503", # Explicit return
    "RET505", # Unnecessary return statement after return
    "S105",   # Ignore checks for possible passwords
    "S404",   # Ignore subprocess import
    "SIM117", # Use a single `with` statement
    "ISC001", # implicitly concatenated strings on a single line
]
unfixable = [
    "COM819", # Trailing comma
]
fixable = ["ALL"]
extend-safe-fixes = ["TCH"]
[tool.ruff.lint.isort]
known-first-party = ["hatch_build_scripts"]
force-single-line = true
[tool.ruff.lint.flake8-tidy-imports]
ban-relative-imports = "all"
[tool.ruff.lint.per-file-ignores]
"tests/**" = [
    "PLC2701", # Private imports
    "RUF029",  # Async functions without await
    "S101",    # Assert statements
    "D",       # Docstrings
    "ANN",     # Type annotations
    "S",       # Security issues
]
"**.ipynb" = [
    "T201", # Print statements
]
"docs/**" = [
    "INP001", # Implicit namespace package
    "D",      # Docstrings
]
"doccmd_*.py" = [
    "ANN",    # Type annotations
    "B018",   # Useless expression
    "FA102",  # Unsafe __futures__ annotations usage
    "RUF029", # No await in async function
    "S101",   # Assert statements
    "S106",   # Possible passwords
    "SIM115", # Use context manager for opening files
    "T201",   # Print
    "TCH002", # Move third-party import into a type-checking block
]

[tool.yamlfix]
line_length = 100

[tool.coverage.run]
source_pkgs = ["hatch_build_scripts", "tests"]
branch = true
omit = []

[tool.coverage.paths]
hatch_build_scripts = ["src"]
tests = ["tests"]

[tool.coverage.report]
exclude_lines = [
    "# nocov",
    "@overload",
    "if TYPE_CHECKING:",
    "raise AssertionError",
    "raise NotImplementedError",
    'if __name__ == .__main__.:',
    '\.\.\.\n($|\s*#.*)',
]
show_missing = true
skip_covered = true
sort = "Name"

[tool.diff_cover]
compare_branch = "origin/main"
fail_under = 100
include_untracked = true