Thanks for your interest in contributing. This document covers the basics.
git clone https://github.com/brandontroidl/Internets.git
cd Internets
pip install requests
python tests/run_tests.py # should report 0 failuresNo virtual environment is strictly required (the only runtime dependency is
requests), but using one is recommended:
python -m venv .venv
source .venv/bin/activate # Linux/macOS
.venv\Scripts\activate # Windows
pip install requestsThe standalone test suite has no external dependencies beyond requests:
python tests/run_tests.pyIf you have pytest installed the same tests also run under it:
pip install pytest
pytest tests/ -vTests must pass on Python 3.10+ across Linux, macOS, and Windows. The GitHub Actions CI matrix covers all three.
See the "Writing a Module" section in README.md. The short version:
- Create
modules/yourmodule.py. - Subclass
BotModule, defineCOMMANDS, implement async handlers. - Add tests to
tests/run_tests.pyunder a new section header. - Add a brief entry to
CHANGELOG.md.
- Python 3.10+ syntax (use
X | Yunions, notOptional). - Type annotations on all public function signatures.
- Docstrings on all public classes and functions.
- No
eval(),exec(), or__import__()in module code. - All command handlers must be
async def. - Blocking I/O must go through
asyncio.to_thread(). - Keep imports at the top of the file (stdlib → third-party → local).
- Fork the repo and create a feature branch.
- Make your changes. Keep commits focused.
- Add or update tests. Run
python tests/run_tests.py— 0 failures. - Update
CHANGELOG.mdunder an[Unreleased]heading. - Open a pull request against
main.
If you find a security vulnerability, please do not open a public issue.
Email the maintainer directly (see config.ini for contact info in the
user_agent field) or use GitHub's private vulnerability reporting.
By contributing you agree that your contributions will be licensed under the MIT License (see LICENSE).