-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
231 lines (213 loc) Β· 8.15 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
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
# =========================================== #
# BUILD SYSTEM #
# =========================================== #
[build-system]
requires = ["setuptools>=61", "setuptools_scm[toml]>=6.2"]
build-backend = "setuptools.build_meta"
# =========================================== #
# TOOLS #
# =========================================== #
# packing tools
[tool.setuptools]
packages = ["pydependence"]
# obtain the version from git
# https://github.com/pypa/setuptools_scm
[tool.setuptools_scm]
local_scheme = "node-and-timestamp"
# automated tests
[tool.pytest]
minversion = "6.0"
testpaths = ["tests", "pydependence"]
python_files = ["test.py", "test_*.py", "__test__*.py"]
# - - - - - - - - - - - - - - - - - - - - - - #
# BOOTSTRAPPED PYDEPENDANCE EXAMPLE #
# - - - - - - - - - - - - - - - - - - - - - - #
# general settings / overrides
[tool.pydependence]
# defaults [optional]:
default_root = "."
default_resolve_rules = {visit_lazy=false, re_add_lazy=false, exclude_unvisited=true, exclude_in_search_space=true, exclude_builtins=true, strict_requirements_map=true}
default_scope_rules = {unreachable_mode="error"}
# map requirements and resolved imports to specific
# packages and version requirements.
versions = [
"networkx",
"pydantic>=2.0.0",
{requirement="pydantic<2.0.0,>=1.0.0", env='legacy'},
"stdlib_list",
"tomlkit",
"packaging",
{requirement="pydependence", scope="pydependence"},
"pytest>=6",
"pytest-cov>=4",
"typing-extensions",
]
# Scopes represent graphs of modules (nodes) and their interconnecting
# import statements (directed edges) that reference themselves or other modules.
scopes = [
{name = "pydependence", pkg_paths = "./pydependence"},
{name = "pydependence-core", parents = ["pydependence"], limit = "pydependence._core"},
{name = "pydependence-tests", parents = ["pydependence"], pkg_paths = "./tests"}
]
# Output resolvers define the resolution and generation of output requirements by
# 1. traversing a scope's directed module and import graph
# 2. collecting all imports and mapping these using the version list above to specific pypi requirements.
resolvers = [
{ output_mode='dependencies', scope='pydependence'},
{output_name='some', output_mode='optional-dependencies', scope='pydependence', visit_lazy=false},
{output_name='all', output_mode='optional-dependencies', scope='pydependence', visit_lazy=true},
{output_name='core', output_mode='optional-dependencies', scope='pydependence', start_scope='pydependence-core', visit_lazy=true},
{output_name='example-core-no-lazy', output_mode='optional-dependencies', scope='pydependence'},
{output_name='example-legacy', output_mode='optional-dependencies', scope='pydependence', env='legacy', visit_lazy=true},
{output_name='test', output_mode='optional-dependencies', scope="pydependence-tests", raw=["pytest-cov"], visit_lazy=true},
{output_name='dev', output_mode='optional-dependencies', raw=['pre-commit'], strict_requirements_map=false},
]
# =========================================== #
# PROJECT #
# =========================================== #
[project]
name = "pydependence"
dynamic = ["version"]
description = "Python local package dependency discovery, resolution and requirements generation."
urls = {repository = "https://github.com/nmichlo/pydependence"}
authors = [{name = "Nathan Michlo", email = "[email protected]"}]
readme = "README.md"
license = {file="LICENSE"}
classifiers = [
"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",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
]
# - - - - - - - - - - - - - - - - - - - - - - #
# [AUTOGEN] PROJECT: DEPS [AUTOGEN] #
# !!! do not modify this section manually !!! #
# !!! do not modify this section manually !!! #
# !!! do not modify this section manually !!! #
# - - - - - - - - - - - - - - - - - - - - - - #
requires-python = ">=3.8"
dependencies = [
# [AUTOGEN] by pydependence resolver 'pydependence' **DO NOT EDIT** [AUTOGEN]
"networkx",
# β pydependence._core.modules_resolver
# β pydependence._core.modules_scope
"packaging",
# β pydependence._cli
"pydantic>=2.0.0",
# β pydependence._cli
"stdlib_list",
# β pydependence._core.builtin
"typing-extensions",
# β pydependence._cli
]
# - - - - - - - - - - - - - - - - - - - - - - #
# [AUTOGEN] PROJECT: OPTIONAL DEPS [AUTOGEN] #
# !!! do not modify this section manually !!! #
# !!! do not modify this section manually !!! #
# !!! do not modify this section manually !!! #
# - - - - - - - - - - - - - - - - - - - - - - #
[project.optional-dependencies]
dev = [
# [AUTOGEN] by pydependence resolver 'dev' **DO NOT EDIT** [AUTOGEN]
"pre_commit", # [M]
# β <manual: pre_commit>
]
test = [
# [AUTOGEN] by pydependence resolver 'test' **DO NOT EDIT** [AUTOGEN]
"networkx",
# β pydependence._core.modules_resolver
# β pydependence._core.modules_scope
"packaging",
# β pydependence._cli
"pydantic>=2.0.0",
# β pydependence._cli
"pytest-cov>=4", # [M]
# β <manual: pytest_cov>
"pytest>=6",
# β tests.test_module_data
# β tests.test_utils
"stdlib_list",
# β pydependence._core.builtin
"tomlkit", # [L]
# β [L] pydependence._core.requirements_out
# β [L] pydependence._core.utils
# β [L] tests.test_module_data
"typing-extensions",
# β pydependence._cli
]
some = [
# [AUTOGEN] by pydependence resolver 'some' **DO NOT EDIT** [AUTOGEN]
"networkx",
# β pydependence._core.modules_resolver
# β pydependence._core.modules_scope
"packaging",
# β pydependence._cli
"pydantic>=2.0.0",
# β pydependence._cli
"stdlib_list",
# β pydependence._core.builtin
"typing-extensions",
# β pydependence._cli
]
all = [
# [AUTOGEN] by pydependence resolver 'all' **DO NOT EDIT** [AUTOGEN]
"networkx",
# β pydependence._core.modules_resolver
# β pydependence._core.modules_scope
"packaging",
# β pydependence._cli
"pydantic>=2.0.0",
# β pydependence._cli
"stdlib_list",
# β pydependence._core.builtin
"tomlkit", # [L]
# β [L] pydependence._core.requirements_out
# β [L] pydependence._core.utils
"typing-extensions",
# β pydependence._cli
]
core = [
# [AUTOGEN] by pydependence resolver 'core' **DO NOT EDIT** [AUTOGEN]
"networkx",
# β pydependence._core.modules_resolver
# β pydependence._core.modules_scope
"stdlib_list",
# β pydependence._core.builtin
"tomlkit", # [L]
# β [L] pydependence._core.requirements_out
# β [L] pydependence._core.utils
]
example-core-no-lazy = [
# [AUTOGEN] by pydependence resolver 'example-core-no-lazy' **DO NOT EDIT** [AUTOGEN]
"networkx",
# β pydependence._core.modules_resolver
# β pydependence._core.modules_scope
"packaging",
# β pydependence._cli
"pydantic>=2.0.0",
# β pydependence._cli
"stdlib_list",
# β pydependence._core.builtin
"typing-extensions",
# β pydependence._cli
]
example-legacy = [
# [AUTOGEN] by pydependence resolver 'example-legacy' **DO NOT EDIT** [AUTOGEN]
"networkx",
# β pydependence._core.modules_resolver
# β pydependence._core.modules_scope
"packaging",
# β pydependence._cli
"pydantic<2.0.0,>=1.0.0",
# β pydependence._cli
"stdlib_list",
# β pydependence._core.builtin
"tomlkit", # [L]
# β [L] pydependence._core.requirements_out
# β [L] pydependence._core.utils
"typing-extensions",
# β pydependence._cli
]