Skip to content

Commit

Permalink
Merge pull request #9 from metaopt/dev-doc
Browse files Browse the repository at this point in the history
feat(doc): update readthedocs
  • Loading branch information
Benjamin-eecs authored Jul 4, 2022
2 parents a8db877 + 24b035b commit 89dc144
Show file tree
Hide file tree
Showing 68 changed files with 4,331 additions and 3,143 deletions.
62 changes: 62 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
---
name: Bug report
about: Create a report to help us improve
title: "[BUG]"
labels: ''
assignees: Benjamin-eecs

---

## Describe the bug

A clear and concise description of what the bug is.

## To Reproduce

Steps to reproduce the behavior.

Please try to provide a minimal example to reproduce the bug. Error messages and stack traces are also helpful.

Please use the markdown code blocks for both code and stack traces.

```python
import metarl
```

```bash
Traceback (most recent call last):
File ...
```

## Expected behavior

A clear and concise description of what you expected to happen.

## Screenshots
If applicable, add screenshots to help explain your problem.

## System info

Describe the characteristic of your environment:
* Describe how the library was installed (pip, source, ...)
* Python version
* Versions of any other relevant libraries

```python
import metarl, numpy, sys
print(metarl.__version__, numpy.__version__, sys.version, sys.platform)
```

## Additional context

Add any other context about the problem here.

## Reason and Possible fixes

If you know or suspect the reason for this bug, paste the code lines and suggest modifications.

## Checklist

- [ ] I have checked that there is no similar issue in the repo (**required**)
- [ ] I have read the [documentation](https://metarl.readthedocs.io/) (**required**)
- [ ] I have provided a minimal working example to reproduce the bug (**required**)
30 changes: 30 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
---
name: Feature request
about: Suggest an idea for this project
title: "[Feature Request]"
labels: ''
assignees: Benjamin-eecs

---

## Motivation

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.

## Solution

A clear and concise description of what you want to happen.

## Alternatives

A clear and concise description of any alternative solutions or features you've considered.

## Additional context

Add any other context or screenshots about the feature request here.

## Checklist

- [ ] I have checked that there is no similar issue in the repo (**required**)
41 changes: 41 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
## 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://metarl.readthedocs.io/en/latest/pages/contributing.html) 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)
- [ ] New environment (non-breaking change which adds 3rd-party environment)
- [ ] Breaking change (fix or feature that would cause existing functionality to change)
- [ ] Documentation (update in the documentation)
- [ ] Example (update in the folder of example)

## 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://metarl.readthedocs.io/en/latest/pages/contributing.html) 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**)
44 changes: 44 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Lint

on: [push, pull_request]

jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Cancel previous run
uses: styfle/cancel-workflow-action@0.9.1
with:
access_token: ${{ github.token }}
- uses: actions/checkout@v2
- name: Set up Python 3.8
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Upgrade pip
run: |
python -m pip install --upgrade pip
- name: Install requirements
run: |
python -m pip install -r requirements.txt
- name: Install dependencies
run: |
python -m pip install -e .
- name: flake8
run: |
make flake8
- name: isort and yapf
run: |
make py-format
- name: addlicense
run: |
make addlicense
- name: mypy
run: |
make mypy
# - name: docstyle
# run: |
# make docstyle
# - name: spelling
# run: |
# make spelling
34 changes: 34 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: pypi

on:
release:
types: [created]

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v1
with:
python-version: '3.x'
- name: Check consistency between the package version and release tag
run: |
RELEASE_VER=${GITHUB_REF#refs/*/}
PACKAGE_VER="v`python setup.py --version`"
if [ $RELEASE_VER != $PACKAGE_VER ]
then
echo "package ver. ($PACKAGE_VER) != release ver. ($RELEASE_VER)"; exit 1
fi
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
- name: Build and publish
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
python setup.py sdist bdist_wheel
twine upload dist/*
31 changes: 31 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Test

on:
release:
types: [created]

jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Cancel previous run
uses: styfle/cancel-workflow-action@0.9.1
with:
access_token: ${{ github.token }}
- uses: actions/checkout@v2
- name: Set up Python 3.8
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Upgrade pip
run: |
python -m pip install --upgrade pip
- name: Install dependencies
run: |
python -m pip install -r tests/requirements.txt
- name: Install dependencies
run: |
python -m pip install -e .
- name: Test with pytest
run: |
make pytest
Loading

0 comments on commit 89dc144

Please sign in to comment.