Skip to main content

Comprehensive multi-repository analysis tool for Linux Foundation projects

Project description

๐Ÿ“Š Linux Foundation Project Reporting System

Comprehensive multi-repository analysis tool for Linux Foundation projects

Generate detailed reports on Gerrit projects, contributor activity, Jenkins jobs, GitHub CI/CD workflows, and development practices across repositories.


๐Ÿ—’๏ธ Published Reports

https://lfreleng-actions.github.io/project-reporting-tool/

โšก Quick Start

# Install
pip install .

# Generate your first report
lf-releng-project-reporting generate \
  --project my-project \
  --repos-path ./repos

๐Ÿš€ Key Features

  • ๐Ÿ“ˆ Git Analytics - Commit activity, lines of code, contributor metrics across configurable time windows
  • ๐Ÿ“‹ INFO.yaml Reporting - Project metadata, committer activity, and lifecycle state tracking from info-master
  • ๐Ÿ” Feature Detection - Automatic detection of CI/CD, documentation, dependency management, security tools
  • ๐Ÿ‘ฅ Contributor Intelligence - Author and organization analysis with domain mapping
  • ๐ŸŒ API Integration - GitHub, Gerrit, and Jenkins API support
  • ๐ŸŽฏ CI-Management Integration - Authoritative Jenkins job allocation using JJB definitions (99%+ accuracy)
  • ๐Ÿ“Š Interactive Reports - JSON (data), Markdown (readable), HTML (interactive), ZIP (bundled)
  • โšก High Performance - Parallel processing with caching support

๐Ÿ“š Documentation

๐ŸŽฏ Getting Started

โš™๏ธ Setup & Configuration

๐Ÿ”ง Advanced Usage

๐Ÿ‘จโ€๐Ÿ’ป Development

๐Ÿ” Development Tools

  • Template Audit Script - python scripts/audit_templates.py - Comprehensive audit of all Jinja2 templates to verify field accesses match context builders, preventing runtime errors

๐Ÿ’ป Installation

Using UV (Recommended)

# Install UV
curl -LsSf https://astral.sh/uv/install.sh | sh

# Install dependencies
uv sync

# Run the tool
uv run lf-releng-project-reporting generate --project my-project --repos-path ./repos

Using pip

# Install from source
pip install .

# Run the tool
# Note: repos-path should match the directory created by gerrit-clone-action
# which defaults to the Gerrit server hostname (e.g., ./gerrit.o-ran-sc.org)
lf-releng-project-reporting generate --project O-RAN-SC --repos-path ./gerrit.o-ran-sc.org

โ†’ Detailed Setup Instructions


๐ŸŽฏ Common Use Cases

Use Case Command
Basic report (O-RAN-SC) lf-releng-project-reporting generate --project O-RAN-SC --repos-path ./gerrit.o-ran-sc.org
Basic report (ONAP) lf-releng-project-reporting generate --project ONAP --repos-path ./gerrit.onap.org
With caching lf-releng-project-reporting generate --project O-RAN-SC --repos-path ./gerrit.o-ran-sc.org --cache --workers 8
Check config lf-releng-project-reporting generate --project O-RAN-SC --repos-path ./gerrit.o-ran-sc.org --dry-run
Get help lf-releng-project-reporting --help

Note: The --repos-path should point to the directory created by gerrit-clone-action, which uses the Gerrit server hostname as the directory name (e.g., ./gerrit.o-ran-sc.org for O-RAN-SC, ./gerrit.onap.org for ONAP).


๐Ÿ“Š Output Formats

reports/
  <PROJECT>/
    โ”œโ”€โ”€ report_raw.json              # Complete dataset (canonical)
    โ”œโ”€โ”€ report.md                    # Markdown report (readable)
    โ”œโ”€โ”€ report.html                  # Interactive HTML (sortable tables)
    โ”œโ”€โ”€ config_resolved.json         # Applied configuration
    โ””โ”€โ”€ <PROJECT>_report_bundle.zip  # Complete bundle

๐Ÿ”Œ CI/CD Integration

GitHub Actions

- name: Generate Report
  run: |
    uv run lf-releng-project-reporting generate \
      --project "${{ matrix.project }}" \
      --repos-path "./${{ matrix.server }}" \
      --cache \
      --quiet
  env:
    GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

๐Ÿ”ง Requirements

  • Python: 3.10+ (supports 3.10, 3.11, 3.12, 3.13)
  • Dependencies: PyYAML, httpx, Jinja2, typer, rich
  • Optional: GitHub token for API features (required for workflow status colors)

GitHub Token Requirements

For full workflow status reporting (colored status indicators), you need a GitHub Personal Access Token (Classic) with these permissions:

Required Scopes:

  • โ˜‘ repo - Full repository access (or public_repo for public repositories)
  • โ˜‘ actions:read - Read GitHub Actions workflow runs and status

Note: Fine-grained tokens are not supported as they cannot span organizations.

Setup:

# Set environment variable
export GITHUB_TOKEN=ghp_your_token_here
# OR for CI/production:
export CLASSIC_READ_ONLY_PAT_TOKEN=ghp_your_token_here

# Then run the tool
lf-releng-project-reporting generate --project my-project --repos-path ./repos

Create token: https://github.com/settings/tokens

Without a token: The tool detects workflows but shows them as grey (unknown status) instead of colored status indicators.

See also: Configuration Guide for detailed token setup

Jenkins Authentication (Optional)

Some Jenkins servers require authentication to view job information. If you encounter a "returned 0 jobs" error, you need to provide Jenkins credentials.

Setup:

# Generate API token in Jenkins: User โ†’ Configure โ†’ API Token โ†’ Add new Token
export JENKINS_USER="your-username"
export JENKINS_API_TOKEN="your-api-token"

# Then run the tool
lf-releng-project-reporting generate --project my-project --repos-path ./repos

Create token: Log into your Jenkins instance โ†’ Your Username โ†’ Configure โ†’ API Token

Without credentials: The tool will fail with an error if Jenkins requires authentication.

See also: Troubleshooting Guide for detailed setup


๐Ÿ“– Key Documentation Files

Topic Document
Getting Started docs/GETTING_STARTED.md
Commands docs/COMMANDS.md
FAQ docs/FAQ.md
Configuration docs/CONFIGURATION.md
Usage Examples docs/USAGE_EXAMPLES.md
Performance docs/PERFORMANCE.md
Troubleshooting docs/TROUBLESHOOTING.md
CI/CD Setup docs/CI_CD_INTEGRATION.md
Developer Guide docs/DEVELOPER_GUIDE.md

๐Ÿ’ก Quick Tips

  • ๐ŸŽฏ First time? Start with Getting Started Guide
  • โšก Slow? Add --cache --workers 8 for parallel processing
  • ๐Ÿ› Issues? Check Troubleshooting Guide
  • โ“ Questions? See FAQ
  • ๐Ÿ“– Need help? Run lf-releng-project-reporting --help
  • ๐Ÿ” Developing templates? Run python scripts/audit_templates.py to verify all field accesses

๐Ÿ› ๏ธ Development Scripts

Template Audit Script

python scripts/audit_templates.py

This script performs a comprehensive audit of all Jinja2 templates to:

  • Extract all field accesses from templates (e.g., repo.field, org.field)
  • Analyze context builders to see what fields they provide
  • Identify mismatches that could cause "Undefined variable" errors at runtime

When to use:

  • Before committing template changes
  • After modifying context builders
  • When debugging template rendering errors
  • During code review to verify template correctness

Output:

  • โœ… Green checkmarks - All required fields present
  • โš ๏ธ Warnings - Extra fields exist (safe, unused)
  • โŒ Red errors - Missing fields that will cause runtime failures

Example output:

================================================================================
TEMPLATE FIELD ACCESS AUDIT
================================================================================

๐Ÿ“„ html/sections/summary.html.j2
  summary:
    - active_count
    - current_count
    - repositories_analyzed

โœ… No critical issues found!
   Extra fields are safe - they're unused.

๐Ÿค Support


๐Ÿ“œ License

Apache-2.0 License - Copyright 2025 The Linux Foundation


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

lf_releng_project_reporting-0.2.0.tar.gz (930.9 kB view details)

Uploaded Source

Built Distribution

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

lf_releng_project_reporting-0.2.0-py3-none-any.whl (669.4 kB view details)

Uploaded Python 3

File details

Details for the file lf_releng_project_reporting-0.2.0.tar.gz.

File metadata

File hashes

Hashes for lf_releng_project_reporting-0.2.0.tar.gz
Algorithm Hash digest
SHA256 0f1bbed388c46ed0faf6e9ff3a63d4b74c2581e0303058fecedc2e3fd4639bf3
MD5 a6fb39d1f9b2a61b0e5613a7124e1101
BLAKE2b-256 869cfa770f573662e166fe5dc4017e1d4e942e6b3f84938e842c34d444d69443

See more details on using hashes here.

Provenance

The following attestation bundles were made for lf_releng_project_reporting-0.2.0.tar.gz:

Publisher: build-test-release.yaml on lfreleng-actions/project-reporting-tool

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

File details

Details for the file lf_releng_project_reporting-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for lf_releng_project_reporting-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 01e198b08983c09179a8f3ee2e209c4b6450e5b4d84ee4e5dc248118e8ed45fb
MD5 71307b12c7cc089a2939da16216a93d0
BLAKE2b-256 8f304bdde2057314d67c6b76e7d445f81c0d98f8c056322f31942156f2236bca

See more details on using hashes here.

Provenance

The following attestation bundles were made for lf_releng_project_reporting-0.2.0-py3-none-any.whl:

Publisher: build-test-release.yaml on lfreleng-actions/project-reporting-tool

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