summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.github/workflows/on_demand.yml4
-rw-r--r--.github/workflows/pr-management.yml2
-rw-r--r--.github/workflows/release.yml37
-rw-r--r--README.md4
-rw-r--r--eos_downloader/__init__.py7
-rw-r--r--eos_downloader/cli/get/commands.py1
-rw-r--r--eos_downloader/cli/info/commands.py2
-rw-r--r--eos_downloader/object_downloader.py2
-rw-r--r--pylintrc3
-rw-r--r--pyproject.toml29
10 files changed, 45 insertions, 46 deletions
diff --git a/.github/workflows/on_demand.yml b/.github/workflows/on_demand.yml
index 17223f9..09c3340 100644
--- a/.github/workflows/on_demand.yml
+++ b/.github/workflows/on_demand.yml
@@ -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
diff --git a/.github/workflows/pr-management.yml b/.github/workflows/pr-management.yml
index 814bb39..201c494 100644
--- a/.github/workflows/pr-management.yml
+++ b/.github/workflows/pr-management.yml
@@ -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
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index e148e6b..6cf8d44 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -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
diff --git a/README.md b/README.md
index 0809624..1f6b46e 100644
--- a/README.md
+++ b/README.md
@@ -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
```
diff --git a/eos_downloader/__init__.py b/eos_downloader/__init__.py
index 4507a70..c5db979 100644
--- a/eos_downloader/__init__.py
+++ b/eos_downloader/__init__.py
@@ -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)
diff --git a/eos_downloader/cli/get/commands.py b/eos_downloader/cli/get/commands.py
index 498473a..a622629 100644
--- a/eos_downloader/cli/get/commands.py
+++ b/eos_downloader/cli/get/commands.py
@@ -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
diff --git a/eos_downloader/cli/info/commands.py b/eos_downloader/cli/info/commands.py
index 64097a1..f64ff5d 100644
--- a/eos_downloader/cli/info/commands.py
+++ b/eos_downloader/cli/info/commands.py
@@ -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.
diff --git a/eos_downloader/object_downloader.py b/eos_downloader/object_downloader.py
index 3a22312..e62fa88 100644
--- a/eos_downloader/object_downloader.py
+++ b/eos_downloader/object_downloader.py
@@ -59,7 +59,7 @@ class ObjectDownloader:
token: str,
software: str = "EOS",
hash_method: str = "md5sum",
- ):
+ ): # pylint: disable=R0917
"""
__init__ Class constructor
diff --git a/pylintrc b/pylintrc
index dd7dfff..be2973c 100644
--- a/pylintrc
+++ b/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
diff --git a/pyproject.toml b/pyproject.toml
index fbd2982..0f48a06 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -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,9 +105,9 @@ 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_message = "bump: Version {old_version} -> {new_version}"
commit = true
# No tag
tag = false
@@ -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