Skip to content

Commit

Permalink
Merge pull request #1836 from SEED-platform/fix-readthedocs
Browse files Browse the repository at this point in the history
Use Conda for Read the Docs
  • Loading branch information
nllong committed Mar 6, 2019
2 parents 49d1fd4 + dce1442 commit 6893d15
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 126 deletions.
19 changes: 0 additions & 19 deletions bin/gitwho.sh

This file was deleted.

75 changes: 0 additions & 75 deletions bin/seedutil

This file was deleted.

7 changes: 7 additions & 0 deletions docs/environment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
channels:
- conda-forge
dependencies:
- gdal
- pip:
- sphinxcontrib-spelling
33 changes: 7 additions & 26 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
copyfile('../../config/settings/local_untracked.py.dist',
'../../config/settings/local_untracked.py')


os.environ.setdefault("DJANGO_SETTINGS_MODULE", "config.settings.dev")
sys.path.insert(0, os.path.abspath('../..'))

Expand All @@ -39,14 +40,16 @@
# ones.
extensions = [
'sphinx.ext.autodoc',
# 'sphinx.ext.doctest',
# 'sphinx.ext.coverage',
# 'sphinx.ext.mathjax',
# 'sphinx.ext.ifconfig',
'sphinx.ext.todo',
'sphinxcontrib.spelling',
'sphinx.ext.inheritance_diagram',
'sphinx.ext.intersphinx',
'sphinx.ext.coverage',
]

autodoc_mock_imports = [
'ubid.v2',
'ubid.v3',
]

# Add any paths that contain templates here, relative to this directory.
Expand Down Expand Up @@ -376,25 +379,3 @@

# If false, no index is generated.
#epub_use_index = True


def process_remove_copyright_author(app, what, name, obj, options, docstringlines):
"""
Clean up the docstrings and remove any of the copyright and author strings in the headers
"""

if len(docstringlines) <= 1:
return

first_line = docstringlines[0]
if first_line.startswith(':copyright') and 'University of California' in first_line:
# Remove the copyright and the author lines from the files
docstringlines.pop(0)
docstringlines.pop(0)


def setup(app):
"""
Called by sphinx to hook up event handlers.
"""
app.connect("autodoc-process-docstring", process_remove_copyright_author)
2 changes: 2 additions & 0 deletions readthedocs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
conda:
file: docs/environment.yml
18 changes: 12 additions & 6 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,21 @@
import json

from setuptools import setup, find_packages

# TODO: This file can most likely be removed.

def get_version():
with open('package.json') as f:
j = json.load(f)

return j['version']

setup(
name='seed',
version='2.4.2',
version=get_version(),
packages=find_packages(),
url='',
url='seed-platform.org',
license='revised BSD',
author='Richard Brown',
author_email='rebrown@lbl.gov',
author='NREL/LBNL',
author_email='info@seed-platform.org',
description='The SEED Platform is a web-based application that helps organizations easily manage data on the energy performance of large groups of buildings.',
scripts=['bin/seedutil']
)

0 comments on commit 6893d15

Please sign in to comment.