-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
162 lines (143 loc) · 3.78 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
[tool.poetry]
name = "microdatasets"
version = "0.0.1"
description = "Simple datasets for evaluating DL algorithms."
authors = [
"Guillem Duran Ballester",
]
maintainers = ["Guillem Duran Ballester"]
license = "MIT"
readme = "README.md"
packages = [
{ include = "microdatasets", from = "src" }
]
include = [
{ path = "tests", format = "sdist" }
]
homepage = "https://github.com/FragileTech/microdatasets"
repository = "https://github.com/FragileTech/microdatasets"
documentation = "https://github.com/FragileTech/microdatasets"
keywords = ["Machine learning", "artificial intelligence", "microdatasets"]
classifiers = [
"Development Status :: 3 - Alpha",
"Topic :: Software Development :: Libraries :: Python Modules"
]
[tool.poetry.build]
generate-setup-file = false
# Requirements
[tool.poetry.dependencies]
python = "^3.7"
numpy = "^1.21"
scipy = "^1.7"
matplotlib = "^3.5"
[tool.poetry.group.dev.dependencies]
pytest = "^7.1"
pytest-cov = "^3.0"
psutil= "^5.8"
pytest-xdist = "^2.5"
pre-commit = "^2.6"
pytest-rerunfailures= "^10.2"
[tool.poetry.group.lint.dependencies]
colorama = "^0.4"
flake8 = "^3.9"
flake8-bugbear = "^21.9"
flake8-docstrings = "^1.6"
flake8-import-order = "^0.18"
flake8-quotes = "^3.3"
flake8-commas = "^2.1"
isort = "^5.10"
pylint = "^2.11"
pydocstyle = "^6.1"
pycodestyle = "^2.7"
flakehell = "^0.9"
black = "^22.8"
pre-commit = "^2.15"
[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"
# Code coverage config
[tool.coverage.run]
branch = true
source = ["src/microdatasets"]
[tool.coverage.report]
exclude_lines =["no cover",
'raise NotImplementedError',
'if __name__ == "__main__":']
ignore_errors = true
omit = ["tests/*"]
# black is the tool to format the source code
[tool.black]
line-length = 99
target-version = ['py37', 'py38', 'py39']
include = '\.pyi?$'
exclude = '''
/(
\.eggs
| \.gitclea
| \.hg
| \.mypy_cache
| \.tox
| \.venv
| _build
| buck-out
| build
| dist
| venv
)/
'''
# isort orders and lints imports
[tool.isort]
profile = "black"
line_length = 99
multi_line_output = 3
order_by_type = false
force_alphabetical_sort_within_sections = true
force_sort_within_sections = true
combine_as_imports = true
include_trailing_comma = true
color_output = true
lines_after_imports = 2
honor_noqa = true
# Flakehell config
[tool.flakehell]
# optionally inherit from remote config (or local if you want)
base = "https://raw.githubusercontent.com/life4/flakehell/master/pyproject.toml"
# specify any flake8 options. For example, exclude "example.py":
exclude = [".git", "docs", ".ipynb*", "*.ipynb", ".pytest_cache"]
format = "grouped" # make output nice
max_line_length = 99 # show line of source code in output
show_source = true
inline_quotes='"'
import_order_style = "appnexus"
application_package_names = ["microdatasets"]
application_import_names = ["microdatasets"]
# Fix AttributeError: 'Namespace' object has no attribute 'extended_default_ignore'
extended_default_ignore=[]
[tool.flakehell.plugins]
"flake8*" = ["+*", "-D*"]
pylint = ["+*", "-D*"]
pyflakes = ["+*", "-D*"]
pycodestyle = ["+*" , "-D*", "-D100", "-D104", "-D301", "-W503", "-W504", "-E203"]
[tool.flakehell.exceptions."**/__init__.py"]
pyflakes = ["-F401"]
# No docs in the tests. No unused imports (otherwise pytest fixtures raise errors).
[tool.flakehell.exceptions."**/tests/*"]
pycodestyle = ["-D*"]
"flake8*" = ["-D*"]
pylint = ["-D*"]
pyflakes = ["-F401", "-F811"]
[tool.pylint.master]
ignore = 'tests'
load-plugins =' pylint.extensions.docparams'
[tool.pylint.messages_control]
disable = 'all,'
enable = """,
missing-param-doc,
differing-param-doc,
differing-type-doc,
missing-return-doc,
"""
[tool.flakehell.exceptions."**/assets/*"]
pycodestyle = ["-*"]
pyflakes = ["-*"]
"flake8*" = ["-*"]