summaryrefslogtreecommitdiffstats
path: root/pyproject.toml
blob: b06934ac01c205d1d5f90858f0bdafdb8eda47e5 (plain)
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
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
# content of pyproject.toml

[build-system]
requires = ["setuptools>=64.0.0", "wheel"]
build-backend = "setuptools.build_meta"

[project]
name = "eos_downloader"
version = "v0.10.1"
readme = "README.md"
authors = [{ name = "Thomas Grimonet", email = "thomas.grimonet@gmail.com" }]
maintainers = [
  { name = "Thomas Grimonet", email = "thomas.grimonet@gmail.com" },
]
description = "Arista EOS/CVP downloader script"
license = { file = "LICENSE" }
dependencies = [
  "cryptography",
  "paramiko",
  "requests>=2.20.0",
  "requests-toolbelt",
  "scp",
  "tqdm",
  "loguru",
  "rich>=13.5.2,<13.8.0",
  "cvprac>=1.0.7",
  "click~=8.1.6",
  "click-help-colors~=0.9",
  "pydantic>2.0.0,<3.0.0",
]
keywords = ["eos_downloader", "Arista", "eos", "cvp", "network", "automation", "networking", "devops", "netdevops"]
classifiers = [
  'Development Status :: 4 - Beta',
  'Intended Audience :: Developers',
  'Intended Audience :: System Administrators',
  'Intended Audience :: Information Technology',
  'Topic :: System :: Software Distribution',
  'Topic :: Terminals',
  'Topic :: Utilities',
  'License :: OSI Approved :: Apache Software License',
  'Operating System :: OS Independent',
  'Programming Language :: Python',
  'Programming Language :: Python :: 3',
  'Programming Language :: Python :: 3.8',
  'Programming Language :: Python :: 3.9',
  'Programming Language :: Python :: 3.10',
  'Programming Language :: Python :: 3 :: Only',
  'Programming Language :: Python :: Implementation :: PyPy',
]
requires-python = ">=3.8"

[project.optional-dependencies]
dev = [
  "mypy==1.8.0",
  "isort==5.13.2",
  "mypy-extensions>=0.4.3",
  "pre-commit>=2.20.0",
  "pylint",
  "pytest>=7.1.2",
  "pytest-cov>=2.11.1",
  "pytest-dependency",
  "pytest-html>=3.1.1",
  "pytest-metadata>=1.11.0",
  "pylint-pydantic>=0.2.4",
  "tox~=4.11",
  "types-PyYAML",
  "types-paramiko",
  "types-requests",
  "typing-extensions",
  "yamllint",
  "flake8>=4.0.1",
  "pyflakes>=2.4.0",
  "bumpver>=2023.1126"
]

[project.urls]
Homepage = "https://www.github.com/titom73/eos-downloader"
"Bug Tracker" = "https://www.github.com/titom73/eos-downloader/issues"
Contributing = "https://www.github.com/titom73/eos-downloader"

[project.scripts]
ardl = "eos_downloader.cli.cli:cli"
lard = "eos_downloader.cli.cli:cli"

################################
# Tools
################################

[tool.setuptools.packages.find]
include = ["eos_downloader*"]
namespaces = false

################################
# Version
################################
[tool.bumpver]
current_version = "0.10.1"
version_pattern = "MAJOR.MINOR.PATCH"
commit_message  = "bump: Version {old_version} -> {new_version}"
commit = true
# No tag
tag = false
push = false

[tool.bumpver.file_patterns]
"pyproject.toml" = ['current_version = "{version}"', 'version = "v{version}"']

# mypy as per https://pydantic-docs.helpmanual.io/mypy_plugin/#enabling-the-plugin
[tool.mypy]
plugins = [
  "pydantic.mypy",
  ]
follow_imports = "skip"
ignore_missing_imports = true
warn_redundant_casts = true
# Note: tox find some unused type ignore which are required for pre-commit.. to
# investigate
# warn_unused_ignores = true
disallow_any_generics = true
check_untyped_defs = true
no_implicit_reexport = true
strict_optional = true

# for strict mypy: (this is the tricky one :-))
disallow_untyped_defs = true

mypy_path = "eos_downloader"

[tool.pydantic-mypy]
init_forbid_extra = true
init_typed = true
warn_required_dynamic_aliases = true
warn_untyped_fields = true


[tool.tox]
legacy_tox_ini = """
[tox]
min_version = 4.0
envlist =
  clean,
  lint,
  type,
  py{38,39,310}

[tox-full]
min_version = 4.0
envlist =
  clean,
  py{38,39,310},
  lint,
  type,
  report

[gh-actions-base]
python =
  3.8: lint, type
  3.9: lint, type
  3.10: lint, type

[gh-actions]
python =
  3.8: py38
  3.9: py39
  3.10: py310, lint, type, coverage

[testenv]
description = run the test driver with {basepython}
extras = dev
commands =
   pytest -rA -q --cov-report term:skip-covered --cov-report term:skip-covered --html=report.html --self-contained-html --cov-report=html --color yes --cov=eos_downloader

[testenv:lint]
description = check the code style
commands =
  flake8 --max-line-length=165 --config=/dev/null eos_downloader
  pylint eos_downloader

[testenv:type]
description = check typing
commands =
  type: mypy --config-file=pyproject.toml eos_downloader

[testenv:clean]
deps = coverage[toml]
skip_install = true
commands = coverage erase

[testenv:report]
deps = coverage[toml]
commands = coverage report
# add the following to make the report fail under some percentage
# commands = coverage report --fail-under=80
depends = py310

"""

[tool.pytest.ini_options]
addopts = "-ra -q -s -vv --capture=tee-sys --cov --cov-append"
log_level = "INFO"
log_cli = "True"

[tool.coverage.run]
source = ['eos_downloader']
# omit = []

[tool.isort]
profile = "black"
line_length = 165