Thank you for your interest in contributing to CryptVault! This document provides guidelines and instructions for contributing.
- Be respectful and inclusive
- Focus on constructive feedback
- Help others learn and grow
- Follow project standards
# Python 3.8+
python --version
# Install dependencies
pip install -r requirements.txt
pip install -r requirements/dev.txt # Development dependencies# Clone the repository
git clone https://github.com/yourusername/cryptvault.git
cd cryptvault
# Create virtual environment
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# Install in development mode
pip install -e .
# Run tests
pytest tests/- Check if the bug already exists in Issues
- Create a new issue with:
- Clear title and description
- Steps to reproduce
- Expected vs actual behavior
- System information (OS, Python version)
- Error messages and logs
- Check existing feature requests
- Create an issue with:
- Clear use case
- Proposed solution
- Alternative approaches considered
- Impact on existing functionality
-
Fork the repository
-
Create a feature branch
git checkout -b feature/your-feature-name
-
Make your changes
- Follow code style guidelines
- Add tests for new functionality
- Update documentation
-
Test your changes
pytest tests/ python -m pylint cryptvault/
-
Commit with clear messages
git commit -m "feat: add new pattern detection algorithm" -
Push and create PR
git push origin feature/your-feature-name
- Follow PEP 8
- Use type hints where appropriate
- Maximum line length: 100 characters
- Use docstrings for all public functions/classes
def calculate_rsi(prices: np.ndarray, period: int = 14) -> np.ndarray:
"""
Calculate Relative Strength Index.
Args:
prices: Array of closing prices
period: RSI period (default: 14)
Returns:
Array of RSI values (0-100)
Raises:
ValueError: If period < 1 or prices array is empty
"""
if period < 1:
raise ValueError("Period must be >= 1")
# Implementation...
return rsi_values<type>: <subject>
<body>
<footer>
Types:
feat: New featurefix: Bug fixdocs: Documentation changesstyle: Code style changes (formatting)refactor: Code refactoringtest: Adding/updating testschore: Maintenance tasks
Example:
feat: add LSTM model to ensemble predictor
- Implemented 2-layer LSTM with dropout
- Added adaptive weight adjustment
- Improved accuracy from 65% to 75%
Closes #123
# All tests
pytest
# Specific test file
pytest tests/test_indicators.py
# With coverage
pytest --cov=cryptvault tests/import pytest
from cryptvault.indicators import calculate_rsi
def test_rsi_calculation():
"""Test RSI calculation with known values."""
prices = np.array([44, 44.34, 44.09, 43.61, 44.33])
rsi = calculate_rsi(prices, period=14)
assert len(rsi) == len(prices)
assert 0 <= rsi[-1] <= 100
def test_rsi_invalid_period():
"""Test RSI raises error for invalid period."""
prices = np.array([44, 44.34, 44.09])
with pytest.raises(ValueError):
calculate_rsi(prices, period=0)- Update relevant
.mdfiles indocs/ - Add docstrings to new functions/classes
- Update
README.mdif adding major features - Include code examples where helpful
docs/
├── API_REFERENCE.md # API documentation
├── ARCHITECTURE.md # System architecture
├── CHANGELOG.md # Version history
├── CONTRIBUTING.md # This file
├── DEPLOYMENT.md # Deployment guide
├── PERFORMANCE.md # Performance optimization
├── SECURITY.md # Security guidelines
└── TROUBLESHOOTING.md # Common issues
cryptvault/
├── cli/ # Command-line interface
├── core/ # Core analysis engine
├── data/ # Data models and fetching
├── indicators/ # Technical indicators
├── ml/ # Machine learning models
├── patterns/ # Pattern detection
├── security/ # Security features
├── storage/ # Data persistence
├── utils/ # Utility functions
└── visualization/ # Chart generation
-
Automated Checks
- Tests must pass
- Code coverage > 80%
- Linting passes
- No security vulnerabilities
-
Code Review
- At least one maintainer approval
- Address all review comments
- Ensure documentation is updated
-
Merge
- Squash commits if needed
- Update CHANGELOG.md
- Tag release if applicable
- Update version in
__version__.py - Update
CHANGELOG.md - Create release branch
- Run full test suite
- Create GitHub release
- Publish to PyPI (maintainers only)
- Documentation: Check
docs/folder - Issues: Search existing issues
- Discussions: Use GitHub Discussions
- Email: contact@meridianalgo.org
By contributing, you agree that your contributions will be licensed under the MIT License.
Contributors are recognized in:
CHANGELOG.mdfor each release- GitHub contributors page
- Project README
Thank you for contributing to CryptVault!