Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

README.md

# project_analysis

version python coverage

0 functions | 0 classes | 0 files | CC̄ = 0.0

Auto-generated project documentation from source code analysis.

Author: Tom Softreck tom@sapletta.com
License: Not specified
Repository: https://github.com/semcod/pyqual

Installation

From PyPI

pip install project_analysis

From Source

git clone https://github.com/semcod/pyqual
cd project_analysis
pip install -e .

Quick Start

CLI Usage

# Generate full documentation for your project
project_analysis ./my-project

# Only regenerate README
project_analysis ./my-project --readme-only

# Preview what would be generated (no file writes)
project_analysis ./my-project --dry-run

# Check documentation health
project_analysis check ./my-project

# Sync — regenerate only changed modules
project_analysis sync ./my-project

Python API

from project_analysis import generate_readme, generate_docs, Code2DocsConfig

# Quick: generate README
generate_readme("./my-project")

# Full: generate all documentation
config = Code2DocsConfig(project_name="mylib", verbose=True)
docs = generate_docs("./my-project", config=config)

Generated Output

When you run project_analysis, the following files are produced:

<project>/
├── README.md                 # Main project README (auto-generated sections)
├── docs/
│   ├── api.md               # Consolidated API reference
│   ├── modules.md           # Module documentation with metrics
│   ├── architecture.md      # Architecture overview with diagrams
│   ├── dependency-graph.md  # Module dependency graphs
│   ├── coverage.md          # Docstring coverage report
│   ├── getting-started.md   # Getting started guide
│   ├── configuration.md    # Configuration reference
│   └── api-changelog.md    # API change tracking
├── examples/
│   ├── quickstart.py       # Basic usage examples
│   └── advanced_usage.py   # Advanced usage examples
├── CONTRIBUTING.md         # Contribution guidelines
└── mkdocs.yml             # MkDocs site configuration

Configuration

Create project_analysis.yaml in your project root (or run project_analysis init):

project:
  name: my-project
  source: ./
  output: ./docs/

readme:
  sections:
    - overview
    - install
    - quickstart
    - api
    - structure
  badges:
    - version
    - python
    - coverage
  sync_markers: true

docs:
  api_reference: true
  module_docs: true
  architecture: true
  changelog: true

examples:
  auto_generate: true
  from_entry_points: true

sync:
  strategy: markers    # markers | full | git-diff
  watch: false
  ignore:
    - "tests/"
    - "__pycache__"

Sync Markers

project_analysis can update only specific sections of an existing README using HTML comment markers:

<!-- project_analysis:start -->
# Project Title
... auto-generated content ...
<!-- project_analysis:end -->

Content outside the markers is preserved when regenerating. Enable this with sync_markers: true in your configuration.

API Overview

Requirements

Contributing

Contributors:

We welcome contributions! Please see CONTRIBUTING.md for guidelines.

Development Setup

# Clone the repository
git clone https://github.com/semcod/pyqual
cd project_analysis

# Install in development mode
pip install -e ".[dev]"

# Run tests
pytest

Documentation

Generated Files

Output Description Link
README.md Project overview (this file)
docs/api.md Consolidated API reference View
docs/modules.md Module reference with metrics View
docs/architecture.md Architecture with diagrams View
docs/dependency-graph.md Dependency graphs View
docs/coverage.md Docstring coverage report View
docs/getting-started.md Getting started guide View
docs/configuration.md Configuration reference View
docs/api-changelog.md API change tracking View
CONTRIBUTING.md Contribution guidelines View
examples/ Usage examples Browse
mkdocs.yml MkDocs configuration