diff --git a/docs/Makefile b/docs/Makefile new file mode 100644 index 00000000..d0c3cbf1 --- /dev/null +++ b/docs/Makefile @@ -0,0 +1,20 @@ +# Minimal makefile for Sphinx documentation +# + +# You can set these variables from the command line, and also +# from the environment for the first two. +SPHINXOPTS ?= +SPHINXBUILD ?= sphinx-build +SOURCEDIR = source +BUILDDIR = build + +# Put it first so that "make" without argument is like "make help". +help: + @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) + +.PHONY: help Makefile + +# Catch-all target: route all unknown targets to Sphinx using the new +# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). +%: Makefile + @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) diff --git a/docs/make.bat b/docs/make.bat new file mode 100644 index 00000000..747ffb7b --- /dev/null +++ b/docs/make.bat @@ -0,0 +1,35 @@ +@ECHO OFF + +pushd %~dp0 + +REM Command file for Sphinx documentation + +if "%SPHINXBUILD%" == "" ( + set SPHINXBUILD=sphinx-build +) +set SOURCEDIR=source +set BUILDDIR=build + +%SPHINXBUILD% >NUL 2>NUL +if errorlevel 9009 ( + echo. + echo.The 'sphinx-build' command was not found. Make sure you have Sphinx + echo.installed, then set the SPHINXBUILD environment variable to point + echo.to the full path of the 'sphinx-build' executable. Alternatively you + echo.may add the Sphinx directory to PATH. + echo. + echo.If you don't have Sphinx installed, grab it from + echo.https://www.sphinx-doc.org/ + exit /b 1 +) + +if "%1" == "" goto help + +%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% +goto end + +:help +%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% + +:end +popd diff --git a/docs/source/_static/custom.css b/docs/source/_static/custom.css new file mode 100644 index 00000000..27004ba8 --- /dev/null +++ b/docs/source/_static/custom.css @@ -0,0 +1,209 @@ +div.textblock a, div.textblock a:visited, p a, p a:visited, +a, a:hover, a:visited, +a.reference, a.internal, a.current { + color: #cfb87c; + font-weight: bold; +} + +a.icon-home, a.icon-home:visited { + color: #666; +} + +div.wy-menu > p.caption > span.caption-text { + color: white; + font-weight: bold; +} +a.el, a.el:visited { + color: #565A5C; +} + +.wy-side-nav-search>div.version { + color: #565A5C; # CU dark gray +} + +.wy-nav-content { + max-width: none; +} + +code span.pre, code { + color: #cb7ccf; +} + +th.head, .wy-nav-top { + color: white; + background-color: #565A5C; +} + +th.head p { + margin: 0px; +} + +tr td p, th.head p { + font-size: small; +} + +img.logo { + filter: drop-shadow(0px 0px 8px #fff); +} +/* override table no-wrap */ +.wy-table-responsive table td, .wy-table-responsive table th { + white-space: normal; +} + +.math { + text-align: left; +} +.eqno { + float: right; +} + +body, h1, h2, h3, h4, h5, .rst-content, .sidebar, .sidebar-title, p.caption { + font-family: system-ui, -apple-system, BlinkMacSystemFont, "Helvetica Neue", + "Lucida Grande", "Segoe UI" !important; +} + +:root { + color-scheme: light dark; +} + +.sidebar { + max-width: 500px; +} + +code, .rst-content tt, .rst-content code { + color: #E74C3C; +} + +ul.simple li, aside.sidebar ul li { + all: revert; +} + +ul.simple li p, aside.sidebar ul li p { + all: revert; + line-height: 24px; + font-size: 16px; + margin: 0px; +} + +ul.simple ul li { + list-style-type: circle; + margin-left: 1.5em; +} + +ul.simple, aside.sidebar ul { + all: revert; + padding-left: 1.5em; +} + +figure { + text-align: center; +} + +@media (prefers-color-scheme: dark) { + .wy-nav-content, .wy-body-for-nav, .wy-nav-content-wrap, math, span[id*='MathJax-Span'] { + background-color: black; + color: #ccc; + } + + .highlight .go { + color: #ccc; + } + + img.logo { + filter: drop-shadow(0px 0px 8px #000); + } + + .rst-content code { + background: #0004; + } + html.writer-html4 .rst-content dl:not(.docutils)>dt, html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple)>dt, .rst-content .note { + background: #2D4151; + } + + .rst-content .warning, .rst-content .caution, .rst-content .attention { + background: #51402F; + } + + .rst-content .important, .rst-content .hint, .rst-content .tip { + background: #275145; + } + + .rst-content .danger, .rst-content .error { + background: #523A37; + } + + /* sidebar formatting */ + .sidebar { + border-color: #666; + } + .rst-content .sidebar { + background: #222; + } + .rst-content .sidebar .sidebar-title { + background: #666; + } + + + .btn-neutral, .btn-neutral:hover, .btn:visited { + background: #333 !important; + color: #ccc !important; + } + + .highlight { + background: #4448; + } + + .rst-content table.docutils:not(.field-list) tr:nth-child(2n-1) td { + background-color: #222; + } + + .rst-content pre.literal-block, .rst-content div[class^='highlight'], .rst-content code, .rst-content table.docutils, .wy-table thead th, .rst-content table.docutils thead th, .rst-content table.field-list thead th, .wy-table-bordered-all td, .rst-content table.docutils td { + border-color: gray; + } + + img[src$="svg"] { + background-color: white; + filter: invert(100%) hue-rotate(180deg) saturate(200%);; + } + + img[src$="jpg"], img[src$="png"] { + border-radius: 5px; + } + + .rst-content dl:not(.docutils) dt { + background-color: #2D4151; + } + + .rst-content dl:not(.docutils) { + padding-top: 1em; + } + + .rst-content dl:not(.docutils) code.descclassname, .rst-content dl:not(.docutils) code.descname { + color: #ccc; + } + + html.writer-html4 .rst-content dl:not(.docutils) dl:not(.field-list)>dt, html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple) dl:not(.field-list)>dt, .rst-content dl:not(.docutils) dl dt { + background-color: #333; + color: #ccc; + } + + .wy-table caption, .rst-content table.docutils caption, .rst-content table.field-list caption { + color: inherit; + } + + span.vm, span.nf, span.nn { + color:#66f !important; + } + + span.normal { + color: #333 !important; + } + + td.linenos pre { + background: #ccc !important; + } + + .rst-content .highlighted { + background-color: #333; + } +} \ No newline at end of file diff --git a/docs/source/conf.py b/docs/source/conf.py new file mode 100644 index 00000000..801266b2 --- /dev/null +++ b/docs/source/conf.py @@ -0,0 +1,40 @@ +# Configuration file for the Sphinx documentation builder. +# +# For the full list of built-in configuration values, see the documentation: +# https://www.sphinx-doc.org/en/master/usage/configuration.html + +# -- Project information ----------------------------------------------------- +# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information +import os +import sys + +#sys.path.insert(0, os.path.abspath(os.path.join("..", "..", "src"))) + +project = "bsk_rl" +copyright = "2023, Mark Stephenson" +author = "Mark Stephenson" +release = "0.0.0" + +# -- General configuration --------------------------------------------------- +# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration + +extensions = [ + "sphinx.ext.duration", + "sphinx.ext.doctest", + "sphinx.ext.todo", + "sphinx.ext.autodoc", + "sphinx.ext.viewcode", +] + +templates_path = ["_templates"] +exclude_patterns = [] + + +# -- Options for HTML output ------------------------------------------------- +# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output + +html_theme = "sphinx_rtd_theme" +html_static_path = ["_static"] +html_css_files = ["custom.css"] + +add_module_names = False diff --git a/docs/source/docsRequired.txt b/docs/source/docsRequired.txt new file mode 100644 index 00000000..438b963c --- /dev/null +++ b/docs/source/docsRequired.txt @@ -0,0 +1 @@ +sphinx_rtd_theme==2.0.0 \ No newline at end of file diff --git a/docs/source/general_satellite_tasking/general_satellite_tasking.rst b/docs/source/general_satellite_tasking/general_satellite_tasking.rst new file mode 100644 index 00000000..55624163 --- /dev/null +++ b/docs/source/general_satellite_tasking/general_satellite_tasking.rst @@ -0,0 +1,39 @@ +general\_satellite\_tasking package +=================================== + +Subpackages +----------- + +.. toctree:: + :maxdepth: 4 + + general_satellite_tasking.scenario + general_satellite_tasking.simulation + general_satellite_tasking.utils + +Submodules +---------- + +general\_satellite\_tasking.gym\_env module +------------------------------------------- + +.. automodule:: bsk_rl.envs.general_satellite_tasking.gym_env + :members: + :undoc-members: + :show-inheritance: + +general\_satellite\_tasking.types module +---------------------------------------- + +.. automodule:: bsk_rl.envs.general_satellite_tasking.types + :members: + :undoc-members: + :show-inheritance: + +Module contents +--------------- + +.. automodule:: bsk_rl.envs.general_satellite_tasking + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/source/general_satellite_tasking/general_satellite_tasking.scenario.rst b/docs/source/general_satellite_tasking/general_satellite_tasking.scenario.rst new file mode 100644 index 00000000..7e95bf9d --- /dev/null +++ b/docs/source/general_satellite_tasking/general_satellite_tasking.scenario.rst @@ -0,0 +1,61 @@ +general\_satellite\_tasking.scenario package +============================================ + +Submodules +---------- + +general\_satellite\_tasking.scenario.communication module +--------------------------------------------------------- + +.. automodule:: bsk_rl.envs.general_satellite_tasking.scenario.communication + :members: + :undoc-members: + :show-inheritance: + +general\_satellite\_tasking.scenario.data module +------------------------------------------------ + +.. automodule:: bsk_rl.envs.general_satellite_tasking.scenario.data + :members: + :undoc-members: + :show-inheritance: + +general\_satellite\_tasking.scenario.environment\_features module +----------------------------------------------------------------- + +.. automodule:: bsk_rl.envs.general_satellite_tasking.scenario.environment_features + :members: + :undoc-members: + :show-inheritance: + +general\_satellite\_tasking.scenario.sat\_actions module +-------------------------------------------------------- + +.. automodule:: bsk_rl.envs.general_satellite_tasking.scenario.sat_actions + :members: + :undoc-members: + :show-inheritance: + +general\_satellite\_tasking.scenario.sat\_observations module +------------------------------------------------------------- + +.. automodule:: bsk_rl.envs.general_satellite_tasking.scenario.sat_observations + :members: + :undoc-members: + :show-inheritance: + +general\_satellite\_tasking.scenario.satellites module +------------------------------------------------------ + +.. automodule:: bsk_rl.envs.general_satellite_tasking.scenario.satellites + :members: + :undoc-members: + :show-inheritance: + +Module contents +--------------- + +.. automodule:: bsk_rl.envs.general_satellite_tasking.scenario + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/source/general_satellite_tasking/general_satellite_tasking.simulation.rst b/docs/source/general_satellite_tasking/general_satellite_tasking.simulation.rst new file mode 100644 index 00000000..d1e3a86a --- /dev/null +++ b/docs/source/general_satellite_tasking/general_satellite_tasking.simulation.rst @@ -0,0 +1,45 @@ +general\_satellite\_tasking.simulation package +============================================== + +Submodules +---------- + +general\_satellite\_tasking.simulation.dynamics module +------------------------------------------------------ + +.. automodule:: bsk_rl.envs.general_satellite_tasking.simulation.dynamics + :members: + :undoc-members: + :show-inheritance: + +general\_satellite\_tasking.simulation.environment module +--------------------------------------------------------- + +.. automodule:: bsk_rl.envs.general_satellite_tasking.simulation.environment + :members: + :undoc-members: + :show-inheritance: + +general\_satellite\_tasking.simulation.fsw module +------------------------------------------------- + +.. automodule:: bsk_rl.envs.general_satellite_tasking.simulation.fsw + :members: + :undoc-members: + :show-inheritance: + +general\_satellite\_tasking.simulation.simulator module +------------------------------------------------------- + +.. automodule:: bsk_rl.envs.general_satellite_tasking.simulation.simulator + :members: + :undoc-members: + :show-inheritance: + +Module contents +--------------- + +.. automodule:: bsk_rl.envs.general_satellite_tasking.simulation + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/source/general_satellite_tasking/general_satellite_tasking.utils.rst b/docs/source/general_satellite_tasking/general_satellite_tasking.utils.rst new file mode 100644 index 00000000..5cf6bc46 --- /dev/null +++ b/docs/source/general_satellite_tasking/general_satellite_tasking.utils.rst @@ -0,0 +1,37 @@ +general\_satellite\_tasking.utils package +========================================= + +Submodules +---------- + +general\_satellite\_tasking.utils.debug module +---------------------------------------------- + +.. automodule:: bsk_rl.envs.general_satellite_tasking.utils.debug + :members: + :undoc-members: + :show-inheritance: + +general\_satellite\_tasking.utils.functional module +--------------------------------------------------- + +.. automodule:: bsk_rl.envs.general_satellite_tasking.utils.functional + :members: + :undoc-members: + :show-inheritance: + +general\_satellite\_tasking.utils.orbital module +------------------------------------------------ + +.. automodule:: bsk_rl.envs.general_satellite_tasking.utils.orbital + :members: + :undoc-members: + :show-inheritance: + +Module contents +--------------- + +.. automodule:: bsk_rl.envs.general_satellite_tasking.utils + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/source/general_satellite_tasking/modules.rst b/docs/source/general_satellite_tasking/modules.rst new file mode 100644 index 00000000..2e5339a6 --- /dev/null +++ b/docs/source/general_satellite_tasking/modules.rst @@ -0,0 +1,7 @@ +general_satellite_tasking +========================= + +.. toctree:: + :maxdepth: 4 + + general_satellite_tasking diff --git a/docs/source/index.rst b/docs/source/index.rst new file mode 100644 index 00000000..0b193c27 --- /dev/null +++ b/docs/source/index.rst @@ -0,0 +1,35 @@ +.. bsk_rl documentation master file, created by + sphinx-quickstart on Wed Nov 15 09:35:59 2023. + You can adapt this file completely to your liking, but it should at least + contain the root `toctree` directive. + +Welcome to bsk_rl's documentation! +================================== + +**bsk_rl** is a Python library used to develop reinforcement learning environments for autonomouse satellites. + +Check out the :doc:`usage` section for further information. + +.. note:: + This project is under active development. + +.. toctree:: + :maxdepth: 2 + :caption: Contents: + + general_satellite_tasking/modules + + +Indices and tables +================== + +* :ref:`genindex` +* :ref:`modindex` +* :ref:`search` + +Contents +-------- + +.. toctree:: + + usage diff --git a/docs/source/usage.rst b/docs/source/usage.rst new file mode 100644 index 00000000..d6b91dba --- /dev/null +++ b/docs/source/usage.rst @@ -0,0 +1,15 @@ +Usage +===== + +Installation +------------ + +.. note:: + To use Lumache, bsk_rl, Basilisk must be installed first. You can find instructions on how to do so + `at this link `_ + +To install bsk_rl, clone the repo and run the following command in your virtual environment: + +.. code-block:: console + + (.venv) $ python -m pip install -e . && finish_install