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.0.tar.gz (15.9 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.0-py3-none-any.whl (4.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: moduflow-0.1.0.tar.gz
  • Upload date:
  • Size: 15.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.11.5

File hashes

Hashes for moduflow-0.1.0.tar.gz
Algorithm Hash digest
SHA256 97b67cb4e2b8b2ea0e68eef452c09fc885c95166a2e448dddd99eded3ec76354
MD5 51de3232b31dc053349b4f1630ce89a9
BLAKE2b-256 c3b585b1140986efa2a609a3c1a9cfbc16edc5f24b96ffa40d60f45836b57c22

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for moduflow-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 32eccf745707671d6efa8b592017b2c4d546d5658c5aba2f98c9921754cd68b3
MD5 c6064b396dbbf435e3ce22f2d93fec6b
BLAKE2b-256 9ee66b79e875204fdccdf8096310c72f844b1e42e34fcfca6974508a78a75433

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