Thank you for your interest in contributing to this Financial Time Series Forecasting project!
- Fork the repository
- Clone your fork:
git clone https://github.com/yourusername/ML-Intern.git cd ML-Intern - Install dependencies:
pip install -r requirements.txt
- Run tests:
python -m pytest tests/
git checkout -b feature/your-feature-name
# or
git checkout -b fix/bug-description- Follow the existing code style
- Add docstrings to functions and classes
- Include type hints where appropriate
- Write unit tests for new features
# Run all tests
python -m pytest tests/
# Run specific test
python -m pytest tests/test_models.py
# Check code coverage
python -m pytest tests/ --cov=srcgit add .
git commit -m "feat: add new feature description"
# or
git commit -m "fix: bug fix description"Commit Message Format:
feat:New featurefix:Bug fixdocs:Documentation changestest:Test additions or modificationsrefactor:Code refactoringstyle:Code style changes (formatting, etc.)
git push origin feature/your-feature-nameThen create a Pull Request on GitHub.
- PEP 8: Follow Python style guide
- Type Hints: Use type annotations
def train_model(model: nn.Module, data: torch.Tensor) -> Dict[str, float]: ...
- Docstrings: Use Google-style docstrings
def calculate_rsi(prices: np.ndarray, window: int = 14) -> np.ndarray: """ Calculate Relative Strength Index. Args: prices: Array of closing prices window: Lookback period (default: 14) Returns: Array of RSI values """
- Keep files under 500 lines
- One class per file when possible
- Group related functions
- Use YAML for configurations
- Include comments explaining parameters
- Provide default values
- Test files should mirror source structure (
test_models.pyformodels/) - Use descriptive test names:
test_lstm_forward_pass_correct_shape() - Include edge cases and error conditions
- Aim for >80% code coverage
- Focus on critical paths first
- Test error handling
- All functions need docstrings
- Complex algorithms need inline comments
- Update README.md if adding features
When adding features that affect results:
- Update
reports/PROJECT_ANALYSIS_REPORT.md - Add figures to
reports/figures/ - Update relevant tables in
reports/tables/
- Create model file:
src/models/your_model.py - Implement base interface:
class YourModel(nn.Module): def __init__(self, input_dim: int, ...): ... def forward(self, x: torch.Tensor) -> torch.Tensor: ...
- Add configuration:
configs/your_model.yaml - Write tests:
tests/test_your_model.py - Update documentation: Add to README.md and reports
- Add to
src/data/indicators.py - Update
add_technical_indicators()function - Document in
reports/tables/TECHNICAL_INDICATORS_TABLE.md - Test in
tests/test_preprocess.py
- Add to
src/evaluation/metrics.py - Write unit tests
- Document purpose and formula
- Code follows style guidelines
- Tests added/updated
- Tests pass locally
- Documentation updated
- No unnecessary files included
- Descriptive PR title and description
## Description
Brief description of changes
## Type of Change
- [ ] Bug fix
- [ ] New feature
- [ ] Documentation update
- [ ] Performance improvement
## Testing
Describe testing performed
## Screenshots (if applicable)
Add screenshots for UI changes- Automated Checks: CI/CD runs tests
- Code Review: Maintainer reviews code
- Feedback: Address review comments
- Approval: Once approved, PR is merged
- Author: Mohansree Vijayakumar
- Email: mohansreesk14@gmail.com
- Bug Reports: Use GitHub Issues
- Feature Requests: Open an issue with [Feature Request] tag
- Questions: Use GitHub Discussions or issues
- Be respectful and constructive
- Focus on the code, not the person
- Welcome newcomers and help them learn
- Keep discussions professional
By contributing, you agree that your contributions will be licensed under the same license as the project.
Thank you for contributing! 🎉