Skip to main content

A comprehensive Python project quality analyzer that automatically detects issues in code style, documentation, CI/CD, and dependencies, providing actionable next steps and detailed reports.

Project description

Weekly - Project Quality Analyzer

AI Cost Tracking

AI Cost AI Model

This project uses AI-generated code. Total cost: $1.6500 with 11 AI commits.

Generated on 2026-06-29 using openrouter/qwen/qwen3-coder-next


PyPI PyPI - Downloads Python Versions License: Apache-2.0 Documentation Code style: black Imports: isort Checked with mypy codecov Build Status CodeQL pre-commit.ci status Ruff CodeFactor OpenSSF Scorecard Dependabot Contributor Covenant Discussions Twitter Follow

Weekly is a comprehensive Python project quality analyzer that helps developers maintain high code quality by automatically detecting issues and suggesting improvements. It analyzes various aspects of your Python projects and generates actionable reports with clear next steps.

✨ Features

  • 🧪 Test Coverage Analysis: Check test coverage and test configuration (now parses coverage.xml)
  • 📚 Documentation Check: Verify README, LICENSE, CHANGELOG, and API docs
  • 🔄 CI/CD Integration: Detect CI/CD configuration and best practices
  • 📦 Dependency Analysis: Identify outdated or vulnerable dependencies (now with pip-audit integration and AST parsing)
  • 🛠️ Code Quality: Check for code style, formatting, and common issues
  • 🔒 Security Checks: Detect hardcoded secrets and insecure function usage
  • 📦 Packaging Check: Verify PEP 517/518 compliance and distribution metadata
  • 🚀 Release Readiness: Check version consistency and changelog status
  • 📊 Interactive Reports: Generate detailed reports in multiple formats (JSON, Markdown, Text, HTML)
  • 🔍 Multi-Repo Scanning: Scan multiple Git repositories with parallel processing
  • 📅 Date-based Filtering: Flexible date parsing for analyzing recent changes

🔍 Git Repository Scanning

Weekly can scan multiple Git repositories in a directory structure and generate comprehensive reports for each one, plus a summary report.

It also extracts Recent Changes (commits, files/lines changed, commit type breakdown) and writes a per-repo changelog.md into the report directory.

Basic Usage

# Scan all Git repositories in ~/github
weekly scan ~/github

# Only show repositories with changes in the last 7 days (default)
weekly scan ~/github --since "7 days ago"

# Specify a custom output directory
weekly scan ~/github -o ./weekly-reports

# Run with 8 parallel jobs for faster scanning
weekly scan ~/github -j 8

# Generate JSON reports instead of HTML
weekly scan ~/github --format json

Recent Changes + changelog.md

When you run weekly scan ... --since "...", the per-repo reports include a Recent Changes section and a changelog.md file in the repository report directory.

  • If git-cliff is available, Weekly uses it to generate changelog.md.
  • If git-cliff is not available, Weekly falls back to an internal summary (commit + diff stats).

Optional installation (recommended) for richer changelog output:

cargo install git-cliff

Example Output

🔍 Scanning Git repositories in /Users/username/github...
✅ Scan complete! Generated reports for 3 repositories.
📊 Summary report: weekly-reports/summary.html

✅ org1/repo1: 5 checks
   ✓ style: Passed
   ✓ code_quality: Passed
   ✓ dependencies: 2 outdated packages found
   ✓ docs: Documentation is 85% complete
   ✓ tests: 92% test coverage

Command Options

Usage: weekly scan [OPTIONS] [ROOT_DIR]

  Scan multiple Git repositories and generate reports.

  ROOT_DIR: Directory containing Git repositories (default: current directory)

Options:
  -o, --output PATH      Output directory for reports (default: ./weekly-reports)
  -s, --since TEXT        Only include repositories with changes since this date (e.g., "7 days ago", "2023-01-01")
  --recursive / --no-recursive  Scan directories recursively (default: True)
  -j, --jobs INTEGER      Number of parallel jobs (default: 4)
  -f, --format [html|json|markdown]  Output format (default: html)
  --summary-only          Only generate a summary report, not individual reports
  -v, --verbose           Show detailed output
  --help                  Show this message and exit.

Programmatic Usage

from pathlib import Path
from datetime import datetime, timedelta
from weekly import GitScanner

# Create a scanner instance
scanner = GitScanner(
    root_dir=Path.home() / "github",
    output_dir="weekly-reports",
    since=datetime.now() - timedelta(days=7),
    recursive=True,
    jobs=4
)

# Run the scan
results = scanner.scan_all()

# Process results
for result in results:
    print(f"{result.repo.org}/{result.repo.name}:")
    for name, check in result.results.items():
        status = "✓" if check.is_ok else "✗"
        print(f"  {status} {name}: {check.message}")

🚀 Installation

Using pip

pip install weekly

Using Poetry (recommended)

poetry add weekly

For Development

# Clone the repository
git clone https://github.com/wronai/weekly.git
cd weekly

# Install with Poetry
poetry install --with dev

# Install pre-commit hooks
pre-commit install

# Activate the virtual environment
poetry shell

Usage

Basic Usage

Analyze a Python project:

weekly analyze /path/to/your/project

Command Line Options

Usage: weekly analyze [OPTIONS] PROJECT_PATH

  Analyze a Python project and provide quality insights.

  PROJECT_PATH: Path to the project directory (default: current directory)

Options:
  -f, --format [text|json|markdown]  Output format (default: text)
  -o, --output FILE                  Output file (default: stdout)
  --show-suggestions / --no-suggestions
                                      Show improvement suggestions (default: true)
  -v, --verbose                      Show detailed output
  --help                             Show this message and exit.

Examples

  1. Analyze current directory and show results in the terminal:

    weekly analyze .
    
  2. Generate a Markdown report:

    weekly analyze -f markdown -o report.md /path/to/project
    
  3. Generate a JSON report for programmatic use:

    weekly analyze -f json -o report.json /path/to/project
    

Output Example

Text Output

📊 Weekly Project Analysis Report
================================================================================
Project: example-project
Generated: 2025-06-07 12:34:56

Summary:
--------------------------------------------------------------------------------
✅ 5 passed
⚠️  3 warnings
❌ 1 errors

Detailed Results:
--------------------------------------------------------------------------------
✅ Project Structure
  Found Python project with proper structure

✅ Dependencies
  All dependencies are properly specified
  
⚠️  Test Coverage
  Test coverage is below 80% (currently 65%)
  
  Suggestions:
    • Add more test cases to improve coverage
    • Consider using pytest-cov for coverage reporting

❌ Documentation
  Missing API documentation
  
  Suggestions:
    • Add docstrings to all public functions and classes
    • Consider using Sphinx or MkDocs for API documentation

Recommended Actions:
--------------------------------------------------------------------------------
1. Improve Test Coverage
   • Add unit tests for untested modules
   • Add integration tests for critical paths
   • Set up code coverage reporting in CI

2. Enhance Documentation
   • Add docstrings to all public APIs
   • Create API documentation using Sphinx or MkDocs
   • Add examples to the README

Programmatic Usage

from pathlib import Path
from weekly import analyze_project
from weekly.core.report import Report

# Analyze a project
report = analyze_project(Path("/path/to/your/project"))

# Get report as dictionary
report_data = report.to_dict()

# Get markdown report
markdown = report.to_markdown()

# Print summary
print(f"✅ {report.summary['success']} passed")
print(f"⚠️  {report.summary['warnings']} warnings")
print(f"❌ {report.summary['errors']} errors")

# Get suggestions
for suggestion in report.get_suggestions():
    print(f"\n{suggestion['title']}:")
    for item in suggestion['suggestions']:
        print(f"  • {item}")

### Most Active Files

- `src/main.py`: 12 changes
- `tests/test_main.py`: 8 changes
- `README.md`: 5 changes

### Languages Used

- `.py`: 15 files
- `.md`: 3 files
- `.json`: 2 files

## 📋 Next Steps

- [ ] Add tests for recent changes
- [ ] Refactor large files: src/utils.py, src/processor.py...

## 📜 Recent Commits

- `a1b2c3d` Fix bug in data processing (2023-05-15)
- `f4e5d6a` Add new feature X (2023-05-14)
- `b3c4d5e` Update documentation (2023-05-13)
- `c6d7e8f` Refactor module Y (2023-05-12)
- `d9e0f1a` Initial commit (2023-05-10)

*[View full history in the JSON file]*

Development

Setup

  1. Clone the repository:

    git clone https://github.com/wronai/weekly.git
    cd weekly
    
  2. Install dependencies (recommended):

    poetry install --with dev
    

Running Tests

poetry run pytest

Code Style

This project uses:

  • Black for code formatting
  • isort for import sorting
  • flake8 for linting
  • mypy for type checking

Run all checks:

black .
isort .
flake8
mypy .

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

Licensed under Apache-2.0.

Author

Tom Sapletta

Acknowledgments

  • Built with ❤️ by the WronAI team
  • Inspired by various Git analysis tools

Status

Last updated by taskill at 2026-04-25 13:49 UTC

Metric Value
HEAD 8545fd9
Coverage 73.0%
Failing tests
Commits in last cycle 21

Added a deep code analysis engine with seven supporting modules, introduced a CLI with validation and API hooks, and substantially improved test coverage and documentation. Several refactors and report-style improvements for LLM output were applied, and auto_update_config was disabled to preserve manual test strategy.

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

weekly-0.1.43.tar.gz (63.8 kB view details)

Uploaded Source

Built Distribution

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

weekly-0.1.43-py3-none-any.whl (77.3 kB view details)

Uploaded Python 3

File details

Details for the file weekly-0.1.43.tar.gz.

File metadata

  • Download URL: weekly-0.1.43.tar.gz
  • Upload date:
  • Size: 63.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.4.1 CPython/3.13.7 Linux/6.17.0-40-generic

File hashes

Hashes for weekly-0.1.43.tar.gz
Algorithm Hash digest
SHA256 d8a5850a032a84cb234dd824ffc14ae4b1515abd6efd4355728db88c8f25df73
MD5 83738bb881e98f4b722c6e54045bfdef
BLAKE2b-256 269226122adbed70e04ec1a904585b23ddafd68b1e7ad35122b66b66db8170f3

See more details on using hashes here.

File details

Details for the file weekly-0.1.43-py3-none-any.whl.

File metadata

  • Download URL: weekly-0.1.43-py3-none-any.whl
  • Upload date:
  • Size: 77.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.4.1 CPython/3.13.7 Linux/6.17.0-40-generic

File hashes

Hashes for weekly-0.1.43-py3-none-any.whl
Algorithm Hash digest
SHA256 523db4dd0392d6646bb285f4dc600042cc98d619b8eb5b8e7e2450c6f3f1aa78
MD5 b81a8bf9c44406b220a6b538217378e3
BLAKE2b-256 6bc81595d0471e754036478d0401cfa61d30fa4eba7d7f07fcc56913eb1fba82

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