Thank you for your interest in contributing to SquidStats! This document provides guidelines and instructions for contributing to the project.
Clone the repository
git clone https://github.com/kaelthasmanu/SquidStats.git
cd SquidStats
Create a virtual environment
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
Install dependencies
pip install -r requirements.txt
Note for maintainers: Direct dependencies are declared in
requirements.in. The pinnedrequirements.txtis generated automatically withpip-compile --upgrade --generate-hashes --output-file requirements.txt requirements.in.
Run the application
python app.py
We maintain high code quality standards using automated tools:
# Check for linting issues
ruff check .
# Fix auto-fixable issues
ruff check --fix .
# Format code
ruff format .
mypy . --ignore-missing-imports
bandit -r . -x tests/
safety check -r requirements.txt
# Run all tests
pytest
# Run with coverage
pytest --cov=. --cov-report=html
# Run specific test file
pytest tests/test_specific.py
tests/ directorytest_*.pyFork the repository and create your feature branch
git checkout -b feature/amazing-feature
Make your changes following the code style guidelines
Add tests for your changes if applicable
Run the full test suite to ensure nothing breaks
pytest
ruff check .
mypy . --ignore-missing-imports
Commit your changes with a clear commit message
git commit -m "Add amazing feature: brief description"
Push to your fork and create a pull request
git push origin feature/amazing-feature
#issue-numberdef process_log_entry(log_line: str) -> dict[str, Any]:
"""
Process a single log entry and extract relevant information.
Args:
log_line: Raw log line from Squid proxy
Returns:
Dictionary containing parsed log information
Raises:
ValueError: If log line format is invalid
"""
if not log_line.strip():
raise ValueError("Log line cannot be empty")
# Process the log line
return {"timestamp": "...", "url": "..."}
When reporting bugs, please include:
For feature requests, please include:
Please note that this project adheres to a Code of Conduct. By participating, you are expected to uphold this code:
Thank you for contributing to SquidStats!