-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathpyproject.toml
139 lines (124 loc) · 4.5 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
[tool.poetry]
name = "dapp-manager"
version = "0.3.0-dev"
description = "Golem dapp-manager - run decetralized apps on the Golem Network using a 'docker-compose'-like interface"
authors = ["Golem Factory <[email protected]>"]
license = "LGPL-3.0"
classifiers = [
"Development Status :: 2 - Pre-Alpha",
"Environment :: Console",
"Intended Audience :: Developers",
"License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)",
"Natural Language :: English",
"Programming Language :: Python :: 3.8",
"Topic :: Software Development",
"Topic :: System :: Distributed Computing",
]
repository = "https://github.com/golemfactory/dapp-manager"
readme = "README.md"
packages = [{ include = "dapp_manager" }, { include = "dapp_stats" }]
[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"
[[tool.poetry.source]]
name = "testpypi"
url = "https://test.pypi.org/simple/"
default = false
secondary = true
[tool.poetry.dependencies]
python = "^3.8"
psutil = "^5.9"
appdirs = "^1.4"
click = "^7.0" # requires bump to goth's dependencies https://github.com/golemfactory/goth/issues/605
pydantic = "^1.9"
dapp-runner = { git = "https://github.com/golemfactory/dapp-runner.git", branch = "main" }
mako = "^1.2.4"
requests = "^2.31.0"
[tool.poetry.group.dev.dependencies]
setuptools = "*" # implicitly required by liccehck
pip = "*" # implicitly required by liccehck
autoflake = "^1"
black = "^21.0b0" # requires bump to goth's dependencies https://github.com/golemfactory/goth/issues/605
mypy = "^0.942"
isort = "^5.11.3"
poethepoet = "^0.13"
pytest = "^7.1"
pytest-cov = "^3.0.0"
pytest-mock = "^3.10.0"
liccheck = "^0.7.2"
flake8 = "^5"
flake8-docstrings = "^1.6"
Flake8-pyproject = "^1.2.2"
[tool.poetry.scripts]
dapp-manager = "dapp_manager.__main__:main"
dapp-stats = "dapp_stats.__main__:main"
[tool.poe.tasks]
checks = {sequence = ["checks_codestyle", "checks_typing", "checks_license"], help = "Run all available code checks"}
checks_codestyle = {sequence = ["_checks_codestyle_flake8", "_checks_codestyle_isort", "_checks_codestyle_black"], help = "Run only code style checks"}
_checks_codestyle_flake8 = "flake8 dapp_manager dapp_stats tests"
_checks_codestyle_isort = "isort --check-only --diff ."
_checks_codestyle_black = "black --check --diff ."
checks_typing = {cmd = "mypy --install-types --non-interactive --ignore-missing-imports --check-untyped-defs --warn-unused-ignores --show-error-codes .", help = "Run only code typing checks" }
checks_license = {sequence = ["_checks_license_export", "_checks_license_verify"], help = "Run only license compatibility checks"}
_checks_license_export = "poetry export -f requirements.txt -o .requirements.txt"
_checks_license_verify = "liccheck -r .requirements.txt"
format = {sequence = ["_format_autoflake", "_format_isort", "_format_black"], help = "Run code auto formatting"}
_format_autoflake = "autoflake ."
_format_isort = "isort ."
_format_black = "black ."
tests = {sequence = ["tests_unit"], help = "Run all available tests"}
tests_unit = {cmd = "pytest", help = "Run only unit tests"}
[tool.liccheck]
authorized_licenses = [
"bsd",
"new bsd",
"bsd license",
"apache 2",
"apache",
"Apache Software",
"Apache Software License",
"MPL-2.0",
"Mozilla Public License 2.0 (MPL 2.0)",
"MIT",
"LGPL",
"LGPL-3.0-or-later",
"GNU Lesser General Public License v3 or later (LGPLv3+)",
"GNU Lesser General Public License v3 (LGPLv3)",
"Python Software Foundation",
"ISC",
"ISC License (ISCL)",
]
unauthorized_licenses = ["gpl v3"]
[tool.autoflake]
recursive = true
in-place = true
remove-all-unused-imports = true
ignore-init-module-imports = true
[tool.flake8]
max-line-length = 100
extend-ignore = [
"E203", # See https://github.com/PyCQA/pycodestyle/issues/373
"E231", # black ignores this rule when formatting
"D105", # No docs for magic method
"D100", # TODO: To be fixed by #74
"D101", # TODO: To be fixed by #74
"D102", # TODO: To be fixed by #74
"D103", # TODO: To be fixed by #74
"D104", # No docs for public package
"D107", # No docs for __init__
"D202", # We prefer whitelines after docstrings
]
[tool.isort]
profile = "black"
py_version = 38
known_golem = "goth, yapapi, ya_activity, ya_market, ya_net, ya_payment"
sections = ["FUTURE", "STDLIB", "THIRDPARTY", "GOLEM", "FIRSTPARTY", "LOCALFOLDER"]
line_length = 100
[tool.black]
line-length = 100
target-version = ['py38']
[tool.pytest.ini_options]
addopts = "--cov --cov-report html --cov-report term-missing -sv"
testspaths = [
"tests"
]