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
61 changes: 61 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,74 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

---

## [1.2.0] - 2025-11-01

### Added
- **Exit codes for CI/CD integration** πŸš€
- `0` = All harmonious (excellent or low severity)
- `1` = Medium severity found (0.5-0.8)
- `2` = High severity found (0.8-1.2)
- `3` = Critical severity found (β‰₯ 1.2)
- Enables automated quality gates in pipelines
- Build fails automatically on high/critical disharmony

- **JSON output format** πŸ“Š
- `--format json` option for machine-readable output
- Structured data for tool integration
- Includes severity levels, scores, and summary statistics
- Perfect for IDEs, dashboards, and analytics

- **Enhanced command-line interface**
- Argument parsing with argparse
- `--version` flag
- `--threshold` option for custom thresholds
- Comprehensive `--help` with examples
- Multiple file support improved

- **Enhanced README badges**
- CI status badge
- Version badge
- Test pass rate badge
- Harmony score badge (meta!)
- All clickable with relevant links

### Changed
- Version bumped to 1.2
- Improved CLI usability with better help text
- Quiet mode when using JSON output

### Documentation
- Quick Reference guide updated with v1.2 features
- Exit code examples for CI/CD
- JSON output format examples
- Advanced usage patterns

---

## [1.1.0] - 2025-10-31

### Added
- Comprehensive documentation suite
- Integration templates (GitHub Actions, pre-commit, VS Code)
- Quick reference guide
- Tool comparison guide
- Troubleshooting guide
- Real-world example files
- Complete refactoring journey examples
- Severity level demonstrations

### Documentation
- USER_GUIDE.md (~14K words)
- TUTORIAL.md (~19K words)
- FAQ.md (~19K words)
- PHILOSOPHY.md (~22K words)
- ARCHITECTURE.md (~23K words)
- API.md (~21K words)
- COMPARISON.md (~11K words)
- QUICK_REFERENCE.md (~5K words)
- TROUBLESHOOTING.md (~11K words)

---

Expand Down
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
# Python Code Harmonizer

[![MIT License](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)
[![Python Versions](https://img.shields.io/badge/python-3.8+-blue.svg)]()
[![CI Status](https://github.com/BruinGrowly/Python-Code-Harmonizer/workflows/Python%20Code%20Harmonizer%20CI/badge.svg)](https://github.com/BruinGrowly/Python-Code-Harmonizer/actions)
[![Version](https://img.shields.io/badge/version-1.2-blue.svg)](CHANGELOG.md)
[![Python Versions](https://img.shields.io/badge/python-3.8+-blue.svg)](https://www.python.org/)
[![License](https://img.shields.io/badge/license-MIT-green.svg)](LICENSE)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
[![Tests](https://img.shields.io/badge/tests-20%20passed-brightgreen.svg)](tests/)
[![Harmony Score](https://img.shields.io/badge/harmony-0.15-brightgreen.svg)](examples/test_code.py)

**The world's first semantic code debugger.**

Expand Down
57 changes: 57 additions & 0 deletions docs/QUICK_REFERENCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,63 @@ find src/ -name "*.py" -exec harmonizer {} \;

---

## Advanced Options (v1.2+)

```bash
# JSON output format (for tools/CI/CD)
harmonizer --format json myfile.py

# Custom threshold
harmonizer --threshold 0.7 myfile.py

# Check version
harmonizer --version

# Get help
harmonizer --help
```

### Exit Codes for CI/CD

Harmonizer returns meaningful exit codes:

| Exit Code | Severity | Score Range |
|-----------|----------|-------------|
| `0` | Excellent/Low | < 0.5 |
| `1` | Medium | 0.5 - 0.8 |
| `2` | High | 0.8 - 1.2 |
| `3` | Critical | β‰₯ 1.2 |

**Use in CI/CD:**
```yaml
- name: Check Code Harmony
run: harmonizer src/**/*.py # Will fail build if critical
```

### JSON Output Example

```json
{
"version": "1.2",
"threshold": 0.5,
"files": [{
"file": "myfile.py",
"functions": [{
"name": "get_user",
"score": 0.95,
"severity": "high",
"disharmonious": true
}]
}],
"summary": {
"total_functions": 10,
"severity_counts": { "critical": 1, "high": 2 }
}
}
```

---

## Score Interpretation

| Score | Status | Meaning | Action |
Expand Down
Loading