Skip to content
Snippets Groups Projects

FIX + Doc / Build_readthedocs_documentation

Merged Karim Ahmed requested to merge doc/run_rtd into master
Compare and Show latest version
2 files
+ 28
25
Compare changes
  • Side-by-side
  • Inline
Files
2
+ 24
21
@@ -13,8 +13,6 @@
# All configuration values have a default; values that are commented out
# serve to show the default.
import glob
# 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.
@@ -22,23 +20,6 @@ import glob
# import os
# import sys
# sys.path.insert(0, os.path.abspath('.'))
import os
import shutil
import sys
import textwrap
from datetime import datetime
from subprocess import Popen, check_output
from textwrap import dedent, indent
from uuid import uuid4
import nbformat
import tabulate
from dateutil.parser import parse
from lxml import etree
from nbconvert import RSTExporter
# generate the list of available notebooks
from xfel_calibrate import notebooks
# -- General configuration ------------------------------------------------
@@ -58,6 +39,11 @@ extensions = [
'sphinx.ext.viewcode',
]
import glob
import os
import sys
from subprocess import Popen
sys.path.append(os.path.abspath("../pycalibration/"))
p = Popen(["./makeAllDocs.sh"])
p.communicate()
@@ -388,6 +374,16 @@ except:
check_call(["wget", pandoc_url])
check_call(["dpkg", "-i", pandoc_pack])
import os
from subprocess import check_output
from textwrap import dedent, indent
import nbformat
from nbconvert import RSTExporter
# generate the list of available notebooks
from xfel_calibrate import notebooks
rst_exporter = RSTExporter()
with open("available_notebooks.rst", "w") as f:
f.write(dedent("""
@@ -446,6 +442,15 @@ with open("available_notebooks.rst", "w") as f:
# add test results
test_artefact_dir = os.path.realpath("../../tests/legacy/artefacts")
import shutil
import textwrap
from datetime import datetime
from uuid import uuid4
import tabulate
from dateutil.parser import parse
from lxml import etree
def xml_to_rst_report(xml, git_tag, reports=[]):
e = etree.fromstring(xml.encode())
@@ -603,7 +608,5 @@ with open("test_results.rst", "w") as f:
rst = xml_to_rst_report(xs, commit, reports=reports.get(rloc, []))
fr.write(rst)
f.write(" test_rsts/{}\n".format(commit))
def setup(app):
app.add_stylesheet('css/test_decorators.css')
Loading