-
Notifications
You must be signed in to change notification settings - Fork 4
/
pyproject.toml
168 lines (143 loc) · 6.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
# See https://packaging.python.org/en/latest/specifications/declaring-project-metadata
[tool.poetry]
name = "dsp-tools"
version = "5.0.2"
description = "DSP-TOOLS is a Python package with a command line interface that helps you interact with a DaSCH service platform (DSP) server."
authors = ["DaSCH - Swiss National Data and Service Center for the Humanities <info@dasch.swiss>"]
readme = "docs/index.md"
license = "GPL-3.0-only"
classifiers = [
"Programming Language :: Python :: 3",
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
"Operating System :: OS Independent",
]
documentation = "https://docs.dasch.swiss/latest/DSP-TOOLS/"
homepage = "https://www.dasch.swiss/"
repository = "https://github.com/dasch-swiss/dsp-tools"
include = [
"src/dsp_tools/resources/*",
"src/dsp_tools/py.typed" # see https://mypy.readthedocs.io/en/stable/installed_packages.html#making-pep-561-compatible-packages
]
exclude = ["src/dsp_tools/import_scripts/*"]
[tool.poetry.dependencies]
python = "^3.11"
jsonpath-ng = "^1.5.3"
argparse = "^1.4.0"
lxml = "^4.9.3"
requests = "^2.31.0"
jsonschema = "^4.19.0"
openpyxl = "^3.1.2"
networkx = "^3.1"
pandas = {version = "^2.0.3", extras = ["excel"]} # extra package that contains xlrd that is necessary for reading old .xls Excel files
regex = "^2023.8.8"
docker = "^6.1.3"
pyyaml = "^6.0.1"
rustworkx = "^0.13.2"
[tool.poetry.group.dev.dependencies]
black = "^23.7.0"
mkdocs = "^1.5.2"
mkdocs-material = "^9.1.21"
mkdocs-include-markdown-plugin = "*"
mypy = "^1.5.0"
pylint = "^2.17.5"
pytest = "^7.4.0"
pre-commit = "^3.3.3"
darglint = "^1.8.1"
types-requests = "^2.31.0.2"
types-lxml = "^2023.3.28"
types-jsonschema = "^4.17.0.10"
types-openpyxl = "^3.1.0.15"
types-regex = "^2023.8.8.0"
types-pyyaml = "^6.0.12.11"
isort = "^5.12.0"
termcolor = "^2.3.0"
pytest-unordered = "^0.5.2"
viztracer = "^0.16.0"
[tool.poetry.scripts]
dsp-tools = "dsp_tools.cli:main" # definition of the CLI entry point
[tool.poetry-exec-plugin.commands]
# plugin (https://github.com/keattang/poetry-exec-plugin) to define commands available for the developers,
# e.g. `poetry exec check-links`
check-links = """
markdown-link-validator \
./docs \
-i \\.\\/assets\\/.+ \
-i .+github\\.com\\/dasch\\-swiss\\/dsp-tools\\/settings \
-i .+github\\.com\\/dasch\\-swiss\\/ops-deploy\\/.+\
"""
darglint = """
find . -name "*.py" \
-not -path "./src/dsp_tools/models/*" \
-not -path "./.git/*" \
| xargs poetry run darglint -v 2\
"""
[build-system]
# Tells “frontend” build tools (like pip, build, or poetry) what “backend” build tool to use (e.g. setuptools, poetry).
# The "backend" doesn't need to be installed. It will be installed by the "frontend" in a temporary, isolated
# environment for use during the build process.
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
[tool.pytest.ini_options]
addopts = ["--import-mode=importlib"]
# see https://docs.pytest.org/en/latest/explanation/goodpractices.html#tests-outside-application-code
[tool.mypy]
ignore_missing_imports = true # TODO: deactivate this
show_column_numbers = true
strict = true
exclude = [
"src/dsp_tools/import_scripts", # TODO: activate this
"src/dsp_tools/models/group.py", # TODO: activate this
"src/dsp_tools/models/helpers.py ", # TODO: activate this
"src/dsp_tools/models/langstring.py", # TODO: activate this
"src/dsp_tools/models/listnode.py", # TODO: activate this
"src/dsp_tools/models/ontology.py", # TODO: activate this
"src/dsp_tools/models/permission.py", # TODO: activate this
"src/dsp_tools/models/project.py", # TODO: activate this
"src/dsp_tools/models/projectContext.py", # TODO: activate this
"src/dsp_tools/models/propertyclass.py", # TODO: activate this
"src/dsp_tools/models/resource.py", # TODO: activate this
"src/dsp_tools/models/resourceclass.py", # TODO: activate this
"src/dsp_tools/models/user.py", # TODO: activate this
"src/dsp_tools/models/value.py", # TODO: activate this
"src/dsp_tools/models/xmlresource.py", # TODO: activate this
]
[tool.black]
line-length = 120
[tool.isort]
profile = "black"
line_length = 120
[tool.pylint.MASTER]
ignore-paths = ["src/dsp_tools/models/resource.py"] # TODO: activate this
suggestion-mode = true
[tool.pylint.format]
max-line-length = 120
[tool.pylint."messages control"]
disable = [
"raw-checker-failed", # disabled by default
"bad-inline-option", # disabled by default
"locally-disabled", # disabled by default
"file-ignored", # disabled by default
"suppressed-message", # disabled by default
"deprecated-pragma", # disabled by default
"use-symbolic-message-instead", # disabled by default
"c-extension-no-member", # probably not necessary
"use-dict-literal", # not worth the effort
"use-list-literal", # not worth the effort
"missing-module-docstring", # not worth the effort
"trailing-whitespace", # not worth the effort
"use-maxsplit-arg", # not worth the effort
"global-statement", # not worth the effort
"no-else-continue", # would be less readable
"no-else-return", # would be less readable
"no-else-raise", # would be less readable
"logging-fstring-interpolation", # would be less readable
"duplicate-code", # too many false positives
"invalid-name", # TODO: activate this
"too-many-arguments", # TODO: activate this
"too-many-branches", # TODO: activate this
"too-many-lines", # TODO: activate this
"too-many-locals", # TODO: activate this
"too-many-nested-blocks", # TODO: activate this
"too-many-return-statements", # TODO: activate this
"too-many-statements", # TODO: activate this
]