Thank you for your interest in RPent!
RPent welcomes contributions from the community. Bug reports, fixes, tests, documentation improvements, performance work, and new planner, robot, or tool integrations all help the project grow.
For integration work, start with the existing guides for custom planners, new robots, and new primitives.
-
Fork RLinf/RPent on GitHub.
-
Clone your fork and add the main repository as
upstream:git clone https://github.com/<your-username>/RPent.git cd RPent git remote add upstream https://github.com/RLinf/RPent.git
-
Create a topic branch from the latest
main:git fetch upstream git checkout -b feat/<short-description> upstream/main
Use a branch name that reflects the change, such as
feat/new-planner, fix/tool-cancellation, test/cli-contract, or
docs/robotwin-setup.
# Create and activate an isolated environment.
uv venv --python 3.11
source .venv/bin/activate
# Install the source checkout and the lightweight test dependencies.
uv pip install -e ".[test]"
# For robot work, choose the matching test environment instead.
uv pip install -e ".[test,libero-pro]" # LIBERO
uv pip install -e ".[test,robocasa]" # RoboCasa
uv pip install -e ".[test,robotwin]" # RoboTwin
# Install and enable the repository hooks.
uv pip install pre-commit==4.6.2
pre-commit installThe commands above are alternatives: install only the robot extra relevant to the change. See the installation guide for environment-specific setup.
Follow these conventions while developing:
- Keep the change focused. A feature, an unrelated refactor, and repository-wide cleanup should normally be separate pull requests.
- Import optional dependencies only where they are used. For example,
import
robosuiteinside the RoboCasa code that needs it, not at module import time. This keepsimport rpent, robot discovery, and CLI help usable without every simulator installed. Put integration-only dependencies in an optional extra. - Preserve existing contracts. If an API or user-visible behavior changes, explain the change and how users should adapt.
- Write tests with the change. New behavior and bug fixes should include tests. Refactors should keep existing tests passing; if behavior changes, update the tests and explain why. Unit tests must run offline on an ordinary CPU machine; use fakes when model or service output is needed.
- Follow the project style. Pre-commit handles Ruff formatting and linting.
Public Python APIs should have type hints and Google-style docstrings, and
runtime messages should use the project logger rather than
print.
Before opening a pull request, run the same required checks as CI:
# Format and lint the complete repository.
pre-commit run --all-files
# Run all unit tests.
pytest tests/unit_tests -v
# Run a focused test while developing.
pytest tests/unit_tests/rpent/cli/test_main_contracts.py -k xxx -xIf a check fails or modifies files, review the changes and run it again.
Update documentation alongside user-visible changes:
- keep
docs/source-en/anddocs/source-zh/aligned when both cover the feature; - update docstrings and examples for public APIs;
- update the README when installation, quick-start, or advertised features change.
Commit messages follow Conventional Commits:
<type>(<optional-scope>): <description>
Common types include:
feat: user-visible functionality;fix: a bug fix;docs: documentation only;test: tests only;ci: CI or workflow changes;refactor: code restructuring without a behavior change;perf: a performance improvement;style: formatting without a semantic change;build: packaging or build changes;chore: maintenance work.
Examples:
feat(planner): add an example provider adapter
fix(toolkit): retain the original handler error
test(cli): cover an offline planner run
docs(robotwin): clarify runtime setup
Pull request titles should use the same format. Keep the scope lowercase and the description short and specific.
Push the branch to your fork and open a pull request against
RLinf/RPent:main. A helpful pull request description includes:
- the problem and why the change is needed;
- a concise summary of the implementation;
- a linked issue when one exists (
Fixes #123orRefs #123); - compatibility changes, migrations, new dependencies, and runtime impact;
- the exact automated checks that were run;
- any manual GPU, simulator, service, or robot verification.
Review the complete diff yourself before marking the pull request ready for review.
- Do not weaken or delete a failing test merely to make CI pass.
- Do not commit credentials, logs, checkpoints, downloaded assets, or generated results.
- Do not make required CI depend on network access, model services, simulators, or robot hardware.
AI coding tools are welcome, but the contributor remains the author of the change and is responsible for everything submitted.
- Read and understand the complete diff before publishing it.
- Run the code and the relevant tests yourself.
- Remove generated code, comments, or abstractions that do not belong in the project.
- Keep AI-assisted pull requests focused and reviewable rather than submitting a large unreviewed change.
- Be prepared to explain the design and implementation during review.
AI-assisted code follows the same compatibility, documentation, testing, and quality requirements as any other contribution.
If you need help or have a question:
Thank you for helping make RPent more reliable and useful.