Skip to content

Latest commit

 

History

History
107 lines (81 loc) · 3.79 KB

CONTRIBUTING.md

File metadata and controls

107 lines (81 loc) · 3.79 KB

Contributing to InfiniBot

Thanks for your interest in improving InfiniBot! This document covers how to get set up, the expected workflow, and what makes a good pull request.

Before you start

  • Bug fixes and small improvements - feel free to open a PR directly.
  • New features or larger changes - please open an issue first to discuss the approach. This avoids wasted effort on something that might not fit the project's direction.
  • Check existing issues and pull requests to avoid duplicating work.
  • Review the license usage terms before contributing derivative work. In particular, InfiniBot may not be used to run a competing public bot service.

Development setup

InfiniBot runs inside Docker. See the README for full setup instructions. In short:

git clone https://github.com/cypress-exe/InfiniBot.git
cd InfiniBot
sudo bash build.bash
sudo bash run.bash        # will error until you set DISCORD_AUTH_TOKEN in .env
sudo bash rebuild_and_run.bash

Dependencies are managed with uv and pinned in pyproject.toml / uv.lock. The project targets Python 3.13+.

Developer documentation for internal systems (database, config, event harness, etc.) lives in the ./documentation folder.

Making changes

  1. Fork the repository and create a feature branch off main:
    git checkout -b feature/short-description
  2. Make your changes, keeping commits focused and scoped to a single purpose.
  3. Follow the existing code style in the file you're editing rather than introducing a new convention.
  4. Add or update tests where behavior changes (see below).
  5. Update relevant docs in ./documentation if you change internal architecture, config, or developer-facing behavior.

Running tests

Tests run with pytest on the host:

uv sync          # installs the dev dependency group
uv run pytest

Useful invocations:

  • uv run pytest tests/config - one directory.
  • uv run pytest -k server - tests matching a name.
  • uv run pytest -m "not slow" - skip the slow ones.
  • uv run pytest --cov - with a coverage report.

To run the suite inside the Docker image (what CI's parity job does):

./run_tests.bash                # builds the image's `test` stage first
./run_tests.bash --skip-build   # reuse the existing image

Any other arguments pass through to pytest.

CI (.github/workflows/ci.yml) runs the suite on every push and pull request to main, and fails if total coverage drops below the floor in pyproject.toml. Please make sure tests pass locally before opening a PR.

See documentation/testing.md for how the suite is organized and what fixtures are available.

Submitting a pull request

  1. Push your branch and open a PR against main.
  2. Fill out the pull request template, including a clear description of what changed and why.
  3. Link any related issues (e.g. Fixes #123).
  4. Ensure CI is passing. PRs with failing checks generally won't be reviewed until fixed.
  5. Be responsive to review feedback. Small, iterative PRs are easier to merge than large ones that sit open.

Reporting bugs and requesting features

Use GitHub Issues with the appropriate template. For security vulnerabilities, do not open a public issue (see SECURITY.md instead).

Questions

Join the InfiniBot Discord server if you want to discuss an idea before writing code, or need help getting your dev environment running.

Source Disclosure

This document was generated with Claude Sonnet 5 and reviewed/edited by cypress.exe.