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:
    • 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 external formatters:
      • Python: isort, ruff format
      • Meson: 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.0.0.tar.gz (15.7 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.0.0-py3-none-any.whl (18.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: eutaxis-1.0.0.tar.gz
  • Upload date:
  • Size: 15.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for eutaxis-1.0.0.tar.gz
Algorithm Hash digest
SHA256 a66bd218d9aa1dbbe80ff33adcd2854c4aafa1ab35984e5172fece12d733319f
MD5 41c15c1cf4670bda8953dbe54f7b1981
BLAKE2b-256 2472671c814ba994407ecb027dd94526636324cad66c9df2fbfd66bf91ef6895

See more details on using hashes here.

File details

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

File metadata

  • Download URL: eutaxis-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 18.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for eutaxis-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 26d9d754a6db0fffd6c37da0981b34914684c949e8397e5f792e46a95ceb92c2
MD5 d14ca2f5bcabd274526670a0e8b41629
BLAKE2b-256 6ae60bdf81f00ebd6833b95f609b33d452d11515ad1ed4b464c0627fe9b64aa6

See more details on using hashes here.

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