-
Notifications
You must be signed in to change notification settings - Fork 13
/
pyproject.toml
178 lines (163 loc) · 4.29 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
# see https://setuptools.pypa.io/en/latest/userguide/pyproject_config.html
[build-system]
requires = ["setuptools"]
build-backend = "setuptools.build_meta"
[project]
name = "nplinker"
version = "2.0.0-alpha.6"
description = "Natural Products Linker"
readme = "README.md"
requires-python = ">=3.9"
keywords = ["Genome", "Metabolome", "Natural Products", "Data Mining"]
license = { text = "Apache-2.0 license" }
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Education",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: Apache Software License",
"Natural Language :: English",
"Operating System :: MacOS",
"Operating System :: POSIX :: Linux",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
]
dependencies = [
"beautifulsoup4",
"biopython",
"deprecated",
"dynaconf",
"httpx",
"jsonschema",
"numpy",
"networkx",
"pandas",
"pyteomics",
"rich",
"scipy",
"sortedcontainers",
"tabulate",
]
[project.optional-dependencies]
dev = [
# packaging
"build",
"wheel",
# formatting and linting
"ruff",
# testing
"pytest",
"pytest-cov",
"pytest-xdist",
"coverage[toml]",
# static typing
"mypy",
"typing_extensions",
# stub packages. Update the `format-typing-check.yml` too if you add more.
"types-Deprecated",
"types-beautifulsoup4",
"types-jsonschema",
"types-networkx",
"pandas-stubs",
# docs
"black",
"mkdocs",
"mkdocs-material",
"mkdocs-exclude",
"mkdocs-redirects",
"mkdocstrings-python",
"mike",
]
[project.urls]
"Documentation" = "https://nplinker.github.io/nplinker"
"Repository" = "https://github.com/NPLinker/nplinker"
"Issues" = "https://github.com/NPLinker/nplinker/issues"
[tool.setuptools.packages.find]
where = ["src"]
namespaces = true # enable data directory to be identified
[tool.setuptools.package-data]
"nplinker.data" = ["*"]
"nplinker.schemas" = ["*"]
"nplinker" = ["nplinker_default.toml"]
[tool.pytest.ini_options]
minversion = "6.0"
# -ra: show summary info for all test outcomes;
# -n auto: run tests in parallel;
# --dist loadgroup: sends tests marked with 'xdist_group' to the same worker
addopts = "-ra -n auto --dist loadgroup"
testpaths = ["tests/unit"]
[tool.coverage.run]
branch = true
source = ["src"]
relative_files = true # show relative path in report, important for sonarcloud
[tool.coverage.report]
omit = [
"src/nplinker/class_info/*",
"src/nplinker/data/*",
"src/nplinker/genomics/aa_pred.py",
"src/nplinker/parsers/*",
"src/nplinker/scoring/iokr/*",
"src/nplinker/scoring/rosetta/*",
"src/nplinker/scoring/np_class_scoring.py",
"src/nplinker/scoring/rosetta_scoring.py",
"src/nplinker/spec_clustering.py",
"src/nplinker/pickler.py"
]
# Mypy: to check static type
# see https://mypy.readthedocs.io/en/stable/config_file.html#example-pyproject-toml
[tool.mypy]
python_version = "3.10"
warn_return_any = true
warn_unused_configs = true
ignore_missing_imports = true
[tool.ruff]
target-version = "py310"
line-length = 100
[tool.ruff.lint]
select = [
"D", # pydocstyle
"E", # pycodestyle (error)
"W", # pycodestyle (warning)
"F", # Pyflakes
"I", # isort
"N", # pep8-naming
]
ignore = [
"E501", # Line too long
"D100", # Missing module docstring
"D104", # Missing public package docstring
"D105", # Missing docstring in magic method
"D107", # Missing `__init__` docstring
# The following list excludes rules irrelevant to the Google style
"D203",
"D204",
"D213",
"D215",
"D400",
"D401",
"D404",
"D406",
"D407",
"D408",
"D409",
"D413",
]
# Allow autofix for all enabled rules (when `--fix`) is provided.
fixable = ["A", "B", "C", "D", "E", "F", "I"]
ignore-init-module-imports = true
[tool.ruff.lint.per-file-ignores]
# Ignore docstrings in all test files
"tests/**py" = ["D"]
[tool.ruff.lint.isort]
known-first-party = ["nplinker"]
force-single-line = true
lines-after-imports = 2
no-lines-before = [
"future",
"standard-library",
"third-party",
"first-party",
"local-folder",
]