Contributing Guide
We welcome contributions to nepse-client! This guide will help you get started.
Getting Started
Fork the Repository
Visit nepse-client on GitHub and fork it.
Clone Your Fork
git clone https://github.com/yourusername/nepse-client.git cd nepse-client
Create a Branch
git checkout -b feature/your-feature-name
Install Development Dependencies
pip install -e ".[dev]" pre-commit install
Development Workflow
Making Changes
Make your changes
Write or update tests
Run tests locally
Update documentation
Commit your changes
# Run tests
pytest
# Check code quality
black nepse_client tests
isort nepse_client tests
flake8 nepse_client tests
mypy nepse_client
# Commit
git add .
git commit -m "Add: Your descriptive message"
Code Standards
Style Guidelines
Follow PEP 8 style guide
Use Black for formatting (line length: 100)
Sort imports with isort
Add type hints to all functions
Write Google-style docstrings
Example:
def calculate_total(
values: List[float],
multiplier: float = 1.0
) -> float:
"""
Calculate the total of values.
Args:
values: List of numeric values
multiplier: Optional multiplier
Returns:
Total sum multiplied by multiplier
Example:
>>> calculate_total([1, 2, 3], 2.0)
12.0
"""
return sum(values) * multiplier
Testing
Write tests for new features
Maintain >80% test coverage
Use pytest for testing
Add both unit and integration tests
# Run tests
pytest
# Run with coverage
pytest --cov=nepse_client
# Run specific test
pytest tests/test_sync_client.py::test_get_market_status
Documentation
Update docstrings
Add examples
Update README if needed
Update CHANGELOG.md
Pull Request Process
Push Your Changes
git push origin feature/your-feature-name
Create Pull Request
Go to GitHub
Click “New Pull Request”
Fill in the template
Link related issues
Code Review
Address review comments
Update as needed
Maintain conversation
Merge
Once approved, your PR will be merged!
Reporting Issues
Bug Reports
Use the bug report template:
Describe the bug
Steps to reproduce
Expected vs actual behavior
Environment details
Error messages
Feature Requests
Use the feature request template:
Describe the feature
Explain use cases
Propose implementation
Consider alternatives
Code of Conduct
Please follow our Code of Conduct.
Be respectful, inclusive, and professional.
Questions?
Ask in Discussions
Check the Quickstart Guide guide
Read the API Reference reference
Thank you for contributing! 🎉