Skip to content

Commit a996428

Browse files
author
bakebot
committed
Cookie updated targeting develop by NetworkToCode Cookie Drift Manager Tool
Template: ``` { "template": "https://github.com/networktocode-llc/cookiecutter-ntc.git", "dir": "python", "ref": "main", "path": "/__w/cookiecutter-nautobot-app-drift-manager/cookiecutter-nautobot-app-drift-manager/cookiecutter-ntc/python" } ``` Cookie: ``` { "remote": "https://github.com/networktocode/netutils.git", "path": "/tmp/tmp8yy2e_dd/netutils", "repository_path": "/tmp/tmp8yy2e_dd/netutils", "dir": "", "branch_prefix": "drift-manager/develop", "context": { "codeowner_github_usernames": "@itdependsnetworks @jeffkala @qduk", "full_name": "Network to Code, LLC", "email": "info@networktocode.com", "github_org": "networktocode", "description": "Common helper functions useful in network automation.", "project_name": "netutils", "project_slug": "netutils", "repo_url": "https://github.com/networktocode/netutils", "base_url": "netutils", "project_python_name": "netutils", "project_python_base_version": "3.10", "project_with_config_settings": "no", "generate_docs": "yes", "version": "1.15.1", "original_publish_year": "2021", "_template": "/__w/cookiecutter-nautobot-app-drift-manager/cookiecutter-nautobot-app-drift-manager/cookiecutter-ntc/python", "_output_dir": "/tmp/tmp8yy2e_dd", "_repo_dir": "/__w/cookiecutter-nautobot-app-drift-manager/cookiecutter-nautobot-app-drift-manager/cookiecutter-ntc/python", "_checkout": null }, "drift_managed_branch": "develop", "remote_name": "origin", "pull_request_strategy": "PullRequestStrategy.UPDATE_OR_CREATE", "post_actions": [], "baked_commit_ref": "b23a9ed5a4714810d83670ad47cc182764c6d464", "draft": false } ``` CLI Arguments: ``` { "cookie_dir": "", "input": false, "json_filename": "", "output_dir": "", "push": true, "template": "./cookiecutter-ntc", "template_dir": "python", "template_ref": "main", "pull_request": "update-or-create", "post_action": [], "disable_post_actions": true, "draft": null, "drift_managed_branch": "develop" } ```
1 parent b23a9ed commit a996428

7 files changed

Lines changed: 12 additions & 11 deletions

File tree

.cookiecutter.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@
1010
"repo_url": "https://github.com/networktocode/netutils",
1111
"base_url": "netutils",
1212
"project_python_name": "netutils",
13-
"project_python_base_version": "3.9",
13+
"project_python_base_version": "3.10",
1414
"project_with_config_settings": "no",
1515
"generate_docs": "yes",
1616
"version": "1.15.1",
17-
"original_publish_year": "2025",
17+
"original_publish_year": "2021",
1818
"_drift_manager": {
1919
"template": "https://github.com/networktocode-llc/cookiecutter-ntc.git",
2020
"template_dir": "python",

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
ARG PYTHON_VER="3.9"
1+
ARG PYTHON_VER="3.10"
22

33
FROM python:${PYTHON_VER}-slim
44

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Apache Software License 2.0
22

3-
Copyright (c) 2025, Network to Code, LLC
3+
Copyright (c) 2021-2026, Network to Code, LLC
44

55
Licensed under the Apache License, Version 2.0 (the "License");
66
you may not use this file except in compliance with the License.

docs/admin/release_notes/version_1.0.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ This document describes all new features and changes in the release `1.0`. The f
2929
- Achieved in this `x.y` release
3030
- Changes to compatibility with Nautobot and/or other apps, libraries etc.
3131

32-
## [v1.0.0] - 2026-01-09
32+
## [v1.0.0] - 2026-02-12
3333

3434
### Added
3535

example.invoke.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
"netutils":
3-
python_ver: "3.9"
3+
python_ver: "3.10"
44
local: false
55
# image_name: "netutils"
66
# image_ver: "latest"

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ include = [
2323
]
2424

2525
[tool.poetry.dependencies]
26-
python = ">=3.9,<3.14"
26+
python = ">=3.10,<3.14"
2727
click = "*"
2828

2929
[tool.poetry.group.dev.dependencies]

tasks.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ def is_truthy(arg):
3636
{
3737
"netutils": {
3838
"project_name": "netutils",
39-
"python_ver": "3.9",
39+
"python_ver": "3.10",
4040
"local": is_truthy(os.getenv("INVOKE_NETUTILS_LOCAL", "false")),
4141
"image_name": "netutils",
4242
"image_ver": os.getenv("INVOKE_PARSER_IMAGE_VER", "latest"),
@@ -66,13 +66,14 @@ def task_wrapper(function=None):
6666
return task_wrapper
6767

6868

69-
def run_command(context, exec_cmd, port=None):
69+
def run_command(context, exec_cmd, port=None, rm=True):
7070
"""Wrapper to run the invoke task commands.
7171
7272
Args:
7373
context ([invoke.task]): Invoke task object.
7474
exec_cmd ([str]): Command to run.
7575
port (int): Used to serve local docs.
76+
rm (bool): Whether to remove the container after running the command.
7677
7778
Returns:
7879
result (obj): Contains Invoke result from running task.
@@ -86,12 +87,12 @@ def run_command(context, exec_cmd, port=None):
8687
)
8788
if port:
8889
result = context.run(
89-
f"docker run -it -p {port} -v {context.netutils.pwd}:/local {context.netutils.image_name}:{context.netutils.image_ver} sh -c '{exec_cmd}'",
90+
f"docker run -it {'--rm' if rm else ''} -p {port} -v {context.netutils.pwd}:/local {context.netutils.image_name}:{context.netutils.image_ver} sh -c '{exec_cmd}'",
9091
pty=True,
9192
)
9293
else:
9394
result = context.run(
94-
f"docker run -it -v {context.netutils.pwd}:/local {context.netutils.image_name}:{context.netutils.image_ver} sh -c '{exec_cmd}'",
95+
f"docker run -it {'--rm' if rm else ''} -v {context.netutils.pwd}:/local {context.netutils.image_name}:{context.netutils.image_ver} sh -c '{exec_cmd}'",
9596
pty=True,
9697
)
9798

0 commit comments

Comments
 (0)