Skip to content
plonePublic

About

Tool designed to manage Plone mono repos

Resources

Code of conduct

Contributing

Security policy

Stars

5 stars

Watchers

9 watching

Forks

Repository files navigation

RepoPlone

PyPI PyPI - Python Version PyPI - Wheel PyPI - License PyPI - Status

Code Quality

GitHub contributors GitHub Repo stars

Overview

RepoPlone releases and maintains the repository of a Plone codebase that holds more than a single package.

A Plone project keeps a Python backend, one or more Node frontends built on Volto or Aurora, and the files that deploy them in one repository. RepoPlone reads one file at the root of that repository, repository.toml, that describes all of it. From that file:

  • repoplone release gives the repository one version, writes every changelog from towncrier news fragments, publishes each package to PyPI or npm, then commits, tags, and creates the GitHub release.
  • repoplone deps reports and upgrades the Plone, Volto, or Aurora version each app uses.
  • repoplone changelog check tells a pull request which packages still need a news fragment.
  • repoplone settings github-outputs gives GitHub Actions the components, packages, versions, and path filters of the repository.

RepoPlone releases a single Python package (it releases itself), a Plone project with a backend only or with Volto and Aurora frontends, and add-ons that ship a Python package and a Volto add-on together.

Warning

RepoPlone 2 is in alpha. Its commands and its repository.toml specification can change before 2.0.0.

Documentation

The documentation lives at https://plone.github.io/repoplone/.

  • Why RepoPlone: the problems it solves.
  • Your first release: a tutorial that releases a small package on your computer.
  • How-to guides: release, upgrade Plone or Volto, check news fragments in CI, migrate from RepoPlone 1.
  • Reference: every command, every repository.toml key, and every release step.

Quick start

You need uv. At the root of a repository with a repository.toml file, run:

uvx repoplone@2.0.0a2 versions current
uvx repoplone@2.0.0a2 changelog preview
uvx repoplone@2.0.0a2 release --dry-run minor

A minimal repository.toml for a project with a backend and a Volto frontend:

spec_version = "2"

[repository]
name = "my-project"
changelog = "CHANGELOG.md"
version = "version.txt"

[[package]]
type = "python-plone"
name = "my.project"
path = "backend"
changelog = "backend/CHANGELOG.md"
publish = false

[[package]]
type = "node-volto"
name = "volto-my-project"
path = "frontend/packages/volto-my-project"
changelog = "frontend/packages/volto-my-project/CHANGELOG.md"
publish = false

Coming from RepoPlone 1? Your repository.toml keeps working. See Migrate from RepoPlone 1.

Contribute 🤝

We welcome contributions to RepoPlone.

You can create an issue in the issue tracker, or contact a maintainer.

Branches

  • main is the development branch of the next major release. New features go there.
  • 1.x maintains RepoPlone 1.x. Bug fixes go there, and are forward-ported to main when they apply.

Open your pull request against the branch that matches the kind of change.

Development requirements

Setup

Clone this repository:

git clone git@github.com:plone/repoplone.git

Install UV, and create a local virtual environment with the following command.

make install

Run the checked out branch of RepoPlone

uv run repoplone

Check and format the codebase

make check

Run tests

pytest is this package's test runner.

Run all tests with the following command.

make test

Run all tests, but stop on the first error and open a pdb session with the following command.

uv run pytest -x --pdb

Run only tests that match test_release_backend with the following command.

uv run pytest -k test_release_backend

Run only tests that match test_release_backend, but stop on the first error and open a pdb session with the following command.

uv run pytest -k test_release_backend -x --pdb

Run type checker

We use mypy to run static type checking for this codebase.

Run the checker with the following command.

uv run mypy src

Build the documentation

The documentation is a Sphinx project in docs/.

make docs-livehtml

Before you push a change to it, run the checks that CI runs.

make docs docs-vale docs-linkcheck docs-generate-check

make docs-generate regenerates the command line reference after a change to a command.

Release RepoPlone

RepoPlone describes itself in its own repository.toml: a single python package at the repository root, with the last released version in version.txt. A maintainer can release it with RepoPlone:

uv run repoplone release --dry-run 2.0.0a0
make release VERSION=2.0.0a0

make release runs uv run repoplone release $(VERSION). RepoPlone no longer uses zest.releaser.

RepoPlone bumps the version, updates the changelog, tags and creates the GitHub release, but does not upload to PyPI (publish = false in repository.toml). Publishing the GitHub release starts the Release workflow (.github/workflows/release.yml), which builds the package from the tag and publishes it to PyPI with trusted publishing, so no PyPI token is needed. If publishing fails, run that workflow by hand with the release tag; files already on PyPI are skipped.

Support 📢

Read the documentation, and ask questions or report problems in the issue tracker.

This project is supported by

Plone Foundation Logo

License

The project is released under the MIT License.

About

Tool designed to manage Plone mono repos

Resources

Code of conduct

Contributing

Security policy

Stars

5 stars

Watchers

9 watching

Forks

Releases

Sponsor this project

Packages

Used by

Contributors

Languages