From d883a892509a5c65ab5c64fa247e68b9f4e844e8 Mon Sep 17 00:00:00 2001 From: Montgomery Alban Date: Mon, 4 Dec 2023 17:51:52 +0000 Subject: [PATCH 1/3] Fix links. --- .github/workflows/ci-format.yml | 2 +- Makefile | 2 +- docs/benchmarks/agent_zoo.rst | 6 +++--- docs/conf.py | 8 ++++++++ docs/ecosystem/ngsim.rst | 2 +- docs/ecosystem/rllib.rst | 2 +- docs/ecosystem/sumo.rst | 4 ++-- docs/examples/base_examples.rst | 2 +- docs/resources/contributing.rst | 2 +- docs/sim/visualization.rst | 4 ++-- smarts/core/controllers/trajectory_tracking_controller.py | 3 ++- 11 files changed, 23 insertions(+), 14 deletions(-) diff --git a/.github/workflows/ci-format.yml b/.github/workflows/ci-format.yml index 9581faba1d..91a19ce0f0 100644 --- a/.github/workflows/ci-format.yml +++ b/.github/workflows/ci-format.yml @@ -100,7 +100,7 @@ jobs: pip install wheel==0.38.4 pip install .[camera_obs,doc,train,ray,envision,argoverse,opendrive,waymo,sumo] cd ${GITHUB_WORKSPACE}/docs - make html SPHINXOPTS="-W -T -E -n --keep-going -b spelling" + make html SPHINXOPTS="-W -T -E -n --keep-going -b spelling -b linkcheck" - name: Check build output run: | cd $GITHUB_WORKSPACE diff --git a/Makefile b/Makefile index 8d6688d2d2..2d2a29888c 100644 --- a/Makefile +++ b/Makefile @@ -154,7 +154,7 @@ format: gen-header .PHONY: docs docs: - cd docs && make clean html SPHINXOPTS="-W -T -n --keep-going -b spelling" + cd docs && make clean html SPHINXOPTS="-W -T -n --keep-going -b spelling -b linkcheck" .PHONY: wheel wheel: docs diff --git a/docs/benchmarks/agent_zoo.rst b/docs/benchmarks/agent_zoo.rst index e8246506aa..585bb97aee 100644 --- a/docs/benchmarks/agent_zoo.rst +++ b/docs/benchmarks/agent_zoo.rst @@ -53,16 +53,16 @@ Available zoo agents - driving_smarts_2022==0.0 - :attr:`~smarts.core.controllers.action_space_type.ActionSpaceType.TargetPose` - `code `__ - - Contributed as part of `NeurIPS 2022 Driving SMARTS `__ competition. + - Contributed as part of `NeurIPS 2022 Driving SMARTS `__ competition. * - | zoo.policies:control-and-supervised-learning-agent-v0 | zoo/policies/control_and_supervised_learning - driving_smarts_2022==0.0 - :attr:`~smarts.core.controllers.action_space_type.ActionSpaceType.TargetPose` - `code `__ - - Contributed as part of `NeurIPS 2022 Driving SMARTS `__ competition. + - Contributed as part of `NeurIPS 2022 Driving SMARTS `__ competition. * - | zoo.policies:discrete-soft-actor-critic-agent-v0 | zoo/policies/discrete_soft_actor_critic - driving_smarts_2022==0.0 - :attr:`~smarts.core.controllers.action_space_type.ActionSpaceType.TargetPose` - `code `__ - - Contributed as part of `NeurIPS 2022 Driving SMARTS `__ competition. + - Contributed as part of `NeurIPS 2022 Driving SMARTS `__ competition. diff --git a/docs/conf.py b/docs/conf.py index 7882a21fb5..0c0d634989 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -148,6 +148,14 @@ (r"py:class", r".*\.?S"), } +# -- Options for broken link checks ------------------------------------------ +linkcheck_ignore = [ + r'http://localhost:\d+/?', + r'https://localhost:\d+/?', +] + +linkcheck_anchors = False + # -- Options for spelling ---------------------------------------------------- spelling_exclude_patterns = ["ignored_*", "**/*_pb2*"] spelling_ignore_pypi_package_names = True diff --git a/docs/ecosystem/ngsim.rst b/docs/ecosystem/ngsim.rst index 4f947b61da..f090be522c 100644 --- a/docs/ecosystem/ngsim.rst +++ b/docs/ecosystem/ngsim.rst @@ -88,7 +88,7 @@ To consume the generated observations you could use the following approach: ... -Alternatively, an approach like :examples:`traffic_histories_vehicle_replacement.py` can be used to operate directly with the scenarios. +Alternatively, an approach like :examples:`direct/traffic_histories_vehicle_replacement.py` can be used to operate directly with the scenarios. Samples diff --git a/docs/ecosystem/rllib.rst b/docs/ecosystem/rllib.rst index 95440c2698..fad7ed371a 100644 --- a/docs/ecosystem/rllib.rst +++ b/docs/ecosystem/rllib.rst @@ -38,4 +38,4 @@ Resume training With respect to ``SMARTS/examples/e12_rllib`` examples, if you want to continue an aborted experiment, you can set ``resume_training=True``. But note that ``resume_training=True`` will continue to use the same configuration as was set in the original experiment. To make changes to a started experiment, you can edit the latest experiment file in ``./results``. -Or if you want to start a new experiment but train from an existing checkpoint, you will need to look into `How to Save and Load Trial Checkpoints `_. +Or if you want to start a new experiment but train from an existing checkpoint, you will need to look into `How to Save and Load Trial Checkpoints `_. diff --git a/docs/ecosystem/sumo.rst b/docs/ecosystem/sumo.rst index a01edac9b9..020eb68245 100644 --- a/docs/ecosystem/sumo.rst +++ b/docs/ecosystem/sumo.rst @@ -24,6 +24,6 @@ Build from source If you wish to compile SUMO by yourself from source + Git repository can be found at `https://github.com/eclipse/sumo `_ . -+ Use SUMO version `1.7.0 `_ or higher. -+ Build instructions are available at `https://sumo.dlr.de/docs/Developer/Main.html#build_instructions `_ . ++ Use SUMO version `1.7.0 `_ or higher. ++ Build instructions are available at `https://sumo.dlr.de/docs/Developer/index.html#build_instructions `_ . + Please note that building SUMO might not install all other vital dependencies that SUMO requires to run. \ No newline at end of file diff --git a/docs/examples/base_examples.rst b/docs/examples/base_examples.rst index f5f376740b..8c8d3aeb75 100644 --- a/docs/examples/base_examples.rst +++ b/docs/examples/base_examples.rst @@ -51,5 +51,5 @@ Several examples are made available to help you get started with SMARTS. #. Jupyter Notebook - + script: :examples:`e9_notebook.py` + + script: :examples:`e9_notebook.ipynb` + A primitive use of SMARTS in a Jupyter Notebook. diff --git a/docs/resources/contributing.rst b/docs/resources/contributing.rst index e69c687bdb..a137c1569a 100644 --- a/docs/resources/contributing.rst +++ b/docs/resources/contributing.rst @@ -78,7 +78,7 @@ You are encouraged to review other people's pull requests and tag in relevant re Code Format ----------- -The project follows a strict format requirement for python code. We made a decision early on in the project to use `Black `_. This makes formatting consistent while eliminating `bike shedding `_. +The project follows a strict format requirement for python code. We made a decision early on in the project to use `Black `_. This makes formatting consistent while eliminating `bike shedding `_. If you do not already have it please install it via ``pip install black``. Formatting guarantees that your code will pass the CI formatting test case. diff --git a/docs/sim/visualization.rst b/docs/sim/visualization.rst index 9f2e18ff58..e0e5691ec5 100644 --- a/docs/sim/visualization.rst +++ b/docs/sim/visualization.rst @@ -7,7 +7,7 @@ Envision -------- SMARTS includes a front-end visualization tool called *Envision* that provides real-time view of the environment state. -Envision is built on web-technologies (including `React `_, `WebGL `_, and `websockets `_) allowing it to run easily in the browser. +Envision is built on web-technologies (including `React `_, `WebGL `_, and `websockets `_) allowing it to run easily in the browser. It is composed of a few parts: a client which SMARTS uses directly; a server used for state broadcasting; and the web application where all the visualization and rendering happens. Run @@ -90,7 +90,7 @@ Save an updated distribution if any changes were made to the Envision web applic Visdom ------ -Use the `visdom `_ integration to easily see the image-based observation outputs in real-time. +Use the `visdom `_ integration to easily see the image-based observation outputs in real-time. Start the visdom server before running the scenario and open the server URL in your browser `http://localhost:8097 `_. .. code-block:: bash diff --git a/smarts/core/controllers/trajectory_tracking_controller.py b/smarts/core/controllers/trajectory_tracking_controller.py index d206dda82f..92a8f6c516 100644 --- a/smarts/core/controllers/trajectory_tracking_controller.py +++ b/smarts/core/controllers/trajectory_tracking_controller.py @@ -533,7 +533,8 @@ def MPC( ): """Implementation of MPC, please see the following ref: Convex Optimization – Boyd and Vandenberghe - https://markcannon.github.io/assets/downloads/teaching/C21_Model_Predictive_Control/mpc_notes.pdf + https://github.com/markcannon/markcannon.github.io/blob/c3344814c9c79d5f0d5f3cf8fc2e7ef14cb4fad3/assets/downloads/teaching/C21_Model_Predictive_Control/mpc_notes.pdf + https://markcannon.github.io/teaching/ """ matrix_A = np.eye(state_matrix.shape[0]) + dt * state_matrix matrix_B = dt * input_matrix From 17d51b13dfcdc2b887aa2a1dc3aa7fcaa3fc7168 Mon Sep 17 00:00:00 2001 From: Montgomery Alban Date: Mon, 4 Dec 2023 17:52:11 +0000 Subject: [PATCH 2/3] make format --- docs/conf.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index 0c0d634989..59392dd9c1 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -150,8 +150,8 @@ # -- Options for broken link checks ------------------------------------------ linkcheck_ignore = [ - r'http://localhost:\d+/?', - r'https://localhost:\d+/?', + r"http://localhost:\d+/?", + r"https://localhost:\d+/?", ] linkcheck_anchors = False From be1f2f017a5613ea7de088ba77e2e4dd47639d97 Mon Sep 17 00:00:00 2001 From: Montgomery Alban Date: Tue, 5 Dec 2023 20:37:49 +0000 Subject: [PATCH 3/3] Fix government link going down. --- docs/conf.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index 59392dd9c1..bfd2869dd3 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -149,12 +149,12 @@ } # -- Options for broken link checks ------------------------------------------ +linkcheck_anchors = False linkcheck_ignore = [ - r"http://localhost:\d+/?", - r"https://localhost:\d+/?", + r"https?://localhost:\d+/?", + r"https?://ops.fhwa.dot.gov.*", # The ngsim domain (us government) appears to go down sometimes. ] - -linkcheck_anchors = False +linkcheck_retries = 2 # -- Options for spelling ---------------------------------------------------- spelling_exclude_patterns = ["ignored_*", "**/*_pb2*"]