fix: Prefix names starting with numbers with an underscore#322
fix: Prefix names starting with numbers with an underscore#322johannwagner wants to merge 1 commit intonautobot:developfrom
Conversation
|
It looks like the |
| dashes to single dashes. Remove characters that aren't alphanumerics, | ||
| underscores, or hyphens. Convert to lowercase. Also strip leading and | ||
| trailing whitespace, dashes, and underscores. | ||
| Also adds a trailing underscore to names starting with an number to circumvent a bug in the Capirca/Aerleon parser. |
There was a problem hiding this comment.
Is this a documented bug? Can we add a link to it here?
There was a problem hiding this comment.
They require a word at those places and a word cannot start with a number by definiton:
https://aerleon.readthedocs.io/en/latest/reference/yaml_reference/#value-types
There was a problem hiding this comment.
| Also adds a trailing underscore to names starting with an number to circumvent a bug in the Capirca/Aerleon parser. | |
| Also adds a leading underscore to names starting with an number to circumvent a bug in the Capirca/Aerleon parser. |
Coverage reportClick to see where and how coverage changed
This report was generated by python-coverage-comment-action |
||||||||||||||||||||||||
|
The slugify function is used in places, where Aerleon requires a word, which is not allowed to start with a number by definiton. I think, it is appropriate and also probably fixes some other unnoted bugs. |
| @@ -0,0 +1 @@ | |||
| Fixed names starting with numbers by prefixing with an underscore. No newline at end of file | |||
There was a problem hiding this comment.
| Fixed names starting with numbers by prefixing with an underscore. | |
| Fixed an incompatibility when slugifying capirca names that start with a number by prefixing the name with an underscore. |
|
Sorry it took me so long to get back to you. Just a couple of suggestions on the wording and we'll get this merged. Thank you! |
…r Tool ## [3.0.0 (2025-12-30)](https://github.com/nautobot/cookiecutter-nautobot-app/releases/tag/3.0.0) ### Added - [#291](nautobot/cookiecutter-nautobot-app#291) - Added support for Python `3.13`. ### Changed - [#291](nautobot/cookiecutter-nautobot-app#291) - Updated minimum Nautobot version to `3.0.0`. - [#291](nautobot/cookiecutter-nautobot-app#291) - Updated maximum Nautobot version to `<4.0.0`. - [#309](nautobot/cookiecutter-nautobot-app#309) - Change the tag-nautobot-app workflow to support multiple nautobot-app versions. - [#320](nautobot/cookiecutter-nautobot-app#320) - Upstream testing now runs against selected branches. ### Documentation - [#319](nautobot/cookiecutter-nautobot-app#319) - Fixed nav typo and added missing 2.7.2 release notes. ### Housekeeping - [#322](nautobot/cookiecutter-nautobot-app#322) - Updated CI workflow to always regenerate poetry lockfile. **Full Changelog**: nautobot/cookiecutter-nautobot-app@nautobot-app-v2.7.2...nautobot-app-v3.0.0
…r Tool - [#291](nautobot/cookiecutter-nautobot-app#291) - Added support for Python `3.13`. - [#291](nautobot/cookiecutter-nautobot-app#291) - Updated minimum Nautobot version to `3.0.0`. - [#291](nautobot/cookiecutter-nautobot-app#291) - Updated maximum Nautobot version to `<4.0.0`. - [#309](nautobot/cookiecutter-nautobot-app#309) - Change the tag-nautobot-app workflow to support multiple nautobot-app versions. - [#320](nautobot/cookiecutter-nautobot-app#320) - Upstream testing now runs against selected branches. - [#319](nautobot/cookiecutter-nautobot-app#319) - Fixed nav typo and added missing 2.7.2 release notes. - [#322](nautobot/cookiecutter-nautobot-app#322) - Updated CI workflow to always regenerate poetry lockfile. **Full Changelog**: nautobot/cookiecutter-nautobot-app@nautobot-app-v2.7.2...nautobot-app-v3.0.0
…r Tool (#368) * Cookie updated targeting develop by NetworkToCode Cookie Drift Manager Tool - [#291](nautobot/cookiecutter-nautobot-app#291) - Added support for Python `3.13`. - [#291](nautobot/cookiecutter-nautobot-app#291) - Updated minimum Nautobot version to `3.0.0`. - [#291](nautobot/cookiecutter-nautobot-app#291) - Updated maximum Nautobot version to `<4.0.0`. - [#309](nautobot/cookiecutter-nautobot-app#309) - Change the tag-nautobot-app workflow to support multiple nautobot-app versions. - [#320](nautobot/cookiecutter-nautobot-app#320) - Upstream testing now runs against selected branches. - [#319](nautobot/cookiecutter-nautobot-app#319) - Fixed nav typo and added missing 2.7.2 release notes. - [#322](nautobot/cookiecutter-nautobot-app#322) - Updated CI workflow to always regenerate poetry lockfile. **Full Changelog**: nautobot/cookiecutter-nautobot-app@nautobot-app-v2.7.2...nautobot-app-v3.0.0 * Fix merge conflicts * Disable mysql testing and add note. * Fix merge conflicts --------- Co-authored-by: bakebot <info@networktocode.com> Co-authored-by: Stephen Kiely <stephenkiely87@gmail.com>
Closes: #319
What's Changed
It prefixes names starting with a number with an underscore.
To Do