Support grouped template selection and repository configuration format#158
Merged
Support grouped template selection and repository configuration format#158
Conversation
Add a new repository-level configuration format with JSON Schema validation, grouped templates, global version pinning, and backward-compatible fallback to cookiecutter.json. - Refactor schemas.py into a schemas/ package with standalone JSON schema files (reusable for future pytest-jsonschema package) - Add repository_config.schema.json with structural validation - Add cross-referential validation (groups ↔ templates consistency) - Update get_repository_config() to prefer new format with validation - Add documentation for the new format - Add comprehensive test coverage (repository schema + loading logic) Closes #141
Read `config.versions` from the repository-level `cookieplone-config.json`
and merge it as a base layer into each template's versions context.
Per-template versions override global values for the same key, so
templates can still customise individual pins while inheriting shared
defaults via `{{ versions.<key> }}`.
Closes #128
When cookieplone-config.json defines groups, the CLI presents a two-step selection: first a category, then a template within that category. Legacy repos without groups fall back to the flat template list. The display uses styled numbered lists inside labeled panels instead of tables. Also updates the default repository tag from main to next and documents the change in the relevant docs pages. Closes #118
- console.py: 52% → 99% - cookiecutter.py: 67% → 100% - parsers.py: 50% → 100% - plone.py: 70% → 97%
Member
Author
|
@valentinab25 Please, take a look at this PR, as it is going to be the basis to the extension mechanism |
Member
Author
|
@valentinab25 I believe those two are now fixed |
valentinab25
approved these changes
Apr 3, 2026
valentinab25
left a comment
There was a problem hiding this comment.
I have compared the generation on all templates with this branch and they are generated exactly the same, with the exception of the new .cookieplone.json file.
I have tested the "go back" and "review" features and they are now working correctly
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
cookieplone-config.jsonrepository configuration format with JSON Schema validation, grouped templates, global version pinning, and backward-compatible fallback tocookiecutter.json.versionpinning from repository config, applied as default context to all templates.utils/console.py(52%→99%),utils/cookiecutter.py(67%→100%),utils/parsers.py(50%→100%), andutils/plone.py(70%→97%).cookieplone-templatesisnext.Closes #118
Closes #128
Closes #141
Closes #159
Closes #160
Closes #161
Test plan
make test— all 790 tests passmake test-coverage— overall coverage at 88%make lint— all checks passuvx --from git+https://github.com/plone/cookieplone@issues_118-128-141 cookieplonecookieplone-config.jsonwith groupsCOOKIEPLONE_REPOSITORY_TAG=main uvx --from git+https://github.com/plone/cookieplone@issues_118-128-141 cookieplonecookiecutter.json--no-inputstill works for non-interactive generation