-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpyproject.toml
187 lines (172 loc) · 4.85 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
# PEP-517 compliant build
# See: https://www.python.org/dev/peps/pep-0517/
# See: https://python-poetry.org/docs/pyproject/#poetry-and-pep-517
[build-system]
requires = ["poetry-core>=1.1.0"]
build-backend = "poetry.core.masonry.api"
[tool.poetry]
name = "science-book"
version = "0.1.0-a0.dev0"
description = "A package to help everyday users with science calculations"
authors = ["Gary Hammock <[email protected]>"]
maintainers = ["Gary Hammock <[email protected]>"]
license = "mit"
readme = "README.md"
homepage = "https://github.com/ghammock/science-book"
repository = "https://github.com/ghammock/science-book"
documentation = "https://github.com/ghammock/science-book/docs"
keywords = [
"science",
"physics",
"engineering"
]
# For a list of valid classifiers, see: https://pypi.org/classifiers/
# N.B. Some classifiers are automatically set by Poetry, see: https://python-poetry.org/docs/pyproject/#classifiers
classifiers = [
"Development Status :: 2 - Pre-Alpha",
"Topic :: Scientific/Engineering :: Physics",
"Topic :: Scientific/Engineering :: Mathematics",
"Intended Audience :: Science/Research",
"Typing :: Typed",
]
packages = [
{ include = "science_book", from = "src" }
]
include = [
{ path = "tests", format = "sdist" },
"README.md",
"LICENSE",
"CHANGELOG.md"
]
[tool.poetry.urls]
changelog = "https://github.com/ghammock/science-book/blob/main/CHANGELOG.md"
download = "https://github.com/ghammock/science-book/releases"
issues = "https://github.com/ghammock/science-book/issues"
[tool.poetry.dependencies]
python = "^3.8"
importlib-metadata = { version = "^5.0.0", python = "<3.10" }
[tool.poetry.group.dev.dependencies]
bandit = "^1.7.4"
black = "^22.10.0"
darglint = "^1.8.1"
flake8 = "^5.0.4"
flake8-broken-line = "^0.6.0"
flake8-bugbear = "^22.9.23"
flake8-builtins = "^2.0.0"
flake8-comprehensions = "^3.10.0"
flake8-eradicate = "^1.4.0"
flake8-isort = "^5.0.0"
flake8-pie = "^0.16.0"
flake8-simplify = "^0.19.3"
flake8-type-checking = "^2.1.3"
flake8-typing-imports = "^1.13.0"
isort = { version = "^5.10.1", extras = ["colors"] }
pep8-naming = "^0.13.2"
[tool.poetry.group.typing.dependencies]
mypy = ">=0.982"
[tool.poetry.group.test.dependencies]
pytest = "^7.1.3"
pytest-cov = "^4.0.0"
pytest-html = "^3.1.1"
pytest-mock = "^3.10.0"
[tool.poetry.group.docs.dependencies]
sphinx = "^5.2.3"
sphinx-autodoc-typehints = "^1.19.4"
sphinx-rtd-theme = "^1.0.0"
# black configuration
# See: https://black.readthedocs.io/en/stable/usage_and_configuration/the_basics.html
[tool.black]
color = true
line-length = 120
target-version = ['py39', 'py310']
preview = true
exclude = '''
(
/(
# These are ordinarily excluded by default because of .gitignore, but they are
# here for manual invocation or for Makefile target invocation.
| \.git
| \.idea
| \.mypy_cache
| \.pytest_cache
| \.?venv
| \.?egg.*
| __pycache__
)/
)
'''
# coverage.py configuration
# See: https://coverage.readthedocs.io/en/latest/config.html
[tool.coverage.run]
branch = true
command_line = "-m pytest"
source = ["src/science_book/*"]
omit = [
"*/__init__.py",
"*/tests/*",
]
parallel = true
[tool.coverage.report]
show_missing = true
skip_empty = true
exclude_lines = [
# Don't complain if tests don't hit defensive assertion code:
'''\#\s*pragma: no cover''',
'''^\s*raise AssertionError\b''',
'''^\s*raise NotImplementedError\b''',
'''^\s*return NotImplemented\b''',
'''^\s*raise$''',
'''^if __name__ == .__main__.:$''',
'''^\s*if TYPE_CHECKING:'''
]
[tool.coverage.html]
directory = "tests/coverage/html"
# isort configuration
# See: https://pycqa.github.io/isort/docs/configuration/options.html
# See: https://pycqa.github.io/isort/docs/configuration/profiles.html
# See: https://black.readthedocs.io/en/stable/guides/using_black_with_other_tools.html
[tool.isort]
atomic = true
color_output = true
known_first_party = ["science_book"]
known_local_folder = ["tests"]
known_third_party = []
lines_after_imports = 2
profile = "black"
src_paths = ["src", "tests"]
skip_glob = ["tests/coverage/*"]
# Mypy Configuration
# See: https://mypy.readthedocs.io/en/stable/config_file.html
[tool.mypy]
pretty = true
files = "**/*.py"
mypy_path = "src"
exclude = ["docs", "tests"]
explicit_package_bases = true
namespace_packages = true
show_column_numbers = true
show_error_codes = true
strict = true
warn_unreachable = true
[[tool.mypy.overrides]]
module = []
ignore_missing_imports = true
# pytest configuration
# See: https://docs.pytest.org/en/stable/reference/reference.html#configuration-options
[tool.pytest.ini_options]
# You can add -ra to the options below to only show summary output.
addopts = [
"-v",
"--tb=auto",
"--showlocals",
"--color=yes",
"--doctest-modules",
"--ignore=docs",
]
junit_family = "xunit2"
minversion = "6.0"
python_files = [
"test_*.py"
]
pythonpath = "src"
testpaths = "tests"