Skip to main content

Self-contained HTML commit-analytics dashboard generated from `git log`.

Project description

repostory

Self-contained HTML commit-analytics dashboard generated from git log.

Point repostory at any local git repository and it produces a single HTML file containing an interactive dashboard: commit cadence, author breakdowns, conventional-commit usage, rework signals, co-change coupling, and more. No server, no external assets — just open the file.

Install

Requires Python 3.9+ and a working git on PATH.

From source (recommended while unreleased)

# 1. Clone the repository
git clone https://github.com/<your-user>/repostory.git
cd repostory

# 2. (Optional but recommended) create and activate a virtual environment
python -m venv .venv
source .venv/bin/activate          # macOS / Linux
# .\.venv\Scripts\activate         # Windows PowerShell

# 3. Upgrade pip, then install the package
python -m pip install --upgrade pip
pip install .

# 4. Verify
repostory --version

From PyPI

Once the first release lands on PyPI:

pip install repostory

For development

git clone https://github.com/<your-user>/repostory.git
cd repostory
python -m venv .venv && source .venv/bin/activate
pip install -e ".[dev]"
pytest

-e installs in editable mode so source changes take effect without reinstalling. [dev] pulls in pytest.

Usage

repostory                              # analyse the current directory
repostory --repo /path/to/repo         # point at another repo
repostory --output report.html         # custom output path
repostory --author you@example.com     # filter by author email substring
repostory --fetch                      # `git fetch --all --prune` first
repostory --fast                       # skip --numstat (faster, less detail)

Or run as a module:

python -m repostory --repo /path/to/repo

Options

Flag Default Description
--repo . Path to the git repository.
--output repostory.html Output HTML file path.
--author all Filter commits by author email substring.
--fetch off Run git fetch --all --prune before reading history.
--fast off Skip file-level analysis (no bus factor, hotspots, coupling).
-v, --verbose off Verbose (DEBUG) logging.
-q, --quiet off Only show warnings and errors.
--version Print version and exit.

What you get

  • Cadence — commits per day, week, and rolling averages.
  • Author breakdown — per-author activity, bus factor, contribution share.
  • Commit types — conventional-commit type distribution (feat, fix, refactor, …).
  • Rework signal — share of commits matching rework keywords (fix, revert, hotfix, …).
  • Hotspots — most-touched files and file-size buckets.
  • Co-change coupling — files that change together.
  • Velocity — recent vs. prior 4-week window classification (up / steady / down).
  • Night & weekend share — when work actually happens.

Project layout

.
├── pyproject.toml
├── README.md
├── src/
│   └── repostory/
│       ├── __init__.py
│       ├── __main__.py     # python -m repostory entrypoint
│       ├── cli.py          # argparse, logging, orchestration
│       ├── git_io.py       # subprocess wrappers around `git log`, `git tag`, …
│       ├── cadence.py      # rolling averages, conventional-commit parsing
│       ├── aggregator.py   # raw commits → structured dashboard payload
│       ├── report.py       # template rendering
│       ├── constants.py    # shared constants
│       └── templates/      # dashboard.html, dashboard.js, styles.css
└── tests/

Layered: transport (cli) → business logic (aggregator, cadence) → data access (git_io) → rendering (report + templates). Uses the src layout so tests can only import the installed package, not a stray in-tree copy.

Development

pip install -e ".[dev]"
pytest

Releases

Releases are fully automated. You do not bump versions, write changelogs, or push tags by hand. The workflow is driven by conventional commits:

Commit type What it does
feat: … bumps the minor version
fix: … / perf: … bumps the patch version
feat!: … (or BREAKING CHANGE: in the body) bumps the major version
chore: / docs: / test: / ci: / style: no release

The pipeline

On every push to main (typically a squash-merged PR), .github/workflows/release.yml runs:

  1. Runs pytest.
  2. python-semantic-release inspects commits since the last tag and decides the next version (or skips if nothing releasable).
  3. Updates pyproject.toml and CHANGELOG.md, commits as chore(release): vX.Y.Z [skip ci], tags vX.Y.Z, and publishes a GitHub Release.
  4. Builds sdist + wheel, validates with twine check, and uploads to PyPI via trusted publishing (OIDC — no API tokens stored).

One-time setup

  1. PyPI account — register at https://pypi.org/account/register/ and enable 2FA.
  2. Trusted publisher — at https://pypi.org/manage/account/publishing/ add a pending publisher:
    • Project: repostory · Owner: your GitHub user/org · Repo: this repo · Workflow: release.yml · Environment: pypi
  3. GitHub environment — repo Settings → Environments → New environment named pypi. Add yourself as a required reviewer if you want a manual click before each PyPI push.
  4. Branch protection — if main requires PR reviews or status checks, allow the github-actions[bot] user to bypass them, or the release commit will be rejected.

Cutting a release

Just merge a PR with a feat: or fix: commit. That's it. To verify before pushing:

# Preview what the next version would be, without changing anything
pip install python-semantic-release
semantic-release --noop version --print

License

MIT.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

repostory-0.0.0.tar.gz (32.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

repostory-0.0.0-py3-none-any.whl (30.0 kB view details)

Uploaded Python 3

File details

Details for the file repostory-0.0.0.tar.gz.

File metadata

  • Download URL: repostory-0.0.0.tar.gz
  • Upload date:
  • Size: 32.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for repostory-0.0.0.tar.gz
Algorithm Hash digest
SHA256 4b4cc434401dbd6e55c4883ad8ab59c430073f4ea5f6ab3f35ac1bd478d8b408
MD5 c83b8c1ffd6787b672ae06fcbf04d60d
BLAKE2b-256 d9f752d3eceeb7fdc2da40d4a1e6f52cc6b3d6c4a04f8a15dfeb4628a8dcc55a

See more details on using hashes here.

Provenance

The following attestation bundles were made for repostory-0.0.0.tar.gz:

Publisher: release.yml on lakshaykamat/repostory

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file repostory-0.0.0-py3-none-any.whl.

File metadata

  • Download URL: repostory-0.0.0-py3-none-any.whl
  • Upload date:
  • Size: 30.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for repostory-0.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 18621a0425539d8d3723554bb89aac198b205950a610280fa558cfbdddd3afd8
MD5 1c4047b8657f7582da7b845864dd8cf1
BLAKE2b-256 02964e7fdbe666b78c3657520baa6c7209c2211d090d52f71575ed3422a79738

See more details on using hashes here.

Provenance

The following attestation bundles were made for repostory-0.0.0-py3-none-any.whl:

Publisher: release.yml on lakshaykamat/repostory

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page