Skip to main content

RideSims

RideSims is a Python CLI package for running automated ride operation sequences for RideSims simulations.

Requirements

  • Python 3.13+
  • uv (Python/dependency manager)
  • A local environment where keyboard and mouse automation is allowed

Installation

Create or update the environment and install project dependencies:

uv sync

Install with development tools:

uv sync --group dev

Running The CLI

Run RideSims with uv-managed execution:

uv run ridesims list-rides
uv run ridesims validate-rides
uv run ridesims run-automated velocicoaster
uv run ridesims run-automated velocicoaster --max-cycles 5
uv run ridesims run-automated velocicoaster --run-once
uv run ridesims run-automated velocicoaster --max-duration-seconds 120
uv run ridesims run-automated velocicoaster --dry-run
uv run ridesims run-automated velocicoaster --backend keyboard --verbose --no-color
uv run ridesims run-automated velocicoaster --no-strict-preflight
uv run ridesims run-automated velocicoaster --strict-backend-probe
uv run ridesims run-automated velocicoaster --config ./ridesims.toml
uv run ridesims run-automated velocicoaster --json-logs

If no ride name is provided for run-automated, the CLI prompts for one.

Available Commands

  • list-rides: Show all supported rides.
  • validate-rides: Validate ride imports and run() contract checks.
  • run-automated <ride_slug>: Start the automation sequence for a ride.

run-automated expects a ride slug (for example velocicoaster).

Key run-automated options:

  • --max-cycles <n>: stop after N cycles.
  • --run-once: shorthand for running exactly one cycle.
  • --max-duration-seconds <seconds>: stop after a time limit.
  • --dry-run: simulate operations without keyboard input.
  • --backend <auto|keyboard|pydirectinput>: choose input backend.
  • --strict-backend-probe: fail if runtime capability probing reports backend issues.
  • --strict-preflight / --no-strict-preflight: control preflight failure policy.
  • --verbose: enable verbose logging.
  • --no-color: disable colored terminal output.
  • --config <path>: load defaults from a TOML file.
  • --json-logs: output machine-readable JSON logs.

Feature-flag based behavior can be configured in [features]:

  • event_stream = true: emits structured lifecycle events (including correlation IDs) during runs.
  • extended_backend_probe = true: reserved toggle for progressively deeper backend probes.

If --config is not provided, RideSims checks these paths in order:

  • ./ridesims.toml
  • ./.ridesims.toml

Example config:

[run]
backend = "auto"
strict_backend_probe = true

[features]
event_stream = true
extended_backend_probe = false

Ride Guides

Each ride has setup and operation notes:

Architecture Layers

  • ridesims/cli.py: command registration, argument parsing, user-facing output.
  • ridesims/core/session.py: run session option assembly and run-bound warnings.
  • ridesims/core/runtime.py: bounded cycle/time execution loop.
  • ridesims/core/errors.py: typed errors and centralized command exit policy map.
  • ridesims/backends/: backend resolution and runtime capability probing.
  • ridesims/rides/: ride modules plus the registry and preflight checks.
  • ridesims/config.py: typed TOML defaults and override loading.

Exit Code Policy

Shell-friendly process exit codes are standardized across commands.

  • list-rides
    • 0: command completed successfully.
  • validate-rides
    • 0: all registered rides validated successfully.
    • 1: one or more ride preflight checks failed.
  • run-automated
    • 0: ride automation completed successfully.
    • 1: user/config/preflight/backend/ride contract error prevented run.
    • 130: interrupted by user (Ctrl+C).

Development

Lint the project:

uv run ruff check .

Format imports:

uv run isort .

Validate release metadata locally:

uv run python scripts/validate_release.py v0.1.0

Run tests:

uv run python -m pytest -q

Continuous Integration

The CI workflow runs Ruff and the unit test suite for pushes to the test branch and pull requests whose target branch is test. Run the same checks locally before opening a pull request:

uv run ruff check .
uv run python -m pytest -q

Creating a Release

Before creating the first PyPI release, configure GitHub Environment pypi and a PyPI Trusted Publisher for GitHub owner copev313, repository RideSims, workflow release.yml, and environment pypi. This uses GitHub OIDC, so no PyPI API token secret is required.

For each release:

  1. Set project.version in pyproject.toml to X.Y.Z.

  2. Add a ## [X.Y.Z] section to CHANGELOG.md.

  3. Commit the release changes and create a matching annotated tag:

    git tag -a vX.Y.Z -m vX.Y.Z
    git push origin vX.Y.Z
    

The tag must match vMAJOR.MINOR.PATCH. The release workflow validates the tag, version, and changelog; runs lint and tests; builds the distribution; publishes it to PyPI; and then creates the GitHub release. Manual release workflow runs validate a proposed tag only and do not publish.

Release/versioning policy:

Metadata

Release files for RideSims 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for RideSims 0.3.0
File Size Uploaded Provenance Actions
ridesims-0.3.0.tar.gz 21.6 kB Without provenance Details for ridesims-0.3.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for RideSims 0.3.0
File Interpreter ABI Platform Actions
ridesims-0.3.0-py3-none-any.whl Python 3 none any Details for ridesims-0.3.0-py3-none-any.whl

Total release size: 46.8 kB

Release files / ridesims-0.3.0.tar.gz

Download URL ridesims-0.3.0.tar.gz
Size 21.6 kB
Tags Source
SHA-256 checksum
How to use checksums
abb6764d5e5f926b37c715ada6a425bf15e52bcca22616e9b75ba701febfce60
BLAKE2b-256 checksum
How to use checksums
9c55187651a51a70e1dbc8e2400d2b04531603e50445d7b084b85a504919f60a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.5 {"installer":{"name":"uv","version":"0.12.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / ridesims-0.3.0-py3-none-any.whl

Download URL ridesims-0.3.0-py3-none-any.whl
Size 25.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
16b93a6e68912d0f6e49cf0917e57a367193bc87801f2796e68b15accd22259e
BLAKE2b-256 checksum
How to use checksums
f71fb325e608d5acdc1546365604f1a82cf31e3e822465f14b4054eca9ea724a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.5 {"installer":{"name":"uv","version":"0.12.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for RideSims 0.3.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page