Skip to content

Commit 54fc1c6

Browse files
committed
feat: initial CodeMap implementation
Signed-off-by: Damian Skrzyński <polprog.tech@gmail.com>
1 parent 488a6b5 commit 54fc1c6

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

74 files changed

+7655
-1
lines changed
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
---
2+
name: Bug Report
3+
about: Report a bug in CodeMap
4+
title: "[Bug] "
5+
labels: bug
6+
assignees: ""
7+
---
8+
9+
## Describe the Bug
10+
11+
A clear and concise description of what the bug is.
12+
13+
## To Reproduce
14+
15+
Steps to reproduce the behavior:
16+
17+
1. Run `codemap ...`
18+
2. With this repository/project: (describe or link)
19+
3. Observe the error
20+
21+
## Expected Behavior
22+
23+
A clear description of what you expected to happen.
24+
25+
## Actual Behavior
26+
27+
What actually happened. Include full command output if possible.
28+
29+
## Environment
30+
31+
- **OS:** (e.g., macOS 14, Ubuntu 22.04)
32+
- **Python version:** (e.g., 3.12.1)
33+
- **CodeMap version:** (run `codemap --help`)
34+
- **Installation method:** (pip install, editable, etc.)
35+
36+
## Additional Context
37+
38+
Add any other context, repository examples, screenshots, or logs.
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
---
2+
name: Feature Request
3+
about: Suggest a new feature or improvement
4+
title: "[Feature] "
5+
labels: enhancement
6+
assignees: ""
7+
---
8+
9+
## Problem / Motivation
10+
11+
Describe the problem or need this feature would address.
12+
13+
## Proposed Solution
14+
15+
A clear description of what you'd like to happen.
16+
17+
## Alternatives Considered
18+
19+
Any alternative solutions or workarounds you've considered.
20+
21+
## Additional Context
22+
23+
Examples, mockups, or references to similar features in other tools.

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
## Description
2+
3+
Brief description of what this PR does.
4+
5+
## Type of Change
6+
7+
- [ ] Bug fix (non-breaking change that fixes an issue)
8+
- [ ] New feature (non-breaking change that adds functionality)
9+
- [ ] Breaking change (fix or feature that would cause existing functionality to change)
10+
- [ ] Documentation update
11+
- [ ] Refactoring (no functional changes)
12+
13+
## Changes Made
14+
15+
- Change 1
16+
- Change 2
17+
18+
## How to Test
19+
20+
Steps to verify this change:
21+
22+
1. `pip install -e ".[dev]"`
23+
2. `pytest`
24+
3. (any specific commands to test the change)
25+
26+
## Checklist
27+
28+
- [ ] My code follows the project's architecture (domain/application/infrastructure/cli layers)
29+
- [ ] I have added tests that cover my changes
30+
- [ ] All new and existing tests pass (`pytest`)
31+
- [ ] I have updated documentation if needed
32+
- [ ] My changes produce no new linting warnings (`ruff check src/ tests/`)

.github/workflows/ci.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
jobs:
10+
quality:
11+
runs-on: ubuntu-latest
12+
strategy:
13+
matrix:
14+
python-version: ["3.12", "3.13"]
15+
16+
steps:
17+
- uses: actions/checkout@v4
18+
19+
- name: Set up Python ${{ matrix.python-version }}
20+
uses: actions/setup-python@v5
21+
with:
22+
python-version: ${{ matrix.python-version }}
23+
24+
- name: Install dependencies
25+
run: pip install -e ".[dev]"
26+
27+
- name: Lint
28+
run: python -m ruff check src/ tests/
29+
30+
- name: Format check
31+
run: python -m ruff format --check src/ tests/
32+
33+
- name: Type check
34+
run: python -m mypy src/codemap/ --ignore-missing-imports
35+
36+
- name: Run tests
37+
run: python -m pytest tests/ -v --tb=short

.gitignore

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# Python
2+
__pycache__/
3+
*.py[cod]
4+
*$py.class
5+
*.so
6+
*.egg-info/
7+
*.egg
8+
dist/
9+
build/
10+
.eggs/
11+
*.whl
12+
13+
# Virtual environments
14+
.venv/
15+
venv/
16+
env/
17+
ENV/
18+
19+
# IDE
20+
.idea/
21+
.vscode/
22+
*.swp
23+
*.swo
24+
*~
25+
.DS_Store
26+
27+
# Testing / Coverage
28+
.coverage
29+
htmlcov/
30+
.pytest_cache/
31+
.mypy_cache/
32+
.ruff_cache/
33+
.tox/
34+
35+
# CodeMap outputs
36+
codemap_output/
37+
*.codemap.json
38+
*.codemap.html

CHANGELOG.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# Changelog
2+
3+
All notable changes to CodeMap will be documented in this file.
4+
5+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7+
8+
## [1.0.0] - 2026-03-15
9+
10+
### Added
11+
12+
- Initial release of CodeMap
13+
- Framework-agnostic repository scanning for Python, JavaScript, TypeScript, JSX, TSX
14+
- Module-level dependency extraction with fan-in/fan-out metrics
15+
- Git-based ownership analysis with batch `git log` operations (2 calls regardless of repo size)
16+
- Churn and hotspot detection (high churn × high coupling = risk)
17+
- Interactive HTML visualization with D3.js force-directed graph
18+
- Six layout modes: Force, Tree, Radial, Cluster, Flow, Manual
19+
- Five display modes: Overview, Readable, Focus, Presentation, Spacious
20+
- Five color modes: Language, Group, Churn, Risk, Contributors
21+
- Theme selector: Dark, Light, System (persisted in localStorage)
22+
- Complete Polish (PL) and English (EN) UI localization
23+
- Focused single-node exploration with dropdown selection (Local, Dependencies, Reverse, Impact, Flow)
24+
- Manual layout mode with drag-and-drop, save/restore via localStorage
25+
- Node notes/annotations with modal editor
26+
- Minimap for large-graph navigation
27+
- Large-graph progressive loading: collapsed clusters, click-to-expand, adaptive simulation
28+
- Fast/Quality performance toggle for large graphs (>200 nodes)
29+
- `--fast` CLI flag to skip git analysis for speed
30+
- Real-time progress reporting with Rich spinners and stage labels
31+
- Graceful `Ctrl+C` cancellation for all commands
32+
- JSON, HTML, and PDF output formats
33+
- Terminal report renderer
34+
- CI workflow with lint (ruff), format check, type checking (mypy), and tests
35+
- 136 tests covering rendering, CLI, analysis, scanning, and infrastructure
36+
- Comprehensive documentation: README, architecture, contributing guide

CODE_OF_CONDUCT.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# Contributor Covenant Code of Conduct
2+
3+
## Our Pledge
4+
5+
We as members, contributors, and leaders pledge to make participation in our
6+
community a harassment-free experience for everyone, regardless of age, body
7+
size, visible or invisible disability, ethnicity, sex characteristics, gender
8+
identity and expression, level of experience, education, socio-economic status,
9+
nationality, personal appearance, race, religion, or sexual identity
10+
and orientation.
11+
12+
## Our Standards
13+
14+
Examples of behavior that contributes to a positive environment:
15+
16+
* Using welcoming and inclusive language
17+
* Being respectful of differing viewpoints and experiences
18+
* Gracefully accepting constructive criticism
19+
* Focusing on what is best for the community
20+
* Showing empathy towards other community members
21+
22+
Examples of unacceptable behavior:
23+
24+
* The use of sexualized language or imagery and unwelcome sexual attention or advances
25+
* Trolling, insulting/derogatory comments, and personal or political attacks
26+
* Public or private harassment
27+
* Publishing others' private information without explicit permission
28+
* Other conduct which could reasonably be considered inappropriate in a professional setting
29+
30+
## Enforcement
31+
32+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
33+
reported to the project maintainers. All complaints will be reviewed and
34+
investigated and will result in a response that is deemed necessary and
35+
appropriate to the circumstances.
36+
37+
## Attribution
38+
39+
This Code of Conduct is adapted from the [Contributor Covenant](https://www.contributor-covenant.org), version 2.1.

0 commit comments

Comments
 (0)