From f67ef2b886f70e129f7d83305b71862c146857ee Mon Sep 17 00:00:00 2001 From: Thomas Robitaille Date: Mon, 29 Jun 2015 09:32:21 +0100 Subject: [PATCH 1/5] Run link checker on Travis --- .travis.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 88431da12..6cc41a4d8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -114,7 +114,7 @@ install: # For now we also install astropy_helpers because setup_requires has a bug # that means it generates PEP440 warnings for the astropy_helpers version # number. - - if [ $DOC_TRIGGER ]; then pip install astropy-helpers; fi + - if [ $DOC_TRIGGER ]; then pip install astropy-helpers linkchecker; fi - python setup.py install @@ -124,8 +124,11 @@ script: # In the following command, the test -s ensures that warnings are not emitted # by the docs build. - - if [ $DOC_TRIGGER ]; then cat doc/warnings.log; fi - - if [ $DOC_TRIGGER ]; then test ! -s doc/warnings.log; fi + - if [ $DOC_TRIGGER ]; then + cat doc/warnings.log + test ! -s doc/warnings.log + linkchecker doc/_build/html + fi after_success: From fecc9b2daff9e82f0ba55766829fa2bb797b8a18 Mon Sep 17 00:00:00 2001 From: Thomas Robitaille Date: Mon, 29 Jun 2015 09:44:34 +0100 Subject: [PATCH 2/5] Fixed broken links --- doc/getting_started/index.rst | 2 +- doc/{_static => getting_started}/w5.tgz | Bin doc/python_guide/custom_viewer.rst | 4 ++-- 3 files changed, 3 insertions(+), 3 deletions(-) rename doc/{_static => getting_started}/w5.tgz (100%) diff --git a/doc/getting_started/index.rst b/doc/getting_started/index.rst index 9fd7b1230..bf86469e1 100644 --- a/doc/getting_started/index.rst +++ b/doc/getting_started/index.rst @@ -2,7 +2,7 @@ Getting started *************** -This page walks through Glue's basic GUI features, using data from the W5 star forming region as an example. You can download the data files for this tutorial `here <_static/w5.tgz>`_ +This page walks through Glue's basic GUI features, using data from the W5 star forming region as an example. You can download the data files for this tutorial :download:`here ` After :ref:`installing ` Glue, open the program by either double clicking on the icon (if using a pre-built application) or from the command line:: diff --git a/doc/_static/w5.tgz b/doc/getting_started/w5.tgz similarity index 100% rename from doc/_static/w5.tgz rename to doc/getting_started/w5.tgz diff --git a/doc/python_guide/custom_viewer.rst b/doc/python_guide/custom_viewer.rst index 6722c38ac..9f1edbb52 100644 --- a/doc/python_guide/custom_viewer.rst +++ b/doc/python_guide/custom_viewer.rst @@ -119,7 +119,7 @@ set up this functionality. Keywords serve two purposes: they define new widgets to interact with the viewer, and they define keywords to pass onto drawing functions like ``plot_data``. -For example, consider `this version `__ of the Shot Plot code: +For example, consider :download:`this version ` of the Shot Plot code: .. literalinclude:: scripts/bball_viewer_3.py :linenos: @@ -167,7 +167,7 @@ contained in a user-drawn :class:`region of interest `: :lines: 18-20 :linenos: -With `this version `__ of the code you can how draw shapes on the plot to select data: +With :download:`this version ` of the code you can how draw shapes on the plot to select data: .. figure:: images/bball_5.png :align: center From 165ec59697f43b9d7988188d053cd366bec2ecf1 Mon Sep 17 00:00:00 2001 From: Thomas Robitaille Date: Mon, 29 Jun 2015 09:49:47 +0100 Subject: [PATCH 3/5] Fix more broken links --- doc/faq.rst | 2 +- doc/installation.rst | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/faq.rst b/doc/faq.rst index c79887e44..e3c8fbd0a 100644 --- a/doc/faq.rst +++ b/doc/faq.rst @@ -23,7 +23,7 @@ Glue relies on several libraries to parse different file formats: tables. * `scikit-image `_ to read popular image formats like ``.jpeg`` and ``.tiff`` - * `h5py `_ to read HDF5 files + * `h5py `_ to read HDF5 files If Glue's predefined data loaders don't fit your needs, ou can also :ref:`write your own ` loader, and plug it into Glue. diff --git a/doc/installation.rst b/doc/installation.rst index 03f4b1138..b18660ea5 100644 --- a/doc/installation.rst +++ b/doc/installation.rst @@ -62,7 +62,7 @@ these packages is somewhat beyond the scope of this document, and unforunately trickier than it should be. If you want to dive in, here is the basic strategy: - * Install `Qt 4 `_ and either `PyQt4 `_ or `PySide `_. If at all possible, use the binary installers; building PyQt4 or PySide from source is tricky (this is a euphemism). + * Install `Qt 4 `_ and either `PyQt4 `_ or `PySide `_. If at all possible, use the binary installers; building PyQt4 or PySide from source is tricky (this is a euphemism). * Install Glue using pip: ``pip install glueviz``. Alternatively, ``git clone`` the repository and install via ``python setup.py install`` From 772383c1e79cfecd6ef4fb7665868049f6f87543 Mon Sep 17 00:00:00 2001 From: Thomas Robitaille Date: Mon, 29 Jun 2015 10:09:35 +0100 Subject: [PATCH 4/5] Fix syntax in .travis.yml --- .travis.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 6cc41a4d8..ef1778c6b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -125,9 +125,9 @@ script: # In the following command, the test -s ensures that warnings are not emitted # by the docs build. - if [ $DOC_TRIGGER ]; then - cat doc/warnings.log - test ! -s doc/warnings.log - linkchecker doc/_build/html + cat doc/warnings.log; + test ! -s doc/warnings.log; + linkchecker doc/_build/html; fi after_success: From 6286161e37e46755923b8952929dc3d8b3b75166 Mon Sep 17 00:00:00 2001 From: Thomas Robitaille Date: Mon, 29 Jun 2015 10:33:37 +0100 Subject: [PATCH 5/5] Ignore font files --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index ef1778c6b..e70454460 100644 --- a/.travis.yml +++ b/.travis.yml @@ -127,7 +127,7 @@ script: - if [ $DOC_TRIGGER ]; then cat doc/warnings.log; test ! -s doc/warnings.log; - linkchecker doc/_build/html; + linkchecker --ignore-url=".*fontawesome_webfont.*" doc/_build/html; fi after_success: