Merging upstream version 0.10.3.
Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
parent
801f1af336
commit
d1f683ede3
10 changed files with 45 additions and 46 deletions
4
.github/workflows/on_demand.yml
vendored
4
.github/workflows/on_demand.yml
vendored
|
@ -40,7 +40,7 @@ jobs:
|
|||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Build and push
|
||||
uses: docker/build-push-action@v5
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
context: .
|
||||
file: Dockerfile
|
||||
|
@ -80,7 +80,7 @@ jobs:
|
|||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Build and push
|
||||
uses: docker/build-push-action@v5
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
context: .
|
||||
file: Dockerfile.docker
|
||||
|
|
2
.github/workflows/pr-management.yml
vendored
2
.github/workflows/pr-management.yml
vendored
|
@ -19,7 +19,7 @@ jobs:
|
|||
- uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
- uses: pre-commit-ci/lite-action@v1.0.2
|
||||
- uses: pre-commit-ci/lite-action@v1.1.0
|
||||
|
||||
compiling:
|
||||
name: Run installation process and code compilation supported Python versions
|
||||
|
|
37
.github/workflows/release.yml
vendored
37
.github/workflows/release.yml
vendored
|
@ -2,38 +2,17 @@
|
|||
name: "Tag & Release management"
|
||||
on:
|
||||
push:
|
||||
# Sequence of patterns matched against refs/tags
|
||||
tags:
|
||||
- 'v[0-9]+.[0-9]+.[0-9]+' # Push events to matching v*, i.e. v1.0, v20.15.10
|
||||
jobs:
|
||||
# release:
|
||||
# name: Create Github Release
|
||||
# runs-on: ubuntu-latest
|
||||
# steps:
|
||||
# - name: Checkout code
|
||||
# uses: actions/checkout@v4
|
||||
# with:
|
||||
# fetch-depth: 0
|
||||
|
||||
# - name: Generate Changelog
|
||||
# run: |
|
||||
# sudo apt update && sudo apt install zsh
|
||||
# export TAG_CURRENT=$(git describe --abbrev=0 --tags)
|
||||
# export TAG_PREVIOUS=$(git describe --abbrev=0 --tags `git rev-list --tags --skip=1 --max-count=1`)
|
||||
# echo "Previous tag is: ${TAG_PREVIOUS}"
|
||||
# echo "Current tag is: ${TAG_CURRENT}"
|
||||
# zsh .github/changelog.sh ${TAG_CURRENT} ${TAG_PREVIOUS} md > CHANGELOG.md
|
||||
# cat CHANGELOG.md
|
||||
|
||||
# - name: Release on Github
|
||||
# uses: softprops/action-gh-release@v1
|
||||
# with:
|
||||
# draft: false
|
||||
# body_path: CHANGELOG.md
|
||||
|
||||
pypi:
|
||||
name: Publish version to Pypi servers
|
||||
runs-on: ubuntu-latest
|
||||
environment:
|
||||
name: pypi
|
||||
url: https://pypi.org/p/eos-downloader
|
||||
permissions:
|
||||
id-token: write
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
@ -47,7 +26,7 @@ jobs:
|
|||
run: |
|
||||
python -m build
|
||||
|
||||
- name: Publish package to TestPyPI
|
||||
- name: Publish package to Pypi server
|
||||
uses: pypa/gh-action-pypi-publish@release/v1
|
||||
with:
|
||||
user: __token__
|
||||
|
@ -86,7 +65,7 @@ jobs:
|
|||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Build and push
|
||||
uses: docker/build-push-action@v5
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
context: .
|
||||
file: Dockerfile
|
||||
|
@ -127,7 +106,7 @@ jobs:
|
|||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Build and push
|
||||
uses: docker/build-push-action@v5
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
context: .
|
||||
file: Dockerfile.docker
|
||||
|
|
|
@ -13,6 +13,10 @@
|
|||
|
||||
Script to download Arista softwares to local folder, Cloudvision or EVE-NG.
|
||||
|
||||
> [!CAUTION]
|
||||
> This script should not be deployed on EOS device. If you do that, there is no support to expect from Arista TAC team.
|
||||
|
||||
|
||||
```bash
|
||||
pip install eos-downloader
|
||||
```
|
||||
|
|
|
@ -18,6 +18,11 @@ import importlib.metadata
|
|||
import json
|
||||
from typing import Any
|
||||
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from _typeshed import DataclassInstance # noqa: F401
|
||||
|
||||
__author__ = "@titom73"
|
||||
__email__ = "tom@inetsix.net"
|
||||
__date__ = "2022-03-16"
|
||||
|
@ -52,5 +57,5 @@ class EnhancedJSONEncoder(json.JSONEncoder):
|
|||
|
||||
def default(self, o: Any) -> Any:
|
||||
if dataclasses.is_dataclass(o):
|
||||
return dataclasses.asdict(o)
|
||||
return dataclasses.asdict(o) # type: ignore
|
||||
return super().default(o)
|
||||
|
|
|
@ -124,6 +124,7 @@ def eos(
|
|||
latest: bool = False,
|
||||
branch: Union[str, None] = None,
|
||||
) -> int:
|
||||
# pylint: disable=R0917
|
||||
"""Download EOS image from Arista website"""
|
||||
console = Console()
|
||||
# Get from Context
|
||||
|
|
|
@ -71,7 +71,7 @@ def eos_versions(
|
|||
latest: bool = False,
|
||||
verbose: bool = False,
|
||||
) -> None:
|
||||
# pylint: disable = too-many-branches
|
||||
# pylint: disable = too-many-branches, R0917
|
||||
"""
|
||||
List Available EOS version on Arista.com website.
|
||||
|
||||
|
|
|
@ -59,7 +59,7 @@ class ObjectDownloader:
|
|||
token: str,
|
||||
software: str = "EOS",
|
||||
hash_method: str = "md5sum",
|
||||
):
|
||||
): # pylint: disable=R0917
|
||||
"""
|
||||
__init__ Class constructor
|
||||
|
||||
|
|
3
pylintrc
3
pylintrc
|
@ -3,7 +3,8 @@ disable=
|
|||
invalid-name,
|
||||
logging-fstring-interpolation,
|
||||
fixme,
|
||||
line-too-long
|
||||
line-too-long,
|
||||
too-many-arguments
|
||||
|
||||
[BASIC]
|
||||
good-names=runCmds, i, y, t, c, x, e, fd, ip, v
|
||||
|
|
|
@ -6,7 +6,7 @@ build-backend = "setuptools.build_meta"
|
|||
|
||||
[project]
|
||||
name = "eos_downloader"
|
||||
version = "v0.10.2"
|
||||
version = "v0.10.3"
|
||||
readme = "README.md"
|
||||
authors = [{ name = "Thomas Grimonet", email = "thomas.grimonet@gmail.com" }]
|
||||
maintainers = [
|
||||
|
@ -27,8 +27,19 @@ dependencies = [
|
|||
"click>=8.1.6",
|
||||
"click-help-colors>=0.9",
|
||||
"pydantic>2.0.0",
|
||||
"urllib3>=2.2.2",
|
||||
]
|
||||
keywords = [
|
||||
"eos_downloader",
|
||||
"Arista",
|
||||
"eos",
|
||||
"cvp",
|
||||
"network",
|
||||
"automation",
|
||||
"networking",
|
||||
"devops",
|
||||
"netdevops",
|
||||
]
|
||||
keywords = ["eos_downloader", "Arista", "eos", "cvp", "network", "automation", "networking", "devops", "netdevops"]
|
||||
classifiers = [
|
||||
'Development Status :: 4 - Beta',
|
||||
'Intended Audience :: Developers',
|
||||
|
@ -51,7 +62,7 @@ requires-python = ">=3.8"
|
|||
|
||||
[project.optional-dependencies]
|
||||
dev = [
|
||||
"mypy==1.10.0",
|
||||
"mypy==1.13.0",
|
||||
"isort==5.13.2",
|
||||
"mypy-extensions>=0.4.3",
|
||||
"pre-commit>=2.20.0",
|
||||
|
@ -70,7 +81,7 @@ dev = [
|
|||
"yamllint",
|
||||
"flake8>=4.0.1",
|
||||
"pyflakes>=2.4.0",
|
||||
"bumpver>=2023.1126"
|
||||
"bumpver>=2023.1126",
|
||||
]
|
||||
|
||||
[project.urls]
|
||||
|
@ -94,7 +105,7 @@ namespaces = false
|
|||
# Version
|
||||
################################
|
||||
[tool.bumpver]
|
||||
current_version = "0.10.2"
|
||||
current_version = "0.10.3"
|
||||
version_pattern = "MAJOR.MINOR.PATCH"
|
||||
commit_message = "bump: Version {old_version} -> {new_version}"
|
||||
commit = true
|
||||
|
@ -107,9 +118,7 @@ push = false
|
|||
|
||||
# mypy as per https://pydantic-docs.helpmanual.io/mypy_plugin/#enabling-the-plugin
|
||||
[tool.mypy]
|
||||
plugins = [
|
||||
"pydantic.mypy",
|
||||
]
|
||||
plugins = ["pydantic.mypy"]
|
||||
follow_imports = "skip"
|
||||
ignore_missing_imports = true
|
||||
warn_redundant_casts = true
|
||||
|
@ -174,7 +183,7 @@ commands =
|
|||
description = check the code style
|
||||
commands =
|
||||
flake8 --max-line-length=165 --config=/dev/null eos_downloader
|
||||
pylint eos_downloader
|
||||
pylint --rcfile=pylintrc eos_downloader
|
||||
|
||||
[testenv:type]
|
||||
description = check typing
|
||||
|
|
Loading…
Add table
Reference in a new issue