Skip to content

Commit

Permalink
feat: eos_downloader v2 (#103)
Browse files Browse the repository at this point in the history
* START - Implement v2 code

* feat(models.version): Implement a generic pydantic SemVer Class

* cut: remove legacy code

* feat(eos_downloader.models): Implement model for data

* fix(eos_downloader.models): Update model for version management

* feat(eos_downloader.logics): Implement logics for Arista server

* feat(eos_downloader.exceptions): Create initial exceptions

* feat(eos_downloader.console): Implement initial console management

* feat(eos_downloader): Implement default module

* chore: Move legacy code to migrate

* fix(eos_downloader.logics): Implement generic querier for EOS and CVP

* fix(eos_downloader.models): Move structure to data and create custom types

* fix(eos_downloader): create docstring + module move

* tests(pytest): initial pytest implementation

* tests(pytest): Pytest for logics.arista_server

* fix(eos_downloader.models): Remove useless debug log

* fix(eos_downloader.logics): Implement exception catching for AristaXmlBase with offline XML

* tests(pytest): initial pytest implementation for AristaServer

* feat(eos_downloader.cli): Implement initial CLI for xml and querier

* fix(eos_downloader): Code refactoring

* tests(pytest): Update unit tests

* doc: Start Readme refactoring

* fix(eos_downloader.models): Remove reference to folder_level

* feat(eos_downloader.cli): Implement initial command to get mappings

* fix(eos_downloader): Code linting

* fix(eos_downloader): Code linting

* cut: Remove legacy code

* fix(eos_downloader): Code linting

* test(gh-actions): Drop python 3.8 support

* chore: Add data source for pytest

* doc(eos_downloader.models.version): Update module docstring

* feat(eos_downloader.cli): Implement consistent Rich console

* feat(eos_downloader.cli): Implement logging managment & console rendering

* fix(eos_downloader): Implement basic logging policy in modules

* fix(eos_downloader.cli): Fix a typing error for AristaMapping

* chore(vscode): Add debugger for Python with VScode running CLI

* feat(eos_downloader.cli): Implement entrypoint to run ardl using python module

* feat(eos_downloader.cli): Implement ardl get eos with docker integration

* doc: Update readme

* fix(eos_downloader.cli): code typing

* make: refactor bumpver

* make: refactor bumpver

* bump: Version 0.10.3 -> 0.11.0dev0

* make: Update ignore file to exclude .envrc

* chore: Update python debugging with vscode

* doc: Update generic documentation

* feat(eos_downloader): Implement cvp endpoint to download CVP images

* doc: Add info about development branch

* doc: Fix incorrect Admonition

* cut: cEOS-lab-4.33.0F.tar.xz.md5sum

* test: Add basic unit tests for cli

* test: Add basic unit tests for eos-downloader.logics.download
  • Loading branch information
titom73 authored Dec 12, 2024
1 parent 7ecc421 commit fe4bc4f
Show file tree
Hide file tree
Showing 49 changed files with 22,242 additions and 2,221 deletions.
2 changes: 1 addition & 1 deletion .coveragerc
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ directory = tests/htmlcov
addopts = --cov=eos_downloader --cov-report html

[run]
omit = tests/*
omit = tests/*, eos_downloader/cli
25 changes: 20 additions & 5 deletions .github/release.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,22 +17,37 @@ It is configured to update:
* pyproject.toml

For instance to bump a patch version:
```
bumpver update --patch

```bash
bumpver update --patch --tag final
```

and for a minor version

```
bumpver update --minor
```bash
bumpver update --minor --tag final
```

Tip: It is possible to check what the changes would be using `--dry`

```bash
bumpver update --minor --tag final --dry
```
bumpver update --minor --dry

For a development version, you can use the following:

```bash
bumpver update --minor --tag dev --tagnum --dry
```

The following tag should be used:

- `dev`: for internal testing
- `rc`: for release candidate testing

> ![INFORMATION]
> This tags are not released to pypi and are only available via git installation.
## Creating release on Github

Create the release on Github with the appropriate tag `vx.x.x`
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/pr-management.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11"]
python-version: ["3.9", "3.10", "3.11"]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
Expand All @@ -27,7 +27,7 @@ jobs:
needs: [pre-commit]
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11"]
python-version: ["3.9", "3.10", "3.11"]

steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -55,7 +55,7 @@ jobs:

strategy:
matrix:
python: ["3.8", "3.9", "3.10", "3.11"]
python: ["3.9", "3.10", "3.11"]

steps:
- uses: actions/checkout@v4
Expand All @@ -78,7 +78,7 @@ jobs:

strategy:
matrix:
python: ["3.8", "3.9", "3.10", "3.11"]
python: ["3.9", "3.10", "3.11"]

steps:
- uses: actions/checkout@v4
Expand All @@ -101,7 +101,7 @@ jobs:

strategy:
matrix:
python: ["3.8", "3.9", "3.10", "3.11"]
python: ["3.9", "3.10", "3.11"]

steps:
- uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: "Tag & Release management"
on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+' # Push events to matching v*, i.e. v1.0, v20.15.10
- 'v[0-9]+.[0-9]+.[0-9]+$' # Push events to matching v*, i.e. v1.0, v20.15.10
jobs:
pypi:
name: Publish version to Pypi servers
Expand Down
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -346,4 +346,8 @@ report.html
*.swp
arista.xml
tester.py
*.tgz
*.tgz

eos_downloader/debug.py
data.xml
.envrc
51 changes: 51 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Python ARDL GET EOS",
"type": "debugpy",
"console": "integratedTerminal",
"request": "launch",
"module": "eos_downloader.cli",
"args": [
// "ardl",
"--log",
"debug",
"--debug-enabled",
"get",
"eos",
"--version",
"4.33.0F",
"--format",
"cEOS",
"--dry-run"
],
"envFile": "${workspaceFolder}/.envrc",
"justMyCode": false
},
{
"name": "Python ARDL GET CVP",
"type": "debugpy",
"console": "integratedTerminal",
"request": "launch",
"module": "eos_downloader.cli",
"args": [
// "ardl",
"--log",
"debug",
"--debug-enabled",
"get",
"cvp",
"--latest",
"--format",
"upgrade",
"--dry-run"
],
"envFile": "${workspaceFolder}/.envrc",
"justMyCode": false
}
]
}
Loading

0 comments on commit fe4bc4f

Please sign in to comment.