Skip to content

Offer a template semantic versioning information for display in the cookieplone --info option #168

Open
@acsr

Description

@acsr

Only hashes versions for the templates available

Currently you get a commit hash of the cookieplone-template written as version information to the README.md files generated by Cookieplone.

This does not help to simply figure out if one version is older or newer and if changes were cosmetic or signficant or breaking.

The current cookieplone -v option is more a debug tool an does not help here.

Goals

  1. Make the relation between used template versions obvious with Semver 2.0. sersion strings used in cookieplone runs before, during and after execution.
  2. Add an pipx run cookieplone --templates-list option to dump the available templates versions in advance and use the -v option to dig deeper (but this is already bloated, so maybe --templates-details would do the job better.

Example outputs of the cookieplone version 0.8.3 and template revision f1d0094

Example output from a pipx run cookieplone --info:

pipx run cookieplone --info
⚠️  cookieplone is already on your PATH and installed at /Users/astro/.local/bin/cookieplone. Downloading and running anyway.
╭────────────────────────────────────────────────────────────── cookieplone ──────────────────────────────────────────────────────────────╮
│ ╭─ Installation ⚡ ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │
│ │  Version                          0.8.3                                                                                             │ │
│ │  Location                         /Users/astro/Library/Caches/pipx/635e6fe9814b2fe/lib/python3.11/site-packages/cookieplone         │ │
│ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ │
│ ╭─ Repository 🔗 ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │
│ │  Location (COOKIEPLONE_REPOSITO…  gh:plone/cookieplone-templates                                                                    │ │
│ │  Tag (COOKIEPLONE_REPOSITORY_TA…  main                                                                                              │ │
│ │  Password (COOKIEPLONE_REPO_PAS…                                                                                                    │ │
│ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ │
│ ╭─ Cookiecutter 🍪 ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │
│ │  Version                          2.6.0                                                                                             │ │
│ │  Location                         /Users/astro/Library/Caches/pipx/635e6fe9814b2fe/lib/python3.11/site-packages/cookiecutter        │ │
│ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ │
│ ╭─ Python 🐍 ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │
│ │  Version                          3.11.5 (main, Aug 24 2023, 15:09:32) [Clang 14.0.0 (clang-1400.0.29.202)]                         │ │
│ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ │
╰────────────────────────────────────────────────── Made with ❤️ by the Plone Community ───────────────────────────────────────────────────╯

The corresponding output of a pipx run cookieplone --version is:

⚠️  cookieplone is already on your PATH and installed at /Users/astro/.local/bin/cookieplone. Downloading and running anyway.
Cookieplone 0.8.3 from /Users/astro/Library/Caches/pipx/635e6fe9814b2fe/lib/python3.11/site-packages/cookieplone (Cookiecutter 2.6.0, 
Python 3.11.5 (main, Aug 24 2023, 15:09:32) [Clang 14.0.0 (clang-1400.0.29.202)])

The summary of the actual pipx run cookiecutter project contains no traces of the cookiecutter and template version like generated for the README.md using the _generator-signature function in Cookieplone.

output from Version 0.8.3:

╭──────────────────────────────────────────────────────────────── kwkdev volto generation ─────────────────────────────────────────────────────────────────╮
│ Summary:                                                                                                                                                 │
│   - Plone version: 6.1.0                                                                                                                                 │
│   - Volto version: 18.9.1                                                                                                                                │
│   - Output folder: /Users/astro/github/kwk-Plone6/kwk.dev.acsr.de/kwkdev-volto                                                                           │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯

This is the Markdown from the current README.md:

## Credits and Acknowledgements 🙏

Generated using [Cookieplone (0.8.3)](https://github.com/plone/cookieplone) and [cookiecutter-plone (f1d0094)](https://github.com/plone/cookiecutter-plone/commit/91f7d2b0a61b4685d383e79a7367b23b6488e534) on 2025-02-13 18:18:49.930741. A special thanks to all contributors and supporters!

The latest PR #144 and cookieplone PR #65by @davisagli seems not reflected yet in the cookieplone 0.8.3 Release in spite of both seem to be merged.

I will try to provide the output after the PR are in charge here for reference asap.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions