Skip to content

Commit

Permalink
Merge pull request #26 from greschd/add_readthedocs_build
Browse files Browse the repository at this point in the history
Add readthedocs build
  • Loading branch information
greschd committed Feb 17, 2020
2 parents a85af9c + bd8fd84 commit 4c2116c
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 8 deletions.
22 changes: 22 additions & 0 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# .readthedocs.yml
# Read the Docs configuration file
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details

# Required
version: 2

# Build documentation in the doc/ directory with Sphinx
sphinx:
configuration: doc/source/conf.py

# Optionally build your docs in additional formats such as PDF and ePub
formats: []

# Optionally set the version of Python and requirements required to build your docs
python:
version: 3.7
install:
- method: pip
path: .
extra_requirements:
- doc
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,7 @@ The goal of this code is to identify nodal features in potential landscapes, usi

The initial use-case for this code is to find gapless features in three-dimensional materials.

Documentation: https://nodefinder.greschd.ch

[![Documentation Status](https://readthedocs.org/projects/nodefinder/badge/?version=latest)](https://nodefinder.greschd.ch/en/latest/?badge=latest)
[![Build Status](https://travis-ci.org/greschd/NodeFinder.svg?branch=master)](https://travis-ci.org/greschd/NodeFinder)
15 changes: 7 additions & 8 deletions doc/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
# © 2017-2019, ETH Zurich, Institut für Theoretische Physik
# Author: Dominik Gresch <greschd@gmx.ch>

import os
import time
import sphinx_rtd_theme

# 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
Expand Down Expand Up @@ -54,11 +54,8 @@
# General information about the project.
project = u'NodeFinder'
year = time.localtime().tm_year
team = 'ETH Zurich'
if year == 2017:
copyright = u'2017, {}'.format(team)
else:
copyright = u'2017-{}, {}'.format(year, team)
team = 'ETH Zurich; Dominik Gresch'
copyright = u'2017-{}, {}'.format(year, team)

# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
Expand Down Expand Up @@ -115,8 +112,10 @@
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#~ html_theme = 'basicstrap'
html_theme = 'sphinx_rtd_theme'
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
if not os.environ.get('READTHEDOCS', None) == 'True':
import sphinx_rtd_theme
html_theme = 'sphinx_rtd_theme'
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]

# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
Expand Down
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
version=VERSION,
author='Dominik Gresch',
author_email='greschd@gmx.ch',
url='https://nodefinder.greschd.ch',
description=
'A tool for studying the nodal features of potential lanscapes.',
install_requires=[
Expand Down

0 comments on commit 4c2116c

Please sign in to comment.