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.2.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.2-py3-none-any.whl (4.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: moduflow-0.1.2.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.2.tar.gz
Algorithm Hash digest
SHA256 cdcb3b597baa33808502d9a2e7d61737b2256ad09579563ccffbf452b27f9521
MD5 82a0cdd0c2383b93a5adde01e1067d5e
BLAKE2b-256 fd85f54255bba33dc4c738b0ecd9f759dcf1ba8dcd1325a32edffcf22d260d0f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: moduflow-0.1.2-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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 edc4ddcfaa2d8b59bca38b50a2756ee7ed11091360bf8a806f4923dbda2e816a
MD5 956f1d38d5122ad8bc121aecbb7a2f79
BLAKE2b-256 420b13399a36a4c328b5dd78d5d99c307f0f9bf012448ae02b0ae022637784a4

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