Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,32 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [0.8.1] - 2026-04-13

### Added
- **Built-in quality rules** - Three quality checks for enforcing code standards
- `type-coverage` - Enforce type hint coverage on public functions (default: 80% minimum)
- `docstring-coverage` - Enforce docstring coverage on public functions (default: 90% minimum)
- `param-complexity` - Enforce parameter count limits (default: 5 parameters maximum)
- Pass/fail semantics with exit codes for CI/CD integration
- Configurable thresholds and exclusion patterns via `mapper.toml`
- **Quality check output formats** - Console, JSON, and CSV formatters
- Console: Human-readable with Rich markup (colors, check marks βœ“/βœ—)
- JSON: Structured output for CI/CD integration and automation
- CSV: Spreadsheet-compatible format for tracking quality over time
- **Quality configuration system** - TOML-based configuration with validation
- `[quality.type-coverage]` section for type hint settings
- `[quality.docstring-coverage]` section for docstring settings
- `[quality.param-complexity]` section for parameter limit settings
- Per-rule enable/disable flags and exclusion patterns
- **User journey and interface documentation** - Complete quality rules documentation
- User journey: CLI usage, configuration examples, CI/CD integration
- Interface design: Data models, query patterns, formatter specifications

### Changed
- Quality rule names use hyphens (consistent with query naming: `find-dead-code`)
- Quality rules use `description` field (consistent with Query base class)

## [0.8.0] - 2026-04-05

### Added
Expand Down
4 changes: 2 additions & 2 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -422,5 +422,5 @@ Review these documents to understand patterns and best practices:

---

**Last Updated**: 2026-04-04
**Current Version**: 0.8.0
**Last Updated**: 2026-04-13
**Current Version**: 0.8.1
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Mapper (Application Mapper)

![Version](https://img.shields.io/badge/version-0.8.0-blue.svg)
![Version](https://img.shields.io/badge/version-0.8.1-blue.svg)
![Tests](https://img.shields.io/endpoint?url=https://gist.githubusercontent.com/ydkadri/9501806ed5eac873dd324bc606c6dd79/raw/mapper-tests.json&cacheSeconds=300)
![Coverage](https://img.shields.io/endpoint?url=https://gist.githubusercontent.com/ydkadri/9501806ed5eac873dd324bc606c6dd79/raw/mapper-coverage.json&cacheSeconds=300)
![Python](https://img.shields.io/badge/python-3.10%2B-blue.svg)
Expand All @@ -18,6 +18,7 @@ Mapper helps you understand complex Python applications by analysing their Abstr
- **Incremental Updates**: Track versions and update only what changed
- **CLI Tool**: Powerful command-line interface built with Typer
- **Risk Detection Queries**: Built-in queries to find dead code, module centrality, and critical functions
- **Quality Rules**: Enforce type coverage, docstring coverage, and parameter complexity standards
- **Package-Wide Analysis**: Analyse entire Python packages from a directory

### Use Cases
Expand Down Expand Up @@ -77,6 +78,11 @@ mapper query list # List available queries
mapper query run find-dead-code mypackage # Find unused code
mapper query run analyze-module-centrality mypackage # Find central modules

# Run quality checks (CI/CD integration)
mapper quality type-coverage mypackage # Check type hint coverage
mapper quality docstring-coverage mypackage # Check docstring coverage
mapper quality check mypackage --json # Run all quality checks

# View detailed analysis in Neo4j Browser
# Navigate to http://localhost:7474 and run Cypher queries
```
Expand Down
13 changes: 13 additions & 0 deletions docs/contributing/code-architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,12 +79,25 @@ from mapper.ast_parser import models
__all__ = ["ASTExtractor", "Node", "Edge", "Graph", "models"]
```

```python
# mapper/ast_parser/extractor.py (regular module - NO __all__)

class ASTExtractor:
"""Public class - no underscore prefix."""
...

def _validate_ast(tree):
"""Private helper - underscore prefix."""
...
```

**Principles:**
- Only expose classes/functions needed by external consumers
- If only one class from a submodule is needed, import just that class
- If multiple things are useful, import them to sit at top level
- If a submodule is a useful reference, import the whole module
- Everything in `__all__` should be intentionally public
- Regular modules use underscore prefixes for private items, NOT `__all__`

**Separate models from logic:**
- Models/dataclasses in `models.py`
Expand Down
Loading
Loading