Thank you for your interest in contributing to our project! I (Pablo Ariño) started this project as part of my bachelor's thesis, which it's already finished (see README.md file for a link to it). Right now, I plan on publishing a paper about the RL environments to a software journal. Version 2 will refactor these environments to make it easier to use. However, this project depends mainly on you, the community, to keep it alive and improve it. I'll do my best to help you with your contributions. Any contribution is welcome, whether it's a small bug or documentation fix or a new feature.
- For significant changes: Please create an issue first to discuss the proposed changes. This helps prevent duplicate work and ensures your contribution aligns with the project's direction. This type of changes include adding new features, refactoring the code, changes to the style of the code, changes to the documentation other than typos, wording, or small mistakes.
- For minor changes (like fixing typos, small bug fixes): Feel free to submit a pull request directly. If in doubt, it's always better to open a new issue! I always try to answer ASAP.
- Fork the repository
- Create a new branch for your feature or fix
- Make your changes, including writing or updating tests (we use
pytest). Commit messages must follow the guideline below. - Ensure all tests pass (
make test) - Run the linting checks (
make lint) - Check for issues with the documentation formatting (
make html_docsand open the generated HTML files in your browser) - Submit a pull request. It must contain a clear description of the changes and reference any related issues
The structure of a commit should be the following:
[Label] BREAKING CHANGE: Short description under 50 characters (#N)
A more detailed description if needed. This body must begin one blank line after
the description and should mention the specific changes and the reasoning behind them.
This body is free-form.
Some considerations:
- "BREAKING CHANGE:" This should be added if the commit contains changes that break the backward compatibility of the code. Introducing this type of changes require updating the major version of the library. This shouldn't be done in the same commit though. Typically, major versions will be worked on inside their own branch (i.e, v2.0.0), and once all the changes are made, the major version is updated and the changes merged. Don't introduce breaking changes without prior confirmation from a library maintainer.
- Here, "#N" makes reference to the specific issue that the commit solves. This is important to quickly identify the commits that solved a specific issue.
We prefix commit messages with one the following labels written between brackets:
- "[Feature]": For adding a specific, identifiable part of the code that provides a particular function or capability of the software.
- "[BugFix]": For commits that solve an error or flaw in the code that causes it to behave in an unintended or incorrect way.
- "[Refactor]": Refactoring is the process of restructuring existing code, altering its internal structure without changing its external behavior. However, code refactoring aimed to solve linting problems exclusively shouldn't use this label, but "[Lint]".
- "[CI]": For adding or updating files related to continous integration aspects. This includes modifying files in the
.githubfolder or the.readthedocs.yamlfile. - "[Chore]": Used when updating the dependencies, the version of the library, or modifying files that are not related to either code or documentation. Those files include:
.gitignore,.flake8,.pylintrc,Makefile,poetry.lock,pyproject.toml. - "[Docs]": For changes related to the documentation of the project. This includes updating: files in the
docsfolder, theREADME.mdandCONTRIBUTING.mdfiles, and docstrings. - "[Lint]": When addressing problems raised by mypy, flake8, pylint, or other linters. If the change is not an error or a warning raised by a linter, then it's consider refactoring.
If a commit contains changes that may fall in more than one of the above labels, two options are possible:
- Use the label with the highest priority. The above list of labels is written in order of priority (Feature > BugFix > Refactor > CI > Chore > Docs > Lint). For example, if a commit adds a new function (a feature), it's also expected to contain tests and documentation for it. Thus, in this case, it's recommended to simply use the "[Feature]" label.
- Combine two labels using "+". Needing to do this is a sign that changes could be better splitted into two different commits. However, if you consider them to be highly related and want to emphasize that two or more types of changes were made, you can use the "+" to combine more than one feature inside the brackets. For example, if there is a bug with the documentation, it would be reasonable to use "[BugFix + Docs]". Similarly, if a bugfix, requires a significant refactoring, "[BugFix + Refactor]" could be used.
This project uses Poetry for dependency management. Follow these steps to set up your development environment:
- Install Poetry following the official instructions. We use Poetry version ^1.7
- Clone your forked repository
- Navigate to the project root directory
- Install all dependencies with:
or
make poetry_install_allpoetry install --with notebooks --with test --with lint --with docs --all-extras
The project includes several helpful commands in the Makefile:
make lint- Run flake8 and mypy linters to check code qualitymake test- Run pytest with coverage reportingmake poetry_install_all- Install all project dependencies including development dependenciesmake html_docs- Generate HTML documentationmake clean_docs- Clean the documentation build directory
- We use Black with line length of 79 characters for code formatting
- Include docstrings for all new functions and classes. Follow the Google Style Guide for docstrings, but check the existing code's style. Some discrepancies with this guide may exist to comply with
sphinx(e.g., classes' docstring contain__init__'s arguments) - Keep your changes focused on the specific issue/feature at hand
- Update the
README.mdor documentation with details of changes if needed - Update the
pyproject.tomlandpoetry.lockif you've added dependencies - Your PR will be reviewed by maintainers, who may request changes
- Once approved, your PR will be merged
If you need assistance or have questions about your contribution, you can:
- Comment on the related issue
- Contact Pablo Ariño directly at pablo.arino22@gmail.com to schedule a call to discuss your contribution
- Be respectful and inclusive in your interactions
- Constructive criticism is welcome, but be kind
Thank you for contributing!