Contributing¶
pyhood is in early development and we welcome contributions.
Development Setup¶
git clone https://github.com/jamestford/pyhood.git
cd pyhood
python -m venv .venv
source .venv/bin/activate
pip install -e ".[dev]"
pip install responses # for tests
Running Tests¶
# All tests
pytest -v
# With coverage
pytest --cov=pyhood --cov-report=term-missing -v
# Single test file
pytest tests/test_auth.py -v
Linting¶
Project Structure¶
pyhood/
├── pyhood/
│ ├── __init__.py # Public API (login, logout, refresh)
│ ├── auth.py # Authentication + token management
│ ├── client.py # PyhoodClient — high-level API
│ ├── exceptions.py # Exception hierarchy
│ ├── http.py # HTTP session, rate limiting, retries
│ ├── models.py # Typed dataclasses
│ └── urls.py # Robinhood API endpoints
├── tests/ # Test suite (responses-based mocking)
├── docs/ # MkDocs documentation
└── .github/
└── workflows/
└── ci.yml # GitHub Actions CI
Guidelines¶
- Type hints on all public functions and methods
- Docstrings in Google style
- Tests for new functionality (aim for >80% coverage)
- No credentials in code, tests, or docs — use placeholder values
- Run
ruff checkandpytestbefore submitting a PR
Reporting Issues¶
- Bugs: Open a GitHub issue
- Security: See SECURITY.md
- Questions: Open a discussion or issue