forked from RDFLib/rdflib
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathpyproject.toml
276 lines (253 loc) · 8.25 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
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
[tool.poetry]
name = "rdflib"
version = "6.3.0a0"
description = """RDFLib is a Python library for working with RDF, \
a simple yet powerful language for representing information."""
authors = ["Daniel 'eikeon' Krech <eikeon@eikeon.com>"]
maintainers = ["RDFLib Team <rdflib-dev@googlegroups.com>"]
repository = "https://github.com/RDFLib/rdflib"
documentation = "https://rdflib.readthedocs.org/"
license = "BSD-3-Clause"
classifiers=[
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"License :: OSI Approved :: BSD License",
"Topic :: Software Development :: Libraries :: Python Modules",
"Operating System :: OS Independent",
"Natural Language :: English"
]
readme = "README.md"
[tool.poetry.scripts]
rdfpipe = 'rdflib.tools.rdfpipe:main'
csv2rdf = 'rdflib.tools.csv2rdf:main'
rdf2dot = 'rdflib.tools.rdf2dot:main'
rdfs2dot = 'rdflib.tools.rdfs2dot:main'
rdfgraphisomorphism = 'rdflib.tools.graphisomorphism:main'
[tool.poetry.dependencies]
python = "^3.7"
isodate = "^0.6.1"
pyparsing = "^3.0.9"
#setuptools # not needed anymore?
importlib_metadata = {version = "^4.2.0", python = ">=3.7,<3.8"}
berkeleydb = {version = "^18.1.5", optional = true}
networkx = {version = "^2.6.2", optional = true}
html5lib = {version = "^1.1", optional = true}
# black = {version = "22.12.0", optional = true}
# flake8 = {version = ">=4.0.1", optional = true} # flakeheaven is incompatible with flake8 >=5.0 (https://github.com/flakeheaven/flakeheaven/issues/132)
# flakeheaven = {version = "^3.2.1", optional = true}
# pep8-naming = {version = "^0.13.2", optional = true}
# isort = {version = "^5.10.0", optional = true}
# mypy = {version = "0.991", optional = true}
# sphinx = {version = ">4.0.0", optional = true}
# myst-parser = {version = "^0.18.0", optional = true}
# sphinxcontrib-apidoc = {version = "^0.3.0", optional = true}
# sphinxcontrib-kroki = {version = "^1.3.0", optional = true}
# sphinx-autodoc-typehints = {version = "^1.17.1", optional = true}
# pytest = {version = "^7.1.3", optional = true}
# pytest-cov = {version = "^4.0.0", optional = true}
# coverage = {version = "^7.0.1", extras = ["toml"], optional = true}
lxml = {version = "^4.9.2", optional = true}
[tool.poetry.group.dev.dependencies]
# # These dependencies are added here so that `poetry install` behaves as
# # expected, which is that it creates a usable development environment. The
# # version constrainsts from `[tool.poetry.dependencies]` are used.
# black = "*"
# flake8 = "*"
# flakeheaven = "*"
# isort = "*"
# mypy = "*"
# pep8-naming = "*"
# sphinx = "*"
# myst-parser = "*"
# sphinxcontrib-apidoc = "*"
# sphinxcontrib-kroki = "*"
# sphinx-autodoc-typehints = "*"
black = "22.12.0"
flake8 = ">=4.0.1" # flakeheaven is incompatible with flake8 >=5.0 (https://github.com/flakeheaven/flakeheaven/issues/132)
flakeheaven = "^3.2.1"
isort = "^5.10.0"
mypy = "0.991"
pep8-naming = "^0.13.2"
lxml-stubs = "^0.4.0"
[tool.poetry.group.extensive]
optional = true
[tool.poetry.group.extensive.dependencies]
berkeleydb-stubs = "^6.2.9"
[tool.poetry.group.tests.dependencies]
pytest = "^7.1.3"
pytest-cov = "^4.0.0"
coverage = {version = "^7.0.1", extras = ["toml"]}
types-setuptools = "^65.6.0.3"
setuptools = "^65.6.3"
[tool.poetry.group.docs.dependencies]
sphinx = ">4.0.0"
myst-parser = "^0.18.0"
sphinxcontrib-apidoc = "^0.3.0"
sphinxcontrib-kroki = "^1.3.0"
sphinx-autodoc-typehints = "^1.17.1"
[tool.poetry.group.flake8.dependencies]
flake8 = ">=4.0.1" # flakeheaven is incompatible with flake8 >=5.0 (https://github.com/flakeheaven/flakeheaven/issues/132)
flakeheaven = "^3.2.1"
pep8-naming = "^0.13.2"
[tool.poetry.extras]
berkeleydb = ["berkeleydb"]
networkx = ["networkx"]
html = ["html5lib"]
lxml = ["lxml"]
# dev = ["black", "flake8", "flakeheaven", "isort", "mypy", "pep8-naming"]
# docs = [
# "sphinx",
# "myst-parser",
# "sphinxcontrib-apidoc",
# "sphinxcontrib-kroki",
# "sphinx-autodoc-typehints"
# ]
# tests = ["html5lib", "pytest", "pytest-cov", "coverage"]
[build-system]
requires = ["poetry-core>=1.4.0"]
build-backend = "poetry.core.masonry.api"
[tool.flakeheaven]
format = "grouped"
baseline = ".flakeheaven.baseline"
[tool.flakeheaven.plugins]
pycodestyle = [
"+*",
# mirrored from setup.cfg
"-E501",
"-E203",
"-W503",
"-E231",
]
pyflakes = [
"+*",
]
pep8-naming = ["+*"]
[tool.flakeheaven.exceptions."rdflib/plugins/sparql/*"]
pep8-naming = ["-N802", "-N803", "-N806", "-N812", "-N816", "-N801"]
[tool.flakeheaven.exceptions."rdflib/namespace/_*"]
pep8-naming = ["-N815"]
[tool.flakeheaven.exceptions."rdflib/plugins/parsers/notation3.py"]
pep8-naming = ["-N802", "-N803", "-N806", "-N816"]
[tool.flakeheaven.exceptions."rdflib/plugins/serializers/turtle.py"]
pep8-naming = ["-N802", "-N806", "-N815"]
[tool.flakeheaven.exceptions."rdflib/__init__.py"]
pycodestyle = ["-E402"]
[tool.flakeheaven.exceptions."test/utils/namespace/_*"]
pep8-naming = ["-N815"]
[tool.black]
required-version = "22.12.0"
line-length = "88"
target-version = ['py37']
include = '\.pyi?$'
exclude = '''
(
/(
\.eggs # exclude a few common directories in the
| \.git # root of the project
| \.hg
| \.mypy_cache
| \.pytest_cache
| \.tox
| \.venv
| \.cache
| \.github
| _build
| htmlcov
| benchmarks
| examples # No need to Black examples
| test_reports
| rdflib.egg-info
| buck-out
| build
| dist
| venv
)/
)
'''
[tool.pytest.ini_options]
addopts = [
"--doctest-modules",
"--ignore=admin",
"--ignore=devtools",
"--ignore=rdflib/extras/external_graph_libs.py",
"--ignore-glob=docs/*.py",
"--doctest-glob=docs/*.rst",
]
doctest_optionflags = "ALLOW_UNICODE"
filterwarnings = [
# The below warning is a consequence of how pytest doctest detects mocks and how DefinedNamespace behaves when an undefined attribute is being accessed.
"ignore:Code. pytest_mock_example_attribute_that_shouldnt_exist is not defined in namespace .*:UserWarning",
# The below warning is a consequence of how pytest detects fixtures and how DefinedNamespace behaves when an undefined attribute is being accessed.
"ignore:Code. _pytestfixturefunction is not defined in namespace .*:UserWarning",
]
# log_cli = true
# log_cli_level = "DEBUG"
log_format = "%(asctime)s.%(msecs)03d %(levelname)-8s %(name)-12s %(filename)s:%(lineno)s:%(funcName)s %(message)s"
log_date_format = "%Y-%m-%dT%H:%M:%S"
log_cli_format = "%(asctime)s.%(msecs)03d %(levelname)-8s %(name)-12s %(filename)s:%(lineno)s:%(funcName)s %(message)s"
log_cli_date_format = "%Y-%m-%dT%H:%M:%S"
[tool.isort]
profile = "black"
py_version = 37
line_length = 88
src_paths= ["rdflib", "test"]
supported_extensions = ["pyw", "pyi", "py"]
skip = [
'.eggs', # exclude a few common directories in the
'.git', # root of the project
'.hg',
'.mypy_cache',
'.pytest_cache',
'.tox',
'.venv',
'.cache,',
'.github',
'_build',
'htmlcov',
'benchmarks',
'examples', # No need to Black examples
'test_reports',
'rdflib.egg-info',
'buck-out',
'build',
'dist',
'venv',
]
[tool.mypy]
files = ['rdflib', 'test', 'devtools']
python_version = "3.7"
warn_unused_configs = true
ignore_missing_imports = true
disallow_subclassing_any = false
warn_unreachable = true
warn_unused_ignores = true
no_implicit_optional = false
[[tool.mypy.overrides]]
module = "pyparsing.*"
# This is here because of an upstream issue with pyparsing:
# https://github.com/pyparsing/pyparsing/issues/385
# Once the issue is fixed this should be removed.
follow_imports = "skip"
[tool.coverage.run]
branch = true
source = ["rdflib"]
omit = ["*/_type_checking.py"]
[tool.coverage.report]
exclude_lines = [
# Have to re-enable the standard pragma
"pragma: no cover",
# TYPE_CHECKING guarded code only affects type checkers.
"^ *if (False|TYPE_CHECKING):",
# constant used in protocols and abstract methods, does not run anything
# and has no side effects.
'^ +\.\.\.$',
# Don't complain if non-runnable code isn't run:
"if 0:",
"if __name__ == .__main__.:",
"if __name__==.__main__.:"
]