Skip to content

Commit

Permalink
adding files for readthedocs
Browse files Browse the repository at this point in the history
  • Loading branch information
heikoklein committed May 28, 2024
1 parent f54b4e0 commit 82ca7d0
Show file tree
Hide file tree
Showing 6 changed files with 187 additions and 0 deletions.
31 changes: 31 additions & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Read the Docs configuration file
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details

# Required
version: 2

# Set the OS, Python version and other tools you might need
build:
os: ubuntu-22.04
tools:
python: "3.10"
# You can also specify other tool versions:
# nodejs: "19"
# rust: "1.64"
# golang: "1.19"

# Build documentation in the "docs/" directory with Sphinx
sphinx:
configuration: docs/conf.py

# Optionally build your docs in additional formats such as PDF and ePub
# formats:
# - pdf
# - epub

# Optional but recommended, declare the Python requirements required
# to build your documentation
# See https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html
python:
install:
- requirements: docs/requirements.txt
19 changes: 19 additions & 0 deletions api.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
API
========

Documentation of the core API of pyaro.


aerovaldb
^^^^^^^^^^^^

.. autofunction:: aerovaldb.open


aerovaldb.AerovalDB - User API
^^^^^^^^^^^^

.. autoclass:: aerovaldb.aerovaldb.AerovalDB
:members:
:undoc-members:

77 changes: 77 additions & 0 deletions conf.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
# Configuration file for the Sphinx documentation builder.
#
# This file only contains a selection of the most common options. For a full
# list see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html

import os
import sys

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

project = "aerovaldb"
copyright = "2024, MET Norway"
author = "pyaerocom developers"

# -- Add paths ---------------------------------------
sys.path.insert(0, os.path.abspath("."))
sys.path.insert(0, os.path.abspath(".."))


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

# 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.todo",
"sphinx.ext.autodoc",
"sphinx.ext.autosummary",
"sphinx.ext.doctest",
"sphinx.ext.napoleon",
"sphinx.ext.intersphinx",
"sphinx.ext.coverage",
"sphinx.ext.mathjax",
"sphinx.ext.viewcode",
"sphinx.ext.githubpages",
"nbsphinx",
"sphinxarg.ext",
]

intersphinx_mapping = {
"python": ("https://docs.python.org/3", None),
"pandas": ("https://pandas.pydata.org/docs/", None),
"numpy": ("https://numpy.org/doc/stable/", None),
}

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

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


# -- 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 = "sphinx_rtd_theme"
#html_logo = "pics/pyaro.svg"
html_theme_options = {
"logo_only": True,
"display_version": False,
}

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

# These paths are either relative to html_static_path
# or fully qualified paths (eg. https://...)
html_css_files = [
"custom.css",
]
28 changes: 28 additions & 0 deletions index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
***************************
aerovaldb - Aeroval Dababase-interface
***************************

Website of aerovaldb, the database interface to read data of the aeroval web-api, i.e. https://api.aeroval.met.no/docs
and connect it pyaercom https://pyaerocom.readthedocs.io/


About
============

TBD

.. toctree::
:maxdepth: 1
:caption: Contents:

index
installation
api
genindex

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

* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`
24 changes: 24 additions & 0 deletions installation.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
Installation
============

You can install aerovaldb via pip or from source.

Via pip
^^^^^^^

This will install the latest aerovaldb and all its dependencies.
::

# install aerovaldb
python -m pip install aerovaldb@git+https://github.com/metno/aerovaldb@main


From source:
^^^^^^^
::

# install aerovaldb on machines with numpy
git clone https://github.com/metno/aerovaldb.git
cd aerovaldb
python -m pip install .

8 changes: 8 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Defining the exact version will make sure things don't break
sphinx>=7.2.6
sphinxcontrib-napoleon
sphinx_rtd_theme
sphinx-argparse
nbsphinx
pandas
aerovaldb @ git+https://github.com/metno/aerovaldb@main

0 comments on commit 82ca7d0

Please sign in to comment.