-
Notifications
You must be signed in to change notification settings - Fork 64
/
pyproject.toml
175 lines (166 loc) · 3.96 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
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
[build-system]
requires = [
"setuptools",
"wheel",
]
[project]
name = "cachier"
description = "Persistent, stale-free, local and cross-machine caching for Python functions."
readme = "README.rst"
keywords = [
"cache",
"caching",
"cross-machine",
"decorator",
"local",
"memoization",
"mongo",
"persistent",
]
license = { file = "LICENSE" }
authors = [
{ name = "Shay Palachy Affek", email = 'shay.palachy@gmail.com' },
]
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Topic :: Other/Nonlisted Topic",
"Topic :: Software Development :: Libraries",
"Topic :: Software Development :: Libraries :: Python Modules",
"Topic :: Utilities",
]
dynamic = [
"version",
]
dependencies = [
"portalocker>=2.3.2",
"watchdog>=2.3.1",
]
urls.Source = "https://github.com/python-cachier/cachier"
scripts.cachier = "cachier.__main__:cli"
[tool.setuptools]
include-package-data = true
[tool.setuptools.dynamic]
version = { attr = "cachier._version.__version__" }
[tool.setuptools.packages.find]
where = [
"src",
] # list of folders that contain the packages (["."] by default)
include = [
"cachier*",
] # package names should match these glob patterns (["*"] by default)
namespaces = false # to disable scanning PEP 420 namespaces (true by default)
[tool.ruff]
target-version = "py38"
line-length = 79
# Exclude a variety of commonly ignored directories.
exclude = [
".eggs",
".git",
".ruff_cache",
"__pypackages__",
"_build",
"build",
"dist",
]
# Enable Pyflakes `E` and `F` codes by default.
lint.select = [
"D", # see: https://pypi.org/project/pydocstyle
"E",
"F", # see: https://pypi.org/project/pyflakes
"I", #see: https://pypi.org/project/isort/
"RUF100", # alternative to yesqa
#"N", # see: https://pypi.org/project/pep8-naming
"S", # see: https://pypi.org/project/flake8-bandit
"SIM",
"W", # see: https://pypi.org/project/pycodestyle
]
lint.extend-select = [
"A", # see: https://pypi.org/project/flake8-builtins
"B", # see: https://pypi.org/project/flake8-bugbear
"C4", # see: https://pypi.org/project/flake8-comprehensions
"PT", # see: https://pypi.org/project/flake8-pytest-style
]
lint.ignore = [
"C901",
"E203",
]
lint.per-file-ignores."src/**/__init__.py" = [
"D104",
]
lint.per-file-ignores."src/cachier/config.py" = [
"D100",
]
lint.per-file-ignores."tests/**" = [
"D100",
"D101",
"D103",
"D104",
"D401",
"S101",
"S105",
"S311",
"S603",
]
lint.unfixable = [
"F401",
]
#[tool.ruff.pydocstyle]
## Use Google-style docstrings.
#convention = "google"
#[tool.ruff.pycodestyle]
#ignore-overlong-task-comments = true
# Unlike Flake8, default to a complexity level of 10.
lint.mccabe.max-complexity = 10
[tool.docformatter]
recursive = true
# some docstring start with r"""
wrap-summaries = 79
wrap-descriptions = 79
blank = true
[tool.pytest.ini_options]
testpaths = [
"cachier",
"tests",
]
norecursedirs = [
"dist",
"build",
]
addopts = [
"--color=yes",
"-r a",
"-v",
"-s",
"-W error",
]
markers = [
"mongo: test the MongoDB core",
"memory: test the memory core",
"pickle: test the pickle core",
]
[tool.coverage.run]
branch = true
# dynamic_context = "test_function"
omit = [
"tests/*",
"cachier/_version.py",
"cachier/__init__.py",
"**/scripts/**",
]
[tool.coverage.report]
show_missing = true
# Regexes for lines to exclude from consideration
exclude_lines = [
"pragma: no cover", # Have to re-enable the standard pragma
"raise NotImplementedError", # Don't complain if tests don't hit defensive assertion code:
"if TYPE_CHECKING:", # Is only true when running mypy, not tests
]