Thank you for your interest in contributing to AnalisiOpenData! This document provides guidelines for contributing to the project effectively.
Before opening an issue:
- Check that the bug has not already been reported in existing issues
- Update to the latest version of the project
How to report:
Open a new issue with the "Bug Report" template and include:
- Clear description of the problem
- Steps to play the bug
- Expected Behavior vs Actual Behavior
- Screenshot or log (if relevant)
- Python Version and Dependencies
Before proposing a new feature:
- Check that it has not already been requested in the issue
- Open a discussion to propose the idea and receive feedback
How to propose:
Open a new issue with the "Feature Request" template and include:
- Description of the functionality
- Motivation (why is it useful?)
- Possible implementation (if you already have an idea)
- Python: Follow
for code styling
- Docstring: Use the Google or NumPy format to document functions and classes
- Comments: Write comments in English to explain complex logic
- Names: Use descriptive names for variables and functions (e.g. 'get_dataset_list()')
- Line Length: Maximum 79 characters for code, 72 for comments
Docstring Example:
def analyze_accidents(data: pd.DataFrame) -> dict:
"""
Analyzes road accident data and returns statistics.
Args:
data (pd.DataFrame): DataFrame containing accident data
with columns: 'latitudine', 'longitudine', 'data'
Returns:
dict: Dictionary with 'total_accidents', 'date_range', 'map_html'
"""
passBefore sending a Pull Request:
Run all tests to check for regressions:
cd tests
python run_unified_tests.pyAdd tests for new features or fixes:
Tests go to the tests/folder
Follow the format of existing tests
Make sure all tests pass
Specific tests:
python test_config.py # Configuration
python test_unified.py # Unit Test
python test_utils.py # UtilityStep 1: Fork and Clone
# Repository fork on GitHub
# Then clone your fork
git clone https://github.com/YOUR_USERNAME/AnalisiOpenData.git
cd AnalysisOpenDataStep 2: Create a Branch
git checkout -b feature/feature-name
# or
git checkout -b fix/bug-nameStep 3: Make the Changes Follow the Coding Standards
Add tests for new features
Update documentation if necessary
Step 4: Commit and Push
git add.
git commit -m "Clear description of changes"
git push origin feature/feature-nameStep 5: Open the Pull Request
Go to the original repository on GitHub
Click on "Compare & pull request"
Fill in the template:
Description: What you did and why
Linked issue: If it resolves an issue, link it (e.g. "Fixes #123")
Test: Specify which tests you performed
What to expect A maintainer will review the PR within 1-2 weeks
Changes may be required
Once approved, it will be merged into the main branch
Open a Discussion in the GitHub Discussions section, Do not use issues for generic questions
By contributing to this project, you agree that your contributions are distributed under the Apache License 2.0.