Migrate from repoplone 1#
This guide shows you how to move a repository from repoplone 1 to repoplone 2.
The move has two independent steps: upgrade the tool, then migrate repository.toml when you are ready.
Upgrade repoplone#
Run repoplone 2 against the repository as it is.
uvx repoplone@2.0.0a2 versions current
A repository.toml without a spec_version key follows specification 1.
repoplone 2 reads it as repoplone 1 did, with the same release steps, the same changelog headings, and the same version labels.
repoplone warns about settings that specification 2 drops: repository.managed_by_uv, backend.path, frontend.path, and a repository.compose written as a string.
The warnings block nothing.
They list what the migration will change.
Preview the migration#
Print the migrated file without writing it.
uvx repoplone settings migrate --dry-run
The command lists every change it makes. It does the following.
It adds
spec_version = "2"at the top of the file.It turns
[backend.package]and[frontend.package]into[[package]]tables, each with itstypeandprimary = true.It turns
composeinto a list.It removes
repository.managed_by_uv,backend.path, andfrontend.path.It moves each package’s
towncrier_settingsandsectioninto itstowncriertable, astowncrier.settingsandtowncrier.section.It removes
repository.towncrier.enabled, and removes a[repository.towncrier]table that names no settings file, because specification 1 treated such a table as off.It renames the release step ids
release_backendandrelease_frontendtorelease_pythonandrelease_node.
It keeps the comments and the layout of the file.
It leaves tables it does not know, such as [cookieplone], alone.
Migrate the file#
Write the migrated file, then validate it.
uvx repoplone settings migrate
uvx repoplone settings sanity-check
The command validates the result against the specification 2 schema before it writes anything.
Review the result#
Check these points before you commit the new file.
- Release step ids
A specification 2 file accepts only
release_pythonandrelease_node. Update scripts and CI jobs that pass--start-step release_backendor--start-step release_frontend.--start-stepstill accepts the old ids.- Changelog headings
In the repository changelog, package sections are now titled with the package name instead of
BackendandFrontend. To keep an old heading, addtowncrier.section = "Backend"ortowncrier.section = "Frontend"to the package.- Comments
A comment between the end of
[frontend.package]and the next table can be lost. The command reports each such comment so you can restore it.- Release hooks
settings.backendandsettings.frontendstill return the primary package of each family. Existinglocal_stephooks keep working.
Declare components#
To develop the packages in more than one app, add components after the migration.
--components writes the derived backend and frontend components as tables.
It works on a file that is already in specification 2.
uvx repoplone settings migrate --components
See also
Declare several frontends, to go on from there.
repository.toml specification 1, for each specification 1 key and its specification 2 form.
The repository model, for why specification 2 exists.