Skip to content

Commit

Permalink
Setting up Sphinx
Browse files Browse the repository at this point in the history
  • Loading branch information
sigvaldm committed Oct 15, 2018
1 parent 9df5ee7 commit 333b2b3
Show file tree
Hide file tree
Showing 9 changed files with 59 additions and 12 deletions.
4 changes: 4 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ Metaplot
.. image:: https://coveralls.io/repos/github/sigvaldm/metaplot/badge.svg?branch=master
:target: https://coveralls.io/github/sigvaldm/metaplot?branch=master

.. image:: https://readthedocs.org/projects/metaplot/badge/?version=latest
:target: https://metaplot.readthedocs.io/en/latest/?badge=latest
:alt: Documentation Status

MetaPlot is in a very early development phase. To install and run development version::

git clone https://github.com/sigvaldm/metaplot.git
Expand Down
14 changes: 8 additions & 6 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,15 @@
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
#
# import os
# import sys
# sys.path.insert(0, os.path.abspath('.'))
import os
import sys
sys.path.insert(0, os.path.abspath('..'))
sys.path.insert(0, os.path.abspath('../metaplot'))


# -- Project information -----------------------------------------------------

project = 'metaplot'
project = 'Metaplot'
copyright = '2018, Sigvald Marholm'
author = 'Sigvald Marholm'

Expand Down Expand Up @@ -89,7 +90,8 @@
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['_static']
# html_static_path = ['_static']
html_static_path = []

# Custom sidebar templates, must be a dictionary that maps document names
# to template names.
Expand Down Expand Up @@ -164,4 +166,4 @@
# -- Options for todo extension ----------------------------------------------

# If true, `todo` and `todoList` produce output, else they produce nothing.
todo_include_todos = True
todo_include_todos = True
2 changes: 2 additions & 0 deletions docs/source/filters.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Filters
-------
13 changes: 7 additions & 6 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,18 @@
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
Welcome to metaplot's documentation!
====================================
Metaplot's documentation!
=========================

.. toctree::
:maxdepth: 2
:caption: Contents:



Indices and tables
==================
installation
usage
filters
plugins
reference

* :ref:`genindex`
* :ref:`modindex`
Expand Down
14 changes: 14 additions & 0 deletions docs/source/installation.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
Installation
------------

To install Metaplot from PyPI::

pip install metaplot

Since Metaplot is in a very early development phase, you may want to install it in directly from a GitHub clone, such that when new bugfixes appear, you can pull them from GitHub with immediate effect. If that's the case you should rather install Metaplot like this::

git clone https://github.com/sigvaldm/metaplot.git
cd metaplot
pip install -e .

To get the latest changes you can now run ``git pull`` on the following folder. Bugfixes may take a considerably longer time to appear on PyPI.
2 changes: 2 additions & 0 deletions docs/source/plugins.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Plugins
-------
14 changes: 14 additions & 0 deletions docs/source/reference.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
Programmer's Reference
----------------------

.. automodule:: metaplot.aux
:members:

.. automodule:: metaplot.api
:members:

.. automodule:: metaplot.cli
:members:

.. automodule:: metaplot.core
:members:
2 changes: 2 additions & 0 deletions docs/source/usage.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Usage
-----
6 changes: 6 additions & 0 deletions metaplot/aux.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,19 @@ def __iter__(self):
yield value

def last(series):
"""
Print the last value in series to terminal.
"""
# TBD: series[-1].to_compact() produces an error
# TBD: Find a way to exctract name instead of writing "series"
y = series.to_compact()
print("Last datapoint in series:",y[-1])
return series

def plain(series):
"""
Removes any filters from series.
"""
series.meta['filter'] = '-'
return series

Expand Down

0 comments on commit 333b2b3

Please sign in to comment.