This repository has been archived by the owner on Oct 31, 2023. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 7fdec15
Showing
258 changed files
with
19,371 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,116 @@ | ||
# Python CircleCI 2.0 configuration file | ||
# | ||
# Check https://circleci.com/docs/2.0/language-python/ for more details | ||
# | ||
version: 2.1 | ||
jobs: | ||
# Linux | ||
py36_linux: | ||
docker: | ||
- image: circleci/python:3.6 | ||
steps: | ||
- checkout | ||
- run: | ||
name: "Mujoco setup" | ||
command: | | ||
wget https://www.roboti.us/download/mujoco200_linux.zip | ||
unzip mujoco200_linux.zip -d ~/.mujoco | ||
cp -r ~/.mujoco/mujoco200_linux ~/.mujoco/mujoco200 | ||
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/circleci/.mujoco/mujoco200_linux/bin | ||
sudo apt install -y libosmesa6-dev libgl1-mesa-glx libglfw3 libglew-dev libglfw3-dev patchelf | ||
- run: | ||
name: "Preparing environment" | ||
command: | | ||
sudo apt-get install -y expect | ||
sudo pip install nox | ||
- run: | ||
name: "Testing mtenv" | ||
command: | | ||
export NOX_PYTHON_VERSIONS=3.6 | ||
pip install nox | ||
python3 -m nox | ||
py37_linux: | ||
docker: | ||
- image: circleci/python:3.7 | ||
steps: | ||
- checkout | ||
- run: | ||
name: "Mujoco setup" | ||
command: | | ||
wget https://www.roboti.us/download/mujoco200_linux.zip | ||
unzip mujoco200_linux.zip -d ~/.mujoco | ||
cp -r ~/.mujoco/mujoco200_linux ~/.mujoco/mujoco200 | ||
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/circleci/.mujoco/mujoco200_linux/bin | ||
sudo apt install -y libosmesa6-dev libgl1-mesa-glx libglfw3 libglew-dev libglfw3-dev patchelf | ||
- run: | ||
name: "Preparing environment" | ||
command: | | ||
sudo apt-get install -y expect | ||
sudo pip install nox | ||
- run: | ||
name: "Testing mtenv" | ||
command: | | ||
export NOX_PYTHON_VERSIONS=3.7 | ||
pip install nox | ||
python3 -m nox | ||
py38_linux: | ||
docker: | ||
- image: circleci/python:3.8 | ||
steps: | ||
- checkout | ||
- run: | ||
name: "Mujoco setup" | ||
command: | | ||
wget https://www.roboti.us/download/mujoco200_linux.zip | ||
unzip mujoco200_linux.zip -d ~/.mujoco | ||
cp -r ~/.mujoco/mujoco200_linux ~/.mujoco/mujoco200 | ||
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/circleci/.mujoco/mujoco200_linux/bin | ||
sudo apt install -y libosmesa6-dev libgl1-mesa-glx libglfw3 libglew-dev libglfw3-dev patchelf | ||
- run: | ||
name: "Preparing environment" | ||
command: | | ||
sudo apt-get install -y expect | ||
sudo pip install nox | ||
- run: | ||
name: "Testing mtenv" | ||
command: | | ||
export NOX_PYTHON_VERSIONS=3.8 | ||
pip install nox | ||
python3 -m nox | ||
py39_linux: | ||
docker: | ||
- image: circleci/python:3.9 | ||
steps: | ||
- checkout | ||
- run: | ||
name: "Mujoco setup" | ||
command: | | ||
wget https://www.roboti.us/download/mujoco200_linux.zip | ||
unzip mujoco200_linux.zip -d ~/.mujoco | ||
cp -r ~/.mujoco/mujoco200_linux ~/.mujoco/mujoco200 | ||
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/circleci/.mujoco/mujoco200_linux/bin | ||
sudo apt install -y libosmesa6-dev libgl1-mesa-glx libglfw3 libglew-dev libglfw3-dev patchelf | ||
- run: | ||
name: "Preparing environment" | ||
command: | | ||
sudo apt-get install -y expect | ||
sudo pip install nox | ||
- run: | ||
name: "Testing mtenv" | ||
command: | | ||
export NOX_PYTHON_VERSIONS=3.9 | ||
pip install nox | ||
python3 -m nox | ||
workflows: | ||
version: 2.0 | ||
build: | ||
jobs: | ||
- py36_linux | ||
- py37_linux | ||
- py38_linux | ||
- py39_linux | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
# Open Source Code of Conduct | ||
|
||
## Our Pledge | ||
|
||
In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to make participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation. | ||
|
||
## Our Standards | ||
|
||
Examples of behavior that contributes to creating a positive environment include: | ||
|
||
Using welcoming and inclusive language | ||
Being respectful of differing viewpoints and experiences | ||
Gracefully accepting constructive criticism | ||
Focusing on what is best for the community | ||
Showing empathy towards other community members | ||
Examples of unacceptable behavior by participants include: | ||
|
||
The use of sexualized language or imagery and unwelcome sexual attention or advances | ||
Trolling, insulting/derogatory comments, and personal or political attacks | ||
Public or private harassment | ||
Publishing others’ private information, such as a physical or electronic address, without explicit permission | ||
Other conduct which could reasonably be considered inappropriate in a professional setting | ||
|
||
## Our Responsibilities | ||
|
||
Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior. | ||
|
||
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful. | ||
|
||
## Scope | ||
|
||
This Code of Conduct applies within all project spaces, and it also applies when an individual is representing the project or its community in public spaces. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers. | ||
|
||
## Enforcement | ||
|
||
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at opensource-conduct@fb.com. All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately. | ||
|
||
Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project’s leadership. | ||
|
||
## Attribution | ||
|
||
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, | ||
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html | ||
|
||
[homepage]: https://www.contributor-covenant.org |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,109 @@ | ||
# Contributing to MTEnv | ||
|
||
We are glad that you want to contribute to MTEnv. | ||
|
||
## Local Setup | ||
|
||
Follow these instructions to setup MTEnv locally: | ||
|
||
* Clone locally - `git clone git@github.com:facebookresearch/mtenv.git`. | ||
* *cd* into the directory - `cd mtenv`. | ||
* Install MTEnv in the dev mode - `pip install -e ".[dev]"` | ||
* Tests can be run locally using `nox`. The code is linted using: | ||
* `black` | ||
* `flake8` | ||
* `mypy` | ||
* Install pre-commit hooks - `pre-commit install`. It will execute some | ||
of the tests when you commit the code. You can disable it by adding the | ||
"-n" flag to git command. For example, `git commit -m <commit_message> -n`. | ||
|
||
|
||
### Documentation | ||
|
||
We use [Sphinx](https://www.sphinx-doc.org/en/master/) to build the documentation. | ||
Follow the steps to build/update the documentation locally. | ||
|
||
* rm -rf docs/* | ||
* rm -rf docs_src/source/pages/api | ||
* rm -rf docs_src/build | ||
* sphinx-apidoc -o docs_src/source/pages/api mtenv | ||
* cd docs_src | ||
* make html | ||
* cd .. | ||
* cp -r docs_src/build/html/* docs/ | ||
|
||
Or run all the commands at once: `rm -rf docs/* && rm -rf docs_src/source/pages/api && rm -rf docs_src/build && sphinx-apidoc -o docs_src/source/pages/api mtenv && cd docs_src && make html && cd .. && cp -r docs_src/build/html/* docs/` | ||
|
||
## Pull Requests | ||
|
||
We actively welcome your pull requests. | ||
|
||
1. Fork the repo and create your branch from `main`. | ||
2. Set up the code using instructions from above. | ||
3. If you are adding a new environment, checkout the guide on [how to contribute new environments](#How-To-Contribute-New-Environments). | ||
4. If you've added code that should be tested, add tests. | ||
5. If you've changed APIs, update the documentation. | ||
6. Ensure the test suite passes. This is tested via CI when you make a PR. | ||
7. Add a news entry as described [here](#News-Entry). | ||
8. If you haven't already, complete the Contributor License Agreement ("CLA"). | ||
|
||
#### How To Contribute New Environments | ||
|
||
1. We recommend that you first open an issue to discuss the feasibility of | ||
adding a new environment. This will eliminate the possibility of duplication | ||
of work. | ||
2. Checkout the guide on [how to create new environments](https://mtenv.readthedocs.io/en/latest/pages/envs/create.html). | ||
3. Create a new folder in `mtenv/envs`. | ||
4. Add the following files, along with the implementation of the environment. | ||
You can refer to existing environments. | ||
* `__init__.py` | ||
* `setup.py` | ||
* `requirements.txt` | ||
* `README.md` | ||
5. Register your environment in `/mtenv/envs/__init__.py`. | ||
* `test_kwargs` are optional but if you can specify some values (both | ||
valid and invalid configurations) for automated testing. | ||
6. We run some basic tests on the environment (to make sure it can be | ||
instantiated). You should add more tests to `tests/envs` | ||
7. Add your environment to the list of supported environments at | ||
`docs_src/source/pages/envs/supported.rst` | ||
|
||
#### News Entry | ||
|
||
* Add an issue describing the issue that the PR fixes. | ||
|
||
* Create a file, with the name `issue_number.xxx`, in `news` folder using | ||
the issue number from the previous step. | ||
|
||
* The extension (ie `xxx` part) can be one of the following: | ||
|
||
* api_change: API Changes | ||
* bugfix: Bug Fixes | ||
* doc: Documentation Changes | ||
* environment: Environment Chages (addition or removal) | ||
* feature: Features | ||
* misc: Miscellaneous Changes | ||
|
||
* Add a crisp one line summary of the change. The summary should complete | ||
the sentence "This change will ...". | ||
|
||
## Contributor License Agreement ("CLA") | ||
|
||
In order to accept your pull request, we need you to submit a CLA. You only need | ||
to do this once to work on any of Facebook's open source projects. | ||
|
||
Complete your CLA here: <https://code.facebook.com/cla> | ||
|
||
## Issues | ||
|
||
We use GitHub issues to track public bugs. Please ensure your description is | ||
clear and has sufficient instructions to be able to reproduce the issue. | ||
|
||
Facebook has a [bounty program](https://www.facebook.com/whitehat/) for the safe | ||
disclosure of security bugs. In those cases, please go through the process | ||
outlined on that page and do not file a public issue. | ||
|
||
## License | ||
|
||
By contributing to MTEnv, you agree that your contributions will be licensed | ||
under the LICENSE file in the root directory of this source tree. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
--- | ||
name: "Issue" | ||
about: | ||
title: "Issue" | ||
labels: | ||
assignees: '' | ||
|
||
--- | ||
|
||
# Description | ||
|
||
What issue are you facing? | ||
|
||
## How to reproduce | ||
|
||
**Add a minimal example to reproduce the issue.** | ||
|
||
**Stack trace / error message** | ||
|
||
Paste the stack trace/error message to [Gist](https://gist.github.com) | ||
and paste the link here. | ||
|
||
## System information | ||
- **MTEnv Version** : | ||
- **MTEnv environment Name** : | ||
- **Python version** : | ||
|
||
## Any other information | ||
|
||
Add any other information here. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
Thank you for contributing to MTEnv. | ||
|
||
## Proposed Change | ||
|
||
What are you proposing? What is the motivation for the change. | ||
|
||
### Have you read the [Contributing Guidelines](https://github.com/facebookresearch/mtenv/blob/main/.github/CONTRIBUTING.md)? | ||
|
||
Yes/No | ||
|
||
## Related Issues/PRs | ||
|
||
Any issues or PRs that are related to this? |
Oops, something went wrong.