-
Notifications
You must be signed in to change notification settings - Fork 2
/
pyproject.toml
155 lines (135 loc) · 4.48 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 = "fotoobo"
version = "2.2.0"
description = "The awesome Fortinet Toolbox"
authors = ["Patrik Spiess <[email protected]>", "Lukas Murer-Jäckle <[email protected]>"]
readme = "README.md"
license = "LGPL-3.0-only"
repository = "https://github.com/migros/fotoobo"
classifiers = [
"Framework :: Pytest",
"Framework :: Sphinx",
"Framework :: Sphinx :: Extension",
"Framework :: Sphinx :: Theme",
"Framework :: tox",
"Intended Audience :: Developers",
"Intended Audience :: Information Technology",
"Intended Audience :: System Administrators",
"Intended Audience :: Telecommunications Industry",
"License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)",
"Natural Language :: English",
"Operating System :: POSIX :: Linux",
"Operating System :: Unix",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Topic :: Security",
"Topic :: System :: Networking",
"Topic :: System :: Networking :: Firewalls",
"Topic :: System :: Networking :: Monitoring",
"Topic :: System :: Systems Administration"
]
[tool.poetry.dependencies]
python = ">=3.8.0, <3.13"
typer = "~0.6.0"
rich = "~12.5.1"
PyYAML = "~6.0.0"
requests = ">=2.32"
Jinja2 = "~3.1.4"
[tool.poetry.group.dev.dependencies]
pytest = "~7.2.0"
black = "~24.03.0"
mypy = ">0.9, <1.0"
tox = "~4.4.0"
pylint = "~3.1.0"
pytest-cov = "~4.0.0"
types-requests = "~2.27.11"
isort = "~5.10.1"
types-PyYAML = "~6.0.5"
pygount = "~1.5.0"
[tool.poetry.group.docs.dependencies]
Sphinx = "~6.2.0"
sphinx-rtd-theme = "~1.2.0"
[tool.poetry.scripts]
fotoobo = "fotoobo.main:main"
# isort is used to organize-imports
[tool.isort]
sections = ['FUTURE', 'STDLIB', 'THIRDPARTY', 'FIRSTPARTY', 'LOCALFOLDER']
[tool.pylint.'MESSAGES CONTROL']
disable = [
"import-error",
"similarities",
"too-few-public-methods"
]
enable = [ "useless-suppression" ]
[tool.black]
line-length = 100
[tool.mypy]
strict=true
warn_unused_ignores=true
ignore_missing_imports=true
disallow_untyped_decorators=false
# here we define the tox settings
# we do it inline because we don't want to have another tox.ini in the project root
# package management is done as described in option 3 on the following FAQ
# - https://python-poetry.org/docs/master/faq/
[tool.tox]
legacy_tox_ini = """[tox]
isolated_build = True
envlist = pylint, mypy, black, pytest, coverage, docs, stats
testpaths = "tests"
[testenv:pylint]
description = Code analysis with pylint
skip_install = true
allowlist_externals = poetry, pylint
commands_pre = poetry install
commands = pylint {posargs} fotoobo
[testenv:mypy]
description = Check typing with mypy
skip_install = true
allowlist_externals = poetry, mypy
commands_pre = poetry install
commands = mypy fotoobo tests {posargs}
[testenv:black]
description = Check formatting with black
skip_install = true
allowlist_externals = poetry, black
commands_pre = poetry install
commands = black --check --diff {posargs} .
[testenv:pytest]
description = do unit tests with pytest
skip_install = true
allowlist_externals = poetry, pytest
commands_pre = poetry install
commands = pytest --basetemp=tests/temp/ {posargs}
[testenv:coverage-integration]
description = check pytest coverage for integration tests (which are under tests/cli)
skip_install = true
allowlist_externals = poetry, pytest
commands_pre = poetry install
commands = pytest --cov-report term-missing --cov-fail-under 90 --cov=fotoobo/cli tests/cli {posargs}
[testenv:coverage]
description = check pytest coverage for unit tests (without cli because these are unit-tests)
skip_install = true
allowlist_externals = poetry, pytest
commands_pre = poetry install
commands = pytest --cov-report term-missing --cov-fail-under 90 --cov=fotoobo --cov-config=.coverage_unittests_rc --ignore=tests/cli tests/ {posargs}
[testenv:docs]
description = Create the documentation with sphinx
skip_install = True
allowlist_externals = poetry, sphinx-build
commands_pre = poetry install
commands = sphinx-build -aEW -b html docs/source docs/build
[testenv:stats]
description = display pygount statistics
skip_install = true
allowlist_externals = poetry, pygount
commands_pre = poetry install
commands = pygount -f summary -s py,toml,json,yaml,md,rst -d -F [...],data
"""