Skip to main content

Code cleanup for C++, Python, and Meson

Project description

🧹 Eutaxis

Eutaxis (from Ancient Greek εὖ “good” + τάξις “arrangement, ordering”) is a command-line tool for normalizing and cleaning up project code layouts. It focuses on consistent headers, include ordering, and formatting across common project structures.

Currently supported:

  • Python projects:
    • isort and ruff
    • optional licence headers
  • Meson projects:
    • Lark-based argument reordering for many functions
    • muon fmt
    • optional licence headers
  • C++ projects:
    • header guards
    • include ordering
    • Meson targets
    • simple qualifier reordering
    • optional licence headers

📦 Installation

Eutaxis is a normal Python package:

pip install eutaxis

🚀 Usage

Eutaxis is driven by “workers” (one per language):

eutaxis <worker> [options]

Examples:

# Clean a Python project in the current directory
eutaxis python

# Clean a Meson project
eutaxis meson -c muon.cfg

# Clean a C++ project using .eutaxis config
eutaxis cpp

To see options:

eutaxis -h
eutaxis python -h
eutaxis meson -h
eutaxis cpp -h

⚙️ C++ Configuration

C++ clean-up is configured via a .eutaxis YAML file in the project root, for example:

skip_meson: false
license: MPL-2.0
url: https://github.com/your/repo
project_name: mylib
ignore_parent_header:
  - include/mylib/detail
ignore_folders:
  - external

The C++ worker expects the following layout:

  • headers: include/<project_name>/...
  • sources (optional): src/, test/, perf/, tools/

🧠 Behaviour Overview

  • Licence/file headers:
    • Inserts or normalizes licence/file headers for supported languages.
  • C++:
    • Normalizes header guards.
    • Maintains “base headers” <dir>.hpp with an IWYU export block.
    • Re-sorts and groups includes into:
      • C++ standard headers
      • other system headers
      • project headers
      • relative headers
    • Adjusts a few qualifiers (e.g. constexpr explicitexplicit constexpr).
    • Updates Meson snippets for per-source targets.
  • Python and Meson:
    • Runs formatters:
      • Python: isort, ruff format
      • Meson: Lark-based argument reordering for many functions, muon fmt

⌨️ Shell Completion

Eutaxis integrates with argcomplete. Once argcomplete is installed and enabled in your shell,

eutaxis <TAB>

can be used to complete available workers and options.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

eutaxis-1.1.0.tar.gz (20.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

eutaxis-1.1.0-py3-none-any.whl (24.4 kB view details)

Uploaded Python 3

File details

Details for the file eutaxis-1.1.0.tar.gz.

File metadata

  • Download URL: eutaxis-1.1.0.tar.gz
  • Upload date:
  • Size: 20.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for eutaxis-1.1.0.tar.gz
Algorithm Hash digest
SHA256 a7ead849e9ae36b8fef6d591fd00422614068613096572536087406dbc25e140
MD5 c8d59653cf0e303824f6a8af842ded99
BLAKE2b-256 72ce5c7114e819481fe4c845f679c78f4fa9cf0a5a471140e83c7215d9dd1045

See more details on using hashes here.

Provenance

The following attestation bundles were made for eutaxis-1.1.0.tar.gz:

Publisher: publish-to-pypi.yml on KurtBoehm/eutaxis

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file eutaxis-1.1.0-py3-none-any.whl.

File metadata

  • Download URL: eutaxis-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 24.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for eutaxis-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 78e7f4e1b26d429337f590a24f096d7bbb73fc19e5b8564874ab935b18d6e270
MD5 ee9a924493d616da1ea6bd55b30e2d5f
BLAKE2b-256 9eaa672addca438ce4bef67c1830a32aa608b4b29316bdd890c1d66e8a5a4056

See more details on using hashes here.

Provenance

The following attestation bundles were made for eutaxis-1.1.0-py3-none-any.whl:

Publisher: publish-to-pypi.yml on KurtBoehm/eutaxis

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page