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

Use underscored (cookiecutter.underscored) for PLUGINS configuration in README.md #20

Open
pheus opened this issue Jul 28, 2024 · 0 comments · May be fixed by #24
Open

Use underscored (cookiecutter.underscored) for PLUGINS configuration in README.md #20

pheus opened this issue Jul 28, 2024 · 0 comments · May be fixed by #24

Comments

@pheus
Copy link

pheus commented Jul 28, 2024

cookiecutter-netbox-plugin version

main (d920039)

Python version

3.12

Steps to Reproduce

The cookiecutter-netbox-plugin generates a README.md with the hyphenated project name for PLUGINS and PLUGINS_CONFIG.

  1. Run cookiecutter https://github.com/netbox-community/cookiecutter-netbox-plugin.git
  2. Fill out the default values
❯ cookiecutter https://github.com/netbox-community/cookiecutter-netbox-plugin.git
  [1/10] plugin_name (ACL):
  [2/10] project_name (NetBox ACL Plugin):
  [3/10] hyphenated (netbox-acl-plugin):
  [4/10] underscored (netbox_acl_plugin):
  [5/10] project_short_description (NetBox plugin for ACL.):
  [6/10] full_name (John Doe):
  [7/10] email ():
  [8/10] github_username ():
  [9/10] version (0.1.0):
  [10/10] Select open_source_license
    1 - Apache-2.0
    2 - MIT
    3 - BSD
    4 - ISC
    5 - GPL-3.0-only
    6 - Not open source
    Choose from [1/2/3/4/5/6] (1): 
  1. Check generated README.md

Expected Behavior

Enable the plugin in `/opt/netbox/netbox/netbox/configuration.py`,
 or if you use netbox-docker, your `/configuration/plugins.py` file :

```python
PLUGINS = [
    'netbox_acl_plugin'
]

PLUGINS_CONFIG = {
    "netbox_acl_plugin": {},
}
```

Observed Behavior

(Snippet from the generated README.md with default values)

Enable the plugin in `/opt/netbox/netbox/netbox/configuration.py`,
 or if you use netbox-docker, your `/configuration/plugins.py` file :

```python
PLUGINS = [
    'netbox-acl-plugin'
]

PLUGINS_CONFIG = {
    "netbox-acl-plugin": {},
}
```
pheus added a commit to pheus/cookiecutter-netbox-plugin that referenced this issue Jul 28, 2024
Revises the plugin name format in README.md to use underscores instead
of hyphens.

Fixes netbox-community#20
@pheus pheus linked a pull request Jul 28, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant