Skip to content

Commit

Permalink
Deploying to gh-pages from @ a134ebb 🚀
Browse files Browse the repository at this point in the history
  • Loading branch information
LucasAlegre committed Jan 10, 2024
1 parent b63b7e5 commit 96e43ca
Show file tree
Hide file tree
Showing 23 changed files with 201 additions and 177 deletions.
4 changes: 4 additions & 0 deletions _static/basic.css
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,10 @@ a.headerlink {
visibility: hidden;
}

a:visited {
color: #551A8B;
}

h1:hover > a.headerlink,
h2:hover > a.headerlink,
h3:hover > a.headerlink,
Expand Down
3 changes: 1 addition & 2 deletions _static/documentation_options.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
var DOCUMENTATION_OPTIONS = {
URL_ROOT: document.getElementById("documentation_options").getAttribute('data-url_root'),
const DOCUMENTATION_OPTIONS = {
VERSION: '1.4.3',
LANGUAGE: 'en',
COLLAPSE_INDEX: false,
Expand Down
3 changes: 3 additions & 0 deletions _static/pygments.css
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
.highlight .cs { color: #8f5902; font-style: italic } /* Comment.Special */
.highlight .gd { color: #a40000 } /* Generic.Deleted */
.highlight .ge { color: #000000; font-style: italic } /* Generic.Emph */
.highlight .ges { color: #000000; font-weight: bold; font-style: italic } /* Generic.EmphStrong */
.highlight .gr { color: #ef2929 } /* Generic.Error */
.highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */
.highlight .gi { color: #00A000 } /* Generic.Inserted */
Expand Down Expand Up @@ -107,6 +108,7 @@ body[data-theme="dark"] .highlight .c1 { color: #ababab; font-style: italic } /*
body[data-theme="dark"] .highlight .cs { color: #e50808; font-weight: bold; background-color: #520000 } /* Comment.Special */
body[data-theme="dark"] .highlight .gd { color: #d22323 } /* Generic.Deleted */
body[data-theme="dark"] .highlight .ge { color: #d0d0d0; font-style: italic } /* Generic.Emph */
body[data-theme="dark"] .highlight .ges { color: #d0d0d0; font-weight: bold; font-style: italic } /* Generic.EmphStrong */
body[data-theme="dark"] .highlight .gr { color: #d22323 } /* Generic.Error */
body[data-theme="dark"] .highlight .gh { color: #ffffff; font-weight: bold } /* Generic.Heading */
body[data-theme="dark"] .highlight .gi { color: #589819 } /* Generic.Inserted */
Expand Down Expand Up @@ -192,6 +194,7 @@ body:not([data-theme="light"]) .highlight .c1 { color: #ababab; font-style: ital
body:not([data-theme="light"]) .highlight .cs { color: #e50808; font-weight: bold; background-color: #520000 } /* Comment.Special */
body:not([data-theme="light"]) .highlight .gd { color: #d22323 } /* Generic.Deleted */
body:not([data-theme="light"]) .highlight .ge { color: #d0d0d0; font-style: italic } /* Generic.Emph */
body:not([data-theme="light"]) .highlight .ges { color: #d0d0d0; font-weight: bold; font-style: italic } /* Generic.EmphStrong */
body:not([data-theme="light"]) .highlight .gr { color: #d22323 } /* Generic.Error */
body:not([data-theme="light"]) .highlight .gh { color: #ffffff; font-weight: bold } /* Generic.Heading */
body:not([data-theme="light"]) .highlight .gi { color: #589819 } /* Generic.Inserted */
Expand Down
26 changes: 17 additions & 9 deletions _static/searchtools.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,12 @@ const _removeChildren = (element) => {
const _escapeRegExp = (string) =>
string.replace(/[.*+\-?^${}()|[\]\\]/g, "\\$&"); // $& means the whole matched string

const _displayItem = (item, searchTerms) => {
const _displayItem = (item, searchTerms, highlightTerms) => {
const docBuilder = DOCUMENTATION_OPTIONS.BUILDER;
const docUrlRoot = DOCUMENTATION_OPTIONS.URL_ROOT;
const docFileSuffix = DOCUMENTATION_OPTIONS.FILE_SUFFIX;
const docLinkSuffix = DOCUMENTATION_OPTIONS.LINK_SUFFIX;
const showSearchSummary = DOCUMENTATION_OPTIONS.SHOW_SEARCH_SUMMARY;
const contentRoot = document.documentElement.dataset.content_root;

const [docName, title, anchor, descr, score, _filename] = item;

Expand All @@ -75,20 +75,24 @@ const _displayItem = (item, searchTerms) => {
if (dirname.match(/\/index\/$/))
dirname = dirname.substring(0, dirname.length - 6);
else if (dirname === "index/") dirname = "";
requestUrl = docUrlRoot + dirname;
requestUrl = contentRoot + dirname;
linkUrl = requestUrl;
} else {
// normal html builders
requestUrl = docUrlRoot + docName + docFileSuffix;
requestUrl = contentRoot + docName + docFileSuffix;
linkUrl = docName + docLinkSuffix;
}
let linkEl = listItem.appendChild(document.createElement("a"));
linkEl.href = linkUrl + anchor;
linkEl.dataset.score = score;
linkEl.innerHTML = title;
if (descr)
if (descr) {
listItem.appendChild(document.createElement("span")).innerHTML =
" (" + descr + ")";
// highlight search terms in the description
if (SPHINX_HIGHLIGHT_ENABLED) // set in sphinx_highlight.js
highlightTerms.forEach((term) => _highlightText(listItem, term, "highlighted"));
}
else if (showSearchSummary)
fetch(requestUrl)
.then((responseData) => responseData.text())
Expand All @@ -97,6 +101,9 @@ const _displayItem = (item, searchTerms) => {
listItem.appendChild(
Search.makeSearchSummary(data, searchTerms)
);
// highlight search terms in the summary
if (SPHINX_HIGHLIGHT_ENABLED) // set in sphinx_highlight.js
highlightTerms.forEach((term) => _highlightText(listItem, term, "highlighted"));
});
Search.output.appendChild(listItem);
};
Expand All @@ -115,14 +122,15 @@ const _finishSearch = (resultCount) => {
const _displayNextItem = (
results,
resultCount,
searchTerms
searchTerms,
highlightTerms,
) => {
// results left, load the summary and display it
// this is intended to be dynamic (don't sub resultsCount)
if (results.length) {
_displayItem(results.pop(), searchTerms);
_displayItem(results.pop(), searchTerms, highlightTerms);
setTimeout(
() => _displayNextItem(results, resultCount, searchTerms),
() => _displayNextItem(results, resultCount, searchTerms, highlightTerms),
5
);
}
Expand Down Expand Up @@ -360,7 +368,7 @@ const Search = {
// console.info("search results:", Search.lastresults);

// print the results
_displayNextItem(results, results.length, searchTerms);
_displayNextItem(results, results.length, searchTerms, highlightTerms);
},

/**
Expand Down
16 changes: 13 additions & 3 deletions _static/sphinx_highlight.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,19 @@ const _highlight = (node, addItems, text, className) => {
}

span.appendChild(document.createTextNode(val.substr(pos, text.length)));
const rest = document.createTextNode(val.substr(pos + text.length));
parent.insertBefore(
span,
parent.insertBefore(
document.createTextNode(val.substr(pos + text.length)),
rest,
node.nextSibling
)
);
node.nodeValue = val.substr(0, pos);
/* There may be more occurrences of search term in this node. So call this
* function recursively on the remaining fragment.
*/
_highlight(rest, addItems, text, className);

if (isInSVG) {
const rect = document.createElementNS(
Expand Down Expand Up @@ -140,5 +145,10 @@ const SphinxHighlight = {
},
};

_ready(SphinxHighlight.highlightSearchWords);
_ready(SphinxHighlight.initEscapeListener);
_ready(() => {
/* Do not call highlightSearchWords() when we are on the search page.
* It will highlight words from the *previous* search query.
*/
if (typeof Search === "undefined") SphinxHighlight.highlightSearchWords();
SphinxHighlight.initEscapeListener();
});
2 changes: 1 addition & 1 deletion _static/styles/furo.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion _static/styles/furo.css.map

Large diffs are not rendered by default.

16 changes: 8 additions & 8 deletions api/gymnasium/index.html
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
<!doctype html>
<html class="no-js" lang="en">
<html class="no-js" lang="en" data-content_root="../../">
<head><meta charset="utf-8"/>
<meta name="viewport" content="width=device-width,initial-scale=1"/>
<meta name="color-scheme" content="light dark"><meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="index" title="Index" href="../../genindex/" /><link rel="search" title="Search" href="../../search/" /><link rel="next" title="PettingZoo API" href="../pettingzoo/" /><link rel="prev" title="Observation Functions" href="../../documentation/observations/" />

<!-- Generated with Sphinx 7.1.0 and Furo 2023.05.20 -->
<!-- Generated with Sphinx 7.2.6 and Furo 2023.09.10 -->
<title>Gymnasium API - SUMO-RL 1.4.3 documentation</title>
<link rel="stylesheet" type="text/css" href="../../_static/pygments.css?v=362ab14a" />
<link rel="stylesheet" type="text/css" href="../../_static/styles/furo.css?digest=e6660623a769aa55fea372102b9bf3151b292993" />
<link rel="stylesheet" type="text/css" href="../../_static/styles/furo-extensions.css?digest=30d1aed668e5c3a91c3e3bf6a60b675221979f0e" />
<link rel="stylesheet" type="text/css" href="../../_static/pygments.css?v=a746c00c" />
<link rel="stylesheet" type="text/css" href="../../_static/styles/furo.css?v=135e06be" />
<link rel="stylesheet" type="text/css" href="../../_static/styles/furo-extensions.css?v=36a5483c" />



Expand Down Expand Up @@ -227,7 +227,7 @@
</div>
<article role="main">
<section id="gymnasium-api">
<h1>Gymnasium API<a class="headerlink" href="#gymnasium-api" title="Permalink to this heading">#</a></h1>
<h1>Gymnasium API<a class="headerlink" href="#gymnasium-api" title="Link to this heading">#</a></h1>
<p>If your network only has ONE traffic light, then you can instantiate a standard Gymnasium env (see <a class="reference external" href="https://gymnasium.farama.org/api/env/">Gymnasium API</a>):</p>
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span> <span class="nn">gymnasium</span> <span class="k">as</span> <span class="nn">gym</span>
<span class="kn">import</span> <span class="nn">sumo_rl</span>
Expand Down Expand Up @@ -295,9 +295,9 @@ <h1>Gymnasium API<a class="headerlink" href="#gymnasium-api" title="Permalink to

</aside>
</div>
</div><script data-url_root="../../" id="documentation_options" src="../../_static/documentation_options.js?v=6f151fd5"></script>
</div><script src="../../_static/documentation_options.js?v=762e3934"></script>
<script src="../../_static/doctools.js?v=888ff710"></script>
<script src="../../_static/sphinx_highlight.js?v=4825356b"></script>
<script src="../../_static/sphinx_highlight.js?v=dc90522c"></script>
<script src="../../_static/scripts/furo.js?v=32e29ea5"></script>
</body>
</html>
16 changes: 8 additions & 8 deletions api/pettingzoo/index.html
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
<!doctype html>
<html class="no-js" lang="en">
<html class="no-js" lang="en" data-content_root="../../">
<head><meta charset="utf-8"/>
<meta name="viewport" content="width=device-width,initial-scale=1"/>
<meta name="color-scheme" content="light dark"><meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="index" title="Index" href="../../genindex/" /><link rel="search" title="Search" href="../../search/" /><link rel="next" title="Observation" href="../../mdp/observation/" /><link rel="prev" title="Gymnasium API" href="../gymnasium/" />

<!-- Generated with Sphinx 7.1.0 and Furo 2023.05.20 -->
<!-- Generated with Sphinx 7.2.6 and Furo 2023.09.10 -->
<title>PettingZoo API - SUMO-RL 1.4.3 documentation</title>
<link rel="stylesheet" type="text/css" href="../../_static/pygments.css?v=362ab14a" />
<link rel="stylesheet" type="text/css" href="../../_static/styles/furo.css?digest=e6660623a769aa55fea372102b9bf3151b292993" />
<link rel="stylesheet" type="text/css" href="../../_static/styles/furo-extensions.css?digest=30d1aed668e5c3a91c3e3bf6a60b675221979f0e" />
<link rel="stylesheet" type="text/css" href="../../_static/pygments.css?v=a746c00c" />
<link rel="stylesheet" type="text/css" href="../../_static/styles/furo.css?v=135e06be" />
<link rel="stylesheet" type="text/css" href="../../_static/styles/furo-extensions.css?v=36a5483c" />



Expand Down Expand Up @@ -227,7 +227,7 @@
</div>
<article role="main">
<section id="pettingzoo-api">
<h1>PettingZoo API<a class="headerlink" href="#pettingzoo-api" title="Permalink to this heading">#</a></h1>
<h1>PettingZoo API<a class="headerlink" href="#pettingzoo-api" title="Link to this heading">#</a></h1>
<p>For multi-agent environments, you can use the PettingZoo API (see <a class="reference external" href="https://pettingzoo.farama.org/api/parallel/">Petting Zoo API</a>):</p>
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span> <span class="nn">sumo_rl</span>
<span class="n">env</span> <span class="o">=</span> <span class="n">sumo_rl</span><span class="o">.</span><span class="n">parallel_env</span><span class="p">(</span><span class="n">net_file</span><span class="o">=</span><span class="s1">&#39;nets/RESCO/grid4x4/grid4x4.net.xml&#39;</span><span class="p">,</span>
Expand Down Expand Up @@ -291,9 +291,9 @@ <h1>PettingZoo API<a class="headerlink" href="#pettingzoo-api" title="Permalink

</aside>
</div>
</div><script data-url_root="../../" id="documentation_options" src="../../_static/documentation_options.js?v=6f151fd5"></script>
</div><script src="../../_static/documentation_options.js?v=762e3934"></script>
<script src="../../_static/doctools.js?v=888ff710"></script>
<script src="../../_static/sphinx_highlight.js?v=4825356b"></script>
<script src="../../_static/sphinx_highlight.js?v=dc90522c"></script>
<script src="../../_static/scripts/furo.js?v=32e29ea5"></script>
</body>
</html>
Loading

0 comments on commit 96e43ca

Please sign in to comment.