Thank you for your interest in contributing to the PlotSenseAI Hackathon Demo Projects! This guide will help you get started with contributing to our open-source educational resources.
We welcome all types of contributions:
- π Bug Reports: Found something that doesn't work? Let us know!
- β¨ Feature Requests: Have ideas for improvements? Share them!
- π Documentation: Help improve our guides, tutorials, and examples
- π§ͺ Tests: Add test cases to improve code reliability
- π» Code: Fix bugs, add features, or optimize performance
- π¨ Examples: Create new demo projects or enhance existing ones
- π Translations: Help make our content accessible globally
# Fork the repository on GitHub, then clone your fork
git clone https://github.com/YOUR_USERNAME/PlotSenseAI-Hackathon-Demo-Projects.git
cd PlotSenseAI-Hackathon-Demo-Projects
# Add upstream remote
git remote add upstream https://github.com/Havilah-Blockchain-Studios/PlotSenseAI-Hackathon-Demo-Projects.git# Create virtual environment
python -m venv dev-env
source dev-env/bin/activate # On Windows: dev-env\Scripts\activate
# Install dependencies
pip install plotsense pandas numpy matplotlib jupyter streamlit pytest
# Install development dependencies
pip install black flake8 pre-commit# Create and switch to a new branch
git checkout -b feature/your-feature-name
# Or for bug fixes
git checkout -b fix/issue-descriptionWe follow Python best practices and PEP 8 guidelines:
# Format code with Black
black .
# Check code style with flake8
flake8 .
# Run before committing
pre-commit run --all-filesKey Style Points:
- Use descriptive variable and function names
- Add docstrings to all functions and classes
- Keep functions focused and concise
- Use type hints where appropriate
- Follow existing code patterns in each project
For Code:
def zscore_anomaly_detection(data, threshold=1.5):
"""
Detect anomalies using Z-score method.
Args:
data (list or pd.Series): Numeric data for analysis
threshold (float): Z-score cutoff for anomaly detection
Returns:
pd.DataFrame: DataFrame with anomaly detection results
Example:
>>> data = [1, 2, 3, 100, 4, 5]
>>> result = zscore_anomaly_detection(data, threshold=2.0)
>>> print(result[result['anomaly'] == True])
"""For Markdown:
- Use clear headings and structure
- Include code examples with syntax highlighting
- Add emoji for visual appeal (sparingly)
- Provide context and explanations
- Include troubleshooting sections
For New Features:
# tests/test_new_feature.py
import pytest
from plotsense_anomaly import new_feature
def test_new_feature_basic():
"""Test basic functionality"""
result = new_feature([1, 2, 3])
assert len(result) == 3
def test_new_feature_edge_cases():
"""Test edge cases"""
# Empty data
with pytest.raises(ValueError):
new_feature([])
# Single value
result = new_feature([5])
assert len(result) == 1Run Tests:
# Run all tests
pytest
# Run specific test file
pytest tests/test_detection.py
# Run with coverage
pytest --cov=plotsense_anomalyWhen reporting bugs, please include:
-
Environment Information:
- Operating system and version
- Python version
- PlotSenseAI version
- Other relevant package versions
-
Reproduction Steps:
1. Navigate to project_two 2. Run `python examples/demo_anomaly_detection.py` 3. Error occurs at line X -
Expected vs Actual Behavior:
- What you expected to happen
- What actually happened
- Error messages or screenshots
-
Additional Context:
- Sample data (if relevant)
- Configuration files
- Logs or output
For feature requests, please provide:
- Problem Description: What problem does this solve?
- Proposed Solution: How would you like it to work?
- Alternatives Considered: What other approaches did you consider?
- Use Cases: How would this benefit users?
- Implementation Ideas: Any thoughts on how to implement?
For small bug fixes or minor improvements:
- Create an issue first (unless it's truly trivial)
- Fork and create a branch
- Make your changes
- Add tests if applicable
- Submit a pull request
For major features or significant changes:
- Start with an issue: Discuss the approach first
- Design document: For complex features, create a design doc
- Incremental development: Break into smaller, reviewable chunks
- Coordinate: Work with maintainers to avoid conflicts
Types of Documentation:
- Tutorials: Step-by-step guides for beginners
- How-to Guides: Solutions for specific problems
- API Reference: Technical documentation
- Examples: Practical use cases and code samples
Best Practices:
- Start with user needs
- Use clear, simple language
- Include working code examples
- Test all code snippets
- Add screenshots for UI-related content
- Code follows style guidelines
- Tests pass locally
- Documentation updated (if applicable)
- CHANGELOG updated (for significant changes)
- Branch is up-to-date with upstream main
## Description
Brief description of changes
## Type of Change
- [ ] Bug fix
- [ ] New feature
- [ ] Documentation update
- [ ] Code refactoring
- [ ] Test improvement
## Testing
- [ ] Tests pass locally
- [ ] New tests added (if applicable)
- [ ] Manual testing completed
## Screenshots
(If applicable)
## Checklist
- [ ] Code follows project style guidelines
- [ ] Self-review completed
- [ ] Documentation updated
- [ ] Breaking changes documented- Automated Checks: CI/CD pipeline runs tests and style checks
- Code Review: Maintainers review code quality and design
- Discussion: Address feedback and questions
- Approval: At least one maintainer approval required
- Merge: Maintainer merges after all checks pass
Type Labels:
bug: Something isn't workingenhancement: New feature or requestdocumentation: Improvements or additions to docsgood first issue: Good for newcomershelp wanted: Extra attention needed
Priority Labels:
priority: high: Critical issuespriority: medium: Important but not urgentpriority: low: Nice to have
Status Labels:
status: in progress: Currently being worked onstatus: needs review: Ready for reviewstatus: blocked: Cannot proceed
We believe in recognizing our contributors:
- Contributors List: All contributors listed in README
- Release Notes: Major contributors mentioned in releases
- Hall of Fame: Outstanding contributors featured on website
- Swag: Stickers and swag for regular contributors
- References: LinkedIn recommendations for significant contributors
- Search existing issues: Your question might already be answered
- Read documentation: Check our guides and tutorials
- Join discussions: Participate in GitHub Discussions
- GitHub Issues: For bugs and feature requests
- GitHub Discussions: For questions and general discussion
- Email: support@havilahacademy.org for sensitive matters
- Discord: Join our community server (link in README)
New contributors can request mentorship:
- Pair with experienced contributors
- Guidance on first contributions
- Code review and feedback
- Career advice in open source
We pledge to make participation in our project a harassment-free experience for everyone, regardless of:
- Age, body size, disability, ethnicity
- Gender identity and expression
- Level of experience, education, socio-economic status
- Nationality, personal appearance, race, religion
- Sexual identity and orientation
Positive behavior includes:
- Using welcoming and inclusive language
- Being respectful of differing viewpoints
- Gracefully accepting constructive criticism
- Focusing on what's best for the community
- Showing empathy towards other community members
Unacceptable behavior includes:
- Trolling, insulting, or derogatory comments
- Public or private harassment
- Publishing private information without consent
- Conduct that could reasonably be considered inappropriate
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at support@havilahacademy.org. All complaints will be reviewed and investigated promptly and fairly.
By contributing to this project, you agree that your contributions will be licensed under the same license as the project (MIT License).
Every contribution, no matter how small, helps make this project better for everyone. We appreciate your time and effort in helping build better educational resources for the PlotSenseAI community!
Happy Contributing! π
Questions? Feel free to reach out in our GitHub Discussions or contact us at support@havilahacademy.org