Skip to content
Snippets Groups Projects
Commit a2a2a0a4 authored by Stefan Mauerberger's avatar Stefan Mauerberger
Browse files

Initial import of an empty Sphinx documentation

parent f4f2cec4
No related branches found
No related tags found
1 merge request!1Sphinx Documentation
pages:
stage: deploy
script:
- python3 setup.py build_sphinx
- mv build/sphinx/html public
artifacts:
paths:
- public
only:
- docs
# 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
# -- Path setup --------------------------------------------------------------
# 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('../'))
# -- Project information -----------------------------------------------------
# Sphinx's options are specified by setup.py
#project = 'pymagglobal'
#copyright = '2020 Helmholtz Centre Potsdam GFZ, German Research Centre for Geosciences, Potsdam, Germany'
## The full version, including alpha/beta/rc tags
#release = '0.0.2'
# Due to some reason not set by setup.py
author = 'Schanner, M.A. and Mauerberger, S.'
# -- 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 = []
# 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 = 'classic'
# 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']
Welcome to pymagglobal's documentation!
=======================================
Nothing here yet ...
.. toctree::
:maxdepth: 2
:caption: Contents:
Indices and tables
==================
* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`
''' # This is the install file for pymagglobal.
This is the install file for pymagglobal. #
# Copyright (C) 2020 Helmholtz Centre Potsdam GFZ,
Copyright (C) 2020 Helmholtz Centre Potsdam GFZ, # German Research Centre for Geosciences, Potsdam, Germany
German Research Centre for Geosciences, Potsdam, Germany #
# Cite as:
Cite as: # TODO
TODO #
# This file is part of pymagglobal.
This file is part of pymagglobal. #
# pymagglobal is free software: you can redistribute it and/or modify
pymagglobal is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by
it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or
the Free Software Foundation, either version 3 of the License, or # (at your option) any later version.
(at your option) any later version. #
# pymagglobal is distributed in the hope that it will be useful,
pymagglobal is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of
but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details.
GNU General Public License for more details. #
# You should have received a copy of the GNU General Public License
You should have received a copy of the GNU General Public License # along with pymagglobal. If not, see <https://www.gnu.org/licenses/>.
along with pymagglobal. If not, see <https://www.gnu.org/licenses/>.
'''
import os import os
import codecs import codecs
from setuptools import setup from setuptools import setup
from sphinx.setup_command import BuildDoc
# https://packaging.python.org/guides/single-sourcing-package-version/ # https://packaging.python.org/guides/single-sourcing-package-version/
...@@ -43,12 +42,14 @@ def get_version(rel_path): ...@@ -43,12 +42,14 @@ def get_version(rel_path):
else: else:
raise RuntimeError("Unable to find version string.") raise RuntimeError("Unable to find version string.")
name = 'pymagglobal'
description = ''' python interface for global geomagnetic field models ''' version = get_version('pymagglobal/__init__.py')
description = '''python interface for global geomagnetic field models '''
copyright = '2020 Helmholtz Centre Potsdam GFZ, German Research Centre for Geosciences, Potsdam, Germany'
setup( setup(
name='pymagglobal', name=name,
version=get_version('pymagglobal/__init__.py'), version=version,
author='Maximilian Schanner', author='Maximilian Schanner',
author_email='arthus@gfz-potsdam.de', author_email='arthus@gfz-potsdam.de',
packages=['pymagglobal'], packages=['pymagglobal'],
...@@ -58,4 +59,12 @@ setup( ...@@ -58,4 +59,12 @@ setup(
install_requires=[], install_requires=[],
package_data={'pymagglobal': ['dat/*']}, package_data={'pymagglobal': ['dat/*']},
include_package_data=True, include_package_data=True,
cmdclass={'build_sphinx': BuildDoc},
# Override docs/conf.py settings
command_options={
'build_sphinx': {
'project': ('dfetup.py', name),
'release': ('dfetup.py', version),
'copyright': ('dfetup.py', copyright),
'source_dir': ('dfetup.py', 'docs')}},
) )
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment