Skip to main content

A web application to visualize GitHub repository commit history

Reason this release was yanked:

yanked

Project description

Git Commit Chart

A web application that visualizes commit history for GitHub repositories using interactive charts. The application shows commit patterns over the last 30 days of any public GitHub repository, with both overall commit trends and per-user contribution breakdowns.

Features

  • View total commits per day with a line chart
  • Analyze commits by user with a stacked bar chart
  • Interactive GitHub-styled legend with user filtering
  • Responsive design that works on all devices
  • Easy navigation between different views
  • URL sharing support for specific repositories

Installation

Local Installation (Current Method)

  1. Clone the repository:
git clone https://github.com/yourusername/git-commit-chart.git
cd git-commit-chart
  1. Create a virtual environment:
python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate
  1. Install the package:
pip install -e .

Development Installation

For development, install with additional development dependencies:

pip install -e ".[dev]"

Usage

Command Line Interface

After installation, you can run the application using the git-commit-chart command:

# Run in development mode (default)
git-commit-chart

# Run in production mode
git-commit-chart --production

# Specify host and port
git-commit-chart --host 0.0.0.0 --port 8000

Options

  • --port: Port to run the application on (default: 5000)
  • --host: Host to run the application on (default: 127.0.0.1)
  • --production/--development: Run in production mode with Waitress server (default: development)

Using the Web Interface

  1. Start the application using one of the methods above
  2. Open your web browser and navigate to the displayed URL (default: http://127.0.0.1:5000)
  3. Enter a GitHub repository owner and name (e.g., "facebook" and "react")
  4. Click "Generate Chart" to view the commit history
  5. Use the navigation links to switch between total commits and per-user views

URL Parameters

You can share specific repository visualizations by including the owner and repo in the URL:

http://localhost:5000/?owner=facebook&repo=react
http://localhost:5000/by-user?owner=facebook&repo=react

Development

Requirements

  • Python 3.9 or higher
  • pip (Python package installer)

Development Tools

The development installation includes:

  • pytest: For running tests
  • black: For code formatting
  • flake8: For code linting
  • build: For building distribution packages
  • twine: For publishing to PyPI

Running Tests

The package includes comprehensive tests for all major components. To run the tests:

# Install development dependencies first
pip install -e ".[dev]"

# Run all tests
pytest

# Run tests with coverage report
pytest --cov=git_commit_chart

# Run specific test files
pytest tests/test_api.py
pytest tests/test_routes.py
pytest tests/test_cli.py

The tests cover:

  • API Functions: Testing GitHub API integration
  • Routes: Testing Flask endpoints and responses
  • CLI: Testing command-line interface options
  • Error Handling: Testing invalid inputs and error cases

Building the Package

To build the package for distribution:

python -m build

This will create both wheel and source distribution in the dist/ directory.

Docker Support

Build and run using Docker:

# Build the image
docker build -t git-commit-chart .

# Run the container
docker run -p 5000:5000 git-commit-chart

Kubernetes Deployment

Kubernetes manifests are provided in the k8s directory. Deploy using:

kubectl apply -f k8s/deployment.yaml

License

This project is licensed under the MIT License - see the LICENSE file for details.

Notes

  • The application only shows commits from the last 30 days
  • Only public repositories are supported
  • GitHub API has rate limiting for unauthenticated requests # git-commit-chart

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

git_commit_chart-0.1.1.tar.gz (11.6 kB view details)

Uploaded Source

Built Distribution

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

git_commit_chart-0.1.1-py3-none-any.whl (11.0 kB view details)

Uploaded Python 3

File details

Details for the file git_commit_chart-0.1.1.tar.gz.

File metadata

  • Download URL: git_commit_chart-0.1.1.tar.gz
  • Upload date:
  • Size: 11.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for git_commit_chart-0.1.1.tar.gz
Algorithm Hash digest
SHA256 6a369dea7116100df710438e2a1f0a3a9a8b69d0e5a70f44971ba353a5e19f6e
MD5 0508b81984719c0b6cbc2672f6671b9e
BLAKE2b-256 88f44119502348cb91b1f60427c545f9f3baf705924ca38735004981e7871c36

See more details on using hashes here.

File details

Details for the file git_commit_chart-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for git_commit_chart-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 50b57295390fa809442ddbb58ad6289ea51d3468ee959fb0daecbff9c961acd7
MD5 1c3ce75378bbd4451031cdbca96552b7
BLAKE2b-256 4b5fe43705d434457c412fda742686d1a0a5a38dd13facf97b5c0f8ae4f7e823

See more details on using hashes here.

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