Contributing Guidelines
Welcome to AGILAB! To maintain high research standards and ensure reproducibility, please adhere to the following guidelines when developing projects.
Quick Start: How to Create a New Project
When starting a new research project, please first refer to the AGILAB Software Template.
The steps to initialize a new project are as follows:
- Clone and Initialize
- Click
Use this templateon GitHub to create a new repository. - Clone the repository to your local environment.
- Rename the core package folder: Rename
src/project_name/to your project name (e.g.,src/my_robot_rl/). -
Update project metadata: Open
pyproject.tomland changename = "project_name"to your actual project name. -
Environment Setup We use Conda to manage complex physical simulations and CUDA dependencies:
-
Verify Installation (Crucial) Ensure your package is correctly installed in development mode (Editable mode):
Lab Workflow
1. Branching Strategy
main: Stable branch, containing only code for published papers or official releases.dev: Integration branch for daily development and experimentation.feature/[name]: Personal feature or specific experiment branches.
2. Development Process
- Sync Environment: Always use
environment.ymlto ensure dependency consistency across the team. - Implement Code: Write your core logic within
src/project_name/. - Linting and Formatting: We use Ruff. Ensure your code passes
ruff check .andruff format .before committing. - Write Tests: Add or update unit tests in
tests/for core logic.
3. Pull Requests (PRs)
- All PRs should be merged from personal branches into the
devbranch. - Ensure all GitHub Actions (CI) tests pass.
- Clearly describe the motivation, methodology, and expected results of the experiment in the PR description.
4. Git Commit Convention
To ensure the traceability of research records, please follow the laboratory's Git Commit Convention.
- Format: Type: English Description
- Example: feat: Add new perception layer
Coding Standards
- Style Guide: Strictly follow the [Google Python Style Guide].
- Type Hinting: All function signatures MUST include Type Hinting.
- Docstrings: Use Google Style Docstrings for all public modules, classes, and functions.
- Reproducibility: Always use random seed locking utilities to ensure stochastic processes are traceable.
Documentation Maintenance
- If new dependencies are added, update
environment.ymlandpyproject.tomlimmediately. - If a new experimental pipeline is implemented, provide usage examples in
README.md.