Skip to content

Commit

Permalink
Cookie updated by NetworkToCode Cookie Drift Manager Tool (#231)
Browse files Browse the repository at this point in the history
* Cookie updated by NetworkToCode Cookie Drift Manager Tool

Template:

```
{
    "template": "https://github.com/nautobot/cookiecutter-nautobot-app.git",
    "dir": "nautobot-app",
    "ref": "refs/tags/nautobot-app-v2.3.2",
    "path": null
}
```

Cookie:

```
{
    "remote": "https://github.com/nautobot/nautobot-app-device-onboarding.git",
    "path": "/tmp/tmpez7eu0wn/nautobot-app-device-onboarding",
    "repository_path": "/tmp/tmpez7eu0wn/nautobot-app-device-onboarding",
    "dir": "",
    "branch_prefix": "drift-manager",
    "context": {
        "codeowner_github_usernames": "@mzbroch @scetron @glennmatthews @chadell",
        "full_name": "Network to Code, LLC",
        "email": "[email protected]",
        "github_org": "nautobot",
        "app_name": "nautobot_device_onboarding",
        "verbose_name": "Device Onboarding",
        "app_slug": "nautobot-device-onboarding",
        "project_slug": "nautobot-app-device-onboarding",
        "repo_url": "https://github.com/nautobot/nautobot-app-device-onboarding",
        "base_url": "nautobot-device-onboarding",
        "min_nautobot_version": "2.0.3",
        "max_nautobot_version": "2.9999",
        "camel_name": "NautobotDeviceOnboarding",
        "project_short_description": "Device Onboarding",
        "model_class_name": "None",
        "open_source_license": "Apache-2.0",
        "docs_base_url": "https://docs.nautobot.com",
        "docs_app_url": "https://docs.nautobot.com/projects/device-onboarding/en/latest",
        "_template": "https://github.com/nautobot/cookiecutter-nautobot-app.git",
        "_output_dir": "/tmp/tmpez7eu0wn",
        "_repo_dir": "/github/home/.cookiecutters/cookiecutter-nautobot-app/nautobot-app",
        "_checkout": "refs/tags/nautobot-app-v2.3.2"
    },
    "base_branch": "develop",
    "remote_name": "origin",
    "pull_request_strategy": "PullRequestStrategy.CREATE",
    "post_actions": [
        "PostAction.BLACK"
    ],
    "baked_commit_ref": "32dbed28878e65887bfd9bd5601a0d4c5b5220e8",
    "draft": true
}
```

CLI Arguments:

```
{
    "cookie_dir": "",
    "input": false,
    "json_filename": "",
    "output_dir": "",
    "push": true,
    "template": "",
    "template_dir": "",
    "template_ref": "refs/tags/nautobot-app-v2.3.2",
    "pull_request": null,
    "post_action": [],
    "disable_post_actions": false,
    "draft": null
}
```

* fix drift manager

* changelog

* lockfile

* pylint

* fix ci

* disable mysql test

* Update invoke.example.yml

---------

Co-authored-by: bakebot <[email protected]>
Co-authored-by: Gary Snider <[email protected]>
  • Loading branch information
3 people committed Sep 12, 2024
1 parent d1c3aca commit fd8bb85
Show file tree
Hide file tree
Showing 11 changed files with 891 additions and 794 deletions.
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`.
21 changes: 12 additions & 9 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"
local: false
nautobot_ver: "2.2.3"
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",
"local": False,
Expand Down

0 comments on commit fd8bb85

Please sign in to comment.