-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
180 lines (154 loc) · 6.06 KB
/
pyproject.toml
File metadata and controls
180 lines (154 loc) · 6.06 KB
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
# ---- Project Info and Dependencies ----
[project.urls]
Repository = "https://github.com/alelom/python-package-folder"
# Homepage = "https://github.com/alelom/python-package-folder"
# Documentation = "https://github.com/alelom/python-package-folder"
[project]
name = "python-package-folder"
description = "Python package to automatically package and build a folder, fetching all relevant dependencies."
authors = [
{ name="Alessio Lombardi", email="work@alelom.com" },
]
readme = "README.md"
license = "MIT"
requires-python = ">=3.11,<4.0"
dynamic = ["version"]
# https://pypi.org/classifiers/
# Adjust as needed:
classifiers = [
# Adjust as needed:
"Development Status :: 4 - Beta",
# "Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Typing :: Typed",
# Include this to avoid accidentally publishing to PyPI:
# "Private :: Do Not Upload",
]
# ---- Main dependencies ----
dependencies = [
"requests>=2.0.0",
]
# ---- Dev dependencies ----
[dependency-groups]
dev = [
"pytest>=8.3.5",
"pytest-sugar>=1.0.0",
"pytest-cov>=4.0.0",
"ruff>=0.11.9",
"codespell>=2.4.1",
"rich>=14.0.0",
"basedpyright>=1.29.1",
"funlog>=0.2.1",
"sysappend>=2.0.0",
"twine>=6.2.0",
]
[project.scripts]
# Add script entry points here:
python-package-folder = "python_package_folder.python_package_folder:main"
# ---- Build system ----
# Dynamic versioning from:
# https://github.com/ninoseki/uv-dynamic-versioning/
[build-system]
requires = ["hatchling", "uv-dynamic-versioning"]
build-backend = "hatchling.build"
[tool.hatch.version]
source = "uv-dynamic-versioning"
# Note JSON schemas don't seem to be right for tool.hatch.version.source so
# this may cause false warnings in IDEs.
# https://github.com/ninoseki/uv-dynamic-versioning/issues/21
[tool.uv-dynamic-versioning]
vcs = "git"
style = "pep440"
bump = true
# Don't add local version identifiers (commit hash) - PyPI doesn't allow them
# Local versions are only useful for local development/testing
local = false
[tool.hatch.build.targets.wheel]
# The source location for the package.
packages = ["src/python_package_folder"]
# ---- Settings ----
[tool.ruff]
# Set as desired, typically 88 (black standard) or 100 (wide).
line-length = 100
[tool.ruff.lint]
select = [
# See: https://docs.astral.sh/ruff/rules/
# Basic list from: https://docs.astral.sh/ruff/linter/#rule-selection
"E", # https://docs.astral.sh/ruff/rules/#error-e
"F", # https://docs.astral.sh/ruff/rules/#pyflakes-f
"UP", # https://docs.astral.sh/ruff/rules/#pyupgrade-up
"B", # https://docs.astral.sh/ruff/rules/#flake8-bugbear-b
"I", # https://docs.astral.sh/ruff/rules/#isort-i
# Other possibilities:
# "D" # https://docs.astral.sh/ruff/rules/#pydocstyle-d
# "Q" # https://docs.astral.sh/ruff/rules/#flake8-quotes-q
# "COM" # https://docs.astral.sh/ruff/rules/#flake8-commas-com
# "SIM", # https://docs.astral.sh/ruff/rules/#flake8-simplify-sim
]
ignore = [
# Disable some rules that are overly pedantic. Add/remove as desired:
"E501", # https://docs.astral.sh/ruff/rules/line-too-long/
"E402", # https://docs.astral.sh/ruff/rules/module-import-not-at-top-of-file/
"E731", # https://docs.astral.sh/ruff/rules/lambda-assignment/
# We use both ruff formatter and linter so some rules should always be disabled.
# See: https://docs.astral.sh/ruff/formatter/#conflicting-lint-rules
"W191", # https://docs.astral.sh/ruff/rules/tab-indentation/
"E111", # https://docs.astral.sh/ruff/rules/indentation-with-invalid-multiple/
"E114", # https://docs.astral.sh/ruff/rules/indentation-with-invalid-multiple-comment/
"E117", # https://docs.astral.sh/ruff/rules/over-indented/
"D206", # https://docs.astral.sh/ruff/rules/docstring-tab-indentation/
"D300", # https://docs.astral.sh/ruff/rules/triple-single-quotes/
"Q000", # https://docs.astral.sh/ruff/rules/bad-quotes-inline-string/
"Q001", # https://docs.astral.sh/ruff/rules/bad-quotes-multiline-string/
"Q002", # https://docs.astral.sh/ruff/rules/bad-quotes-docstring/
"Q003", # https://docs.astral.sh/ruff/rules/avoidable-escaped-quote/
"COM812", # https://docs.astral.sh/ruff/rules/missing-trailing-comma/
"COM819", # https://docs.astral.sh/ruff/rules/prohibited-trailing-comma/
"ISC002", # https://docs.astral.sh/ruff/rules/multi-line-implicit-string-concatenation/
]
[tool.basedpyright]
# BasedPyright currently seems like the best type checker option, much faster
# than mypy and with a good extension for VSCode/Cursor.
# https://marketplace.visualstudio.com/items?itemName=detachhead.basedpyright
# https://docs.basedpyright.com/latest/configuration/config-files/#sample-pyprojecttoml-file
include = ["src", "tests", "devtools"]
# By default BasedPyright is very strict, so you almost certainly want to disable
# some of the rules.
# First, these turn off warnings about (yes) how you ignore warnings:
reportIgnoreCommentWithoutRule = false
reportUnnecessaryTypeIgnoreComment = false
# A few typically noisy warnings are next.
# How many you enable is up to you. The first few are off by default, but you can
# comment/uncomment these as desired:
reportMissingTypeStubs = false
reportUnusedCallResult = false
reportAny = false
reportExplicitAny = false
reportImplicitStringConcatenation = false
reportUnreachable = false
# reportPrivateImportUsage = false
# reportPrivateLocalImportUsage = false
# reportMissingImports = false
# reportUnnecessaryIsInstance = false
# reportUnknownVariableType = false
# reportUnknownArgumentType = false
[tool.codespell]
# Add here as needed:
# ignore-words-list = "foo,bar"
# skip = "foo.py,bar.py"
[tool.pytest.ini_options]
python_files = ["test_*.py", "*_test.py"]
python_classes = ["Test*"]
python_functions = ["test_*"]
testpaths = [
"src",
"tests",
]
norecursedirs = []
filterwarnings = []