CAsMan

CAsMan Documentation

Welcome to the CAsMan (CASM Assembly Manager) documentation. This documentation is automatically generated from the source code and reflects the current modular architecture.

Getting Started

User Documentation

API Documentation

Auto-Generated API Documentation

The following documentation is automatically generated from the source code:

Note: Auto-generated docs are created by running python docs/generate_docs.py and provide technical API details extracted directly from the source code.

Core Packages (Modularized v2.0)

CAsMan v2.0 uses a fully modular architecture with focused packages:

Legacy Modules (Compatibility)

These modules maintain backward compatibility:

Architecture Overview

CAsMan v2.0 follows a fully modular architecture with clear separation of concerns:

Package Structure

casman/
├── assembly/            # Assembly management (NEW: fully modularized)
│   ├── chains.py       # Connection chain analysis
│   ├── connections.py  # Connection recording and validation
│   ├── data.py        # Assembly data structures
│   └── interactive.py # Interactive assembly tools
├── cli/               # Command-line interface (NEW: hierarchical commands)
│   ├── main.py        # Main CLI entry point
│   ├── assembly_commands.py   # Assembly/scanning commands
│   ├── database_commands.py   # Database management commands
│   ├── parts_commands.py      # Parts management commands
│   ├── barcode_commands.py    # Barcode generation commands
│   └── visualization_commands.py # Visualization commands
├── parts/             # Parts management (NEW: fully modularized)
│   ├── generation.py  # Part number generation
│   ├── interactive.py # Interactive part management
│   ├── validation.py  # Part validation and checking
│   └── search.py      # Part searching functionality
├── database/          # Database operations (NEW: modularized)
│   ├── connection.py  # Database connections and paths
│   ├── initialization.py # Database setup and schema
│   ├── operations.py  # Database queries and operations
│   └── migrations.py  # Schema migrations and updates
├── config/            # Configuration management (NEW: modularized)
│   ├── core.py        # Core configuration functions
│   ├── environments.py # Environment handling
│   └── schema.py      # Configuration validation
├── barcode/           # Barcode operations (NEW: modularized)
│   ├── generation.py  # Barcode creation
│   ├── operations.py  # Barcode processing
│   └── validation.py  # Barcode validation
└── visualization/     # Visualization tools (NEW: modularized)
    ├── core.py        # ASCII visualization
    └── web.py         # Web-based visualization

Key Benefits

Testing

All functionality is covered by comprehensive tests:

# Run all tests (59 tests total)
python -m pytest

# Test specific packages
python -m pytest tests/test_assembly.py -v  # Assembly package tests
python -m pytest tests/test_cli.py -v      # CLI package tests
python -m pytest tests/test_parts.py -v    # Parts package tests

Scripts

The project includes standalone scripts in the scripts/ directory:

Development

This documentation includes both manually written guides and auto-generated API documentation.

Manual Documentation

The main documentation (guides, tutorials, examples) is manually maintained for accuracy and clarity.

Auto-Generated Documentation

To generate technical API documentation from source code:

python docs/generate_docs.py

This creates auto-generated documentation in docs/auto-generated/ with technical API details extracted from the source code.

Project Structure

CAsMan/
├── casman/                 # Main Python package
├── scripts/               # Standalone utility scripts
├── database/              # SQLite database files
├── barcodes/              # Generated barcode images
├── docs/                  # Documentation (this directory)
│   ├── auto-generated/    # Auto-generated API docs
│   └── *.md              # Manual documentation
├── tests/                 # Unit tests
└── config.yaml           # Project configuration