-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathpyproject.toml
155 lines (141 loc) · 3.76 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
[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"
[tool.poetry]
name = "topt"
version = "0.0.3"
description = "Tools for optimizing trajectories with direct collocation."
license = "Apache-2.0"
authors = ["Michael A. Perlin <[email protected]>"]
readme = "README.md"
repository = "https://github.com/perlinm/topt"
classifiers = [
"Development Status :: 3 - Alpha",
"Intended Audience :: Science/Research",
"Natural Language :: English",
"Topic :: Scientific/Engineering :: Mathematics",
"Topic :: Scientific/Engineering :: Physics",
]
include = ["topt/py.typed"]
[tool.poetry.dependencies]
python = "^3.9"
jax = ">=0.4.26"
jaxlib = ">=0.4.26"
cyipopt = ">=1.4.1"
checks-superstaq = { version = ">=0.5.0", optional = true }
[tool.poetry.extras]
dev = ["checks-superstaq"]
# Check script configuration:
[tool.black]
color = true
line_length = 100
[tool.isort]
profile = "black"
line_length = 100
color_output = true
known_first_party = "topt" # REPO-SPECIFIC CONFIG
[tool.flake8]
max-line-length = 100
max-complexity = 10
show_source = true
statistics = true
count = true
enable-extensions = ["TC", "TC1"]
extend-ignore = [
"E203",
"I100",
"I101",
"I201",
"I202",
] # these errors conflict with black and/or isort
type_checking_exempt_modules = ["collections.abc"]
# Configuration for flake8-modern-annotations
modern-annotations-postponed = "always"
modern-annotations-deprecated = "always"
modern-annotations-union = "always"
modern-annotations-optional = "always"
[tool.mypy]
ignore_missing_imports = true
show_error_codes = true
disallow_any_generics = true
disallow_incomplete_defs = true
disallow_untyped_defs = true
warn_unused_ignores = true
install_types = true
non_interactive = true
no_implicit_optional = true
plugins = ["numpy.typing.mypy_plugin"]
[tool.coverage.report]
fail_under = 100
show_missing = true
skip_covered = true
exclude_lines = ["pragma: no cover", "if TYPE_CHECKING:", "@overload"]
[tool.coverage.run]
include = ["./*"]
[tool.pylint.main]
max-line-length = 100
disable = "all"
load-plugins = ["pylint.extensions.docparams", "pylint.extensions.docstyle"]
output-format = "colorized"
score = false
reports = false
enable = [
"anomalous-backslash-in-string",
"assert-on-tuple",
"bad-indentation",
"bad-option-value",
"bad-reversed-sequence",
"bad-super-call",
"consider-merging-isinstance",
"continue-in-finally",
"dangerous-default-value",
"docstyle",
"duplicate-argument-name",
"expression-not-assigned",
"function-redefined",
"inconsistent-mro",
"init-is-generator",
"line-too-long",
"lost-exception",
"missing-class-docstring",
"missing-function-docstring",
"missing-kwoa",
"mixed-line-endings",
"not-callable",
"no-value-for-parameter",
"nonexistent-operator",
"not-in-loop",
"parameter_documentation",
"pointless-statement",
"redefined-builtin",
"relative-beyond-top-level",
"return-arg-in-generator",
"return-in-init",
"return-outside-function",
"simplifiable-if-statement",
"syntax-error",
"too-many-function-args",
"trailing-whitespace",
"undefined-variable",
"unexpected-keyword-arg",
"unhashable-dict-key",
"unnecessary-pass",
"unreachable",
"unrecognized-inline-option",
"unused-import",
"unnecessary-semicolon",
"unused-variable",
"unused-wildcard-import",
"wildcard-import",
"wrong-import-order",
"wrong-import-position",
"yield-outside-function",
]
# Ignore long lines containing urls or pylint directives.
[tool.pylint.format]
ignore-long-lines = '^(.*#\w*pylint: disable.*|\s*(# )?<?https?://\S+>?)$'
# List of members which are set dynamically and missed by pylint inference
# system, and so shouldn't trigger E1101 when accessed. Python regular
# expressions are accepted.
[tool.pylint.typecheck]
generated-members = "numpy.*"