Skip to content

Commit

Permalink
Merge pull request #127 from JoelPasvolsky/broken_links
Browse files Browse the repository at this point in the history
Add link checks
  • Loading branch information
randomir authored Jun 29, 2021
2 parents 2e99f0a + a1a7b5b commit 52bfcd0
Show file tree
Hide file tree
Showing 14 changed files with 37 additions and 27 deletions.
5 changes: 5 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,11 @@ jobs:
command: |
. env/bin/activate
make -C docs/ doctest
- run:
name: linkcheck
command: |
. env/bin/activate
make -C docs/ linkcheck || true
deploy:
docker:
Expand Down
8 changes: 4 additions & 4 deletions CONTRIBUTING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ the repository owner and they will merge your code in.
Follow the commit conventions described here:

* https://chris.beams.io/posts/git-commit/
* http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html
* https://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html

TL;DR:

Expand Down Expand Up @@ -122,13 +122,13 @@ Documentation
following are exceptions:

* For D-Wave extensions of third-party projects, we match the existing convention (e.g. the `D-Wave NetworkX
<https://github.com/dwavesystems/dwave_networkx>`_ project follows `NumPy <http://scipy.org>`_ conventions).
<https://github.com/dwavesystems/dwave_networkx>`_ project follows `NumPy <https://scipy.org>`_ conventions).
* Argument defaults are written "default=x" rather than "default x".

* Private functions should include some sort of docstring.
* If your module has more than one public unit, it should have a module docstring with a table of contents.
* The docstring for the :code:`__init__` method goes on the class.
* All docstrings should be parsable by the `Sphinx <http://www.sphinx-doc.org/en/stable/#>`_ documentation generation
* All docstrings should be parsable by the `Sphinx <https://www.sphinx-doc.org/>`_ documentation generation
tool (i.e. reStructuredText) The sphinx theme should be `readthedocs <https://docs.readthedocs.io/en/latest/>`_.

C++
Expand All @@ -153,7 +153,7 @@ Format
Versioning Scheme
-----------------

Our code follows `Semantic Versioning <http://semver.org/>`_ conventions: major.minor.patch.
Our code follows `Semantic Versioning <https://semver.org/>`_ conventions: major.minor.patch.

A change that breaks backwards compatibility must increment the major version. Anything below version 1.0.0 can break
backwards compatibility.
Expand Down
7 changes: 7 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,13 @@
# This patterns also effect to html_static_path and html_extra_path
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']

linkcheck_ignore=[r'.clang-format', # would need symlink
r'https://cloud.dwavesys.com/leap', # redirects, many checks
r'https://scipy.org', # ignores robots
r'LICENSE', # would need symlink, checked by submodule
r'CONTRIBUTING', # would need symlink, checked by submodule
]

# The name of the Pygments (syntax highlighting) style to use.
pygments_style = 'sphinx'

Expand Down
4 changes: 2 additions & 2 deletions docs/examples/hybrid1.rst
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ Formulate the Problem

This example uses a synthetic problem for illustrative purposes: a NetworkX
generated graph,
`NetworkX barabasi_albert_graph() <https://networkx.github.io/documentation/stable/reference/generators.html#module-networkx.generators>`_\ , with random +1 or -1
couplings assigned to its edges.
`NetworkX barabasi_albert_graph() <https://networkx.org/documentation/latest/reference/generators.html>`_
, with random +1 or -1 couplings assigned to its edges.

.. testcode::

Expand Down
2 changes: 1 addition & 1 deletion docs/examples/hybrid_solver_service.rst
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ Formulate the Problem
=====================

For a social graph, `G`, this example simply builds a random sparse graph---using the
`NetworkX <https://networkx.github.io/>`_ :func:`~networkx.generators.geometric.random_geometric_graph()`
`NetworkX <https://networkx.org>`_ :func:`~networkx.generators.geometric.random_geometric_graph()`
function, which places uniformly at random a specified number of nodes, `problem_node_count`,
in a unit cube, joining edges of any two if the distance is below a given radius---and randomly
assigns :math:`-1, 1` signs to represent friendly and hostile relationships.
Expand Down
3 changes: 2 additions & 1 deletion docs/examples/inspector_graph_partitioning.rst
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ Formulate the Problem

This example uses a synthetic problem for illustrative purposes: a NetworkX
generated graph,
`NetworkX random_geometric_graph() <https://networkx.github.io/documentation/stable/reference/generators.html#module-networkx.generators.random>`_. The problem of interest here,
`NetworkX random_geometric_graph() <https://networkx.org/documentation/latest/reference/generators.html>`_.
The problem of interest here,
which is NP-hard, is to try and find the best division of the graph's nodes into two
equal sets with a minimum number of edges between the two groups.

Expand Down
4 changes: 2 additions & 2 deletions docs/examples/map_coloring.rst
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ To run the code in this example, the following is required.
* Ocean tools
:doc:`dwavebinarycsp </docs_binarycsp/sdk_index>` and
:doc:`dwave-system </docs_system/sdk_index>`. For graphics,
you will also need `NetworkX <https://networkx.github.io/>`_\ .
you will also need `NetworkX <https://networkx.org>`_.

.. include:: hybrid_solver_service.rst
:start-after: example-requirements-start-marker
Expand Down Expand Up @@ -119,7 +119,7 @@ The example uses the
:doc:`D-Wave binary CSP tool </docs_binarycsp/sdk_index>`
to set up constraints and convert the CSP to a binary quadratic model,
:doc:`dwave-system </docs_system/sdk_index>` to set up a D-Wave
system as the :term:`sampler`, and `NetworkX <https://networkx.github.io/>`_ to
system as the :term:`sampler`, and `NetworkX <https://networkx.org>`_ to
plot results.

>>> import dwavebinarycsp
Expand Down
4 changes: 2 additions & 2 deletions docs/examples/map_dqm.rst
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ To run the code in this example, the following is required.
solutions are those with the lowest values. This is demonstrated in
`Leap <https://cloud.dwavesys.com/leap/>`_\ 's *Structural Imbalance* demo,
introduced in the :ref:`and` example, and comprehensively explained in the
`Problem Solving Handbook <https://docs.dwavesys.com/docs/latest/c_handbook_1.html>`_.
:std:doc:`Problem Solving Handbook <sysdocs_gettingstarted:doc_handbook>`_.

Solution Steps
==============
Expand All @@ -55,7 +55,7 @@ to formulate the problem and submitted to the
Formulate the Problem
=====================

This example uses the `NetworkX <https://networkx.github.io/>`_
This example uses the `NetworkX <https://networkx.org>`_
:func:`~networkx.readwrite.adjlist.read_adjlist` function to read a text file,
``usa.adj``, containing the states of the USA and their adjacencies (states with
a shared border) into a graph. The original map information was found on
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/map_kerberos.rst
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ solve the problem.
Formulate the Problem
=====================

This example uses the `NetworkX <https://networkx.github.io/>`_
This example uses the `NetworkX <https://networkx.org>`_
:func:`~networkx.readwrite.adjlist.read_adjlist` function to read a text file,
``usa.adj``, containing the states of the USA and their adjacencies (states with
a shared border) into a graph. The original map information was found on
Expand Down
12 changes: 5 additions & 7 deletions docs/examples/max_cut.rst
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,9 @@ Example Requirements
To run the code in this example, the following is required.

* The requisite information for problem submission through SAPI, as described in
:ref:`sapi_access`\ , in a configuration file for connection to a D-Wave system,
as described in
`dwave-cloud-client <http://dwave-cloud-client.readthedocs.io/en/latest/>`_\ .
* Installation of Ocean tools `dwave-system <https://github.com/dwavesystems/dwave-system>`_ and
`dwave_networkx <http://dwave-networkx.readthedocs.io/en/latest/index.html>`_\ .
:ref:`sapi_access`.
* Installation of Ocean tools :doc:`dwave-system </docs_system/sdk_index>` and
:doc:`dwave_networkx </docs_dnx/sdk_index>`.

.. include:: hybrid_solver_service.rst
:start-after: example-requirements-start-marker
Expand All @@ -50,7 +48,7 @@ valid maximum cut.

.. note:: As stated in the requirements section above, you should have set up
a configuration file for connection to a D-Wave system, as described in
`dwave-cloud-client <http://dwave-cloud-client.readthedocs.io/en/latest/>`_\ .
:doc:`dwave-cloud-client </docs_cloud/sdk_index>`.

The first example code creates a graph that exactly duplicates the structure of a fully
working :term:`Chimera` unit cell. It relies on the default embedding of the DWaveSampler to correctly
Expand Down Expand Up @@ -83,7 +81,7 @@ Optional Example Code

.. note:: This example code requires `Matplotlib <https://matplotlib.org>`_\ .

The Ocean `dwave_networkx <http://dwave-networkx.readthedocs.io/en/latest/index.html>`_
The Ocean :doc:`dwave_networkx </docs_dnx/sdk_index>`
tool includes some graphic functionality helpful for work on Chimera graphs. The following
example code visualizes the graph used in the previous example code.

Expand Down
2 changes: 1 addition & 1 deletion docs/examples/min_vertex.rst
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ problem of finding such a set is NP hard.
A five-node star graph.

First, run the code snippet below to create a star graph where node 0 is hub to four other nodes.
The code uses `NetworkX <https://networkx.github.io/documentation/stable/index.html>`_\ , which is
The code uses `NetworkX <https://networkx.org/documentation/stable/index.html>`_\ , which is
part of your *dwave_networkx* or *dwave-ocean-sdk* installation.

>>> import networkx as nx
Expand Down
1 change: 0 additions & 1 deletion docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ Packages

The Ocean SDK includes the :ref:`dwave_cli` and the following packages:


.. dropdown:: **dimod** --- Quadratic models: BQM, DQM. \
:link-badge:`https://docs.ocean.dwavesys.com/en/stable/docs_dimod/sdk_index.html, "docs", cls=badge-primary fr text-white` \
:link-badge:`https://github.com/dwavesystems/dimod, "code", cls=badge-secondary fr text-white`
Expand Down
4 changes: 2 additions & 2 deletions docs/overview/install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ versions 3.6 and higher are supported.

For information on why many in the Python development community are
requiring Python 3, see
`the Python 3 statement <http://python3statement.org/>`_.
`the Python 3 statement <https://python3statement.org/>`_.


This section explains how to :ref:`install Ocean software<installOceanSoftware>`, either the entire suite of tools
Expand Down Expand Up @@ -50,7 +50,7 @@ depending on your operating system, you may need to first install Python and/or
.. attention::
For Windows systems, note that only **64-bit** Python is supported.

#. `Install virtualenv <https://packaging.python.org/guides/installing-using-pip-and-virtualenv>`_
#. `Install virtualenv <https://packaging.python.org/guides/installing-using-pip-and-virtual-environments>`_
describes how to install the `virtualenv` tool for creating isolated Python environments
on your local machine for supported operating system.

Expand Down
6 changes: 3 additions & 3 deletions docs/overview/stack.rst
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ into the following layers of functionality:

Tools that help formulate a problem as binary quadratic models; for example
:doc:`dwave_networkx </docs_dnx/sdk_index>`
(`repo <https://github.com/dwavesystems/dwave_networkx>`_\ ) for graph-related problems.
(`repo <https://github.com/dwavesystems/dwave-networkx>`_\ ) for graph-related problems.
* Application

Original problem in its context ("problem space"); for example, circuit fault diagnosis
Expand Down Expand Up @@ -257,8 +257,8 @@ each stage of the process to a layer of the Ocean stack.

Ocean demo applications, which formulate known problems, include:

* `Structural Imbalance <https://github.com/dwavesystems/structural-imbalance-demo>`_\ .
* `Circuit-Fault Diagnosis <https://github.com/dwavesystems/circuit-fault-diagnosis-demo>`_\ .
* `Structural Imbalance <https://github.com/dwave-examples/structural-imbalance>`_.
* `Circuit-Fault Diagnosis <https://github.com/dwave-examples/circuit-fault-diagnosis>`_.


Top-Down Approach
Expand Down

0 comments on commit 52bfcd0

Please sign in to comment.