i.e. they are configured with plone/meta
If I got it right, on a buildout.coredev
checkout where one forces all packages to be git downloaded (i.e. auto-checkout = *
) one gets 141 packages in src
folder, out of those 59 have the signature .meta.toml
file indicating that either they are configured via plone/meta
or via zopefoundation/meta
Not all of them have automatic tests running on new PRs, and a few also are missing the pre-commit.ci integration, but overall almost all of those 59 packages have both, ensuring that package testing as well as formatting/spelling/code smells are detected before being merged
But even better than the above, in quite a few of them, cleaning up the dependencies listed in setup.py
allowed to remove circular imports, getting us one step closer at a time to a no circular dependency world
Wanna help?
The list of packages already converted can be also found in Plone's meta config/default/packages.txt file.
Not all packages can be blindly converted. Only the ones that their master
branch is for Plone 6.x only can be converted.
How to know that? I'm glad you ask
mr.roboto
, our friendly keeps tabs on that: Mr. Roboto
How one applies the configuration? The README on config
folder explains it, but more or less boils down to:
- checkout
plone/meta
:git clone git@github.com:plone/meta
- create a virtual environment with python 3.11
- navigate to the
config
folder withinmeta
repository - run
python config-package.py LOCAL_PATH_TO_REPOSITORY
- after plenty of output, say
y
to commit the changes
That's the first step, now head over the repository you have configured, there's a bit of work to do still
- do a
git show --stat
to see which files have changes, and if there is any deletion, review it, it might not be needed, or you might need to add it back - do a
git stash
andgit stash drop
to remove the automatic changes thatconfig-package.py
has produced, we will re-do them in next step - run
tox -e format
and commit the changes on every step, i.e. one commit forpyupgrade
,isort
,black
andzpretty
(for this later one you might want to split it further into two commits ZCML/XML files and PT files, small/focused commits are easier to review)- notice that you need
tox
to be either globally available (vianpx
for example) or have it handily ready on virtual environment
- notice that you need
- once
tox -e format
is happy, do the same withtox -e lint
, this time though, it only reports the changes, you need to apply them yourself, see plenty of PR examples - next you can run tests
tox -e test
and adjust code as necessary - finally clean up dependencies with
tox -e dependencies
The last two parts can be tricky, you might push the branch and create a draft PR to ask for help/guidance, or ask here below
zpretty
does an amazing job, but as any software has bugs, fortunately his main developer (@alert ) irons them at light speed do report any findings at its issue tracker.
It is much better an almost finished PR than nothing
To enable GHA and pre-commit.ci integration ping one Plone GitHub organization administrator (me for example or @mauritsvanrees and plenty others probably
).
Have fun!