Skip to main content

Section-based development with Test-Driven Development support

Project description

ModuFlow

Documentation Status

A command-line tool for modular development with Test-Driven Development (TDD) support.

Overview

ModuFlow helps you organize your codebase into logical modules, making it easier to:

  • Implement Test-Driven Development (TDD) for each module
  • Keep track of which files belong to which module
  • Compile modules separately or together
  • Generate AI development prompts based on the project structure

Installation

pip install moduflow

For development:

git clone https://github.com/moduflow/moduflow.git
cd moduflow
pip install -e .

Core Concepts

  • Modules: Logical groupings of files that represent a component or feature
  • Module Configuration: YAML files stored in .moduflow/config/sections/
  • Design Files: Stored in design/ directory with module-specific design information
  • Compilation: Files from modules are compiled into .compiled_sections/ directory

Usage

Initialize a project

moduflow init

This creates the necessary directory structure and configuration files.

Working with modules

# Create a new module
moduflow create-section users --description "User authentication and management"

# Add files to a module
moduflow add-files users users/auth.py users/models.py

# Add a file to multiple modules
moduflow add-file .env users,core,api

Compiling code

# Compile a specific module
moduflow compile-section users

# Compile all modules separately
moduflow compile-all

# Compile the entire project
moduflow compile-project

Managing the project

# List all modules and their files
moduflow list

# Analyze the project structure and suggest modules
moduflow analyze

# Generate AI development prompt
moduflow get-prompt --output ai_prompt.md

Configuration Structure

ModuFlow uses YAML for configuration, with separate files for each module:

.moduflow/                 # Hidden directory for configuration files
├── config/                # Configuration directory
│   ├── sections/          # Individual module configurations
│   │   ├── users.yaml     # Users module config
│   │   ├── core.yaml      # Core module config
│   │   └── ...            # Other module configs
│   └── compiled.yaml      # Compiled configuration (generated)

Example module YAML file (users.yaml):

name: users
description: User authentication, registration, and profile management
files:
  - users/__init__.py
  - users/models.py
  - users/views.py
  - users/tests/test_models.py
  - .env
  - requirements.txt

Development Workflow

  1. Initialize your project with moduflow init
  2. Define your modules using create-section
  3. Create design files in the design/ directory for each module
  4. Use get-prompt to generate an AI development prompt
  5. Implement each module using TDD
  6. Use compile-section to verify that each module works independently
  7. Use compile-project for final integration

Documentation

Check out our documentation.

License

MIT

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

moduflow-0.1.1.tar.gz (15.8 kB view details)

Uploaded Source

Built Distribution

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

moduflow-0.1.1-py3-none-any.whl (4.3 kB view details)

Uploaded Python 3

File details

Details for the file moduflow-0.1.1.tar.gz.

File metadata

  • Download URL: moduflow-0.1.1.tar.gz
  • Upload date:
  • Size: 15.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.21

File hashes

Hashes for moduflow-0.1.1.tar.gz
Algorithm Hash digest
SHA256 32967f2cef61b04ea5ca30a6f06f5a5d42e08b502b55f8757d1c226141527849
MD5 920c79087189515ad84a8a130a19c22f
BLAKE2b-256 13a545f3b08609b2487751de901cb5525b36fcabbc655a0e2f3a699d5f55c8d6

See more details on using hashes here.

File details

Details for the file moduflow-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: moduflow-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 4.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.21

File hashes

Hashes for moduflow-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 2923fede1dcb4c467c5b07c0743df034b5268eb905a18a9241e4ad9eb08e57cc
MD5 2b60162dd9948e16b4f5d0c4ded61673
BLAKE2b-256 3dc588fdb2aaa3fb5c7b2d92dbf39347d1d2ce94eede1b58eb51ef2bb40cef0d

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