Skip to content

Commit

Permalink
Docs link test. (#2121)
Browse files Browse the repository at this point in the history
* Fix links.

* make format

* Fix government link going down.
  • Loading branch information
Gamenot authored Dec 5, 2023
1 parent b9aceac commit 3199a9a
Show file tree
Hide file tree
Showing 11 changed files with 23 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci-format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions docs/benchmarks/agent_zoo.rst
Original file line number Diff line number Diff line change
Expand Up @@ -53,16 +53,16 @@ Available zoo agents
- driving_smarts_2022==0.0
- :attr:`~smarts.core.controllers.action_space_type.ActionSpaceType.TargetPose`
- `code <https://github.com/smarts-project/smarts-project.rl/tree/master/interaction_aware_motion_prediction>`__
- Contributed as part of `NeurIPS 2022 Driving SMARTS <https://smarts-project.github.io/archive/2022_nips_driving_smarts/>`__ competition.
- Contributed as part of `NeurIPS 2022 Driving SMARTS <https://smarts-project.github.io/archive/2022_nips_driving_smarts/competition/>`__ 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 <https://github.com/smarts-project/smarts-project.rl/tree/master/control_and_supervised_learning>`__
- Contributed as part of `NeurIPS 2022 Driving SMARTS <https://smarts-project.github.io/archive/2022_nips_driving_smarts/>`__ competition.
- Contributed as part of `NeurIPS 2022 Driving SMARTS <https://smarts-project.github.io/archive/2022_nips_driving_smarts/competition/>`__ 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 <https://github.com/smarts-project/smarts-project.rl/tree/master/discrete_soft_actor_critic>`__
- Contributed as part of `NeurIPS 2022 Driving SMARTS <https://smarts-project.github.io/archive/2022_nips_driving_smarts/>`__ competition.
- Contributed as part of `NeurIPS 2022 Driving SMARTS <https://smarts-project.github.io/archive/2022_nips_driving_smarts/competition/>`__ competition.
8 changes: 8 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,14 @@
(r"py:class", r".*\.?S"),
}

# -- Options for broken link checks ------------------------------------------
linkcheck_anchors = False
linkcheck_ignore = [
r"https?://localhost:\d+/?",
r"https?://ops.fhwa.dot.gov.*", # The ngsim domain (us government) appears to go down sometimes.
]
linkcheck_retries = 2

# -- Options for spelling ----------------------------------------------------
spelling_exclude_patterns = ["ignored_*", "**/*_pb2*"]
spelling_ignore_pypi_package_names = True
Expand Down
2 changes: 1 addition & 1 deletion docs/ecosystem/ngsim.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion docs/ecosystem/rllib.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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 <https://docs.ray.io/en/latest/tune/tutorials/tune-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 <https://docs.ray.io/en/latest/tune/tutorials/tune-trial-checkpoints.html#how-to-save-and-load-trial-checkpoints>`_.
4 changes: 2 additions & 2 deletions docs/ecosystem/sumo.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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 <https://github.com/eclipse/sumo>`_ .
+ Use SUMO version `1.7.0 <https://github.com/eclipse/sumo/commits/v1_7_0>`_ or higher.
+ Build instructions are available at `https://sumo.dlr.de/docs/Developer/Main.html#build_instructions <https://sumo.dlr.de/docs/Developer/Main.html#build_instructions>`_ .
+ Use SUMO version `1.7.0 <https://github.com/eclipse-sumo/sumo/commits/v1_7_0>`_ or higher.
+ Build instructions are available at `https://sumo.dlr.de/docs/Developer/index.html#build_instructions <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.
2 changes: 1 addition & 1 deletion docs/examples/base_examples.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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.
2 changes: 1 addition & 1 deletion docs/resources/contributing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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 <https://github.com/psf/black>`_. This makes formatting consistent while eliminating `bike shedding <http://bikeshed.com/>`_.
The project follows a strict format requirement for python code. We made a decision early on in the project to use `Black <https://github.com/psf/black>`_. This makes formatting consistent while eliminating `bike shedding <https://bikeshed.com/>`_.
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.
Expand Down
4 changes: 2 additions & 2 deletions docs/sim/visualization.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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 <https://reactjs.org/>`_, `WebGL <https://www.khronos.org/webgl/>`_, and `websockets <https://developer.mozilla.org/en-US/docs/Web/API/WebSockets_API>`_) allowing it to run easily in the browser.
Envision is built on web-technologies (including `React <https://react.dev/>`_, `WebGL <https://www.khronos.org/webgl/>`_, and `websockets <https://developer.mozilla.org/en-US/docs/Web/API/WebSockets_API>`_) 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
Expand Down Expand Up @@ -90,7 +90,7 @@ Save an updated distribution if any changes were made to the Envision web applic
Visdom
------

Use the `visdom <https://github.com/facebookresearch/visdom>`_ integration to easily see the image-based observation outputs in real-time.
Use the `visdom <https://github.com/fossasia/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 <http://localhost:8097>`_.

.. code-block:: bash
Expand Down
3 changes: 2 additions & 1 deletion smarts/core/controllers/trajectory_tracking_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 3199a9a

Please sign in to comment.