Skip to content

Commit

Permalink
Merge pull request #40 from HowToThink/travis
Browse files Browse the repository at this point in the history
Set up travis, fix build issues
  • Loading branch information
pckroon committed Mar 17, 2020
2 parents 487025c + 567e2c9 commit aee753d
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 7 deletions.
11 changes: 11 additions & 0 deletions .travis.yml
@@ -0,0 +1,11 @@
language: python
dist: xenial
cache:
- pip
install:
- pip install --upgrade -r requirements.txt
script:
- mkdir build_html
- sphinx-build -nW -b html source build_html
- mkdir build_pdf
- sphinx-build -nW -b pdf source build_pdf
1 change: 1 addition & 0 deletions requirements.txt
@@ -0,0 +1 @@
sphinx
2 changes: 1 addition & 1 deletion source/PvL_E.rst
Expand Up @@ -108,7 +108,7 @@ If the ``try`` block can fail if various way, you can handle different
exceptions in the same ``try`` clause:

.. sourcecode:: python3
:lineos:
:linenos:

try:
with open(filename) as infile:
Expand Down
4 changes: 2 additions & 2 deletions source/PvL_F.rst
Expand Up @@ -25,7 +25,7 @@ y t n
Since the model predicts a parabola, we want to fit the data to this model to see how good it works. It might be a bit confusing, but :math:`h` is our x axis, and :math:`t` is the y axis.

We use the ``symfit`` package to do our fitting. You can find the installation instructions `here
<http://symfit.readthedocs.org/en/latest/installation.html>`_.
<http://symfit.readthedocs.org/en/latest/installation.html>`__.

To fit the data to the model we run the following code:

Expand Down Expand Up @@ -162,6 +162,6 @@ More on symfit

There are a lot more features in ``symfit`` to help you on your quest to fitting
the universe. You can find the tutorial `here
<http://symfit.readthedocs.org/en/latest/tutorial.html>`_.
<http://symfit.readthedocs.org/en/latest/tutorial.html>`__.

It is recommended you read this as well before starting to fit your own data.
6 changes: 3 additions & 3 deletions source/PvL_H.rst
Expand Up @@ -140,7 +140,7 @@ that define the plotting style:

The style strings, one per *x*--*y* pair, specify color and shape: 'rx' stands
for red crosses, and 'b-.' stands for blue dash-point line. Check the
`documentation <http://matplotlib.org/api/pyplot_api.html#matplotlib.pyplot.plot>`_
`documentation <http://matplotlib.org/api/pyplot_api.html#matplotlib.pyplot.plot>`__
of ``pyplot.plot`` for the list of colors and shapes.

Finally, ``plt.plot`` can also, conveniently, take numpy arrays as its arguments.
Expand All @@ -152,7 +152,7 @@ More plots
While ``plt.plot`` can satisfy basic plotting needs, ``matplotlib``
provides many more plotting functions. Below we try out the ``plt.bar``
function, for plotting bar charts. The full list of plotting functions can be found
in the the ``matplotlib.pyplot`` `documentation <http://matplotlib.org/api/pyplot_api.html>`_.
in the the ``matplotlib.pyplot`` `documentation <http://matplotlib.org/api/pyplot_api.html>`__.

Bar charts can be plotted using ``plt.bar``, in a similar fashion to ``plt.plot``:

Expand Down Expand Up @@ -253,7 +253,7 @@ calling ``plt.savefig``:

.. note::
When saving a plot, you'll want to choose a `vector format
<https://en.wikipedia.org/wiki/Vector_graphics>`_
<https://en.wikipedia.org/wiki/Vector_graphics>`__
(either pdf, ps, eps, or svg). These are resolution-independent
formats and will yield the best quality, even if printed at very
large sizes. Saving as png should be avoided, and saving as jpg
Expand Down
2 changes: 1 addition & 1 deletion source/conf.py
Expand Up @@ -22,7 +22,7 @@

# Add any Sphinx extension module names here, as strings. They can be extensions
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
extensions = ['sphinx.ext.pngmath']
extensions = ['sphinx.ext.imgmath']

# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
Expand Down
1 change: 1 addition & 0 deletions source/index.rst
Expand Up @@ -55,6 +55,7 @@ illustrated by Dario Mitchell
PvL_E.rst
PvL_F.rst
PvL_G.rst
PvL_H.rst

.. toctree::
:maxdepth: 1
Expand Down

0 comments on commit aee753d

Please sign in to comment.