Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ station_list.csv
config.ini
writer_app.py
*.h5
_build/
build/


# Python
*.pyc
Expand All @@ -20,3 +23,6 @@ writer_app.py
ehthumbs.db
Icon?
Thumbs.db

# logfiles generated by tests
tests/hisparc.log*
22 changes: 16 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
language: python

sudo: false

python:
- "3.6"

Expand All @@ -19,11 +16,24 @@ before_install:
install:
- conda create --yes -n test_env python=$TRAVIS_PYTHON_VERSION pytables
- source activate test_env
- pip install webtest flake8 coverage coveralls codecov
- pip install webtest flake8 coverage coveralls codecov sphinx

script:
- flake8 writer wsgi
- coverage run -m unittest discover tests -v
- make test

after_success:
- coveralls

before_deploy:
- touch doc/_build/html/.nojekyll

deploy:
provider: pages
skip_cleanup: true
github_token: $GITHUB_TOKEN
local_dir: doc/_build/html
email: beheer@hisparc.nl
name: HiSPARC-Bot
on:
branch: master
python: 3.6
12 changes: 12 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
.PHONY: test unittests flaketest doctest

test: unittests flaketest doctest

unittests:
coverage run -m unittest discover tests -v

flaketest:
flake8 wsgi writer

doctest:
sphinx-build -anW doc doc/_build/html
20 changes: 20 additions & 0 deletions doc/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Minimal makefile for Sphinx documentation
#

# You can set these variables from the command line.
SPHINXOPTS =
SPHINXBUILD = sphinx-build
SPHINXPROJ = HiSPARC-datastore
SOURCEDIR = .
BUILDDIR = _build

# Put it first so that "make" without argument is like "make help".
help:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

.PHONY: help Makefile

# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
Binary file added doc/_static/favicon.ico
Binary file not shown.
70 changes: 70 additions & 0 deletions doc/_static/hisparc_style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
body {
background: #fff;
max-width: 900px;
margin: 0 auto;}

div.document {
background-color: #fafafa;}

div.sphinxsidebar ul {
margin: 10px 10px;}

div.sphinxsidebarwrapper {
padding: 0px 0px 10px 0px;}

div.sphinxsidebar h3,
div.sphinxsidebar h4 {
color: #111;
background: none;
padding: 8px 10px 5px 10px;
border-bottom: 1px solid #ddd;}

div.sphinxsidebar h3 a {
color: #111;}

div.sphinxsidebar a {
color: #333;}

div.sphinxsidebarwrapper ul {
margin-right: 5px;}

p.searchtip {
display: none;}

div.body {
padding: 0 25px 25px 30px;
color: #333;}

div.body h1,
div.body h2,
div.body h3,
div.body h4,
div.body h5,
div.body h6 {
background: none;
padding-top: 0;
padding-left: 0;}

div.body h1 {
border-top: none;
padding-top: 20px;
font-size: 260%;}

div.body h2 {
font-size: 210%;
padding-top: 15px;}

div.body h3 {
font-size: 170%;
border-bottom: 1px solid #BBB;}

div.body h4 {
font-size: 130%;
margin-top: 20px;
padding-left: 3px;}

div.related {
background-color: #0071E2;}

div.related a {
color: #fff;}
174 changes: 174 additions & 0 deletions doc/conf.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,174 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# HiSPARC-datastore documentation build configuration file, created by
# sphinx-quickstart on Wed May 10 10:11:52 2017.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# All configuration values have a default; values that are commented out
# serve to show the default.

# If extensions (or modules to document with autodoc) are in another directory,
# 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('..'))


# -- General configuration ------------------------------------------------

# If your documentation needs a minimal Sphinx version, state it here.
#
# needs_sphinx = '1.0'

# 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.autodoc',
'sphinx.ext.mathjax',
'sphinx.ext.viewcode',
'sphinx.ext.githubpages']

# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']

# The suffix(es) of source filenames.
# You can specify multiple suffix as a list of string:
#
# source_suffix = ['.rst', '.md']
source_suffix = '.rst'

# The master toctree document.
master_doc = 'index'

# General information about the project.
project = 'HiSPARC-datastore'
copyright = '2017, David Fokkema, Arne de Laat, Tom Kooij'
author = 'David Fokkema, Arne de Laat, Tom Kooij'

# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
# built documents.
#
# The short X.Y version.
version = '1.0'
# The full version, including alpha/beta/rc tags.
release = '1.0.0'

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
#
# This is also used if you do content translation via gettext catalogs.
# Usually you set "language" from the command line for these cases.
language = None

# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This patterns also effect to html_static_path and html_extra_path
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']

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

# If true, `todo` and `todoList` produce output, else they produce nothing.
todo_include_todos = False


# -- Options for HTML output ----------------------------------------------

# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
html_theme = 'nature'

# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
# documentation.
#
# html_theme_options = {}

# The name of an image file (relative to this directory) to place at the top
# of the sidebar.
html_logo = 'logo/header.png'

# The name of an image file (within the static path) to use as favicon of the
# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
# pixels large.
html_favicon = '_static/favicon.ico'

# 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']


# -- Options for HTMLHelp output ------------------------------------------

# Output file base name for HTML help builder.
htmlhelp_basename = 'HiSPARC-datastoredoc'


def setup(app):
app.add_stylesheet('hisparc_style.css')

# -- Options for LaTeX output ---------------------------------------------

latex_elements = {
# The paper size ('letterpaper' or 'a4paper').
#
# 'papersize': 'letterpaper',

# The font size ('10pt', '11pt' or '12pt').
#
# 'pointsize': '10pt',

# Additional stuff for the LaTeX preamble.
#
# 'preamble': '',

# Latex figure (float) alignment
#
# 'figure_align': 'htbp',
}

# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title,
# author, documentclass [howto, manual, or own class]).
latex_documents = [
(master_doc, 'HiSPARC-datastore.tex', 'HiSPARC-datastore Documentation',
'David Fokkema, Arne de Laat, Tom Kooij', 'manual'),
]

# The name of an image file (relative to this directory) to place at the top of
# the title page.
latex_logo = 'logo/logo.pdf'



# -- Options for manual page output ---------------------------------------

# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [
(master_doc, 'hisparc-datastore', 'HiSPARC-datastore Documentation',
[author], 1)
]


# -- Options for Texinfo output -------------------------------------------

# Grouping the document tree into Texinfo files. List of tuples
# (source start file, target name, title, author,
# dir menu entry, description, category)
texinfo_documents = [
(master_doc, 'HiSPARC-datastore', 'HiSPARC-datastore Documentation',
author, 'HiSPARC-datastore', 'One line description of project.',
'Miscellaneous'),
]
25 changes: 25 additions & 0 deletions doc/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
.. HiSPARC-datastore documentation master file, created by
sphinx-quickstart on Wed May 10 10:11:52 2017.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.

Welcome to HiSPARC-datastore's documentation!
=============================================

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

introduction
wsgi
writer
xml-rpc-server



Indices and tables
==================

* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`
11 changes: 11 additions & 0 deletions doc/introduction.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
Introduction
============

Todo:

- document datastore setup on frome
- document `station-list.csv` <-- pique
- document raw datastore tables
- document upload codes??
- document logfiles

Binary file added doc/logo/header.pdf
Binary file not shown.
Binary file added doc/logo/header.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/logo/logo.pdf
Binary file not shown.
Binary file added doc/logo/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading