Skip to content

Commit

Permalink
Release-v1.1.0 (#50)
Browse files Browse the repository at this point in the history
* Update Testing Name (#34)

renamed host

* Docs/Tests (#35)

* readme

* Refactoring testing to be consistent in local and CI env

Co-authored-by: Hugo Tinoco <[email protected]>

* Recreating (#37)

* Hasattr (#36)

* Sros integration (#38)

* Device Params (#42)

* Testing device-params

* changelog update

* README

* housekeeping

* actually, allowing flexibility and preference in extras

* collapse deviceparams

* coverage

* integration / unit 100 coverage

* warnings

* simplified, but same logic exists

* Bump paramiko from 2.9.2 to 2.9.3 (#43)

Bumps [paramiko](https://github.com/paramiko/paramiko) from 2.9.2 to 2.9.3.
- [Release notes](https://github.com/paramiko/paramiko/releases)
- [Changelog](https://github.com/paramiko/paramiko/blob/main/NEWS)
- [Commits](paramiko/paramiko@2.9.2...2.9.3)

---
updated-dependencies:
- dependency-name: paramiko
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump lxml from 4.7.1 to 4.9.1 (#41)

Bumps [lxml](https://github.com/lxml/lxml) from 4.7.1 to 4.9.1.
- [Release notes](https://github.com/lxml/lxml/releases)
- [Changelog](https://github.com/lxml/lxml/blob/master/CHANGES.txt)
- [Commits](lxml/lxml@lxml-4.7.1...lxml-4.9.1)

---
updated-dependencies:
- dependency-name: lxml
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* deps (#44)

* doc build on main only (#45)

* release v1.1.0 (#46)

* Revert "release v1.1.0 (#46)" (#48)

This reverts commit 4ff3d90.

* Feature/pipeline (#49)

* release v1.1.0

* branch name

* workflow

* changelog

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: Hugo Tinoco <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
  • Loading branch information
3 people authored Oct 7, 2022
1 parent fa99a65 commit 96964f3
Show file tree
Hide file tree
Showing 51 changed files with 895 additions and 1,207 deletions.
23 changes: 0 additions & 23 deletions .clab-topo-netconf.yaml

This file was deleted.

10 changes: 8 additions & 2 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -1,15 +1,21 @@
# .coveragerc to control coverage.py
[run]
branch = True
source = vip_tracker

[report]
show_missing = true
show_missing = True

exclude_lines =
__init__.py
if self.debug:
self.connection.close_session()
parameters["ssh_config"] = ssh_config_file
pragma: no cover
raise NotImplementedError
if __name__ == .__main__.:

omit =
nornir_netconf/__init__.py
tests/*

ignore_errors = True
69 changes: 62 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
---
name: "Nornir NETCONF"
name: "CI"

on:
push:
branches: [ "*" ]
branches: ["*"]
pull_request:
branches: [ "develop", "master" ]
branches: ["develop", "master"]

jobs:
linters:
Expand Down Expand Up @@ -41,17 +41,17 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [ '3.7', '3.8', '3.9', '3.10' ]
python-version: ["3.7", "3.8", "3.9", "3.10"]
steps:
- uses: actions/checkout@v2
- name: Setup python
uses: actions/setup-python@v1
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
architecture: x64

- name: Start containers
run: docker-compose up -d netconf1
- name: Start NETCONF Sysrepo container
run: docker-compose up -d netconf_sysrepo

- name: Install dependencies
run: |
Expand All @@ -66,3 +66,58 @@ jobs:
uses: codecov/codecov-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
publish_gh:
needs:
- "test"
name: "Publish to GitHub"
runs-on: "ubuntu-20.04"
if: "startsWith(github.ref, 'refs/tags/v')"
steps:
- name: "Check out repository code"
uses: "actions/checkout@v2"
- name: "Set up Python"
uses: "actions/setup-python@v2"
with:
python-version: "3.9"
- name: "Install Python Packages"
run: "pip install poetry"
- name: "Set env"
run: "echo RELEASE_VERSION=${GITHUB_REF:10} >> $GITHUB_ENV"
- name: "Run Poetry Version"
run: "poetry version $RELEASE_VERSION"
- name: "Run Poetry Build"
run: "poetry build"
- name: "Upload binaries to release"
uses: "svenstaro/upload-release-action@v2"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
file: "dist/*"
tag: "${{ github.ref }}"
overwrite: true
file_glob: true
publish_pypi:
needs:
- "test"
name: "Push Package to PyPI"
runs-on: "ubuntu-20.04"
if: "startsWith(github.ref, 'refs/tags/v')"
steps:
- name: "Check out repository code"
uses: "actions/checkout@v2"
- name: "Set up Python"
uses: "actions/setup-python@v2"
with:
python-version: "3.9"
- name: "Install Python Packages"
run: "pip install poetry"
- name: "Set env"
run: "echo RELEASE_VERSION=${GITHUB_REF:10} >> $GITHUB_ENV"
- name: "Run Poetry Version"
run: "poetry version $RELEASE_VERSION"
- name: "Run Poetry Build"
run: "poetry build"
- name: "Push to PyPI"
uses: "pypa/gh-action-pypi-publish@release/v1"
with:
user: "__token__"
password: "${{ secrets.PYPI_API_TOKEN }}"
7 changes: 2 additions & 5 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,7 @@ name: "Documentation"
on:
push:
branches:
- "develop"
pull_request:
branches:
- "develop"
- "master"

jobs:
documentation:
Expand All @@ -17,7 +14,7 @@ jobs:
- name: "Check out repository code"
uses: "actions/checkout@v2"
- name: "Setup environment"
uses: "networktocode/gh-action-setup-poetry-environment@v1"
uses: "networktocode/gh-action-setup-poetry-environment@v3"
- name: "Sphinx Build"
run: "poetry run sphinx-build -vvv -b html ./docs ./docs/public"
- name: "Deploy auto generated documentation to GH-Pages"
Expand Down
6 changes: 3 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ __pycache__/
# Testing
*.log
*.xml
tests/test_data/schema_path/

# C extensions
*.so
Expand Down Expand Up @@ -118,7 +117,8 @@ tests/stubs/*.pyi

# Docs
docs/README.md
docs/public/*

# containerlab
*.clab-topo-netconf.yaml
*clab-topo-netconf.yml/*
.clab-topo-netconf.yml.bak
clab-clab-topo-netconf.yml/
15 changes: 5 additions & 10 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,9 @@ FROM python:${PYTHON_VER} AS base

WORKDIR /usr/src/app

# Install poetry for dep management
RUN curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python -
ENV PATH="$PATH:/root/.poetry/bin"

# Enable this for testing with ^3.10.1
# RUN pip install cleo tomlkit poetry.core requests cachecontrol cachy html5lib pkginfo virtualenv lockfile
RUN pip install -U pip && \
curl -sSL https://install.python-poetry.org | python3 -
ENV PATH="/root/.local/bin:$PATH"

RUN poetry config virtualenvs.create false

Expand All @@ -22,8 +19,7 @@ RUN poetry install --no-root
FROM base AS test

COPY . .
# --no-root declares not to install the project package since we're wanting to take advantage of caching dependency installation
# and the project is copied in and installed after this step

RUN poetry install --no-interaction

# Runs all necessary linting and code checks
Expand All @@ -45,5 +41,4 @@ RUN echo 'Running Flake8' && \
# Run full test suite including integration
ENTRYPOINT ["pytest"]

CMD ["--cov=nornir_netconf", "--color=yes", "--disable-pytest-warnings", "--cov-report=xml", "-vvv"]

CMD ["--cov=nornir_netconf/", "tests/", "-vvv"]
Loading

0 comments on commit 96964f3

Please sign in to comment.