Contributing to the Project
Coding Standards
- Style Guide: Follow PEP 8 for Python code.
- Type Annotations: Use type hints throughout the code for better readability and tooling support.
- Docstrings: Include docstrings for all modules, classes, and functions using the Google Python Style Guide.
- Naming Conventions:
- Use descriptive names for variables, functions, and classes.
- Class names should follow
CamelCase
. - Function and variable names should be in
snake_case
.
Development Workflow
-
Branching:
- Create a new branch for each feature or bug fix.
- Branch names should be descriptive, e.g.,
feature/add-new-reward-function
.
-
Writing Tests:
- Write unit tests for new features and bug fixes.
- Use
unittest
orpytest
frameworks. - Place tests in the
tests
directory, mirroring the module structure.
-
Commits:
- Make small, atomic commits with clear commit messages.
- Follow the Conventional Commits specification if possible.
-
Pull Requests:
- Submit pull requests to the
main
branch when ready. - Include a detailed description of changes and any related issues.
- Submit pull requests to the
-
Code Review:
- Participate in code reviews for peers.
- Be constructive and focus on improving code quality.
Testing
-
Unit Tests:
- Ensure high test coverage across modules.
- Tests should be independent and repeatable.
-
Integration Tests:
- Test interactions between modules, especially environment and reward functions.
-
Continuous Integration:
- Use CI tools like GitHub Actions or Jenkins to automate testing on each commit or pull request.