forked from RDFLib/pySHACL
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
271 lines (248 loc) · 7.85 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
[build-system]
requires = ["poetry-core>=1.6.0,<2"]
build-backend = "poetry.core.masonry.api"
[tool.poetry]
name = "pyshacl"
version = "0.23.0"
# Don't forget to change the version number in __init__.py, Dockerfile, and CITATION.cff along with this one
description = "Python SHACL Validator"
license = "Apache-2.0"
authors = [
"Ashley Sommer <Ashley.Sommer@csiro.au>"
]
readme = "README.md"
repository = "https://github.com/RDFLib/pySHACL"
homepage = "https://github.com/RDFLib/pySHACL"
keywords = ["Linked Data", "Semantic Web", "RDF", "Python", "SHACL", "Shapes", "Schema", "Validate"]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Topic :: Utilities",
"Intended Audience :: Developers",
"Natural Language :: English",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
"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",
"Topic :: Software Development :: Libraries :: Python Modules",
"Operating System :: OS Independent"
]
packages = [
{ include = "pyshacl" },
{ include = "examples", format = "sdist" },
{ include = "benchmarks", format = "sdist" },
{ include = "test", format = "sdist" }
]
include = [
{ path = "pyshacl/assets/*.ttl", format = "sdist" },
{ path = "pyshacl/assets/*.py", format = "sdist" },
{ path = "hooks/*", format = "sdist" },
{ path = "MANIFEST.in", format = "sdist" },
{ path = "pyproject.toml", format = "sdist" },
{ path = "poetry.lock", format = "sdist" },
{ path = "Makefile", format = "sdist" },
{ path = "*.md" },
{ path = "*.txt" },
{ path = "pyshacl/assets/*.pickle" },
{ path = "pyshacl/*.spec" }
]
[tool.poetry.dependencies]
python = "^3.7.0" # Compatible python versions must be declared here
rdflib = ">=6.3.2,<7"
html5lib = ">=1.1,<2"
owlrl = ">=6.0.2,<7"
prettytable = "^2.2.1"
packaging = ">=21.3"
pyduktape2 = {version="^0.4.3", optional=true}
sanic = {version=">=22.12, <23", optional=true} #For the HTTP service
sanic-ext = {version=">=23.3, <23.6", optional=true} #For the HTTP service
sanic-cors = {version="2.2.0", optional=true} #For the HTTP service
ruff = {version="^0.0.267", optional=true}
black = {version="23.3.0", optional=true}
mypy = [
{version=">=0.800,<0.900", optional=true, python = "<3.10"},
{version=">=0.900,<0.1000", optional=true, python = ">=3.10"}
]
types-setuptools = {version="*", optional=true}
platformdirs = {version="*", optional=true}
coverage = {version=">6,<7,!=6.0.*,!=6.1,!=6.1.1", optional=true}
pytest-cov = {version="^2.8.1", optional=true}
[tool.poetry.dev-dependencies]
pytest = "^7.2"
coverage = {version=">6,<7,!=6.0.*,!=6.1,!=6.1.1", optional=true}
pytest-cov = {version="^2.8.1", optional=true}
ruff = {version="^0.0.267", optional=true}
mypy = [
{version=">=0.800,<0.900", optional=true, python = "<3.10"},
{version=">=0.900,<0.1000", optional=true, python = ">=3.10"}
]
types-setuptools = {version="*", optional=true}
platformdirs = {version="*", optional=true}
[tool.poetry.extras]
js = ["pyduktape2"]
http = ["sanic", "sanic-ext", "sanic-cors"]
dev-lint = ["ruff", "black", "platformdirs"]
dev-type-checking = ["mypy", "types-setuptools", "platformdirs"]
dev-coverage = ["pytest-cov", "coverage", "platformdirs"]
[tool.poetry.scripts]
pyshacl = "pyshacl.cli:main"
pyshacl_validate = "pyshacl.cli:main"
pyshacl_server = "pyshacl.http:cli"
[tool.dephell.main]
from = {format = "poetry", path = "pyproject.toml"}
to = {format = "setuppy", path = "setup.py"}
[tool.black]
required-version = "23.3.0"
line-length = "119"
skip-string-normalization = true
target-version = ['py37']
include = '\.pyi?$'
exclude = '''
(
/(
\.eggs # exclude a few common directories in the
| \.git # root of the project
| \.hg
| \.mypy_cache
| \.ruff_cache
| \.pytest_cache
| \.tox
| \.venv
| _build
| htmlcov
| benchmarks
| examples
| pyshacl.egg-info
| buck-out
| build
| dist
| venv
)/
)
'''
[tool.ruff]
# Enable pycodestyle (`E`) and Pyflakes (`F`) codes by default.
select = ["E", "F"]
ignore = []
# Allow autofix for all enabled rules (when `--fix`) is provided.
fixable = ["A", "B", "C", "D", "E", "F", "G", "I", "N", "Q", "S", "T", "W", "ANN", "ARG", "BLE", "COM", "DJ", "DTZ", "EM", "ERA", "EXE", "FBT", "ICN", "INP", "ISC", "NPY", "PD", "PGH", "PIE", "PL", "PT", "PTH", "PYI", "RET", "RSE", "RUF", "SIM", "SLF", "TCH", "TID", "TRY", "UP", "YTT"]
unfixable = []
# Exclude a variety of commonly ignored directories.
exclude = [
".bzr",
".direnv",
".eggs",
".git",
".git-rewrite",
".hg",
".mypy_cache",
".nox",
".pants.d",
".pytype",
".ruff_cache",
".pytest_cache",
".svn",
".tox",
".venv",
"htmlcov",
"__pypackages__",
"_build",
"buck-out",
"pyshacl.egg-info",
"build",
"dist",
"node_modules",
"venv",
]
# Same as Black.
line-length = 119
# Allow unused variables when underscore-prefixed.
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
# Assume Python 3.10.
target-version = "py37"
[tool.ruff.mccabe]
# Unlike Flake8, default to a complexity level of 10.
max-complexity = 10
[tool.pytest.ini_options]
minversion = "6.0"
testpaths = [
"test",
]
[tool.tox]
legacy_tox_ini = """
[tox]
skipsdist = true
envlist = py37, py38, py39, py310, py311, lint, type-checking
toxworkdir={env:TOX_WORK_DIR:.tox}
[testenv]
deps =
poetry>=1.5.0
passenv =
TRAVIS
TRAVIS_JOB_ID
TRAVIS_BRANCH
TRAVIS_BUILD_DIR
DRONE_BUILD_NUMBER
DRONE_STAGE_NAME
DRONE_STAGE_KIND
DRONE_REPO_NAME
DRONE_SOURCE_BRANCH
COVERALLS_SERVICE_NAME
COVERALLS_REPO_TOKEN
DRONE_COMMIT_AUTHOR_NAME
DRONE_COMMIT_AUTHOR_EMAIL
DRONE_COMMIT
HAS_COVERALLS
DBUS_SESSION_BUS_ADDRESS
PIP_KEYRING_PROVIDER
PIP_FORCE_KEYRING
PYTHON_KEYRING_BACKEND
skip_install = true
allowlist_externals = python3, ls, pwd, env, poetry
setenv =
COVERALLS_SERVICE_NUMBER ={env:DRONE_BUILD_NUMBER:0}
COVERALLS_SERVICE_JOB_ID = {env:DRONE_STAGE_NAME:stage}
COVERALLS_SERVICE_JOB_NUMBER = {env:DRONE_BUILD_NUMBER:0}
COVERALLS_FLAG_NAME = {env:DRONE_STAGE_KIND:build}
COVERALLS_GIT_REPO = {env:DRONE_REPO_NAME:RDFLib/pySHACL}
COVERALLS_GIT_BRANCH = {env:DRONE_SOURCE_BRANCH:master}
CI_BRANCH = {env:DRONE_SOURCE_BRANCH:master}
GIT_BRANCH = {env:DRONE_SOURCE_BRANCH:master}
GIT_AUTHOR_NAME = {env:DRONE_COMMIT_AUTHOR_NAME:nobody}
GIT_AUTHOR_EMAIL = {env:DRONE_COMMIT_AUTHOR_EMAIL:nobody@example.com}
GIT_ID = {env:DRONE_COMMIT:0}
commands_pre =
py39: poetry run pip3 install -U "pip>=21.0"
py310: poetry run pip3 install -U "pip>=21.3"
poetry install -vv -n --no-root --extras "js dev-coverage"
# Coveralls required to send coverage report to coveralls.io
py38: poetry run pip3 install "coveralls>=3.3.1"
commands =
- poetry show
poetry run pytest --cov=pyshacl test/
- poetry run coverage combine --append
poetry run coverage report -m
poetry run coverage html -i
py38: - coveralls
[testenv:lint]
commands_pre =
python --version
poetry install -vv -n --no-root --extras "dev-lint"
commands =
- poetry show
poetry run ruff check ./pyshacl
poetry run ruff check --select I ./pyshacl #isort
poetry run black --check --verbose --config ./pyproject.toml pyshacl
[testenv:type-checking]
commands_pre =
python --version
poetry install -vv -n --no-root --extras "dev-type-checking"
poetry run pip3 install "mypy>=0.800" "types-setuptools"
commands =
- poetry show
poetry run python3 -m mypy --ignore-missing-imports pyshacl
"""