Skip to content

Commit

Permalink
updated sphinx docs
Browse files Browse the repository at this point in the history
  • Loading branch information
harisankar95 committed Dec 29, 2023
1 parent 7689fa9 commit 5aac004
Show file tree
Hide file tree
Showing 9 changed files with 372 additions and 42 deletions.
28 changes: 28 additions & 0 deletions docs/INSTALL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Installation

## PyPI

Install the package from PyPI using pip:

```bash
pip install voxelgym2D
```

## GitHub

```bash
pip install git+https://github.com/harisankar95/voxelgym2D.git
```

## For development purpose use editable mode

To install the package in development mode, run the following command in the root directory of the repository:

```bash
git clone https://github.com/harisankar95/voxelgym2D.git ~/path/to/repo
cd ~/path/to/repo
pip install -e .[dev]

# to aditionally install stable_baselines 3 and pytorch (optional)
pip install -e .[dev,sb3]
```
16 changes: 16 additions & 0 deletions docs/INTRO.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Voxelgym2D

A gym environment for voxel/grid based reinforcement learning for path planning.

<div id="solution-table">
<table>
<tr>
<td style="padding:10px">
<img src="https://github.com/harisankar95/voxelgym2D/raw/main/resources/solution_1.gif" width="375"/>
</td>
<td style="padding:10px">
<img src="https://github.com/harisankar95/voxelgym2D/raw/main/resources/solution_2.gif" width="375"/>
</td>
</tr>
</table>
</div>
21 changes: 21 additions & 0 deletions docs/USAGE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Examples

For usage examples with detailed descriptions take a look at the [examples](https://github.com/harisankar95/voxelgym2D/tree/main/examples/) folder.

## Basic usage

```python
import gymnasium as gym

env = gym.make("voxelgym2D:onestep-v0")
observation, info = env.reset(seed=123456)

done = False
while not done:
action = env.action_space.sample() # agent policy that uses the observation and info
observation, reward, terminated, truncated, info = env.step(action)

done = terminated or truncated
env.render()

env.close()
77 changes: 77 additions & 0 deletions docs/_static/custom.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
/* Based on Stable Baselines 3 theme
* https://github.com/DLR-RM/stable-baselines3/
* */
:root {
--main-bg-color: #B6C8DB;
--link-color: #6DB59F;
}

/* Header fonts y */
h1,
h2,
.rst-content .toctree-wrapper p.caption,
h3,
h4,
h5,
h6,
legend,
p.caption {
font-family: "Lato", "proxima-nova", "Helvetica Neue", Arial, sans-serif;
}


/* Docs background */
.wy-side-nav-search {
background-color: var(--main-bg-color);
}

/* Mobile version */
.wy-nav-top {
background-color: var(--main-bg-color);
}

/* Change link colors (except for the menu) */
a {
color: var(--link-color);
}

a:hover {
color: #798EA9;
}

.wy-menu a {
color: #b3b3b3;
}

.wy-menu a:hover {
color: #b3b3b3;
}

a.icon.icon-home {
color: #b3b3b3;
}

.version {
color: var(--link-color) !important;
}


/* Make code blocks have a background */
.codeblock,
pre.literal-block,
.rst-content .literal-block,
.rst-content pre.literal-block,
div[class^='highlight'] {
background: #FFFFFF;
;
}

/* Change style of types in the docstrings .rst-content .field-list */
.field-list .xref.py.docutils,
.field-list code.docutils,
.field-list .docutils.literal.notranslate {
border: None;
padding-left: 0;
padding-right: 0;
color: #404040;
}
27 changes: 27 additions & 0 deletions docs/_templates/versions.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{%- if current_version %}
<div class="rst-versions" data-toggle="rst-versions" role="note" aria-label="versions">
<span class="rst-current-version" data-toggle="rst-current-version">
<span class="fa fa-book"> Other Versions</span>
v: {{ current_version.name }}
<span class="fa fa-caret-down"></span>
</span>
<div class="rst-other-versions">
{%- if versions.tags %}
<dl>
<dt>Tags</dt>
{%- for item in versions.tags %}
<dd><a href="{{ item.url }}">{{ item.name }}</a></dd>
{%- endfor %}
</dl>
{%- endif %}
{%- if versions.branches %}
<dl>
<dt>Branches</dt>
{%- for item in versions.branches %}
<dd><a href="{{ item.url }}">{{ item.name }}</a></dd>
{%- endfor %}
</dl>
{%- endif %}
</div>
</div>
{%- endif %}
Loading

0 comments on commit 5aac004

Please sign in to comment.