-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
153 lines (132 loc) · 2.88 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
[project]
name = "nipe_py"
authors = [
{ name = "nipe_py", email = "[email protected]" }
]
description = "An engine to make Tor Network your default gateway."
readme = "README.md"
dynamic = ["version"]
license = { file = "LICENSE" }
classifiers = [
"Programming Language :: Python",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
]
requires-python = ">=3.9"
dependencies = [
"requests",
"rich",
"click"
]
[project.urls]
Documentation = "https://aviksaikat.github.io/nipe_py/"
Source = "https://github.com/aviksaikat/nipe_py"
# mypy
[tool.mypy]
exclude = ["build/", "dist/", "docs/", "tests/*"]
check_untyped_defs = true
plugins = ["pydantic.mypy"]
[tool.ruff]
line-length = 120
target-version = "py39"
[tool.ruff.lint]
select = [
"A",
"ARG",
"B",
"C",
"DTZ",
"E",
"EM",
"F",
"FBT",
"ICN",
"ISC",
"N",
"PLC",
"PLE",
"PLR",
"PLW",
"Q",
"RUF",
"S",
"T",
"TID",
"UP",
"W",
"YTT",
]
ignore = [
# Allow non-abstract empty methods in abstract base classes
"B027",
# Allow boolean positional values in function calls, like `dict.get(... True)`
"FBT003",
# Ignore checks for possible passwords
"S105",
"S106",
"S107",
# Ignore complexity
"C901",
"PLR0911",
"PLR0912",
"PLR0913",
"PLR0915",
"ISC001"
]
[tool.pytest.ini_options]
addopts = "--cov=nipe_py/ --cov-report=term-missing"
[project.scripts]
nipe = "nipe_py.main:cli"
[tool.hatch.metadata]
allow-direct-references = true
[tool.hatch.version]
source = "regex_commit"
commit_extra_args = ["-e"]
path = "src/nipe_py/__init__.py"
[tool.hatch.envs.default]
python = "3.9"
dependencies = [
"mypy",
"ruff",
"pytest",
"pytest-cov",
"mkdocs-material",
"mkdocstrings[python]",
]
[tool.hatch.envs.default.scripts]
test = "pytest"
test-cov-xml = "pytest --cov-report=xml"
lint = [
"ruff format .",
"ruff --fix .",
"mypy src/nipe_py/",
]
lint-check = [
"ruff format --check .",
"ruff .",
"mypy src/nipe_py/",
]
docs-serve = "mkdocs serve"
docs-build = "mkdocs build"
# Build configs
[tool.hatch.build.targets.sdist]
include = [
"src/**/*.py",
".configs/*"
]
# exclude = ["build/", "dist/", "docs/", "tests/*", ".github/", "assets/", ".cruft.json", ".editorconfig", "mkdocs.yml"]
# only-include = ["src/nipe_py/*.py", ".configs"]
[tool.hatch.build.targets.wheel]
# artifacts = [
# ".configs/*",
# "*-torrc"
# ]
packages = ["src/nipe_py", ".configs"]
[build-system]
requires = ["hatchling", "hatch-regex-commit"]
build-backend = "hatchling.build"