Skip to content

Commit

Permalink
Cookie updated by NetworkToCode Cookie Drift Manager Tool (#219)
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.0",
    "path": null
}
```

Cookie:

```
{
    "remote": "https://github.com/nautobot/nautobot-app-bgp-models.git",
    "path": "/tmp/tmpayznd8h6/nautobot-app-bgp-models",
    "repository_path": "/tmp/tmpayznd8h6/nautobot-app-bgp-models",
    "dir": "",
    "branch_prefix": "drift-manager",
    "context": {
        "codeowner_github_usernames": "@glennmatthews @mzbroch",
        "full_name": "Network to Code, LLC",
        "email": "opensource@networktocode.com",
        "github_org": "nautobot",
        "app_name": "nautobot_bgp_models",
        "verbose_name": "BGP Models",
        "app_slug": "nautobot-bgp-models",
        "project_slug": "nautobot-app-bgp-models",
        "repo_url": "https://github.com/nautobot/nautobot-app-bgp-models",
        "base_url": "bgp",
        "min_nautobot_version": "2.0.3",
        "max_nautobot_version": "2.9999",
        "camel_name": "NautobotBGPModels",
        "project_short_description": "Nautobot BGP Models App",
        "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/bgp-models/en/latest",
        "_template": "https://github.com/nautobot/cookiecutter-nautobot-app.git",
        "_output_dir": "/tmp/tmpayznd8h6",
        "_repo_dir": "/github/home/.cookiecutters/cookiecutter-nautobot-app/nautobot-app",
        "_checkout": "refs/tags/nautobot-app-v2.3.0"
    },
    "base_branch": "develop",
    "remote_name": "origin",
    "pull_request_strategy": "PullRequestStrategy.CREATE",
    "post_actions": [
        "PostAction.BLACK"
    ],
    "baked_commit_ref": "e768e8f62f6900e8c0dd71f74bbaa727d6dd0975",
    "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.0",
    "pull_request": null,
    "post_action": [],
    "disable_post_actions": false,
    "draft": null
}
```

* ruff

* lockfile

* changelog

* fix pylint

* update changelog

---------

Co-authored-by: bakebot <info@networktocode.com>
Co-authored-by: Gary Snider <75227981+gsnider2195@users.noreply.github.com>
  • Loading branch information
3 people authored Aug 14, 2024
1 parent c368f1c commit c32ba54
Show file tree
Hide file tree
Showing 44 changed files with 191 additions and 341 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": "nautobot-app-v2.2.1",
"template_ref": "refs/tags/nautobot-app-v2.3.0",
"cookie_dir": "",
"branch_prefix": "drift-manager",
"pull_request_strategy": "create",
"post_actions": [
"black"
],
"draft": true,
"baked_commit_ref": "e768e8f62f6900e8c0dd71f74bbaa727d6dd0975"
"baked_commit_ref": "4b1f3816c64fee0927383bc3fc34e08c0c9acb5b"
}
}
}
1 change: 0 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ FAQ.md
.git/
.gitignore
.github
tasks.py
LICENSE
**/*.log
**/.vscode/
Expand Down
24 changes: 6 additions & 18 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ env:
APP_NAME: "nautobot-app-bgp-models"

jobs:
black:
ruff-format:
runs-on: "ubuntu-22.04"
env:
INVOKE_NAUTOBOT_BGP_MODELS_LOCAL: "True"
Expand All @@ -25,8 +25,8 @@ jobs:
uses: "actions/checkout@v4"
- name: "Setup environment"
uses: "networktocode/gh-action-setup-poetry-environment@v6"
- name: "Linting: black"
run: "poetry run invoke black"
- name: "Linting: ruff format"
run: "poetry run invoke ruff --action format"
bandit:
runs-on: "ubuntu-22.04"
env:
Expand All @@ -38,7 +38,7 @@ jobs:
uses: "networktocode/gh-action-setup-poetry-environment@v6"
- name: "Linting: bandit"
run: "poetry run invoke bandit"
ruff:
ruff-lint:
runs-on: "ubuntu-22.04"
env:
INVOKE_NAUTOBOT_BGP_MODELS_LOCAL: "True"
Expand All @@ -60,17 +60,6 @@ jobs:
uses: "networktocode/gh-action-setup-poetry-environment@v6"
- name: "Check Docs Build"
run: "poetry run invoke build-and-check-docs"
flake8:
runs-on: "ubuntu-22.04"
env:
INVOKE_NAUTOBOT_BGP_MODELS_LOCAL: "True"
steps:
- name: "Check out repository code"
uses: "actions/checkout@v4"
- name: "Setup environment"
uses: "networktocode/gh-action-setup-poetry-environment@v6"
- name: "Linting: flake8"
run: "poetry run invoke flake8"
poetry:
runs-on: "ubuntu-22.04"
env:
Expand All @@ -96,11 +85,10 @@ jobs:
check-in-docker:
needs:
- "bandit"
- "ruff"
- "flake8"
- "ruff-format"
- "ruff-lint"
- "poetry"
- "yamllint"
- "black"
runs-on: "ubuntu-22.04"
strategy:
fail-fast: true
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<a href="https://pypi.org/project/nautobot-bgp-models/"><img src="https://img.shields.io/pypi/v/nautobot-bgp-models"></a>
<a href="https://pypi.org/project/nautobot-bgp-models/"><img src="https://img.shields.io/pypi/dm/nautobot-bgp-models"></a>
<br>
An <a href="https://www.networktocode.com/nautobot/apps/">App</a> for <a href="https://nautobot.com/">Nautobot</a>.
An <a href="https://networktocode.com/nautobot-apps/">App</a> for <a href="https://nautobot.com/">Nautobot</a>.
</p>

## Overview
Expand Down
1 change: 1 addition & 0 deletions changes/219.housekeeping
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Rebaked from the cookie `nautobot-app-v2.3.0`.
1 change: 0 additions & 1 deletion development/docker-compose.base.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ x-nautobot-base: &nautobot-base
- "creds.env"
tty: true

version: "3.8"
services:
nautobot:
depends_on:
Expand Down
1 change: 0 additions & 1 deletion development/docker-compose.dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
# any override will need to include these volumes to use them.
# see: https://github.com/docker/compose/issues/3729
---
version: "3.8"
services:
nautobot:
command: "nautobot-server runserver 0.0.0.0:8080"
Expand Down
2 changes: 0 additions & 2 deletions development/docker-compose.mysql.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
---
version: "3.8"

services:
nautobot:
environment:
Expand Down
2 changes: 0 additions & 2 deletions development/docker-compose.postgres.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
---
version: "3.8"

services:
nautobot:
environment:
Expand Down
1 change: 0 additions & 1 deletion development/docker-compose.redis.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
---
version: "3.8"
services:
redis:
image: "redis:6-alpine"
Expand Down
7 changes: 4 additions & 3 deletions development/nautobot_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
# Debug
#

DEBUG = is_truthy(os.getenv("NAUTOBOT_DEBUG", False))
DEBUG = is_truthy(os.getenv("NAUTOBOT_DEBUG", "false"))
_TESTING = len(sys.argv) > 1 and sys.argv[1] == "test"

if DEBUG and not _TESTING:
Expand Down Expand Up @@ -48,9 +48,10 @@
"PASSWORD": os.getenv("NAUTOBOT_DB_PASSWORD", ""), # Database password
"HOST": os.getenv("NAUTOBOT_DB_HOST", "localhost"), # Database server
"PORT": os.getenv(
"NAUTOBOT_DB_PORT", default_db_settings[nautobot_db_engine]["NAUTOBOT_DB_PORT"]
"NAUTOBOT_DB_PORT",
default_db_settings[nautobot_db_engine]["NAUTOBOT_DB_PORT"],
), # Database port, default to postgres
"CONN_MAX_AGE": int(os.getenv("NAUTOBOT_DB_TIMEOUT", 300)), # Database timeout
"CONN_MAX_AGE": int(os.getenv("NAUTOBOT_DB_TIMEOUT", "300")), # Database timeout
"ENGINE": nautobot_db_engine,
}
}
Expand Down
2 changes: 1 addition & 1 deletion docs/assets/extra.css
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ a.autorefs-external:hover::after {
}


/* Customization for mkdocs-version-annotations */
/* Customization for markdown-version-annotations */
:root {
/* Icon for "version-added" admonition: Material Design Icons "plus-box-outline" */
--md-admonition-icon--version-added: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M19 19V5H5v14h14m0-16a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h14m-8 4h2v4h4v2h-4v4h-2v-4H7v-2h4V7Z"/></svg>');
Expand Down
2 changes: 1 addition & 1 deletion docs/dev/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ The project is packaged with a light [development environment](dev_environment.m

The project is following Network to Code software development guidelines and is leveraging the following:

- Python linting and formatting: `black`, `pylint`, `bandit`, `flake8`, and `ruff`.
- Python linting and formatting: `pylint`, `bandit`, and `ruff`.
- YAML linting is done with `yamllint`.
- Django unit test to ensure the app is working properly.

Expand Down
8 changes: 2 additions & 6 deletions docs/dev/dev_environment.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,9 +124,7 @@ Each command can be executed with `invoke <command>`. All commands support the a

```
bandit Run bandit to validate basic static code security analysis.
black Run black to check that Python files adhere to its style standards.
flake8 Run flake8 to check that Python files adhere to its style standards.
ruff Run ruff to validate docstring formatting adheres to NTC defined standards.
ruff Run ruff to perform code formatting and/or linting.
pylint Run pylint code analysis.
tests Run all tests for this app.
unittest Run Django unit tests for the app.
Expand Down Expand Up @@ -454,7 +452,7 @@ This is the same as running:

### Tests

To run tests against your code, you can run all of the tests that TravisCI runs against any new PR with:
To run tests against your code, you can run all of the tests that the CI runs against any new PR with:

```bash
➜ invoke tests
Expand All @@ -465,8 +463,6 @@ To run an individual test, you can run any or all of the following:
```bash
➜ invoke unittest
➜ invoke bandit
➜ invoke black
➜ invoke flake8
➜ invoke ruff
➜ invoke pylint
```
Expand Down
2 changes: 1 addition & 1 deletion docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
mkdocs==1.5.2
mkdocs-material==9.1.15
mkdocs-version-annotations==1.0.0
markdown-version-annotations==1.0.1
mkdocstrings-python==1.5.2
mkdocstrings==0.22.0
3 changes: 2 additions & 1 deletion mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ extra:
link: "https://twitter.com/networktocode"
name: "Network to Code Twitter"
markdown_extensions:
- "markdown_version_annotations":
admonition_tag: "???"
- "admonition"
- "toc":
permalink: true
Expand All @@ -89,7 +91,6 @@ markdown_extensions:
- "footnotes"
plugins:
- "search"
- "mkdocs-version-annotations"
- "mkdocstrings":
default_handler: "python"
handlers:
Expand Down
3 changes: 1 addition & 2 deletions nautobot_bgp_models/api/serializers.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
"""REST API serializers for nautobot_bgp_models models."""

from rest_framework import serializers, validators

from nautobot.apps.api import (
NautobotModelSerializer,
TaggedModelSerializerMixin,
)
from nautobot.core.settings_funcs import is_truthy
from rest_framework import serializers, validators

from nautobot_bgp_models import models

Expand Down
6 changes: 3 additions & 3 deletions nautobot_bgp_models/api/views.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
"""REST API viewsets for nautobot_bgp_models."""

from drf_spectacular.types import OpenApiTypes
from drf_spectacular.utils import extend_schema, OpenApiParameter
from drf_spectacular.utils import OpenApiParameter, extend_schema
from nautobot.apps.api import NautobotModelViewSet
from rest_framework.filters import OrderingFilter

from nautobot_bgp_models import filters
from nautobot_bgp_models import models
from nautobot_bgp_models import filters, models
from nautobot_bgp_models.api.filter_backends import IncludeInheritedFilterBackend

from . import serializers


Expand Down
1 change: 0 additions & 1 deletion nautobot_bgp_models/filter_extensions.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
"""Filter Extensions definitions for nautobot_bgp_models."""

from django import forms

from nautobot.apps.filters import FilterExtension, MultiValueCharFilter


Expand Down
10 changes: 4 additions & 6 deletions nautobot_bgp_models/filters.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,17 @@
"""FilterSet definitions for nautobot_bgp_models."""

import django_filters

from django.db.models import Q

from nautobot.dcim.models import Device
from nautobot.apps.filters import (
StatusModelFilterSetMixin,
BaseFilterSet,
CreatedUpdatedModelFilterSetMixin,
CustomFieldModelFilterSetMixin,
StatusModelFilterSetMixin,
)
from nautobot.dcim.models import Device
from nautobot.extras.filters.mixins import RoleModelFilterSetMixin
from nautobot.ipam.models import VRF
from nautobot.apps.filters import BaseFilterSet
from nautobot.extras.models import Role
from nautobot.ipam.models import VRF

from . import choices, models

Expand Down
13 changes: 6 additions & 7 deletions nautobot_bgp_models/forms.py
Original file line number Diff line number Diff line change
@@ -1,20 +1,19 @@
"""Forms and FilterForms for nautobot_bgp_models."""

from django import forms

import nautobot.core.forms as utilities_forms
from django import forms
from nautobot.apps.forms import (
DynamicModelMultipleChoiceField,
DynamicModelChoiceField,
NautobotModelForm,
DynamicModelMultipleChoiceField,
NautobotBulkEditForm,
NautobotModelForm,
TagFilterField,
TagsBulkEditFormMixin,
)
from nautobot.circuits.models import Provider
from nautobot.dcim.models import Device, Interface
from nautobot.extras.forms import NautobotFilterForm, RoleModelFilterFormMixin
from nautobot.extras.models import Tag, Secret, Role
from nautobot.extras.models import Role, Secret, Tag
from nautobot.ipam.models import VRF, IPAddress
from nautobot.tenancy.models import Tenant

Expand Down Expand Up @@ -335,7 +334,7 @@ class PeerGroupFilterForm(NautobotFilterForm, RoleModelFilterFormMixin):
class PeerGroupTemplateFilterForm(NautobotFilterForm, RoleModelFilterFormMixin):
"""Form for filtering PeerGroupTemplate records in combination with PeerGroupTemplateFilterSet."""

model = models.PeerGroup
model = models.PeerGroupTemplate

q = forms.CharField(required=False, label="Search")

Expand Down Expand Up @@ -621,7 +620,7 @@ class PeerEndpointAddressFamilyForm(NautobotModelForm):
multipath = forms.NullBooleanField(required=False, widget=utilities_forms.BulkEditNullBooleanSelect())

class Meta:
model = models.PeerGroupAddressFamily
model = models.PeerEndpointAddressFamily
fields = (
"peer_endpoint",
"afi_safi",
Expand Down
2 changes: 1 addition & 1 deletion nautobot_bgp_models/migrations/0001_initial.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
import uuid

import django.core.serializers.json
from django.db import migrations, models
import django.db.models.deletion
import nautobot.core.models.fields
import nautobot.dcim.fields
import nautobot.extras.models.mixins
import nautobot.extras.models.statuses
import taggit.managers
from django.db import migrations, models


class Migration(migrations.Migration):
Expand Down
2 changes: 1 addition & 1 deletion nautobot_bgp_models/migrations/0002_viewsets_migration.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# pylint: disable=missing-module-docstring,missing-function-docstring,missing-class-docstring,invalid-name
# Generated by Django 3.2.18 on 2023-03-15 21:03

from django.db import migrations
import django.db.models.deletion
import nautobot.extras.models.statuses
from django.db import migrations


class Migration(migrations.Migration):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
import uuid

import django.core.serializers.json
from django.db import migrations, models
import django.db.models.deletion
import nautobot.extras.models.mixins
from django.db import migrations, models


class Migration(migrations.Migration):
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# pylint: disable=missing-module-docstring,missing-function-docstring,missing-class-docstring,invalid-name
# Generated by Django 3.2.17 on 2023-02-12 19:21

from django.db import migrations
import django.db.models.deletion
import nautobot.extras.models
from django.db import migrations


class Migration(migrations.Migration):
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# pylint: disable=missing-module-docstring,missing-function-docstring,missing-class-docstring,invalid-name

from django.db import migrations
import django.db.models.deletion
import nautobot.extras.models
from django.db import migrations


class Migration(migrations.Migration):
Expand Down
Loading

0 comments on commit c32ba54

Please sign in to comment.