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.3.tar.gz (17.6 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.3-py3-none-any.whl (23.5 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for moduflow-0.1.3.tar.gz
Algorithm Hash digest
SHA256 72c10d8e4e599df20c49cd56b4a292fbba9b00847d3db0e40b2f68b496c7d51b
MD5 28d88356b9f49c05ef305e6d01730796
BLAKE2b-256 4c34225421ac2a8df11adaa5ecb6c8bf7138595bb32e73326505b63b636ff0e4

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for moduflow-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 3c9476991497f661daf28fff49b8f6246a5d9bc99a0b8b9c578d456916777cc6
MD5 b46d52aa9c15e4255a84104111c05848
BLAKE2b-256 f15ca907e810ac08049cbf38774e5e65e053df13c90ffe7bf06878f6eefa0b9a

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