🚀 Try ChipaEditor - Our AI-Powered Code Editor
donate in paypal: Paypal.me
help us in patreon: Patreon
👉 Join us on Discord
Get our services here
Let us create your bot here
Contact us in Telegram
Thank you for your interest in contributing to BinomoAPI! This guide will help you get started with contributing to the project.
- Fork the repository
- Clone your fork:
git clone https://github.com/your-username/BinomoAPI.git
cd BinomoAPI- Create a virtual environment:
python -m venv venv
source venv/bin/activate # Unix/macOS
venv\Scripts\activate # Windows- Install dependencies:
pip install -r requirements.txt
pip install -r requirements-dev.txt- Create a new branch:
git checkout -b feature/your-feature-name- Make your changes
- Run tests:
pytest tests/- Format code:
black .
isort .- Run linting:
flake8 .
mypy .- Commit your changes:
git add .
git commit -m "feat: add new feature"- Push to your fork:
git push origin feature/your-feature-name- Create a Pull Request
- Follow PEP 8
- Use type hints
- Maximum line length: 88 characters
- Use descriptive variable names
from typing import Dict, Optional
class TradingClient:
"""
Trading client implementation.
Attributes:
api_key: API authentication key
demo_mode: Whether to use demo account
"""
def __init__(
self,
api_key: str,
demo_mode: bool = True
) -> None:
self.api_key = api_key
self.demo_mode = demo_mode
async def execute_trade(
self,
asset: str,
amount: float,
direction: str
) -> Dict[str, any]:
"""
Execute a trading operation.
Args:
asset: Trading asset name
amount: Trade amount
direction: Trade direction
Returns:
Dict containing trade result
Raises:
TradeError: If trade execution fails
"""
# Implementation- Use Google-style docstrings
- Document all public APIs
- Include type hints
- Provide usage examples
- Write unit tests for all new features
- Maintain test coverage above 80%
- Use pytest fixtures
- Mock external dependencies
Example test:
import pytest
from BinomoAPI import BinomoAPI
@pytest.fixture
def api_client():
return BinomoAPI(
auth_token="test_token",
device_id="test_device",
demo=True
)
def test_place_call_option(api_client):
result = await api_client.place_call_option(
asset="EUR/USD",
duration_seconds=60,
amount=1.0
)
assert result["status"] == "success"Use conventional commits format:
feat: add new featurefix: resolve bug issuedocs: update documentationtest: add testsrefactor: improve code structure
## Description
Brief description of changes
## Type of Change
- [ ] Bug fix
- [ ] New feature
- [ ] Documentation update
- [ ] Performance improvement
- [ ] Code refactoring
## Testing
Describe testing done
## Screenshots
If applicable
## Related Issues
Fixes #issue_number- Code review by maintainers
- CI checks must pass
- Documentation must be updated
- Tests must be included
- Changes must be rebased on main
- Create issue describing feature
- Discuss implementation approach
- Create feature branch
- Implement feature
- Add tests
- Update documentation
- Submit PR
- Create issue with reproduction steps
- Create fix branch
- Implement fix
- Add regression test
- Submit PR
- Identify documentation needs
- Create documentation branch
- Update documentation
- Submit PR
BinomoAPI/
├── BinomoAPI/
│ ├── __init__.py
│ ├── api.py
│ ├── exceptions.py
│ ├── models.py
│ └── utils/
├── tests/
│ ├── __init__.py
│ ├── test_api.py
│ └── test_utils.py
├── docs/
│ ├── index.md
│ └── api-reference.md
├── examples/
│ └── basic_usage.py
└── setup.py
- Code follows style guide
- Tests are included
- Documentation is updated
- Changes are backwards compatible
- Error handling is appropriate
- Performance impact is considered
- Be constructive
- Explain reasoning
- Provide examples
- Be respectful
- All contributors are listed in CONTRIBUTORS.md
- Significant contributors become maintainers
- Active contributors get special recognition
- Recognition in release notes
- Contributor badges
- Community spotlight
Follow semantic versioning:
- MAJOR.MINOR.PATCH
- Example: 1.2.3
- Update version number
- Update CHANGELOG.md
- Create release branch
- Run full test suite
- Build documentation
- Create GitHub release
- Deploy to PyPI
- Be respectful
- Stay professional
- Help others
- Share knowledge
- Use GitHub issues for bugs
- Use discussions for questions
- Join Discord community
- Follow Stack Overflow guidelines
BinomoAPI is MIT licensed. By contributing, you agree to license your contributions under the same terms.
Thank you for contributing to BinomoAPI! 🎉