Skip to content

Latest commit

 

History

History
146 lines (100 loc) · 2.54 KB

File metadata and controls

146 lines (100 loc) · 2.54 KB

Developer Guide

This guide provides comprehensive information for developers working on DocGen.

Project Overview

DocGen is a CLI tool that generates project structure documentation. It helps developers quickly understand project layout.

Key features:

  • Generate PROJECT_STRUCTURE.md automatically
  • Support multiple profiles (minimal, default, detailed)
  • Smart mode for automatic optimization
  • Configurable via .projectstructure.toml

Development Setup

Prerequisites

  • Python 3.14+
  • Git
  • Docker (optional, for containerized development)

Quick Setup

# Clone repository
git clone https://github.com/devalltect00/doc-gen.git
cd doc-gen

# Create virtual environment
python -m venv .venv

# Activate (Windows)
.venv\Scripts\activate

# Activate (Linux/Mac)
source .venv/bin/activate

# Install with dev dependencies
pip install -e .[dev,docs]

Project Structure

doc-gen/
├── app/
│   └── doc_gen/
│       ├── cli/           # CLI commands
│       ├── core/         # Core logic
│       ├── config/       # Configuration
│       ├── constants/    # Constants
│       ├── services/    # Services
│       ├── templates/    # Templates
│       ├── theme/       # Theming
│       ├── ui/         # UI components
│       └── utils/       # Utilities
├── docs/               # Documentation
├── tests/              # Tests
└── Makefile           # Build automation

Common Development Tasks

Running Tests

pytest -v

Running Lint

ruff check app tests

Running Format

ruff format app tests

Running Full Check

make check

Running Docker Development

make d-build-dev
make d-test

Code Style

  • Follow PEP 8
  • Use Ruff for linting
  • Use Black/Ruff formatter for code formatting
  • Write docstrings for all public functions

Testing

Write tests for:

  • New features
  • Bug fixes
  • Edge cases

Run specific test:

pytest tests/cli/test_main.py -v

Submitting Changes

  1. Create a feature branch
  2. Make your changes
  3. Add tests
  4. Run 'make check'
  5. Submit pull request

Related Documentation