Unverified Commit f2d97bdc authored by Mayank Mittal's avatar Mayank Mittal Committed by GitHub

Adds codespell to pre-commit configuration file (#38)

# Description

<!--
Thank you for your interest in sending a pull request. Please make sure to check the contribution guidelines.

Link: https://isaac-orbit.github.io/orbit/source/refs/contributing.html
-->

Since many of us are working, it makes sense to have a spell checker to ensure we have the right words everywhere. The PR adds [codespell](https://github.com/codespell-project/codespell) to the pre-commit file that allows checking for typos/spellings in the repository.

The tool is available under a GPL-2.0 license and is fetched using its PyPi release. The repo's BSD-3 is compatible with  GNU-GPL family of licenses.  We do not modify any of the codespell's source code. The license file is included in the repository for the sake of completion.

<!-- As a practice, it is recommended to open an issue to have discussions on the proposed pull request.
This makes it easier for the community to keep track of what is being developed or added, and if a given feature
is demanded by more than one party. -->

## Type of change

<!-- As you go through the list, delete the ones that are not applicable. -->

- New feature (non-breaking change which adds functionality)

<!--
Example:

| Before | After |
| ------ | ----- |
| _gif/png before_ | _gif/png after_ |

To upload images to a PR -- simply drag and drop an image while in edit mode and it should upload the image directly. You can then paste that source into the above before/after sections.
-->

## Checklist

- [x] I have run the [`pre-commit` checks](https://pre-commit.com/) with `./orbit.sh --format`
- [x] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my feature works
- [ ] I have updated the changelog and the corresponding version in the extension's `config/extension.toml` file

<!--
As you go through the checklist above, you can mark something as done by putting an x character in it

For example,
- [x] I have done this task
- [ ] I have not done this task
-->
parent 0c6a23bf
repos: repos:
- repo: https://github.com/python/black - repo: https://github.com/python/black
rev: 23.1.0 rev: 23.3.0
hooks: hooks:
- id: black - id: black
args: ["--line-length", "120"] args: ["--line-length", "120"]
...@@ -31,18 +31,24 @@ repos: ...@@ -31,18 +31,24 @@ repos:
name: isort (python) name: isort (python)
args: ["--profile", "black", "--filter-files"] args: ["--profile", "black", "--filter-files"]
- repo: https://github.com/asottile/pyupgrade - repo: https://github.com/asottile/pyupgrade
rev: v3.3.1 rev: v3.7.0
hooks: hooks:
- id: pyupgrade - id: pyupgrade
args: ["--py37-plus"] args: ["--py37-plus"]
- repo: https://github.com/codespell-project/codespell
rev: v2.2.4
hooks:
- id: codespell
additional_dependencies:
- tomli
# FIXME: Figure out why this is getting stuck under VPN. # FIXME: Figure out why this is getting stuck under VPN.
# - repo: https://github.com/RobertCraigie/pyright-python # - repo: https://github.com/RobertCraigie/pyright-python
# rev: v1.1.296 # rev: v1.1.315
# hooks: # hooks:
# - id: pyright # - id: pyright
# Note: We disable this by default since not all code is compatible with it. # Note: We disable this by default since not all code is compatible with it.
# - repo: https://github.com/Lucas-C/pre-commit-hooks # - repo: https://github.com/Lucas-C/pre-commit-hooks
# rev: v1.4.2 # rev: v1.5.1
# hooks: # hooks:
# - id: insert-license # - id: insert-license
# files: \.py$ # files: \.py$
......
...@@ -77,7 +77,7 @@ def overwrite_default_python_interpreter(orbit_settings: str) -> str: ...@@ -77,7 +77,7 @@ def overwrite_default_python_interpreter(orbit_settings: str) -> str:
Returns: Returns:
The settings string with overwritten default python interpreter. The settings string with overwritten default python interpreter.
""" """
# read executble name # read executable name
python_exe = sys.executable python_exe = sys.executable
# if python interpreter is from conda, use that. Otherwise, use the template. # if python interpreter is from conda, use that. Otherwise, use the template.
if "conda" not in python_exe: if "conda" not in python_exe:
......
This diff is collapsed.
...@@ -19,7 +19,7 @@ Each string has two sub-strings joined by underscore: ...@@ -19,7 +19,7 @@ Each string has two sub-strings joined by underscore:
For instance, the command type ``"p_abs"`` defines a position command in absolute mode, while ``"v_rel"`` For instance, the command type ``"p_abs"`` defines a position command in absolute mode, while ``"v_rel"``
defines a velocity command in relative mode. defines a velocity command in relative mode.
To facilitate easier composibility, the actuator group handles the offsets and scalings applied to To facilitate easier composability, the actuator group handles the offsets and scalings applied to
the input commands. These are set through the :class:`ActuatorControlCfg` and by default are set to zero the input commands. These are set through the :class:`ActuatorControlCfg` and by default are set to zero
and one, respectively. Based on these, the input commands are processed as follows: and one, respectively. Based on these, the input commands are processed as follows:
......
...@@ -72,7 +72,7 @@ We use the following tools for maintaining code quality: ...@@ -72,7 +72,7 @@ We use the following tools for maintaining code quality:
* `pre-commit <https://pre-commit.com/>`__: Runs a list of formatters and linters over the codebase. * `pre-commit <https://pre-commit.com/>`__: Runs a list of formatters and linters over the codebase.
* `black <https://black.readthedocs.io/en/stable/>`__: The uncompromising code formatter. * `black <https://black.readthedocs.io/en/stable/>`__: The uncompromising code formatter.
* `flake8 <https://flake8.pycqa.org/en/latest/>`__: A wrapper around PyFlakes, pycodestyle and * `flake8 <https://flake8.pycqa.org/en/latest/>`__: A wrapper around PyFlakes, pycodestyle and
Ned Batchelder's McCabe script. McCabe complexity checker.
Please check `here <https://pre-commit.com/#install>`__ for instructions Please check `here <https://pre-commit.com/#install>`__ for instructions
to set these up. To run over the entire repository, please execute the to set these up. To run over the entire repository, please execute the
......
...@@ -50,7 +50,7 @@ motion planning). The main goals of the framework are summarized as follows: ...@@ -50,7 +50,7 @@ motion planning). The main goals of the framework are summarized as follows:
- **Modularity**: It is possible to easily add new environments, sensors, and tasks. It is also possible - **Modularity**: It is possible to easily add new environments, sensors, and tasks. It is also possible
to easily swap out different components to suit the needs of the user. to easily swap out different components to suit the needs of the user.
- **Agility**: While still dependant on Isaac Sim, the framework includes pre-release features that - **Agility**: While still dependent on Isaac Sim, the framework includes pre-release features that
are not yet available in Isaac Sim. This allows the framework to be more agile and adapt to the are not yet available in Isaac Sim. This allows the framework to be more agile and adapt to the
changing needs of the community. changing needs of the community.
- **Openness**: The framework is designed to be open-sourced. This makes it possible to easily - **Openness**: The framework is designed to be open-sourced. This makes it possible to easily
......
...@@ -133,7 +133,7 @@ setup_conda_env() { ...@@ -133,7 +133,7 @@ setup_conda_env() {
'export RESOURCE_NAME="IsaacSim"' \ 'export RESOURCE_NAME="IsaacSim"' \
'' > ${CONDA_PREFIX}/etc/conda/activate.d/setenv.sh '' > ${CONDA_PREFIX}/etc/conda/activate.d/setenv.sh
# reactivate the environment to load the variables # reactivate the environment to load the variables
# needed because deactivate complains about orbit alias since it otherwise doens't exist # needed because deactivate complains about orbit alias since it otherwise doesn't exist
conda activate ${env_name} conda activate ${env_name}
# remove variables from environment during deactivation # remove variables from environment during deactivation
printf '%s\n' '#!/bin/bash' '' \ printf '%s\n' '#!/bin/bash' '' \
...@@ -158,7 +158,7 @@ setup_conda_env() { ...@@ -158,7 +158,7 @@ setup_conda_env() {
# add information to the user about alias # add information to the user about alias
echo -e "[INFO] Added 'orbit' alias to conda environment for 'orbit.sh' script." echo -e "[INFO] Added 'orbit' alias to conda environment for 'orbit.sh' script."
echo -e "[INFO] Created conda environment named '${env_name}'.\n" echo -e "[INFO] Created conda environment named '${env_name}'.\n"
echo -e "\t\t1. To activate the enviornment, run: conda activate ${env_name}" echo -e "\t\t1. To activate the environment, run: conda activate ${env_name}"
echo -e "\t\t2. To install orbit extensions, run: orbit -i" echo -e "\t\t2. To install orbit extensions, run: orbit -i"
echo -e "\t\t3. To install learning-related dependencies, run: orbit -e" echo -e "\t\t3. To install learning-related dependencies, run: orbit -e"
echo -e "\t\t4. To perform formatting, run: orbit -f" echo -e "\t\t4. To perform formatting, run: orbit -f"
......
...@@ -79,3 +79,10 @@ reportMissingModuleSource = "none" # -> most common: prettytable in mdp managers ...@@ -79,3 +79,10 @@ reportMissingModuleSource = "none" # -> most common: prettytable in mdp managers
reportGeneralTypeIssues = "none" # -> raises 218 errors (usage of literal MISSING in dataclasses) reportGeneralTypeIssues = "none" # -> raises 218 errors (usage of literal MISSING in dataclasses)
reportOptionalMemberAccess = "warning" # -> raises 8 errors reportOptionalMemberAccess = "warning" # -> raises 8 errors
reportPrivateUsage = "warning" reportPrivateUsage = "warning"
[tool.codespell]
skip = '*.usd,*.svg,*.png,_isaac_sim*,*.bib,*.css,*/_build'
quiet-level = 0
# the world list should always have words in lower case
ignore-words-list = "haa,slq"
...@@ -36,7 +36,7 @@ class NonHolonomicKinematicsGroup(ActuatorGroup): ...@@ -36,7 +36,7 @@ class NonHolonomicKinematicsGroup(ActuatorGroup):
the value of the revolute joint along z, i.e., :math:`q_2 = \theta`. the value of the revolute joint along z, i.e., :math:`q_2 = \theta`.
Tip: Tip:
For velocity control of the base with dummy mechanism, we recommed setting high damping gains to the joints. For velocity control of the base with dummy mechanism, we recommend setting high damping gains to the joints.
This ensures that the base remains unperturbed from external disturbances, such as an arm mounted on the base. This ensures that the base remains unperturbed from external disturbances, such as an arm mounted on the base.
""" """
......
...@@ -204,7 +204,7 @@ class Se3Gamepad(DeviceBase): ...@@ -204,7 +204,7 @@ class Se3Gamepad(DeviceBase):
} }
self._INPUT_DPAD_VALUE_MAPPING = { self._INPUT_DPAD_VALUE_MAPPING = {
# pitch command (postive) # pitch command (positive)
carb.input.GamepadInput.DPAD_UP: (1, 4, self.rot_sensitivity * 0.8), carb.input.GamepadInput.DPAD_UP: (1, 4, self.rot_sensitivity * 0.8),
# pitch command (negative) # pitch command (negative)
carb.input.GamepadInput.DPAD_DOWN: (0, 4, self.rot_sensitivity * 0.8), carb.input.GamepadInput.DPAD_DOWN: (0, 4, self.rot_sensitivity * 0.8),
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
# #
# SPDX-License-Identifier: BSD-3-Clause # SPDX-License-Identifier: BSD-3-Clause
"""Configuration fo the ANYbotics robots. """Configuration for the ANYbotics robots.
The following configuration parameters are available: The following configuration parameters are available:
* :obj:`ANYMAL_B_CFG`: The ANYmal-B robot with ANYdrives 3.0 * :obj:`ANYMAL_B_CFG`: The ANYmal-B robot with ANYdrives 3.0
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment