Skip to content

Commit

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

Cookie:

```
{
    "remote": "https://github.com/nautobot/nautobot-app-dev-example.git",
    "path": "/tmp/tmpax5muxqk/nautobot-app-dev-example",
    "repository_path": "/tmp/tmpax5muxqk/nautobot-app-dev-example",
    "dir": "",
    "branch_prefix": "drift-manager",
    "context": {
        "codeowner_github_usernames": "@nautobot/maintain-nautobot-apps",
        "full_name": "Network to Code, LLC",
        "email": "[email protected]",
        "github_org": "nautobot",
        "app_name": "nautobot_dev_example",
        "verbose_name": "Nautobot Dev Example App",
        "app_slug": "nautobot-dev-example",
        "project_slug": "nautobot-app-dev-example",
        "repo_url": "https://github.com/nautobot/nautobot-app-dev-example",
        "base_url": "dev-example",
        "min_nautobot_version": "2.0.0",
        "max_nautobot_version": "2.9999",
        "camel_name": "NautobotDevExample",
        "project_short_description": "Nautobot App to demonstrate how to create a Nautobot App.",
        "model_class_name": "DevExample",
        "open_source_license": "Apache-2.0",
        "docs_base_url": "https://docs.nautobot.com",
        "docs_app_url": "https://docs.nautobot.com/projects/dev-example/en/latest",
        "_template": "https://github.com/nautobot/cookiecutter-nautobot-app.git",
        "_output_dir": "/tmp/tmpax5muxqk",
        "_repo_dir": "/github/home/.cookiecutters/cookiecutter-nautobot-app/nautobot-app",
        "_checkout": "refs/tags/nautobot-app-v2.4.1"
    },
    "base_branch": "develop",
    "remote_name": "origin",
    "pull_request_strategy": "PullRequestStrategy.CREATE",
    "post_actions": [
        "PostAction.RUFF",
        "PostAction.POETRY"
    ],
    "baked_commit_ref": "9e0f9a4771b5689b714de8313cff9c65a4cab611",
    "draft": false
}
```

CLI Arguments:

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

* Correct issues from Drift Manager

---------

Co-authored-by: bakebot <[email protected]>
Co-authored-by: Stephen Kiely <[email protected]>
  • Loading branch information
3 people authored Jan 17, 2025
1 parent 9621567 commit 52abb54
Show file tree
Hide file tree
Showing 10 changed files with 748 additions and 665 deletions.
4 changes: 2 additions & 2 deletions .cookiecutter.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"_drift_manager": {
"template": "https://github.com/nautobot/cookiecutter-nautobot-app.git",
"template_dir": "nautobot-app",
"template_ref": "refs/tags/nautobot-app-v2.4.0",
"template_ref": "refs/tags/nautobot-app-v2.4.1",
"cookie_dir": "",
"branch_prefix": "drift-manager",
"pull_request_strategy": "create",
Expand All @@ -30,7 +30,7 @@
"poetry"
],
"draft": false,
"baked_commit_ref": "9e0f9a4771b5689b714de8313cff9c65a4cab611"
"baked_commit_ref": "83c9a795c4ca6c3ad81f4992effdc0d81021dfa0"
}
}
}
34 changes: 34 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<!--
Thank you for your interest in contributing to Nautobot Dev Example App! Please note
that our contribution policy recommends that a feature request or bug
report be opened for approval prior to filing a pull request. This
helps avoid wasting time and effort on something that we might not
be able to accept.
Please indicate the relevant feature request or bug report below.
-->

# Closes: #<ISSUE NUMBER GOES HERE>

## What's Changed

<!--
Please include:
- A summary of the proposed changes
- A sectioned breakdown for larger features under ## subheadings
- Screenshots, example payloads where relevant:
- Before/After for bugfixes
- Using a new feature
-->

## To Do

<!--
Please feel free to update todos to keep track of your own notes for WIP PRs.
-->
- [ ] Explanation of Change(s)
- [ ] Added change log fragment(s) (for more information see [the documentation](https://docs.nautobot.com/projects/core/en/stable/development/#creating-changelog-fragments))
- [ ] Attached Screenshots, Payload Example
- [ ] Unit, Integration Tests
- [ ] Documentation Updates (when adding/changing features)
- [ ] Outline Remaining Work, Constraints from Design
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Apache Software License 2.0

Copyright (c) 2024, Network to Code, LLC
Copyright (c) 2025, Network to Code, LLC

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
1 change: 1 addition & 0 deletions changes/+nautobot-app-v2.4.1.housekeeping
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Rebaked from the cookie `nautobot-app-v2.4.1`.
6 changes: 4 additions & 2 deletions development/docker-compose.dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,12 @@ services:
volumes:
- "./nautobot_config.py:/opt/nautobot/nautobot_config.py"
- "../:/source"
# To expose postgres or redis to the host uncomment the following
# postgres:
# To expose postgres (5432), myql (3306) on db service or redis (6379) to the host uncomment the
# following. Ensure to match the 2 idented spaces which to have the service nested under services.
# db:
# ports:
# - "5432:5432"
# - "3306:3306"
# redis:
# ports:
# - "6379:6379"
7 changes: 7 additions & 0 deletions development/docker-compose.mysql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,13 @@ services:
- "development.env"
- "creds.env"
- "development_mysql.env"
beat:
environment:
- "NAUTOBOT_DB_ENGINE=django.db.backends.mysql"
env_file:
- "development.env"
- "creds.env"
- "development_mysql.env"
db:
image: "mysql:8"
command:
Expand Down
14 changes: 3 additions & 11 deletions development/nautobot_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import sys

from nautobot.core.settings import * # noqa: F403 # pylint: disable=wildcard-import,unused-wildcard-import
from nautobot.core.settings_funcs import is_truthy, parse_redis_connection
from nautobot.core.settings_funcs import is_truthy

#
# Debug
Expand Down Expand Up @@ -64,16 +64,8 @@
#

# The django-redis cache is used to establish concurrent locks using Redis.
CACHES = {
"default": {
"BACKEND": "django_redis.cache.RedisCache",
"LOCATION": parse_redis_connection(redis_database=0),
"TIMEOUT": 300,
"OPTIONS": {
"CLIENT_CLASS": "django_redis.client.DefaultClient",
},
}
}
# Inherited from nautobot.core.settings
# CACHES = {....}

#
# Celery settings are not defined here because they can be overloaded with
Expand Down
2 changes: 2 additions & 0 deletions nautobot_dev_example/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,10 @@
from nautobot_dev_example import views

router = NautobotUIViewSetRouter()

router.register("devexample", views.DevExampleUIViewSet)


urlpatterns = [
path("docs/", RedirectView.as_view(url=static("nautobot_dev_example/docs/index.html")), name="docs"),
]
Expand Down
1,335 changes: 688 additions & 647 deletions poetry.lock

Large diffs are not rendered by default.

8 changes: 6 additions & 2 deletions tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -411,9 +411,13 @@ def shell_plus(context):
run_command(context, command)


@task
@task(
help={
"service": "Docker compose service name to launch cli in (default: nautobot).",
}
)
def cli(context, service="nautobot"):
"""Launch a bash shell inside the Nautobot container."""
"""Launch a bash shell inside the container."""
run_command(context, "bash", service=service)


Expand Down

0 comments on commit 52abb54

Please sign in to comment.