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

Cookie updated by NetworkToCode Cookie Drift Manager Tool #231

Merged
merged 9 commits into from
Sep 12, 2024
Merged
Show file tree
Hide file tree
Changes from 8 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
4 changes: 2 additions & 2 deletions .cookiecutter.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,15 @@
"_drift_manager": {
"template": "https://github.com/nautobot/cookiecutter-nautobot-app.git",
"template_dir": "nautobot-app",
"template_ref": "refs/tags/nautobot-app-v2.3.0",
"template_ref": "refs/tags/nautobot-app-v2.3.2",
"cookie_dir": "",
"branch_prefix": "drift-manager",
"pull_request_strategy": "create",
"post_actions": [
"black"
],
"draft": true,
"baked_commit_ref": "32dbed28878e65887bfd9bd5601a0d4c5b5220e8"
"baked_commit_ref": "56195cad1cb296db964271e2ee9bf643e3d4404b"
}
}
}
8 changes: 4 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -127,14 +127,14 @@ jobs:
strategy:
fail-fast: true
matrix:
python-version: ["3.8", "3.11"]
python-version: ["3.8", "3.12"]
db-backend: ["postgresql"]
nautobot-version: ["stable"]
include:
- python-version: "3.11"
db-backend: "postgresql"
nautobot-version: "2.2.3"
# - python-version: "3.11"
# - python-version: "3.12"
# db-backend: "mysql"
# nautobot-version: "stable"
runs-on: "ubuntu-22.04"
Expand Down Expand Up @@ -205,7 +205,7 @@ jobs:
- name: "Set up Python"
uses: "actions/setup-python@v5"
with:
python-version: "3.11"
python-version: "3.12"
- name: "Install Python Packages"
run: "pip install poetry"
- name: "Set env"
Expand Down Expand Up @@ -240,7 +240,7 @@ jobs:
- name: "Set up Python"
uses: "actions/setup-python@v5"
with:
python-version: "3.11"
python-version: "3.12"
- name: "Install Python Packages"
run: "pip install poetry"
- name: "Set env"
Expand Down
1 change: 1 addition & 0 deletions changes/231.added
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Added Python 3.12 support.
1 change: 1 addition & 0 deletions changes/231.housekeeping
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Rebaked from the cookie `nautobot-app-v2.3.2`.
19 changes: 11 additions & 8 deletions invoke.example.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
---
nautobot_device_onboarding:
project_name: "nautobot-device-onboarding"
nautobot_ver: "2.0.3"
gsnider2195 marked this conversation as resolved.
Show resolved Hide resolved
local: false
python_ver: "3.11"
compose_dir: "development"
compose_files:
- "docker-compose.base.yml"
- "docker-compose.redis.yml"
- "docker-compose.postgres.yml"
- "docker-compose.dev.yml"
# local: false
# compose_dir: "/full/path/to/nautobot-app-device-onboarding/development"

# The following is an example of using MySQL as the database backend
# ---
# nautobot_device_onboarding:
# compose_files:
# - "docker-compose.base.yml"
# - "docker-compose.redis.yml"
# - "docker-compose.mysql.yml"
# - "docker-compose.dev.yml"
2 changes: 1 addition & 1 deletion mkdocs.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
dev_addr: "127.0.0.1:8001"
edit_uri: "edit/main/nautobot-app-device-onboarding/docs"
edit_uri: "edit/main/docs"
site_dir: "nautobot_device_onboarding/static/nautobot_device_onboarding/docs"
site_name: "Device Onboarding Documentation"
site_url: "https://docs.nautobot.com/projects/device-onboarding/en/latest/"
Expand Down
4 changes: 2 additions & 2 deletions nautobot_device_onboarding/jobs.py
Original file line number Diff line number Diff line change
Expand Up @@ -632,9 +632,9 @@ def run(
if self.debug:
self.logger.debug("Checking for last_network_data_sync custom field")
try:
cf = CustomField.objects.get(key="last_network_data_sync")
cf = CustomField.objects.get(key="last_network_data_sync") # pylint:disable=invalid-name
except ObjectDoesNotExist:
cf, _ = CustomField.objects.get_or_create(
cf, _ = CustomField.objects.get_or_create( # pylint:disable=invalid-name
label="Last Network Data Sync",
key="last_network_data_sync",
type=CustomFieldTypeChoices.TYPE_DATE,
Expand Down
2 changes: 1 addition & 1 deletion nautobot_device_onboarding/tests/test_transform.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def populate_repo(self, path, url, *args, **kwargs):
"""Simple helper to populate a mock repo with some data."""
os.makedirs(path, exist_ok=True)
os.makedirs(os.path.join(path, "onboarding_command_mappers"), exist_ok=True)
with open(os.path.join(path, "onboarding_command_mappers", "foo_bar.yml"), "w", encoding="utf-8") as fd:
with open(os.path.join(path, "onboarding_command_mappers", "foo_bar.yml"), "w", encoding="utf-8") as fd: # pylint:disable=invalid-name
yaml.dump(
{
"sync_devices": {
Expand Down
1,617 changes: 854 additions & 763 deletions poetry.lock

Large diffs are not rendered by default.

23 changes: 12 additions & 11 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ classifiers = [
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
]
packages = [
{ include = "nautobot_device_onboarding" },
Expand All @@ -26,7 +27,7 @@ include = [
]

[tool.poetry.dependencies]
python = ">=3.8,<3.12"
python = ">=3.8,<3.13"
napalm = ">=2.5.0, <5"
zipp = "^3.4.0"
nautobot = "^2.2.3"
Expand Down Expand Up @@ -67,12 +68,12 @@ all = [

[tool.pylint.master]
# Include the pylint_django plugin to avoid spurious warnings about Django patterns
load-plugins="pylint_django, pylint_nautobot"
ignore=".venv"
load-plugins = "pylint_django, pylint_nautobot"
ignore = ".venv"

[tool.pylint.basic]
# No docstrings required for private methods (Pylint default), or for test_ functions, or for inner Meta classes.
no-docstring-rgx="^(_|test_|Meta$)"
no-docstring-rgx = "^(_|test_|Meta$)"

[tool.pylint.messages_control]
disable = """,
Expand Down Expand Up @@ -117,21 +118,21 @@ select = [
]
ignore = [
# warning: `one-blank-line-before-class` (D203) and `no-blank-line-before-class` (D211) are incompatible.
"D203", # 1 blank line required before class docstring
"D203", # 1 blank line required before class docstring

# D212 is enabled by default in google convention, and complains if we have a docstring like:
# """
# My docstring is on the line after the opening quotes instead of on the same line as them.
# """
# We've discussed and concluded that we consider this to be a valid style choice.
"D212", # Multi-line docstring summary should start at the first line
"D213", # Multi-line docstring summary should start at the second line
"D212", # Multi-line docstring summary should start at the first line
"D213", # Multi-line docstring summary should start at the second line

# Produces a lot of issues in the current codebase.
"D401", # First line of docstring should be in imperative mood
"D407", # Missing dashed underline after section
"D416", # Section name ends in colon
"E501", # Line too long
"D401", # First line of docstring should be in imperative mood
"D407", # Missing dashed underline after section
"D416", # Section name ends in colon
"E501", # Line too long
]

[tool.ruff.lint.pydocstyle]
Expand Down
2 changes: 1 addition & 1 deletion tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def is_truthy(arg):
namespace.configure(
{
"nautobot_device_onboarding": {
"nautobot_ver": "2.2.3",
"nautobot_ver": "2.3.1",
"project_name": "nautobot-device-onboarding",
"python_ver": "3.11",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

3.12 instead?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We're leaving that at 3.11 until we can get better compatibility with 3.12. For now, we at least need all the apps to be released showing support for 3.12

"local": False,
Expand Down