diff --git a/.github/ISSUE_TEMPLATE/bug.yml b/.github/ISSUE_TEMPLATE/bug.yml index 6078e1a..2bbe7a6 100644 --- a/.github/ISSUE_TEMPLATE/bug.yml +++ b/.github/ISSUE_TEMPLATE/bug.yml @@ -12,7 +12,7 @@ body: ## A bug found is a bug fixed, thank you for helping with Helx! * Please first verify that your issue is not already reported using the - [issue search][https://github.com/epignatelli/helx/search?q=is%3Aissue&type=issues]. + [issue search](https://github.com/epignatelli/helx/search?q=is%3Aissue&type=issues). * If you would like a new feature, please consider [requesting one](https://github.com/epignatelli/helx/issues/new?template=feature.yml) @@ -20,7 +20,7 @@ body: * If you would like to ask a question, please consider [opening a discussion](https://github.com/epignatelli/helx/discussions) - * If you prefer a non-templated issue report, click [here][http://github.com/epignatelli/helx/issues/new]. + * If you prefer a non-templated issue report, click [here](http://github.com/epignatelli/helx/issues/new). - type: textarea attributes: diff --git a/.github/ISSUE_TEMPLATE/build.yml b/.github/ISSUE_TEMPLATE/build.yml new file mode 100644 index 0000000..4ca639f --- /dev/null +++ b/.github/ISSUE_TEMPLATE/build.yml @@ -0,0 +1,13 @@ +--- +name: Installation or build issue +description: >- + A problem with the installation or build process. +labels: +- installation/build + +body: +- type: textarea + attributes: + label: Description + description: >- + A concise description of what of what you would like to add or change. diff --git a/.github/ISSUE_TEMPLATE/ci.yml b/.github/ISSUE_TEMPLATE/ci.yml new file mode 100644 index 0000000..ebaeed9 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/ci.yml @@ -0,0 +1,13 @@ +--- +name: Continuous Integration (CI) and Continuous Deployment (CD) +description: >- + Add or change CI/CD workflows. +labels: +- ci + +body: +- type: textarea + attributes: + label: Description + description: >- + A concise description of what of what you would like to add or change. diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml index 16e0097..497d4a0 100644 --- a/.github/ISSUE_TEMPLATE/config.yml +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -2,4 +2,4 @@ blank_issues_enabled: false contact_links: - name: Have questions or want to have a chat? url: https://github.com/epignatelli/helx/discussions - about: Please ask questions on the Discussions tab \ No newline at end of file + about: Please ask questions on the Discussions tab diff --git a/.github/ISSUE_TEMPLATE/docs.yml b/.github/ISSUE_TEMPLATE/docs.yml new file mode 100644 index 0000000..5479b1e --- /dev/null +++ b/.github/ISSUE_TEMPLATE/docs.yml @@ -0,0 +1,13 @@ +--- +name: Documentation +description: >- + Add or edit documentation. +labels: +- documentation + +body: +- type: textarea + attributes: + label: Description + description: >- + A concise description of what of what you would like to add or change. diff --git a/.github/ISSUE_TEMPLATE/feature.yml b/.github/ISSUE_TEMPLATE/feature.yml index 0d65a7f..7317c0e 100644 --- a/.github/ISSUE_TEMPLATE/feature.yml +++ b/.github/ISSUE_TEMPLATE/feature.yml @@ -3,7 +3,7 @@ name: Feature or improvement request description: >- Request a missing feature, or an improvement to an existing feature that is not a bug labels: -- bug +- feature body: - type: markdown diff --git a/.github/ISSUE_TEMPLATE/performance.yml b/.github/ISSUE_TEMPLATE/performance.yml new file mode 100644 index 0000000..6b53c3d --- /dev/null +++ b/.github/ISSUE_TEMPLATE/performance.yml @@ -0,0 +1,13 @@ +--- +name: Performance +description: >- + A code change that improves performance but does not change the functionality or the API. +labels: +- performance + +body: +- type: textarea + attributes: + label: Description + description: >- + A concise description of what of what you would like to add or change. diff --git a/.github/ISSUE_TEMPLATE/refactor.yml b/.github/ISSUE_TEMPLATE/refactor.yml new file mode 100644 index 0000000..3e80e7f --- /dev/null +++ b/.github/ISSUE_TEMPLATE/refactor.yml @@ -0,0 +1,13 @@ +--- +name: Refactor +description: >- + A code change that restructures the existing code, like namespace changes. +labels: +- refactor + +body: +- type: textarea + attributes: + label: Description + description: >- + A concise description of what of what you would like to add or change. diff --git a/.github/ISSUE_TEMPLATE/revert.yml b/.github/ISSUE_TEMPLATE/revert.yml new file mode 100644 index 0000000..9f462d2 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/revert.yml @@ -0,0 +1,13 @@ +--- +name: Revert a previous change +description: >- + Revert a change made in a previous commit. +labels: +- revert + +body: +- type: textarea + attributes: + label: Description + description: >- + A concise description of what of what you would like to add or change. diff --git a/.github/ISSUE_TEMPLATE/style.yml b/.github/ISSUE_TEMPLATE/style.yml new file mode 100644 index 0000000..b386ac6 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/style.yml @@ -0,0 +1,13 @@ +--- +name: Style +description: >- + Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons) +labels: +- style + +body: +- type: textarea + attributes: + label: Description + description: >- + A concise description of what of what you would like to add or change. diff --git a/.github/ISSUE_TEMPLATE/test.yml b/.github/ISSUE_TEMPLATE/test.yml new file mode 100644 index 0000000..4d4dbad --- /dev/null +++ b/.github/ISSUE_TEMPLATE/test.yml @@ -0,0 +1,13 @@ +--- +name: Unittests and examples +description: >- + Add or edit unittests or examples. +labels: +- test + +body: +- type: textarea + attributes: + label: Description + description: >- + A concise description of what of what you would like to add or change. diff --git a/.github/PULL_REQUEST_TEMPLATE/pull_request_template.md b/.github/PULL_REQUEST_TEMPLATE/pull_request_template.md index ac0ee0d..bb64ee1 100644 --- a/.github/PULL_REQUEST_TEMPLATE/pull_request_template.md +++ b/.github/PULL_REQUEST_TEMPLATE/pull_request_template.md @@ -15,4 +15,4 @@ and any information that can improve and speed-up the review process. For example: - Add a way to do X - Fix a bug with Y ---> \ No newline at end of file +--> diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 04cb4ef..da9876a 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -4,9 +4,14 @@ on: pull_request: types: [opened, synchronize, reopened] +concurrency: + group: ${{ github.head_ref }} + cancel-in-progress: true + jobs: Test: runs-on: ${{ matrix.os }}-latest + timeout-minutes: 30 defaults: run: shell: bash -l {0} @@ -28,10 +33,11 @@ jobs: run: | pip install . -v helx-download-extras + conda env config vars set MUJOCO_GL=osmesa PYOPENGL_PLATFORM=osmesa + conda env config vars set LD_PRELOAD=$CONDA_PREFIX/x86_64-conda-linux-gnu/sysroot/usr/lib64/libGLdispatch.so.0:/usr/lib/x86_64-linux-gnu/libGLEW.so conda env config vars set LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$HOME/.mujoco/mujoco210/bin conda env config vars set MJLIB_PATH=$HOME/.mujoco/mujoco210/bin/libmujoco210.so conda env config vars set MUJOCO_PY_MUJOCO_PATH=$HOME/.mujoco/mujoco210 - conda env config vars set LD_PRELOAD=$CONDA_PREFIX/x86_64-conda-linux-gnu/sysroot/usr/lib64/libGLdispatch.so.0 - name: Check code quality run: | pip install pylint @@ -48,6 +54,7 @@ jobs: Compliance: runs-on: ubuntu-latest + timeout-minutes: 30 steps: - uses: actions/checkout@v3 with: diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..0da1d0d --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,78 @@ +# Contributing to helx +If you are reading this, your are interested in contributing -- and time is precious, so thank you very much for your time. +This guidelines are designed to guide you through how to submit commits to `helx`. + + +## Code of conduct +First and foremost, please be respectuful to others. +Please, read and follow our [Code of conduct](https://github.com/epignatelli/helx/CODE_OF_CONDUCT.md). +The code applies to both humans and bots. + + +## Committing code +Contributing to the codebase or to other any operational support material happens through Pull Requests (PRs). +If you have already a PR in mind, please open an issue first, explaining the underlying motivation for the change. +To commit new code, please: +1. Open a [new issue](https://github.com/epignatelli/helx/issues/new/choose) and assign yourself to it +2. Create and work on a new branch -- you can do it [directly from the issue page](https://docs.github.com/en/issues/tracking-your-work-with-issues/creating-a-branch-for-an-issue) +3. When you are ready to merge, or you you have a proof of concept to discuss, open a PR, assign yourself to it, and ask review from one of the team + + + +## Development install +You can install `helx` in your development environment using `conda` and `pip`. +From the repository root, you can install the package in development mode (`-e`) in a pre-baked environment: +```bash +git clone https://github.com/epignatelli/helx +cd helx +conda env create -f environment.yml +pip install -e . +``` + +## Testing +We use `pytest` for testing. +You can run the tests with: +```bash +pytest test/ +``` + +--- +## Standards +### Python code +We adopt the [PEP8 Python style guide](https://peps.python.org/pep-0008/), and a big handful of good old common sense. +Please, keep your code as modular as possible. + +### Documentation +We adopt the [Goole Python docstrings style guide](https://google.github.io/styleguide/pyguide.html#38-comments-and-docstrings). + +### Versioning +We adopt the [semantic versioning](https://semver.org/) standard. +No prefixes, no suffixes are allowed, and no alpha/beta/rc versions are allowed. +The version number is automatically calculated by the CD, based on the commit messages (see [conventional commit](https://www.conventionalcommits.org/en/v1.0.0/#how-does-this-relate-to-semver) for more, and read further for more details). + +### Commit messages +We adopt the [angular convention](https://github.com/angular/angular/blob/68a6a07/CONTRIBUTING.md#commit) for commit messages. +The commit message consists of a header, a body, and a footer: +``` +(): + + + +