forked from useblocks/sphinx-needs
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathpyproject.toml
163 lines (141 loc) · 4.49 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
[tool.poetry]
name = "sphinx-needs"
# !! Don't miss updates in sphinx_needs.__version__, changelog.rst, and .github/workflows/docker !!!
version = "2.0.0"
description = "Sphinx needs extension for managing needs/requirements and specifications"
authors = ["team useblocks <[email protected]>"]
license = "MIT"
readme = "README.rst"
repository = "http://github.com/useblocks/sphinx-needs"
documentation = "https://sphinx-needs.readthedocs.io/en/latest/"
classifiers=[
'Development Status :: 5 - Production/Stable',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
'Topic :: Documentation',
'Topic :: Utilities',
'Framework :: Sphinx :: Extension',
]
packages = [
{include = "sphinx_needs"}
]
# [project.dependencies]
[tool.poetry.dependencies]
python = ">=3.8,<4"
sphinx = ">=5.0,<8"
requests-file = "^1.5.1" # external links
requests = "^2.25.1" # external_links
jsonschema = ">=3.2.0" # needsimport schema validation
sphinx-data-viewer = "^0.1.1" # needservice debug output
sphinxcontrib-jquery = "^4" # needed for datatables in sphinx>=6
# [project.optional-dependencies.plotting]
# for needpie / needbar
matplotlib = { version = ">=3.3.0", optional = true }
# [project.optional-dependencies.test]
pytest = { version = "^7", optional = true }
pytest-cov = { version = "^4", optional = true }
lxml = { version = "^4.6.5", optional = true }
requests-mock = { version = ">=1.9.3", optional = true }
responses = { version = "^0.22.0", optional = true }
sphinxcontrib-plantuml = { version = "^0", optional = true }
syrupy = { version = "^3", optional = true }
pytest-xprocess = { version = "^0.22.2", optional = true }
# [project.optional-dependencies.test-parallel]
pytest-xdist = { version = "*", optional = true }
# [project.optional-dependencies.benchmark]
pytest-benchmark = { version = "^4.0.0", optional = true }
memray = { version = "^1.3.1", optional = true }
# [project.optional-dependencies.docs]
sphinx-copybutton = { version="^0.5", optional = true }
sphinxcontrib-programoutput = { version="^0.17", optional = true }
sphinx-design = { version="^0.5", optional = true }
sphinx-immaterial = { version="0.11.7", optional = true }
pydantic = { version="2.4.2", optional = true }
[tool.poetry.extras]
plotting = ["matplotlib"]
test = [
"matplotlib",
"pytest",
"pytest-cov",
"syrupy",
"sphinxcontrib-plantuml",
"requests-mock",
"lxml",
"responses",
"pytest-xprocess"
]
test-parallel = ["pytest-xdist"]
benchmark = ["pytest-benchmark", "memray"]
docs = [
"matplotlib",
"sphinxcontrib-plantuml",
"sphinx-copybutton",
"sphinxcontrib-programoutput",
"sphinx-design",
"sphinx-immaterial",
"pydantic" # note this is only required because of https://github.com/jbms/sphinx-immaterial/issues/302
]
[tool.poetry.dev-dependencies]
pre-commit = "^3"
[tool.pytest.ini_options]
markers = [
"jstest: marks tests as JavaScript test (deselect with '-m \"not jstest\"')",
]
[tool.black]
line-length = 120
[tool.isort]
profile = "black"
[tool.mypy]
files = "sphinx_needs"
strict = true
show_error_codes = true
implicit_reexport = true
namespace_packages = true
disallow_any_generics = true
disallow_subclassing_any = true
# disallow_any_unimported = true
# disallow_any_explicit = true
# disallow_any_expr = true
# disallow_any_decorated = true
[[tool.mypy.overrides]]
module = [
"matplotlib.*",
"numpy.*",
"requests_file",
"sphinx_data_viewer.*",
"sphinxcontrib.plantuml.*",
]
ignore_missing_imports = true
[[tool.mypy.overrides]]
module = [
'sphinx_needs.api.need',
'sphinx_needs.directives.needuml',
]
ignore_errors = true
[[tool.mypy.overrides]]
module = [
"sphinx_needs.directives.needextend",
"sphinx_needs.functions.functions",
]
# TODO dynamically overriding TypeDict keys is a bit tricky
disable_error_code = "literal-required"
[[tool.mypy.overrides]]
module = [
"sphinx_needs.data"
]
disable_error_code = ["attr-defined", "no-any-return"]
[[tool.mypy.overrides]]
module = [
"sphinx_needs.directives.needextract",
]
disable_error_code = "no-untyped-call"
[build-system]
requires = ["setuptools", "poetry_core>=1.0.8"] # setuptools for deps like plantuml
build-backend = "poetry.core.masonry.api"