Skip to content

Commit 7ab9111

Browse files
committed
Adding test docs
1 parent 9ee1da8 commit 7ab9111

File tree

5 files changed

+218
-0
lines changed

5 files changed

+218
-0
lines changed

docs/Makefile

+20
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, and also
5+
# from the environment for the first two.
6+
SPHINXOPTS ?=
7+
SPHINXBUILD ?= sphinx-build
8+
SOURCEDIR = .
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/conf.py

+133
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,133 @@
1+
# Configuration file for the Sphinx documentation builder.
2+
#
3+
# This file only contains a selection of the most common options. For a full
4+
# list see the documentation:
5+
# https://www.sphinx-doc.org/en/master/usage/configuration.html
6+
7+
# -- Path setup --------------------------------------------------------------
8+
9+
# If extensions (or modules to document with autodoc) are in another directory,
10+
# add these directories to sys.path here. If the directory is relative to the
11+
# documentation root, use os.path.abspath to make it absolute, like shown here.
12+
#
13+
import os
14+
import sys
15+
# import avaframe
16+
# sys.path.insert(0, os.path.abspath('.'))
17+
sys.path.insert(0, os.path.abspath('../avaframe'))
18+
# sys.path.insert(0, os.path.abspath('../avaframe'))
19+
import sphinx_rtd_theme
20+
21+
# -- Project information -----------------------------------------------------
22+
23+
project = 'AvaFrame'
24+
copyright = '2021, AvaFrame developers'
25+
author = 'AvaFrame developers'
26+
27+
28+
# -- General configuration ---------------------------------------------------
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.napoleon',
36+
'sphinx.ext.autosummary',
37+
'sphinx.ext.viewcode',
38+
'sphinx_rtd_theme',
39+
'sphinx.ext.autosectionlabel',
40+
'sphinx.ext.extlinks',
41+
'sphinxcontrib.bibtex',
42+
'sphinx.ext.graphviz',
43+
]
44+
# -- GraphViz configuration ----------------------------------
45+
graphviz_output_format = 'svg'
46+
47+
bibtex_bibfiles = ['references_all.bib']
48+
49+
# alternative: use base requirements.txt in readthedocs.yml files to install
50+
# missing modules on rtd
51+
autosummary_mock_imports = [
52+
'avaframe',
53+
'numpy',
54+
'shapefile',
55+
'scipy',
56+
'matplotlib',
57+
'glob',
58+
'subprocess',
59+
'shutil',
60+
'math',
61+
'pandas',
62+
'copy',
63+
'os',
64+
'logging',
65+
'time',
66+
'mpl_toolkits',
67+
'make_axes_locatable',
68+
]
69+
autosummary_generate = True
70+
71+
napoleon_google_docstring = True
72+
napoleon_use_param = False
73+
napoleon_use_ivar = True
74+
75+
# Turn off prepending module names
76+
add_module_names = False
77+
78+
# make referencing unique if the same section heading exists doubly
79+
autosectionlabel_prefix_document = True
80+
autosectionlabel_maxdepth = 4
81+
82+
# Add any paths that contain templates here, relative to this directory.
83+
templates_path = ['_templates']
84+
85+
# List of patterns, relative to source directory, that match files and
86+
# directories to ignore when looking for source files.
87+
# This pattern also affects html_static_path and html_extra_path.
88+
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store', 'run*', '*run*', 'run']
89+
90+
# Set the master document name for readthedocs builds
91+
master_doc = 'index'
92+
93+
# -- Options for HTML output -------------------------------------------------
94+
95+
# The theme to use for HTML and HTML Help pages. See the documentation for
96+
# a list of builtin themes.
97+
#
98+
html_theme = "sphinx_rtd_theme"
99+
100+
# Theme options are theme-specific and customize the look and feel of a theme
101+
# further. For a list of options available for each theme, see the
102+
# documentation.
103+
html_theme_options = {
104+
'logo_only': True,
105+
'style_nav_header_background': '#343131',
106+
# 'display_version': False,
107+
}
108+
109+
# The name of an image file (relative to this directory) to place at the top
110+
# of the sidebar.
111+
html_logo = '_static/logo.png'
112+
113+
# The name of an image file (within the static path) to use as favicon of the
114+
# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
115+
# pixels large.
116+
html_favicon = '_static/favicon.png'
117+
118+
# Add any paths that contain custom static files (such as style sheets) here,
119+
# relative to this directory. They are copied after the builtin static files,
120+
# so a file named "default.css" will overwrite the builtin "default.css".
121+
html_static_path = ['_static']
122+
123+
# -- Options for LaTeX output ---------------------------------------------
124+
latex_logo = '_static/logo.png'
125+
126+
# -- Options for referencing -------------------------------------------
127+
numfig = True
128+
math_numfig = True
129+
math_eqref_format = "Eq.{number}"
130+
131+
132+
def setup(app):
133+
app.add_css_file('css/custom.css')

docs/index.rst

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
.. AvaFrame documentation master file, created by
2+
sphinx-quickstart on Mon Jul 6 16:11:23 2020.
3+
You can adapt this file completely to your liking, but it should at least
4+
contain the root `toctree` directive.
5+
6+
The Open Avalanche Framework
7+
============================
8+
9+
.. include:: introduction.rst
10+
11+
General
12+
=======
13+
14+
.. only:: html
15+
16+
* :doc:`introduction`
17+
18+
.. toctree::
19+
:maxdepth: 3
20+
:hidden:
21+
:caption: General
22+
23+
introduction.rst
24+

docs/introduction.rst

+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
Introduction
2+
============
3+
4+
AvaFrame is a cooperation between the Austrian Avalanche and Torrent Service
5+
(Wildbach- und Lawinenverbauung; WLV) and the Austrian Research Centre for
6+
Forests (Bundesforschungszentrum für Wald; BFW) within the Federal Ministry
7+
Republic of Austria: Agriculture, Regions and Tourism (BMLRT).
8+
9+
Our mission is to develop an open source framework (licensed with the European
10+
Union Public license (EUPL) ) for avalanche simulations which replicates and
11+
simplifies current simulation procedures and models at the WLV and make them
12+
accessible to the public domain.
13+
14+
Our aims are to make AvaFrame:
15+
16+
* applicable in an operational setting e.g. for hazard mapping or planning of
17+
mitigation measures within the WLV and civil engineering.
18+
* extensible for scientific applications to be used to develop new methods,
19+
models and cover a wide range of scientific topics.
20+
* easily usable and extendable by (inter-)national partners, academia and
21+
interested users.
22+
23+
AvaFrame is part of an BMLRT initiative to foster technological innovation within a strategic focus on the area of Austrian safety policies, digital innovations and climate mitigation strategies.
24+
25+
Information in German can be found on the `BMLRT Homepage <https://www.bmlrt.gv.at/forst/wildbach-lawinenverbauung/kooperationen-zusammenarbeit/lawinenschutzvorsorgeprojekt.html>`_.
26+
27+
A summery of the lattest advances of the project can be found on the
28+
`Avaframe homepage <https://avaframe.org/>`_ web-page.
29+
30+
Feel free to contact us at our `matrix room <#public:matrix.avaframe.org>`_ if
31+
you have any questions or suggestions. Avaframe is in an early development phase
32+
and all ideas and contributions are welcome!
33+
34+
If you want to cite our project, please use:
35+
36+
.. image:: https://zenodo.org/badge/281922740.svg
37+
:target: https://zenodo.org/badge/latestdoi/281922740

docs/requirements.txt

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
sphinxcontrib-bibtex
2+
sphinx
3+
sphinx-rtd-theme
4+
sphinx-autodoc-typehints

0 commit comments

Comments
 (0)