Skip to main content

Code cleanup for C++, Python, and Meson

Project description

🧹 Eutaxis

PyPI - Version Test Workflow Status

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 available on PyPI and can be installed as usual, for example:

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:

fix_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.

📜 Licence

This library is licensed under the terms of the Mozilla Public Licence 2.0, provided in License.

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.2.0.tar.gz (21.4 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.2.0-py3-none-any.whl (24.7 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for eutaxis-1.2.0.tar.gz
Algorithm Hash digest
SHA256 1be9ce40926e3a919d9b731a973b6c3ca5f228d52e868b4272fc681c0443a4da
MD5 df50764307e45023c70966f6c9caee0b
BLAKE2b-256 c3a6027058609006097b7fbe4c2c176945baba9f6ac6f3553805756269b4074e

See more details on using hashes here.

Provenance

The following attestation bundles were made for eutaxis-1.2.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.2.0-py3-none-any.whl.

File metadata

  • Download URL: eutaxis-1.2.0-py3-none-any.whl
  • Upload date:
  • Size: 24.7 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.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 efea46b58dee0a0132244b315e670fb8153f7f55dd2cdfff9025471b68c05f4b
MD5 864e1acf8c6b1ecbe3e1822f89828a70
BLAKE2b-256 a6850465d2bdfc213c2efec7e6f18b4668aa96f43b9444b4457a7d4255e5e824

See more details on using hashes here.

Provenance

The following attestation bundles were made for eutaxis-1.2.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