New helper tool to manage buildout configurations

Are you maintaining multiple Plone projects with different buildout configurations?
Do you try to maintain a coherent set of best practices for your buildout configurations, but keep struggling because all your buildout configs are slightly different and it is just too hard to update your buildouts?

Then the command line tool from collective.normalize_buildout is for you.

It will normalise a single buildout file for you, ordering sections, keys in a section and order some values, like eggs.
This will make it much easier to compare buildout files.

So far the script can handle some special cases:

  • The buildout section always comes first, versions always come last.
  • The key recipe is always first.
  • sources get indented so that the branch specifier is on the same column for each specified checkout.

Comments above keys or sections are identified as belonging together and when the script reorders your lines, the comments get moved with them. You can specify a version pinning and you won't loose the comment about why you wanted this specific version.

I am looking for feedback. Maybe you want to group keys in the buildout section, or you know of more keys those multiline values could be sorted.

This sounds great! i tried this and would like the sources section to be on top or bottom (prefered above versions).

1 Like

Hi @do3cc this package sound great! :+1:

maybe you could add to plone.recipe.codeanalysis package as an extension.

The latest release puts sources to the bottom. It also groups mr.developer variables and groups them a bit apart from the other buildout variables.

I want to do this in the future. For now I'd like to improve the tool further. I expect that for now each request will change the output again, and a code analyser that throws different errors with each release is not good :slight_smile: