The Codebase Bemanification Tool - beman-tidy is ready for MVP!

Hello,

As previously discussed in the face to face WG21 meeting in Hagenberg, where I did a demo with a beman-tidy POC, I continued the work and incorporated the feedback into what’s now proposed to be the MVP for beman-tidy - The Codebase Bemanification Tool.

Issue: https://github.com/bemanproject/infra/issues/1
PR: Add beman-tidy: The Codebase Bemanification Tool by neatudarius · Pull Request #2 · bemanproject/infra · GitHub

The focus of this discussion / PR / review should be on next items:
1) The usage of the tool (check “tools/beman-tidy/README.md”).
2) Portability (Only Python deps → portable).
3) Modes (dry-run, fix-inplace)
4) Limitations (requires a hard copy of the Beman Standard).
5) Advantages (because it uses a hard copy of the standard, it does not requrire internet access).
6) The ease of adding new checks (check “README.md” and an “tools/beman-tidy/lib/checks/beman_standard”).
7) The ease of adding automated tests for implemented checks.

Notes:

  • There are 43 checks in the Beman Standard. I have only implemented 3/43 for this demo / first step.
  • tools/beman-tidy/README.md has docs for installation, usage, development, writing tests, etc.

Proposed next steps:

  • Review and merge MVP PR.
  • Implement most used checks: all REQUIREMENTs and most used RECOMMANDATIONs.
  • Deploy beman-tidy on CI as optional job in exemplar and other repos (it will be reusable via the infra/ repo).
  • Make it stable.
  • Implement remaining checks.
  • We’ll enforce the beman-tidy jobs in repos one 1) the tool is stable and 2) we actually apply all the checks on that repo.

Please feel free to jump in the discussion or on the PR. I plan to do a demo in the next Beman Weekly Sync (if we can add this topic to the agenda).

CC: @leads

1 Like

Hello,

Yesterday I discussed with @dsankel about best place and way to expose beman-tidy (https://github.com/bemanproject/infra/pull/2#discussion_r2138978901). The discussion focused around the comments from PR and February Austria demo to be able to refer to the doc and keep offline tool.

It seems that the root case is having the tool and the Beman Standard doc in different repos.

We can move the document BEMAN_STANDARD.md and the beman-tidy tool in a new repo bemanproject/beman-standard to get next advantages:

  1. Having the tool and the documentation in the same place.
  2. Be able to allow a commit to also change the standard and the tool implementation (it won’t be a requirement - at least not for now).
  3. We’ll keep BEMAN_STANDARD.MD for human interaction only and we’ll not parse that!
  4. We’ll keep .beman-standard.yml file for automation.
  5. The standard and the tool can be independently changed (aka the tool may implement a slightly older version of the standard, which has snapshot in the yaml file).
  6. This repo can have the pre-commit in the root. It will expose a single tool - “beman-tidy”.

What do you think?

CC:@leads