forked from PolusAI/mm-workflows
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpyproject.toml
203 lines (164 loc) · 6.42 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
# Based on https://packaging.python.org/en/latest/tutorials/packaging-projects/
[build-system]
requires = ["jupyter_packaging~=0.7.9", "setuptools>=42,<68", "wheel", "versioneer[toml]==0.29"]
# NOTE: The above list mostly comes from https://github.com/nglviewer/nglview/pull/969/files
# NOTE: Use upper bound of <68 for setuptools due to 2to3 error.
# See https://stackoverflow.com/questions/72414481/error-in-anyjson-setup-command-use-2to3-is-invalid
build-backend = "setuptools.build_meta"
[project]
name = "mm-workflows"
dynamic = ["version"]
authors = [{name = "Jake Fennick", email = "jake.fennick@axleinfo.com"}]
description = "Molecular modeling workflows"
classifiers = [
"Programming Language :: Python :: 3",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
]
requires-python = ">=3.8"
dependencies = [
"requests",
"beautifulsoup4", # Solely for parsing gromacs mdp options html
]
[project.readme]
file = "README.md"
content-type = "text/markdown"
[project.urls]
Homepage = "https://github.com/PolusAI/mm-workflows"
"Bug Tracker" = "https://github.com/PolusAI/mm-workflows/issues"
[project.optional-dependencies]
test = [
"pre-commit",
"mypy",
"pylint",
"autopep8",
]
# NOTE: The following list was generated using the command
# mypy --install-types
# When updating this list, also update .pre-commit-config.yaml
# Alternatively, the --non-interactive flag can be used install these automatically.
# See https://mypy.readthedocs.io/en/stable/command_line.html#miscellaneous
# toml language has problem with underscore in array name
mypy-types = [
"pandas-stubs",
"types-beautifulsoup4",
"types-requests",
"types-openpyxl",
"types-pyyaml",
]
workflow-deps = [
"matplotlib",
"pandas",
"numpy>=1.21.0",
"mdanalysis",
"nmrformd",
"mdanalysis",
"mdtraj",
"rdkit",
"pymol",
"pdbfixer @ git+https://github.com/openmm/pdbfixer.git",
"openmm",
]
# See docs/requirements.txt
doc = [
"sphinx",
"myst-parser",
"sphinx-autodoc-typehints",
"ipytree",
]
all = ["mm-workflows[test,workflow-deps,doc,mypy-types]"]
[project.scripts]
mm-workflows = "mm_workflows.main:main"
# Need the following defined in order to make versioneer work with git tags
[tool.setuptools.dynamic]
version = {attr = "mm_workflows.__version__"}
[tool.setuptools]
package-dir = {"" = "src"}
include-package-data = false
[tool.setuptools.packages.find]
where = ["src"]
namespaces = false
[tool.versioneer]
VCS = "git"
style = "pep440-pre"
versionfile_source = "src/mm_workflows/_version.py"
versionfile_build = "mm_workflows/_version.py"
tag_prefix = "''"
# Based on https://packaging.python.org/en/latest/tutorials/packaging-projects/
[tool.mypy]
# See https://mypy.readthedocs.io/en/stable/running_mypy.html#follow-imports
follow_imports = "normal"
# Specifies the paths to use, after trying the paths from MYPYPATH environment variable.
# mypy_path = ''
# NOTE: mypy requires __init__.py files and/or namespace_packages = True. Otherwise, you will get
# "error: Cannot find implementation or library stub for module named 'module'"
namespace_packages = true
# Disallows defining functions without type annotations or with incomplete type annotations.
disallow_untyped_defs = true
# Disallows defining functions with incomplete type annotations.
disallow_incomplete_defs = true
# Type-checks the interior of functions without type annotations.
check_untyped_defs = true
# Warns about casting an expression to its inferred type.
warn_redundant_casts = true
# Warns about unneeded `# type: ignore` comments.
warn_unused_ignores = true
# Shows a warning when returning a value with type Any from a function declared with a non-Any return type.
warn_return_any = true
# A regular expression that matches file names, directory names and paths which
# mypy should ignore while recursively discovering files to check.
# Note that if you want to exclude multiple regexes, you have to concatenate
# them with |, and sometimes it doesn't even work. It is much easier to
# just use the [mypy-*] notation below with ignore_errors = True
# exclude =
# Allows disabling one or multiple error codes globally.
# disable_error_code = ["ignore-missing-imports"] # comma-separated list of strings
# Disallows usage of generic types that do not specify explicit type parameters.
# disallow_any_generics = False # NOTE: This one tends to generate a medium number of warnings, so enable with caution.
# Disallows all expressions in the module that have type Any.
# disallow_any_expr = False # NOTE: This one tends to generate a MASSIVE number of warnings, so enable with caution.
# Ignores all non-fatal errors.
ignore_errors = false
# Probably because it is in the root directory, I was unable to add
# versioneer to the exclude=regex above, but this works.
[[tool.mypy.overrides]]
module = ["BioSimSpace.*", "MDAnalysis.*", "pymol.*", "rdkit.*", "nmrformd.*", "setuptools.*", "parmed.*", "pdbfixer.*", "openmm.*", "mdtraj.*", "nglview.*", "ipytree.*", "ipywidgets.*"]
ignore_missing_imports = true
[tool.pytest.ini_options]
markers = [
"fast: (i.e. for maximum speed, use 'pytest -m fast')",
"slow: (i.e. for medium speed, use 'pytest -m \"not slow\"')",
"serial: (These tests CANNOT be run in parallel with --workers n > 1)",
]
addopts = "--maxfail=2"
# Exit after first num failures or errors
[tool.codespell]
skip = "*.svg,*.html"
ignore-words = "codespellwords.txt"
# See https://pylint.pycqa.org/en/latest/user_guide/configuration/all-options.html
[tool.pylint.main]
# TODO: Add class and module docstrings.
disable=[
"missing-class-docstring",
"missing-module-docstring",
"dangerous-default-value",
"pointless-string-statement",
"unused-variable",
"fixme",
"invalid-name",
]
# Specify a score threshold to be exceeded before program exits with error.
# Try to keep the threshold near the default of a perfect 10/10.
# However, for some reason, on github actions CI/CD the scores are slightly
# lower and fails, so let's use 9.25 instead of 9.50 for now.
fail-under=9.25
[tool.pylint.format]
# Regexp for a line that is allowed to be longer than the limit.
ignore-long-lines='^\s*(# )?(See )?(and )?<?https?://\S+>?$'
# Maximum number of characters on a single line.
max-line-length=120
# Maximum number of lines in a module.
max-module-lines=750
[tool.pylint.miscellaneous]
# List of note tags to take in consideration, separated by a comma.
notes="FIXME,XXX,TODO"