Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release 3.0 #35

Merged
merged 1 commit into from
Jan 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ jobs:
strategy:
fail-fast: true
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10"]
python-version: ["3.8", "3.11"]
runs-on: "ubuntu-20.04"
env:
PYTHON_VER: "${{ matrix.python-version }}"
Expand Down Expand Up @@ -120,7 +120,7 @@ jobs:
strategy:
fail-fast: true
matrix:
python-version: ["3.7"]
python-version: ["3.8"]
env:
PYTHON_VER: "${{ matrix.python-version }}"
steps:
Expand Down Expand Up @@ -156,7 +156,7 @@ jobs:
strategy:
fail-fast: true
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10"]
python-version: ["3.8", "3.11"]
runs-on: "ubuntu-20.04"
env:
PYTHON_VER: "${{ matrix.python-version }}"
Expand Down
18 changes: 16 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,22 @@ ARG PYTHON_VER

FROM python:${PYTHON_VER}-slim

RUN pip install --upgrade pip \
&& pip install poetry
RUN apt-get update && \
apt-get upgrade -y && \
apt-get install --no-install-recommends -y curl gcc python3-dev && \
apt-get autoremove -y && \
apt-get clean all && \
rm -rf /var/lib/apt/lists/* && \
pip --no-cache-dir install --upgrade pip wheel

RUN pip install --upgrade pip

RUN curl -sSL https://install.python-poetry.org -o /tmp/install-poetry.py && \
python /tmp/install-poetry.py --version 1.6.0 && \
rm -f /tmp/install-poetry.py

# Add poetry install location to the $PATH
ENV PATH="${PATH}:/root/.local/bin"

WORKDIR /local
COPY pyproject.toml poetry.lock /local/
Expand Down
13 changes: 13 additions & 0 deletions docs/admin/release_notes/version_3_0.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# v3.0.0 Release Notes

## [3.0.0] 01-2024

### Changed

- Updated `pyntc` dependency to 2.0.0, which contains updates related to changes in netmiko 4.0. In short `delay_factor` was deprecated in favor of `read_timeout`.

Refer to this blog post for more info about changes in netmiko 4.0: https://pynet.twb-tech.com/blog/netmiko-read-timeout.html

### Removed

- Dropped support for python3.7
1 change: 1 addition & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ nav:
- "admin/release_notes/index.md"
- v1.0.0: "admin/release_notes/version_1_0.md"
- v2.0.0: "admin/release_notes/version_2_0.md"
- v3.0.0: "admin/release_notes/version_3_0.md"
- Developer Guide:
- Extending the Library: "dev/extending.md"
- Contributing to the Library: "dev/contributing.md"
Expand Down
8 changes: 1 addition & 7 deletions nornir_pyntc/__init__.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
"""Initialize Connection and Tasks."""

try:
from importlib import metadata # type: ignore[attr-defined]
except ImportError:
# Python version < 3.8
import importlib_metadata as metadata # type: ignore[no-redef]

from importlib import metadata
from nornir_pyntc.connections import CONNECTION_NAME, Pyntc
from nornir_pyntc.tasks import pyntc_config, pyntc_file_copy, pyntc_install_os, pyntc_reboot, pyntc_save, pyntc_show

Expand Down
2,307 changes: 1,108 additions & 1,199 deletions poetry.lock

Large diffs are not rendered by default.

11 changes: 5 additions & 6 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "nornir-pyntc"
version = "2.0.0"
version = "3.0.0"
description = "pyntc plugin for Nornir"
authors = ["Network to Code, LLC <[email protected]>"]
license = "Apache-2.0"
Expand All @@ -11,8 +11,8 @@ repository = "https://github.com/networktocode-llc/nornir_pyntc"
"pyntc" = "nornir_pyntc.connections:Pyntc"

[tool.poetry.dependencies]
python = "^3.7"
pyntc = "^1.0.0"
python = "^3.8"
pyntc = "^2.0.0"
nornir = "^3.2.0"

[tool.poetry.dev-dependencies]
Expand All @@ -39,7 +39,7 @@ mkdocs-version-annotations = "1.0.0"
nornir_pyntc = 'nornir_pyntc.cli:main'

[tool.mypy]
python_version = 3.7
python_version = 3.8
ignore_errors = false
disallow_untyped_calls = true
disallow_untyped_defs = true
Expand All @@ -62,7 +62,7 @@ show_error_codes = true

[tool.black]
line-length = 120
target-version = ['py37']
target-version = ['py38']
include = '\.pyi?$'
exclude = '''
(
Expand Down Expand Up @@ -92,7 +92,6 @@ no-docstring-rgx="^(_|test_|Meta$)"
# Pylint and Black disagree about how to format multi-line arrays; Black wins.
disable = """,
line-too-long,
bad-continuation,
duplicate-code,
"""

Expand Down
2 changes: 1 addition & 1 deletion tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def is_truthy(arg):
TOOL_CONFIG = PYPROJECT_CONFIG["tool"]["poetry"]

# Can be set to a separate Python version to be used for launching or building image
PYTHON_VER = os.getenv("PYTHON_VER", "3.7")
PYTHON_VER = os.getenv("PYTHON_VER", "3.8")
# Name of the docker image/image
IMAGE_NAME = os.getenv("IMAGE_NAME", TOOL_CONFIG["name"])
# Tag for the image
Expand Down
Loading