-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
190 lines (150 loc) · 5.25 KB
/
Copy pathpyproject.toml
File metadata and controls
190 lines (150 loc) · 5.25 KB
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
# This is a comment.
# syntax-documentation:
# - https://python-poetry.org/docs/pyproject
# - https://flit.readthedocs.io/en/latest/pyproject_toml.html
#
# NOTE: you have to use single-quoted strings in TOML for regular expressions.
# It's the equivalent of r-strings in Python. Multiline strings are treated as
# verbose regular expressions by Black. Use [ ] to denote a significant space
# character.
#
# > poetry install
# > poetry install --only docs
# > poetry install (--with|--without) (docs|dev|ipython|profiling|testing|typing)
[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"
[tool.black]
line-length = 120
include = '\.py$' # regex -> single-quotes
target_version = ["py311"]
[tool.coverage.html]
directory = "var/coverage/html" # relative to $CWD
[tool.coverage.xml]
output = "var/coverage/coverage.xml" # relative to $CWD
[tool.coverage.report]
# cfr. https://coverage.readthedocs.io/en/coverage-4.2/excluding.html
exclude_lines = [
"pragma: no cover",
"raise AssertionError",
"raise NotImplementedError",
"if 0:",
"if __name__ == .__main__.:",
]
include = ["src/*"]
[tool.coverage.run]
branch = true
data_file = "var/coverage/coverage.db" # defaults to .coverage
[tool.flake8]
max_line_length = 140
exclude = "bindings"
per_file_ignores = [
"__init__.py:F401", # F401: imported but unused
]
[tool.isort]
include_trailing_comma = true # corresponds to -tc flag
known_third_party = []
line_length = 120 # corresponds to -w flag
multi_line_output = 3 # corresponds to -m flag
skip_glob = '^((?!py$).)*$' # isort all Python files
[tool.mypy]
# cfr https://mypy.readthedocs.io/en/stable/config_file.html#using-a-pyproject-toml-file
cache_dir = "var/cache/mypy"
check_untyped_defs = true
exclude = "^bin/"
ignore_missing_imports = true
[tool.poetry]
name = "conda-xdgpatch"
version = "0.3" # version managed by poetry-dynamic-versioning
license = "MIT"
description = "Patch for conda to use XDG-locations."
readme = "docs/readme.md"
authors = ["Wouter Vanden Hove <wouter@libranet.eu>"]
maintainers = ["Wouter Vanden Hove <wouter@libranet.eu>"]
repository = "https://github.com/libranet/conda-xdgpatch"
documentation = "https://github.com/libranet/conda-xdgpatch"
keywords = ["conda", "xdg", "sitecustomize"]
classifiers = [
"Development Status :: 3 - Alpha",
"Environment :: Console",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Operating System :: POSIX :: Linux",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
"Typing :: Typed",
]
packages = [{ include = "conda_xdgpatch", from = "src" }]
[tool.poetry.dependencies]
# These packages are mandatory and form the core of this package’s distribution.
python = ">=3.8.0,<4.0"
sitecustomize-entrypoints = ">=0.1.0"
[tool.poetry.group.dev.dependencies]
black = { version = ">=22.1.0", optional = true, allow-prereleases = true }
flake8 = ">=4.0.1"
flake8-pyproject = ">=1.2.2"
isort = ">=5.10.1"
pre-commit = ">=2.14.1"
pre-commit-hooks = ">=4.1.0"
pylint = ">=2.12.2"
[tool.poetry.group.dist.dependencies]
pyroma = ">=4.2"
twine = ">=4.0.2"
[tool.poetry.group.docs.dependencies]
Sphinx = ">=4.4.0"
sphinx-rtd-theme = ">=1.0.0"
recommonmark = ">=0.7.1"
sphinx-autoapi = ">=1.8.4"
autoapi = ">=2.0.1"
[tool.poetry.group.ipython.dependencies]
ipdb = ">=0.13.9"
ipython = ">=8.4.0"
[tool.poetry.group.testing.dependencies]
pytest = ">=7.0.1"
pytest-cov = ">=3.0.0"
[tool.poetry.group.typing.dependencies]
lxml = { version = ">=4.9.2", optional = true, allow-prereleases = false } # mypy coverage-report
mypy = ">=0.931"
[tool.poetry.urls]
"Bug Tracker" = "https://github.com/Libranet/conda-xdgpatch/issues"
# [tool.poetry-dynamic-versioning]
# # cfr https://github.com/mtkennerly/poetry-dynamic-versioning
# enable = true
# vcs = "git"
# style = "semver"
# [tool.poetry-dynamic-versioning.substitution]
# files = ["src/*/__init__.py", "src/*/__version__.py", "docs/changes.rst"]
[tool.poetry.plugins] # Optional super table
[tool.poetry.plugins."sitecustomize"]
# https://python-poetry.org/docs/pyproject/#plugins
# https://github.com/Darsstar/sitecustomize-entrypoints/blob/main/src/sitecustomize/__init__.py
conda_xdgpatch = "conda_xdgpatch:patch"
[tool.poetry2conda]
# https://pypi.org/project/poetry2conda/
# https://levelup.gitconnected.com/publishing-your-python-package-on-conda-and-conda-forge-309a405740cf
name = "conda-base"
[tool.pylint.format]
max-line-length = 120
good-names = [
"i", # counter in loop
"ok", # status
"ts", # timestamp or timeseries object
]
[tool.pylint.messages_control]
disable = [
"C0116", # missing-function-docstring
]
[tool.pytest.ini_options]
cache_dir = "var/cache/pytest"
log_cli = false # enable to show log-output
log_cli_level = "NOTSET"
filterwarnings = []
markers = ["unit", "integration"]
testpaths = ["tests"]
# the junit-report is used to report coverage in gitlab
addopts = "--junit-xml='var/coverage/pytest.xml'"