Skip to content

Latest commit

 

History

History
80 lines (67 loc) · 2.21 KB

File metadata and controls

80 lines (67 loc) · 2.21 KB

Contributing to Version Tracker

Thank you for your interest in contributing to Version Tracker! This document outlines the process for adding new software products to our version tracking system.

Adding a New Product

  1. Research Phase

    • Identify a reliable source for version information:
      • Official API endpoints
      • Release RSS/Atom feeds
      • GitHub releases
      • Official release pages
    • Determine what version data is consistently available
    • Verify update frequency/patterns
    • Document the source and any rate limits or restrictions
  2. Implementation

    • Create new product JSON file in data/<category>/<product>.json
    • Implement version checker in scripts/checkers/<product>_checker.py
    • Add appropriate error handling and logging
    • Add tests to tests/checkers/test_<product>.py
  3. Required Files

    scripts/checkers/<product>.py       # Version checker implementation
    tests/checkers/test_<product>.py    # Test suite for the checker
    
  4. Testing Requirements

    • Version checker must have unit tests
    • Tests must cover:
      • Successful version fetching
      • Error handling (timeouts, bad responses)
      • JSON schema validation
      • Data file reading/writing
  5. Pull Request Process

    1. Fork the repository
    2. Create a feature branch
    3. Implement your changes
    4. Run tests locally (python -m pytest)
    5. Submit PR with description of:
      • What product you're adding
      • How versions are sourced
      • Any special considerations
      • Test coverage

Development Setup

  1. Clone the repository
  2. Create a virtual environment:
    python -m venv .venv
    source .venv/bin/activate  # Linux/MacOS
    # or
    .venv\Scripts\activate     # Windows
  3. Install dependencies:
    pip install httpx jsonschema pytest pytest-asyncio pytest-cov

Running Tests

# Run all tests
python -m pytest

# Run with coverage report
python -m pytest --cov=scripts

# Run specific test file
python -m pytest tests/checkers/test_chrome.py

Code Style

  • Follow PEP 8
  • Use type hints
  • Include docstrings for all functions/classes
  • Keep functions focused and single-purpose
  • Add appropriate logging