Skip to content

Commit

Permalink
f
Browse files Browse the repository at this point in the history
  • Loading branch information
Mark2000 committed May 29, 2024
1 parent e4dc286 commit 4bb4a75
Show file tree
Hide file tree
Showing 10 changed files with 131 additions and 123 deletions.
23 changes: 12 additions & 11 deletions docs/build/doctrees/nbsphinx/Examples/multiagent_envs.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -4,24 +4,25 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"# Multi-Agent Environments"
"# Multi-Agent Environments\n",
"\n",
"big change"
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"True\n"
]
"metadata": {
"execution": {
"iopub.execute_input": "2024-05-29T23:28:21.710130Z",
"iopub.status.busy": "2024-05-29T23:28:21.710028Z",
"iopub.status.idle": "2024-05-29T23:28:21.714229Z",
"shell.execute_reply": "2024-05-29T23:28:21.713932Z"
}
],
},
"outputs": [],
"source": [
"if 1 > 0:\n",
"if 1 > 3:\n",
" print(\"True\")"
]
}
Expand Down
9 changes: 8 additions & 1 deletion docs/build/doctrees/nbsphinx/Examples/rllib_training.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,14 @@
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"metadata": {
"execution": {
"iopub.execute_input": "2024-05-29T23:28:22.823987Z",
"iopub.status.busy": "2024-05-29T23:28:22.823580Z",
"iopub.status.idle": "2024-05-29T23:28:22.831857Z",
"shell.execute_reply": "2024-05-29T23:28:22.831451Z"
}
},
"outputs": [
{
"name": "stdout",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,14 @@
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"metadata": {
"execution": {
"iopub.execute_input": "2024-05-29T23:28:24.073082Z",
"iopub.status.busy": "2024-05-29T23:28:24.072990Z",
"iopub.status.idle": "2024-05-29T23:28:24.078640Z",
"shell.execute_reply": "2024-05-29T23:28:24.078343Z"
}
},
"outputs": [
{
"name": "stdout",
Expand Down
149 changes: 75 additions & 74 deletions docs/build/doctrees/nbsphinx/Examples/simple_environment.ipynb

Large diffs are not rendered by default.

14 changes: 13 additions & 1 deletion docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
import os
import re
import shutil
import subprocess
import sys
from importlib import metadata
from pathlib import Path
Expand Down Expand Up @@ -49,6 +50,7 @@
"undoc-members": None,
}
autodoc_typehints = "both"
# nbsphinx_execute = "never" # conf.py executes them and caches them

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand Down Expand Up @@ -278,8 +280,18 @@ def run(self, source_dir=None):
file,
)

nb_cache_dir = Path("../build/doctrees/nbsphinx") # relative to build
for notebook in nb_paths:
shutil.copy(notebook, self.base_doc_dir / index_path / notebook.name)
nb_cache = nb_cache_dir / self.base_doc_dir / index_path / notebook.name
if (nb_cache).is_file() and subprocess.check_output(
f"nbdiff --sources {notebook} {nb_cache}", shell=True
) == b"":
shutil.copy(
nb_cache,
self.base_doc_dir / index_path / notebook.name,
)
else:
shutil.copy(notebook, self.base_doc_dir / index_path / notebook.name)

# Recursively go through all directories in source, documenting what is available.
for dir_path in sorted(dir_paths):
Expand Down
18 changes: 6 additions & 12 deletions examples/multiagent_envs.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -4,24 +4,18 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"# Multi-Agent Environments"
"# Multi-Agent Environments\n",
"\n",
"big change"
]
},
{
"cell_type": "code",
"execution_count": 1,
"execution_count": null,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"True\n"
]
}
],
"outputs": [],
"source": [
"if 1 > 0:\n",
"if 1 > 3:\n",
" print(\"True\")"
]
}
Expand Down
12 changes: 2 additions & 10 deletions examples/rllib_training.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,9 @@
},
{
"cell_type": "code",
"execution_count": 1,
"execution_count": null,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"True\n"
]
}
],
"outputs": [],
"source": [
"if 1 > 0:\n",
" print(\"True\")"
Expand Down
12 changes: 2 additions & 10 deletions examples/satellite_configuration.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,9 @@
},
{
"cell_type": "code",
"execution_count": 1,
"execution_count": null,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"True\n"
]
}
],
"outputs": [],
"source": [
"if 1 > 0:\n",
" print(\"True\")"
Expand Down
7 changes: 4 additions & 3 deletions examples/simple_environment.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,10 @@
"source": [
"## Making the Environment\n",
"For this example, we will be using the single-agent [SatelliteTasking](../api_reference/index.rst) \n",
"environment.\n",
"\n",
"TODO add more"
"environment. Along with passing the satellite that we configured, the environment takes\n",
"a [scenario](../api_reference/scene/index.rst), which defines the environment the\n",
"satellite is acting in, and a [rewarder](../api_reference/data/index.rst), which defines\n",
"how data collected from the scenario is rewarded."
]
},
{
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ dependencies = [
"ipykernel",
"matplotlib",
"nbsphinx",
"nbdime",
"numpy",
"pandas",
"pettingzoo",
Expand Down

0 comments on commit 4bb4a75

Please sign in to comment.