Thank you for your interest in contributing to tiny8 — a compact AVR-like 8-bit CPU simulator and examples. This short guide explains how to get the project running locally, how to run tests and examples, the code style we prefer, and what to include when submitting a pull request.
git clone https://github.com/sql-hkr/tiny8.git
cd tiny8
uv venv
source .venv/bin/activate
uv syncTip
uv is an extremely fast Python package and project manager, written in Rust. To install it, run:
# On macOS and Linux.
curl -LsSf https://astral.sh/uv/install.sh | sh
# On Windows.
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"This flow sets up a development virtual environment, installs development requirements, and prepares the project for local editing and testing.
Examples live in the examples/ directory. Run an example like:
uv run examples/fibonacci.pyImportant
You will need ffmpeg installed on your system to generate a GIF or MP4 file.
- Tests live in the
tests/folder. Add unit tests for any bug fixes or new features. - Use Python's built-in
unittestframework for new tests. Keep tests small, fast and deterministic when possible. - Aim for coverage of edge cases and error paths for logic changes.
-
We use
rufffor linting and auto-fixes. Run:ruff check . ruff format .
-
When fixing/implementing code, make sure lint errors are resolved or justified in your PR.
Docs are generated from the docs/ directory. To build the HTML docs locally:
sphinx-apidoc -efo docs/api/ src/
make -C docs html
open docs/_build/html/index.html- Open an issue first for non-trivial changes (design or API changes) so maintainers can provide feedback before you invest time.
- Work on a topic branch (not
main). Use a descriptive branch name:fix/short-desc,feat/short-desc, ordoc/short-desc. - Commit messages should be short and descriptive. If your changes are a bug fix or feature, reference the issue number if one exists.
- Include or update tests that cover your changes.
- Run the test suite, linter, and build the docs locally before opening the PR.
- In the PR description include:
- What the change does and why
- Any notable design decisions or trade-offs
- How to run tests/examples to verify the change
- Branched from current
main - Tests added/updated
- Linting passes (
ruff) and formatting applied - Documentation updated (if applicable)
- Clear PR description and linked issue (if any)
- Place assembly programs under
examples/and a small runner script if needed. - Keep examples deterministic (fixed inputs) unless you document why randomness is used.
- If an example adds new instructions or behavior, add tests under
tests/.
Be respectful and professional. Follow common community standards when discussing issues and reviewing contributions.
If you discover a security vulnerability, please contact the maintainers directly (see pyproject.toml author email) instead of creating a public issue.
By contributing you agree that your contributions will be licensed under the project's MIT License.
Open an issue describing what you'd like to do, or reach out via the author email in pyproject.toml.
Thank you for helping improve Tiny8!