Skip to content

Commit

Permalink
init(project): upload full project
Browse files Browse the repository at this point in the history
  • Loading branch information
muchvo committed Jan 27, 2023
0 parents commit e311eab
Show file tree
Hide file tree
Showing 142 changed files with 25,842 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# https://editorconfig.org/

root = true

[*]
charset = utf-8
end_of_line = lf
indent_style = space
indent_size = 4
trim_trailing_whitespace = true
insert_final_newline = true

[*.py]
indent_size = 4
src_paths=safety_gymnasium,tests,examples

[*.{yaml,yml,xml}]
indent_size = 2

[*.md]
indent_size = 2
x-soft-wrap-text = true

[*.rst]
indent_size = 4
x-soft-wrap-text = true

[Makefile]
indent_style = tab

[*.bat]
end_of_line = crlf
indent_style = tab
12 changes: 12 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
* text eol=lf
*.bat eol=crlf
*.ipynb linguist-detectable=false

*.png binary
*.jpg binary
*.jpeg binary
*.gif binary
*.pdf binary
*.STL binary
*.stl binary
*.PNG binary
122 changes: 122 additions & 0 deletions .github/ISSUE_TEMPLATE/bug-report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@
name: 🐛 Bug Report
description: File an issue about a bug.
title: "[BUG] "
labels: [bug]
assignees: [zmsn-2077]
body:
- type: markdown
attributes:
value: |
Please do your best to make the issue as easy to act on as possible, and only submit here if there is clearly a problem with Safety Gymnasium (ask in [Discussions](https://github.com/PKU-MARL/Safety-Gymnasium/discussions) first if unsure).
- type: checkboxes
id: steps
attributes:
label: Required prerequisites
description: Make sure you've completed the following steps before submitting your issue -- thank you!
options:
- label: I have read the documentation <https://safety-gymnasium.readthedocs.io>.
required: true
- label: I have searched the [Issue Tracker](https://github.com/PKU-MARL/Safety-Gymnasium/issues) and [Discussions](https://github.com/PKU-MARL/Safety-Gymnasium/discussions) that this hasn't already been reported. (+1 or comment there if it has.)
required: true
- label: Consider asking first in a [Discussion](https://github.com/PKU-MARL/Safety-Gymnasium/discussions/new).
required: false

- type: input
id: version
attributes:
label: What version of Safety Gymnasium are you using?
description: Run command `python3 -c 'print(__import__("safety_gymnasium").__version__)'` in your shell and paste the output here.
placeholder: E.g., 0.1.0
validations:
required: true

- type: textarea
id: system-info
attributes:
label: System information
description: |
Describe the characteristic of your environment:
- Describe how the library was installed (pip, conda, source, ...)
- Python version
- Versions of any other relevant libraries
```python
import sys, safety_gymnasium
print(sys.version, sys.platform)
print(safety_gymnasium.__version__)
```
validations:
required: true

- type: textarea
id: description
attributes:
label: Problem description
description: >-
Provide a short description, state the expected behavior and what actually happens. Include
relevant information like what version of Safety Gymnasium you are using, what system you are on,
and any useful commands / output.
validations:
required: true

- type: textarea
id: code
attributes:
label: Reproducible example code
description: >-
The code should be minimal, have minimal external dependencies, and isolate the functions
that cause breakage. Submit matched and complete snippets that can be easily run to diagnose
the issue.
value: |
The Python snippets:
```python
```
Command lines:
```bash
```
Extra dependencies:
```text
```
Steps to reproduce:
1.
2.
3.
validations:
required: true

- type: textarea
id: traceback
attributes:
label: Traceback
description: Put the Python traceback information here.
placeholder: |
Traceback (most recent call last):
File ...
render: pytb

- type: textarea
id: expected
attributes:
label: Expected behavior
description: Provide a clear and concise description of what you expected to happen.

- type: textarea
id: additional-context
attributes:
label: Additional context
description: >-
Add any other context about the problem here. Screenshots may also be helpful.
If you know or suspect the reason for this bug, paste the code lines and suggest modifications.
5 changes: 5 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
blank_issues_enabled: false
contact_links:
- name: 💬 Start a discussion
url: https://github.com/PKU-MARL/Safety-Gymnasium/discussions/new
about: Please ask and answer questions here if unsure.
45 changes: 45 additions & 0 deletions .github/ISSUE_TEMPLATE/feature-request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: ✨ Feature Request
description: Suggest an idea for this project.
title: "[Feature Request] "
labels: [enhancement]
body:
- type: checkboxes
id: steps
attributes:
label: Required prerequisites
description: Make sure you've completed the following steps before submitting your issue -- thank you!
options:
- label: I have searched the [Issue Tracker](https://github.com/PKU-MARL/Safety-Gymnasium/issues) and [Discussions](https://github.com/PKU-MARL/Safety-Gymnasium/discussions) that this hasn't already been reported. (+1 or comment there if it has.)
required: true
- label: Consider asking first in a [Discussion](https://github.com/PKU-MARL/Safety-Gymnasium/discussions/new).
required: false

- type: textarea
id: motivation
attributes:
label: Motivation
description: Outline the motivation for the proposal.
value: |
<!-- Please outline the motivation for the proposal.
Is your feature request related to a problem? E.g., "I'm always frustrated when [...]".
If this is related to another issue, please link here too. -->
validations:
required: true

- type: textarea
id: solution
attributes:
label: Solution
description: Provide a clear and concise description of what you want to happen.

- type: textarea
id: alternatives
attributes:
label: Alternatives
description: A clear and concise description of any alternative solutions or features you've considered.

- type: textarea
id: additional-context
attributes:
label: Additional context
description: Add any other context about the problem here. Screenshots may also be helpful.
25 changes: 25 additions & 0 deletions .github/ISSUE_TEMPLATE/questions.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: 🤔 Questions / Help / Support
description: Do you need support?
title: "[Question] "
labels: [question]
body:
- type: checkboxes
id: steps
attributes:
label: Required prerequisites
description: Make sure you've completed the following steps before submitting your issue -- thank you!
options:
- label: I have read the documentation <https://safety-gymnasium.readthedocs.io>.
required: true
- label: I have searched the [Issue Tracker](https://github.com/PKU-MARL/Safety-Gymnasium/issues) and [Discussions](https://github.com/PKU-MARL/Safety-Gymnasium/discussions) that this hasn't already been reported. (+1 or comment there if it has.)
required: true
- label: Consider asking first in a [Discussion](https://github.com/PKU-MARL/Safety-Gymnasium/discussions/new).
required: false

- type: textarea
id: questions
attributes:
label: Questions
description: Describe your questions with relevant resources such as snippets, links, images, etc.
validations:
required: true
39 changes: 39 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
## Description

Describe your changes in detail.

## Motivation and Context

Why is this change required? What problem does it solve?
If it fixes an open issue, please link to the issue here.
You can use the syntax `close #15213` if this solves the issue #15213

- [ ] I have raised an issue to propose this change ([required](https://github.com/PKU-MARL/Safety-Gymnasium/issues) for new features and bug fixes)

## Types of changes

What types of changes does your code introduce? Put an `x` in all the boxes that apply:

- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds core functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to change)
- [ ] Documentation (update in the documentation)

## Implemented Tasks

- [ ] Subtask 1
- [ ] Subtask 2
- [ ] Subtask 3

## Checklist

Go over all the following points, and put an `x` in all the boxes that apply.
If you are unsure about any of these, don't hesitate to ask. We are here to help!

- [ ] I have read the [CONTRIBUTION](https://github.com/PKU-MARL/Safety-Gymnasium/blob/main/CONTRIBUTING.md) guide. (**required**)
- [ ] My change requires a change to the documentation.
- [ ] I have updated the tests accordingly. (*required for a bug fix or a new feature*)
- [ ] I have updated the documentation accordingly.
- [ ] I have reformatted the code using `make format`. (**required**)
- [ ] I have checked the code using `make lint`. (**required**)
- [ ] I have ensured `make test` pass. (**required**)
80 changes: 80 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
name: ci

on:
push:
branches:
- main
pull_request:
# Allow to trigger the workflow manually
workflow_dispatch:

permissions:
contents: read

concurrency:
group: "${{ github.workflow }}-${{ github.ref }}"
cancel-in-progress: ${{ github.event_name == 'pull_request' }}

jobs:
lint:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: "recursive"
fetch-depth: 1

- name: Set up Python 3.8
uses: actions/setup-python@v4
with:
python-version: "3.8"
update-environment: true

- name: Upgrade pip
run: |
python -m pip install --upgrade pip setuptools
- name: Install Safety-Gymnasium
run: |
python -m pip install -vvv --editable '.[lint]'
- name: pre-commit
run: |
make pre-commit
- name: flake8
run: |
make flake8
- name: pylint
run: |
make pylint
- name: isort and black
run: |
make py-format
- name: addlicense
run: |
make addlicense
# TODO: enable this when ready
# - name: mypy
# run: |
# make mypy

# TODO: enable this when ready
# - name: Install dependencies
# run: |
# python -m pip install -r docs/requirements.txt

# TODO: enable this when ready
# - name: docstyle
# run: |
# make docstyle

- name: spelling
run: |
make spelling
Loading

0 comments on commit e311eab

Please sign in to comment.