Skip to content

Commit 291d5ec

Browse files
committed
sphinx-quickstart
1 parent e0bdb10 commit 291d5ec

6 files changed

Lines changed: 302 additions & 0 deletions

File tree

docs/Makefile

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Minimal makefile for Sphinx documentation
2+
#
3+
4+
# You can set these variables from the command line.
5+
SPHINXOPTS =
6+
SPHINXBUILD = python -msphinx
7+
SPHINXPROJ = ODM2PythonAPI
8+
SOURCEDIR = source
9+
BUILDDIR = build
10+
11+
# Put it first so that "make" without argument is like "make help".
12+
help:
13+
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
14+
15+
.PHONY: help Makefile
16+
17+
# Catch-all target: route all unknown targets to Sphinx using the new
18+
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
19+
%: Makefile
20+
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

docs/source/conf.py

Lines changed: 171 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,171 @@
1+
# -*- coding: utf-8 -*-
2+
#
3+
# ODM2PythonAPI documentation build configuration file, created by
4+
# sphinx-quickstart on Thu Sep 28 11:03:57 2017.
5+
#
6+
# This file is execfile()d with the current directory set to its
7+
# containing dir.
8+
#
9+
# Note that not all possible configuration values are present in this
10+
# autogenerated file.
11+
#
12+
# All configuration values have a default; values that are commented out
13+
# serve to show the default.
14+
15+
# If extensions (or modules to document with autodoc) are in another directory,
16+
# add these directories to sys.path here. If the directory is relative to the
17+
# documentation root, use os.path.abspath to make it absolute, like shown here.
18+
#
19+
# import os
20+
# import sys
21+
# sys.path.insert(0, os.path.abspath('.'))
22+
23+
24+
# -- General configuration ------------------------------------------------
25+
26+
# If your documentation needs a minimal Sphinx version, state it here.
27+
#
28+
# needs_sphinx = '1.0'
29+
30+
# Add any Sphinx extension module names here, as strings. They can be
31+
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
32+
# ones.
33+
extensions = [
34+
'sphinx.ext.autodoc',
35+
'sphinx.ext.viewcode',
36+
'sphinx.ext.githubpages'
37+
]
38+
39+
# Add any paths that contain templates here, relative to this directory.
40+
templates_path = ['_templates']
41+
42+
# The suffix(es) of source filenames.
43+
# You can specify multiple suffix as a list of string:
44+
#
45+
# source_suffix = ['.rst', '.md']
46+
source_suffix = '.rst'
47+
48+
# The master toctree document.
49+
master_doc = 'index'
50+
51+
# General information about the project.
52+
project = u'ODM2PythonAPI'
53+
copyright = u'2017, Stephanie Reeder'
54+
author = u'Stephanie Reeder'
55+
56+
# The version info for the project you're documenting, acts as replacement for
57+
# |version| and |release|, also used in various other places throughout the
58+
# built documents.
59+
60+
from odm2api._version import get_versions
61+
version = release = get_versions()['version']
62+
del get_versions
63+
64+
# The language for content autogenerated by Sphinx. Refer to documentation
65+
# for a list of supported languages.
66+
#
67+
# This is also used if you do content translation via gettext catalogs.
68+
# Usually you set "language" from the command line for these cases.
69+
language = None
70+
71+
# List of patterns, relative to source directory, that match files and
72+
# directories to ignore when looking for source files.
73+
# This patterns also effect to html_static_path and html_extra_path
74+
exclude_patterns = []
75+
76+
# The name of the Pygments (syntax highlighting) style to use.
77+
pygments_style = 'sphinx'
78+
79+
# If true, `todo` and `todoList` produce output, else they produce nothing.
80+
todo_include_todos = False
81+
82+
83+
# -- Options for HTML output ----------------------------------------------
84+
85+
# The theme to use for HTML and HTML Help pages. See the documentation for
86+
# a list of builtin themes.
87+
#
88+
html_theme = 'alabaster'
89+
90+
# Theme options are theme-specific and customize the look and feel of a theme
91+
# further. For a list of options available for each theme, see the
92+
# documentation.
93+
#
94+
# html_theme_options = {}
95+
96+
# Add any paths that contain custom static files (such as style sheets) here,
97+
# relative to this directory. They are copied after the builtin static files,
98+
# so a file named "default.css" will overwrite the builtin "default.css".
99+
html_static_path = ['_static']
100+
101+
# Custom sidebar templates, must be a dictionary that maps document names
102+
# to template names.
103+
#
104+
# This is required for the alabaster theme
105+
# refs: http://alabaster.readthedocs.io/en/latest/installation.html#sidebars
106+
html_sidebars = {
107+
'**': [
108+
'about.html',
109+
'navigation.html',
110+
'relations.html', # needs 'show_related': True theme option to display
111+
'searchbox.html',
112+
'donate.html',
113+
]
114+
}
115+
116+
117+
# -- Options for HTMLHelp output ------------------------------------------
118+
119+
# Output file base name for HTML help builder.
120+
htmlhelp_basename = 'ODM2PythonAPIdoc'
121+
122+
123+
# -- Options for LaTeX output ---------------------------------------------
124+
125+
latex_elements = {
126+
# The paper size ('letterpaper' or 'a4paper').
127+
#
128+
# 'papersize': 'letterpaper',
129+
130+
# The font size ('10pt', '11pt' or '12pt').
131+
#
132+
# 'pointsize': '10pt',
133+
134+
# Additional stuff for the LaTeX preamble.
135+
#
136+
# 'preamble': '',
137+
138+
# Latex figure (float) alignment
139+
#
140+
# 'figure_align': 'htbp',
141+
}
142+
143+
# Grouping the document tree into LaTeX files. List of tuples
144+
# (source start file, target name, title,
145+
# author, documentclass [howto, manual, or own class]).
146+
latex_documents = [
147+
(master_doc, 'ODM2PythonAPI.tex', u'ODM2PythonAPI Documentation',
148+
u'Stephanie Reeder', 'manual'),
149+
]
150+
151+
152+
# -- Options for manual page output ---------------------------------------
153+
154+
# One entry per manual page. List of tuples
155+
# (source start file, name, description, authors, manual section).
156+
man_pages = [
157+
(master_doc, 'odm2pythonapi', u'ODM2PythonAPI Documentation',
158+
[author], 1)
159+
]
160+
161+
162+
# -- Options for Texinfo output -------------------------------------------
163+
164+
# Grouping the document tree into Texinfo files. List of tuples
165+
# (source start file, target name, title, author,
166+
# dir menu entry, description, category)
167+
texinfo_documents = [
168+
(master_doc, 'ODM2PythonAPI', u'ODM2PythonAPI Documentation',
169+
author, 'ODM2PythonAPI', 'One line description of project.',
170+
'Miscellaneous'),
171+
]

docs/source/credits.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
Credits
2+
-------
3+
4+
This work was supported by National Science Foundation Grants
5+
`EAR-1224638 <http://www.nsf.gov/awardsearch/showAward?AWD_ID=1224638>`__
6+
and
7+
`ACI-1339834 <http://www.nsf.gov/awardsearch/showAward?AWD_ID=1339834>`__.
8+
Any opinions, findings, and conclusions or recommendations expressed in
9+
this material are those of the author(s) and do not necessarily reflect
10+
the views of the National Science Foundation.

docs/source/index.rst

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
ODM2 Python API
2+
===============
3+
4+
A Python-based application programmer's interface for the `Observations Data Model 2 (ODM2) <http://odm2.org>`__.
5+
`List of current and planned functions included in the
6+
API <https://github.com/ODM2/ODM2PythonAPI/blob/master/doc/APIFunctionList.md>`__
7+
8+
9+
.. toctree::
10+
:maxdepth: 2
11+
:caption: Contents:
12+
13+
installing
14+
modules
15+
credits
16+
17+
Indices and tables
18+
==================
19+
20+
* :ref:`genindex`
21+
* :ref:`modindex`
22+
* :ref:`search`

docs/source/installing.rst

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
Installation
2+
------------
3+
4+
The easiest and most reliable way to install the ODM2 Python API
5+
(``odm2api``) is using the `Conda package management
6+
system <http://conda.pydata.org/docs/>`__ via either
7+
`Anaconda <https://www.continuum.io/downloads>`__ or
8+
`Miniconda <http://conda.pydata.org/miniconda.html>`__. To start using
9+
conda (if it's not your system default), add conda to the PATH; on
10+
MacOSX and Linux, it's something like
11+
``export PATH=$HOME/miniconda/bin:$PATH``, but the exact path may vary.
12+
13+
To activate a conda environment, say, "myenv":
14+
15+
.. code:: bash
16+
17+
activate myenv # On Windows
18+
source activate myenv # On MacOSX or Linux
19+
20+
**Note:** ``odm2api`` currently is only tested on Python 2.7. Some
21+
changes have been made to support Python 3.x, but they haven't been
22+
tested thoroughly.
23+
24+
Latest release, from ODM2 anaconda.org channel
25+
----------------------------------------------
26+
27+
The `latest ``odm2api``
28+
release <https://github.com/ODM2/ODM2PythonAPI/releases>`__ is available
29+
on the `ODM2 anaconda.org channel <https://anaconda.org/odm2/odm2api>`__
30+
for all major OS paltforms (linux, OSX, win32/win64). To install it on
31+
an existing conda environment:
32+
33+
::
34+
35+
conda install -c odm2 odm2api
36+
37+
All dependencies are installed, including Pandas and its dependencies
38+
(numpy, etc).
39+
40+
To create a new environment "myenv" with the ``odm2api`` package:
41+
42+
::
43+
44+
conda create -n myenv -c odm2 python=2.7 odm2api
45+
46+
47+
Installing the development version from the ``master`` branch on GitHub
48+
-----------------------------------------------------------------------
49+
50+
**Note from 4/26/2016:** These instructions may be slightly outdated.
51+
Follow these directions for installing the bleeding edge GitHub master
52+
branch, mainly for development and testing purposes.
53+
54+
To create a new environment "myenv" with ``odm2api``, first download the
55+
conda environment file
56+
`condaenvironment\_1.yml <https://raw.githubusercontent.com/ODM2/ODM2PythonAPI/master/condaenvironment_1.yml>`__.
57+
Go to the directory where ``condaenvironment_1.yml`` was downloaded.
58+
Then, on a terminal shell:
59+
60+
.. code:: bash
61+
62+
conda env create -n myenv --file py2_conda_environment.yml
63+
64+
Activate the new environment, then install ``odm2api`` into the
65+
environment:
66+
67+
.. code:: bash
68+
69+
activate myenv # On Windows
70+
source activate myenv # On MacOSX or Linux
71+
72+
pip install --process-dependency-links git+https://github.com/ODM2/ODM2PythonAPI.git

docs/source/modules.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
:mod:`ODMconnection`
2+
---------------------
3+
4+
.. automodule:: odm2api.ODMconnection
5+
:members:
6+
:undoc-members:
7+
:show-inheritance:

0 commit comments

Comments
 (0)