Skip to content

Commit df4e1bc

Browse files
committed
added docs and pyproject.toml
1 parent b7d4560 commit df4e1bc

File tree

7 files changed

+1896
-0
lines changed

7 files changed

+1896
-0
lines changed

docs/Makefile

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# Minimal makefile for Sphinx documentation
2+
#
3+
4+
# You can set these variables from the command line.
5+
SPHINXOPTS =
6+
SPHINXBUILD = sphinx-build
7+
SPHINXPROJ = pyobs
8+
SOURCEDIR = source
9+
BUILDDIR = ../.doc-build
10+
11+
#.EXPORT_ALL_VARIABLES:
12+
13+
#PYTHONPATH:=../pyobs-core/:../pyobs-sbig/:../pyobs-fli:../pyobs-weather:../pyobs-archive:${PYTHONPATH}
14+
15+
# Put it first so that "make" without argument is like "make help".
16+
help:
17+
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
18+
19+
.PHONY: help Makefile
20+
21+
html:
22+
@$(SPHINXBUILD) -M html "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS)
23+
24+
livehtml:
25+
sphinx-autobuild -b html --watch ../pyobs_sbig $(ALLSPHINXOPTS) "$(SOURCEDIR)/" "$(BUILDDIR)/html/"
26+
27+
# Catch-all target: route all unknown targets to Sphinx using the new
28+
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
29+
%: Makefile
30+
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
31+

docs/make.bat

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
@ECHO OFF
2+
3+
pushd %~dp0
4+
5+
REM Command file for Sphinx documentation
6+
7+
if "%SPHINXBUILD%" == "" (
8+
set SPHINXBUILD=sphinx-build
9+
)
10+
set SOURCEDIR=source
11+
set BUILDDIR=build
12+
set SPHINXPROJ=pyobs
13+
14+
if "%1" == "" goto help
15+
16+
%SPHINXBUILD% >NUL 2>NUL
17+
if errorlevel 9009 (
18+
echo.
19+
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
20+
echo.installed, then set the SPHINXBUILD environment variable to point
21+
echo.to the full path of the 'sphinx-build' executable. Alternatively you
22+
echo.may add the Sphinx directory to PATH.
23+
echo.
24+
echo.If you don't have Sphinx installed, grab it from
25+
echo.http://sphinx-doc.org/
26+
exit /b 1
27+
)
28+
29+
%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS%
30+
goto end
31+
32+
:help
33+
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS%
34+
35+
:end
36+
popd

docs/source/_static/pyobs.gif

1.75 KB
Loading

docs/source/conf.py

Lines changed: 121 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,121 @@
1+
# -*- coding: utf-8 -*-
2+
#
3+
# Configuration file for the Sphinx documentation builder.
4+
#
5+
# This file does only contain a selection of the most common options. For a
6+
# full list see the documentation:
7+
# http://www.sphinx-doc.org/en/stable/config
8+
9+
# -- Path setup --------------------------------------------------------------
10+
11+
# If extensions (or modules to document with autodoc) are in another directory,
12+
# add these directories to sys.path here. If the directory is relative to the
13+
# documentation root, use os.path.abspath to make it absolute, like shown here.
14+
#
15+
import os
16+
import sys
17+
18+
sys.path.insert(0, os.path.abspath("../../"))
19+
20+
# -- Django --------------------
21+
import os
22+
import sys
23+
import django
24+
sys.path.insert(0, os.path.abspath('..'))
25+
os.environ['DJANGO_SETTINGS_MODULE'] = 'pyobs_archive.settings'
26+
django.setup()
27+
28+
# -- Project information -----------------------------------------------------
29+
30+
project = "pyobs-archive"
31+
copyright = "2022, Tim-Oliver Husser"
32+
author = "Tim-Oliver Husser"
33+
34+
# The short X.Y version
35+
# version = "0.16"
36+
# The full version, including alpha/beta/rc tags
37+
# release = "0.16.0"
38+
39+
40+
# -- General configuration ---------------------------------------------------
41+
42+
add_module_names = False
43+
44+
# If your documentation needs a minimal Sphinx version, state it here.
45+
#
46+
# needs_sphinx = '1.0'
47+
48+
# Add any Sphinx extension module names here, as strings. They can be
49+
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
50+
# ones.
51+
extensions = [
52+
"sphinx.ext.autodoc",
53+
"sphinx.ext.githubpages",
54+
"sphinx.ext.napoleon",
55+
"sphinx.ext.viewcode",
56+
"sphinx.ext.autosectionlabel",
57+
#'sphinx_autodoc_typehints'
58+
]
59+
60+
intersphinx_mapping = {"http://docs.python.org/3": None}
61+
62+
# napoleon settings
63+
napoleon_google_docstring = True
64+
napoleon_numpy_docstring = False
65+
napoleon_use_param = False
66+
napoleon_use_ivar = True
67+
68+
# typehints
69+
# set_type_checking_flag = True
70+
# autodoc_typehints = "description"
71+
72+
# show c'tor parameters in class only
73+
autoclass_content = "both"
74+
75+
# Add any paths that contain templates here, relative to this directory.
76+
templates_path = ["_templates"]
77+
78+
# The suffix(es) of source filenames.
79+
# You can specify multiple suffix as a list of string:
80+
#
81+
source_suffix = ".rst"
82+
83+
# The master toctree document.
84+
master_doc = "index"
85+
86+
# The language for content autogenerated by Sphinx. Refer to documentation
87+
# for a list of supported languages.
88+
#
89+
# This is also used if you do content translation via gettext catalogs.
90+
# Usually you set "language" from the command line for these cases.
91+
language = "en"
92+
93+
# List of patterns, relative to source directory, that match files and
94+
# directories to ignore when looking for source files.
95+
# This pattern also affects html_static_path and html_extra_path .
96+
exclude_patterns = []
97+
98+
# The name of the Pygments (syntax highlighting) style to use.
99+
pygments_style = "sphinx"
100+
101+
# Be a little nitpicky
102+
nitpicky = True
103+
nitpick_ignore = []
104+
105+
106+
# -- Options for HTML output -------------------------------------------------
107+
108+
# The theme to use for HTML and HTML Help pages. See the documentation for
109+
# a list of builtin themes.
110+
html_theme = "sphinx_rtd_theme"
111+
html_theme_options = {
112+
"collapse_navigation": False,
113+
"sticky_navigation": True,
114+
"navigation_depth": 4,
115+
"display_version": False,
116+
"logo_only": False,
117+
"prev_next_buttons_location": "bottom",
118+
"titles_only": False,
119+
"style_nav_header_background": "#cccccc",
120+
}
121+
html_logo = "_static/pyobs.gif"

0 commit comments

Comments
 (0)