Thank you for considering contributing to the HVAC Climate Data Pipeline project! This document provides guidelines and instructions for contributing.
- Fork the repository on GitHub
- Clone your fork locally:
git clone https://github.com/YOUR_USERNAME/HVAC-Climate-Data-Pipeline.git cd HVAC-Climate-Data-Pipeline - Set up your development environment:
./setup.sh # or manually: python3 -m venv venv source venv/bin/activate pip install -r requirements-dev.txt
Create a new branch for your feature or bugfix:
git checkout -b feature/your-feature-name
# or
git checkout -b fix/your-bugfix-name- Write clean, readable code
- Follow the existing code style
- Add docstrings to functions and classes
- Update documentation as needed
Run the test suite to ensure your changes don't break existing functionality:
pytest tests/ -vFormat your code using Black and isort:
black .
isort .Write clear, descriptive commit messages:
git add .
git commit -m "Add feature: description of your changes"git push origin feature/your-feature-nameThen create a Pull Request on GitHub.
- Follow PEP 8 style guide
- Use meaningful variable and function names
- Keep functions focused and small
- Add type hints where appropriate
- Write docstrings for all public functions and classes
def calculate_average_temperature(
data: pd.DataFrame,
sensor_id: str
) -> float:
"""
Calculate the average temperature for a specific sensor.
Args:
data: DataFrame containing sensor data
sensor_id: Unique identifier for the sensor
Returns:
Average temperature in Celsius
Raises:
ValueError: If sensor_id not found in data
"""
sensor_data = data[data['sensor_id'] == sensor_id]
if sensor_data.empty:
raise ValueError(f"Sensor {sensor_id} not found")
return sensor_data['temperature_celsius'].mean()- Write tests for all new features
- Ensure existing tests pass
- Aim for high test coverage
- Use pytest fixtures for test data
- Mock external dependencies
import pytest
def test_function_name():
# Arrange
input_data = create_test_data()
# Act
result = function_to_test(input_data)
# Assert
assert result == expected_value- Update README.md if adding new features
- Add docstrings to all functions and classes
- Create or update diagrams if changing architecture
-
Data Source Integration
- Implement real API connectors
- Add database connectivity
- Create authentication modules
-
Transformation Logic
- Implement bronze layer transformations
- Build silver layer business rules
- Create gold layer aggregations
-
Data Quality
- Add validation rules
- Implement quality checks
- Create quality reports
-
Testing
- Add unit tests
- Add integration tests
- Add end-to-end tests
-
Documentation
- Create architecture diagrams
- Write usage guides
- Add code examples
- Description: Clearly describe what your PR does
- Testing: Include test results
- Documentation: Update relevant documentation
- Review: Address review comments promptly
- Merge: PRs will be merged by maintainers after approval
When creating a PR, include:
## Description
Brief description of changes
## Type of Change
- [ ] Bug fix
- [ ] New feature
- [ ] Documentation update
- [ ] Refactoring
## Testing
- [ ] All tests pass
- [ ] New tests added
- [ ] Manual testing completed
## Checklist
- [ ] Code follows project style guidelines
- [ ] Documentation updated
- [ ] Tests added/updated
- [ ] No breaking changes (or documented)When reporting issues:
- Check existing issues first
- Use a clear title describing the problem
- Include details:
- Steps to reproduce
- Expected behavior
- Actual behavior
- Environment details (OS, Python version, etc.)
- Error messages and logs
- Be respectful and inclusive
- Welcome newcomers
- Focus on constructive feedback
- Assume good intentions
If you have questions:
- Check the documentation
- Search existing issues
- Open a new issue with the "question" label
By contributing, you agree that your contributions will be licensed under the same license as the project.
Thank you for contributing to HVAC Climate Data Pipeline!