From 35c54668eb8382818c0d648f727d53ef96a26f46 Mon Sep 17 00:00:00 2001 From: philipstarkey Date: Tue, 16 Jun 2020 17:19:33 +1000 Subject: [PATCH 01/10] Updated docs to follow our standard conf Also added links to other labscript suite docs and standard links. --- .gitignore | 37 ++- docs/requirements.txt | 1 - docs/source/_static/custom.css | 59 ++++ docs/source/api_reference/index.rst | 2 +- docs/source/conf.py | 436 +++++++++++----------------- docs/source/img/labscript.ico | Bin 0 -> 98716 bytes docs/source/img/labscript.svg | 42 +++ docs/source/index.rst | 12 +- readthedocs.yaml | 27 ++ setup.cfg | 8 + 10 files changed, 345 insertions(+), 279 deletions(-) delete mode 100644 docs/requirements.txt create mode 100644 docs/source/_static/custom.css create mode 100644 docs/source/img/labscript.ico create mode 100644 docs/source/img/labscript.svg create mode 100644 readthedocs.yaml diff --git a/.gitignore b/.gitignore index 923159d..140b788 100644 --- a/.gitignore +++ b/.gitignore @@ -20,6 +20,8 @@ parts/ sdist/ var/ wheels/ +pip-wheel-metadata/ +share/python-wheels/ *.egg-info/ .installed.cfg *.egg @@ -38,12 +40,14 @@ pip-delete-this-directory.txt # Unit test / coverage reports htmlcov/ .tox/ +.nox/ .coverage .coverage.* .cache nosetests.xml coverage.xml *.cover +*.py,cover .hypothesis/ .pytest_cache/ @@ -55,6 +59,7 @@ coverage.xml *.log local_settings.py db.sqlite3 +db.sqlite3-journal # Flask stuff: instance/ @@ -64,7 +69,9 @@ instance/ .scrapy # Sphinx documentation +docs/html/ docs/_build/ +docs/source/_build/ # PyBuilder target/ @@ -72,11 +79,26 @@ target/ # Jupyter Notebook .ipynb_checkpoints +# IPython +profile_default/ +ipython_config.py + # pyenv .python-version -# celery beat schedule file +# pipenv +# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. +# However, in case of collaboration, if having platform-specific dependencies or dependencies +# having no cross-platform support, pipenv may install dependencies that don't work, or not +# install all needed dependencies. +#Pipfile.lock + +# PEP 582; used by e.g. github.com/David-OConnor/pyflow +__pypackages__/ + +# Celery stuff celerybeat-schedule +celerybeat.pid # SageMath parsed files *.sage.py @@ -102,6 +124,11 @@ venv.bak/ # mypy .mypy_cache/ +.dmypy.json +dmypy.json + +# Pyre type checker +.pyre/ # conda build results conda_build @@ -111,4 +138,10 @@ conda_packages *.out *.log *.aux -*.toc \ No newline at end of file +*.toc + +# Editors +.vscode/ + +# dynamically generated docs +docs/source/component_docs.rst \ No newline at end of file diff --git a/docs/requirements.txt b/docs/requirements.txt deleted file mode 100644 index 37a69c4..0000000 --- a/docs/requirements.txt +++ /dev/null @@ -1 +0,0 @@ -PyQt5 \ No newline at end of file diff --git a/docs/source/_static/custom.css b/docs/source/_static/custom.css new file mode 100644 index 0000000..ad5c1a8 --- /dev/null +++ b/docs/source/_static/custom.css @@ -0,0 +1,59 @@ +/* Add space between collapsible details HTML tags */ +details { + margin-bottom: 1em; +} + +/* Darker pygment highlighing of console input/output */ +.highlight .go { + color: #404040; +} + +/* White captions in sidebar */ +.wy-nav-side p.caption { + color: #f5f5f5; +} + +/* labscript blue, alpha = 83% */ +.wy-side-nav-search { + background: #2946bbd3; +} + +.wy-nav-top { + background: #2946bbd3; +} + +/* labscript green, alpha = 75% */ +.rst-content .note .admonition-title { + background: #00804fbf; +} + +/* labscript green, alpha = 25% */ +.rst-content .note { + background: #00804f3f; +} + +/* labscript red, alpha = 75% */ +.rst-content .warning .admonition-title { + background: #bc294cbf +} + +/* labscript red, alpha = 25% */ +.rst-content .warning { + background: #bc294c3b; +} + +/* Elevation +* +* Style box-shadows using Material Design's idea of elevation. These particular numbers are taken from here: +* +* https://github.com/material-components/material-components-web +* https://material-components-web.appspot.com/elevation.html +*/ + +.rst-content img.screenshot { + border: none; + /* MD Elevation 8 */ + box-shadow: 0px 5px 5px -3px rgba(0, 0, 0, 0.2), + 0px 8px 10px 1px rgba(0, 0, 0, 0.14), 0px 3px 14px 2px rgba(0, 0, 0, 0.12); + margin-bottom: 24px; +} diff --git a/docs/source/api_reference/index.rst b/docs/source/api_reference/index.rst index 2fe6df4..dcfda06 100644 --- a/docs/source/api_reference/index.rst +++ b/docs/source/api_reference/index.rst @@ -1,6 +1,6 @@ API Reference -======== +============= .. toctree:: :maxdepth: 2 diff --git a/docs/source/conf.py b/docs/source/conf.py index 7051cd5..028f19b 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -1,300 +1,200 @@ -# -*- coding: utf-8 -*- +# Configuration file for the Sphinx documentation builder. # -# labscript documentation build configuration file, created by -# sphinx-quickstart on Mon Dec 08 14:26:41 2014. -# -# This file is execfile()d with the current directory set to its -# containing dir. -# -# Note that not all possible configuration values are present in this -# autogenerated file. -# -# All configuration values have a default; values that are commented out -# serve to show the default. +# 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 -import sys -import os +# -- 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. -#sys.path.insert(0, os.path.abspath('.')) +# +import os +from m2r import MdInclude +from recommonmark.transform import AutoStructify -# -- General configuration ------------------------------------------------ +# -- Project information (unique to each project) ------------------------------------- -# If your documentation needs a minimal Sphinx version, state it here. -#needs_sphinx = '1.0' +project = "labscript" +copyright = "2020, labscript suite" +author = "labscript suite contributors" + +from labscript import __version__ as version # noqa: E402 + +release = version + +# HTML icons +html_logo = "img/{}.svg".format(project) +html_favicon = "img/{}.ico".format(project) + +# -- General configuration (should be identical across all projects) ------------------ # Add any Sphinx extension module names here, as strings. They can be # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom # ones. extensions = [ - 'sphinx.ext.autodoc', - 'sphinx.ext.intersphinx', - 'sphinx.ext.todo', - 'sphinx.ext.coverage', - 'sphinx.ext.mathjax', - 'sphinx.ext.ifconfig', - 'sphinx.ext.viewcode', - # 'sphinx.ext.linkcode', + "sphinx.ext.autodoc", + "sphinx.ext.autosectionlabel", + "sphinx.ext.intersphinx", + "sphinx.ext.napoleon", + "sphinx.ext.todo", + "sphinx.ext.viewcode", + "sphinx_rtd_theme", + "recommonmark", ] -# def linkcode_resolve(domain, info): - # if domain != 'py': - # return None - # if not info['module']: - # return None - # elif info['module'] == 'labscript': - # return "https://bitbucket.org/labscript_suite/labscript/src/tip/labscript.py?at=default" - # else: - # return None +autodoc_typehints = 'description' -# Add any paths that contain templates here, relative to this directory. -templates_path = ['labscript_templates'] - -# The suffix of source filenames. -source_suffix = '.rst' - -# The encoding of source files. -#source_encoding = 'utf-8-sig' - -# The master toctree document. -master_doc = 'index' - -# General information about the project. -project = u'labscript' -copyright = u'2014, Monash University' - -# The version info for the project you're documenting, acts as replacement for -# |version| and |release|, also used in various other places throughout the -# built documents. -# -# The short X.Y version. -version = '2.0' -# The full version, including alpha/beta/rc tags. -release = '2.0.1' - -# The language for content autogenerated by Sphinx. Refer to documentation -# for a list of supported languages. -# -# This is also used if you do content translation via gettext catalogs. -# Usually you set "language" from the command line for these cases. -language = None +# Prefix each autosectionlabel with the name of the document it is in and a colon +autosectionlabel_prefix_document = True -# There are two options for replacing |today|: either, you set today to some -# non-false value, then it is used: -#today = '' -# Else, today_fmt is used as the format for a strftime call. -#today_fmt = '%B %d, %Y' +# 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 = [] -# The reST default role (used for this markup: `text`) to use for all -# documents. -#default_role = None - -# If true, '()' will be appended to :func: etc. cross-reference text. -#add_function_parentheses = True - -# If true, the current module name will be prepended to all description -# unit titles (such as .. function::). -#add_module_names = True +# The suffix(es) of source filenames. +source_suffix = ['.rst', '.md'] -# If true, sectionauthor and moduleauthor directives will be shown in the -# output. They are ignored by default. -#show_authors = False - -# The name of the Pygments (syntax highlighting) style to use. -pygments_style = 'sphinx' -highlight_language = 'python' -# A list of ignored prefixes for module index sorting. -#modindex_common_prefix = [] - -# If true, keep warnings as "system message" paragraphs in the built documents. -#keep_warnings = False +# The master toctree document. +master_doc = 'index' +# intersphinx allows us to link directly to other repos sphinxdocs. +# https://www.sphinx-doc.org/en/master/usage/extensions/intersphinx.html +intersphinx_mapping = { + 'python': ('https://docs.python.org/3/', None), + 'numpy': ('https://numpy.org/doc/stable/', None), + 'scipy': ('https://docs.scipy.org/doc/scipy/reference/', None), + 'pandas': ('https://pandas.pydata.org/pandas-docs/stable/', None), + 'qtutils': ('https://qtutils.readthedocs.io/en/stable/', None), + 'pyqtgraph': ( + 'https://pyqtgraph.readthedocs.io/en/latest/', + None, + ), # change to stable once v0.11 is published + 'matplotlib': ('https://matplotlib.org/', None), + 'h5py': ('http://docs.h5py.org/en/stable/', None), + 'pydaqmx': ('https://pythonhosted.org/PyDAQmx/', None), + 'qt': ( + '', + 'pyqt5-modified-objects.inv', + ) # from https://github.com/MSLNZ/msl-qt/blob/master/docs/create_pyqt_objects.py + # under MIT License + # TODO + # desktop-app + # spinapi/pynivision/etc +} -# -- Options for HTML output ---------------------------------------------- +# list of all labscript suite components that have docs +labscript_suite_programs = [ + 'labscript', + 'runmanager', + 'runviewer', + 'blacs', + 'lyse', + 'labscript-utils', + 'labscript-devices', +] +# remove this current repo from the list +if project in labscript_suite_programs: + labscript_suite_programs.remove(project) + +# whether to use stable or latest version +labscript_suite_doc_version = os.environ.get('READTHEDOCS_VERSION', 'latest') +if labscript_suite_doc_version not in ['stable', 'latest']: + labscript_suite_doc_version = 'stable' + +# add intersphinx references for each component +for ls_prog in labscript_suite_programs: + intersphinx_mapping[ls_prog] = ( + 'https://docs.labscript_suite.org/projects/{}/en/{}/'.format( + ls_prog, labscript_suite_doc_version + ), + None, + ) + +# add intersphinx reference for the metapackage +if project != "the labscript suite": + intersphinx_mapping['labscript-suite'] = ( + 'https://docs.labscript_suite.org/en/{}/'.format(labscript_suite_doc_version), + None, + ) + +# Make `some code` equivalent to :code:`some code` +default_role = 'code' + +# hide todo notes if on readthedocs and not building the latest +if os.environ.get('READTHEDOCS') and ( + os.environ.get('READTHEDOCS_VERSION') != 'latest' + or ( + os.environ.get('READTHEDOCS_PROJECT') == project + or os.environ.get('READTHEDOCS_PROJECT') == 'labscriptsuite' + ) +): + todo_include_todos = False +else: + todo_include_todos = True + +# -- 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 = 'default' - -# 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 -# documentation. -#html_theme_options = {} - -# Add any paths that contain custom themes here, relative to this directory. -#html_theme_path = [] - -# The name for this set of Sphinx documents. If None, it defaults to -# " v documentation". -#html_title = None - -# A shorter title for the navigation bar. Default is the same as html_title. -#html_short_title = None - -# The name of an image file (relative to this directory) to place at the top -# of the sidebar. -#html_logo = None - -# The name of an image file (within the static path) to use as favicon of the -# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 -# pixels large. -#html_favicon = None +# +# html_theme = 'alabaster' +html_theme = "sphinx_rtd_theme" +html_title = "labscript suite | {project}".format( + project=project + if project != "labscript-suite" + else "experiment control and automation" +) +html_short_title = "labscript suite" # 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 = ['labscript_static'] - -# Add any extra paths that contain custom files (such as robots.txt or -# .htaccess) here, relative to this directory. These files are copied -# directly to the root of the documentation. -#html_extra_path = [] - -# If not '', a 'Last updated on:' timestamp is inserted at every page bottom, -# using the given strftime format. -#html_last_updated_fmt = '%b %d, %Y' - -# If true, SmartyPants will be used to convert quotes and dashes to -# typographically correct entities. -#html_use_smartypants = True - -# Custom sidebar templates, maps document names to template names. -#html_sidebars = {} - -# Additional templates that should be rendered to pages, maps page names to -# template names. -#html_additional_pages = {} - -# If false, no module index is generated. -#html_domain_indices = True - -# If false, no index is generated. -#html_use_index = True - -# If true, the index is split into individual pages for each letter. -#html_split_index = False - -# If true, links to the reST sources are added to the pages. -#html_show_sourcelink = True - -# If true, "Created using Sphinx" is shown in the HTML footer. Default is True. -#html_show_sphinx = True - -# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True. -#html_show_copyright = True - -# If true, an OpenSearch description file will be output, and all pages will -# contain a tag referring to it. The value of this option must be the -# base URL from which the finished HTML is served. -#html_use_opensearch = '' - -# This is the file name suffix for HTML files (e.g. ".xhtml"). -#html_file_suffix = None - -# Language to be used for generating the HTML full-text search index. -# Sphinx supports the following languages: -# 'da', 'de', 'en', 'es', 'fi', 'fr', 'hu', 'it', 'ja' -# 'nl', 'no', 'pt', 'ro', 'ru', 'sv', 'tr' -#html_search_language = 'en' - -# A dictionary with options for the search language support, empty by default. -# Now only 'ja' uses this config value -#html_search_options = {'type': 'default'} - -# The name of a javascript file (relative to the configuration directory) that -# implements a search results scorer. If empty, the default will be used. -#html_search_scorer = 'scorer.js' - -# Output file base name for HTML help builder. -htmlhelp_basename = 'labscriptdoc' - -# -- Options for LaTeX output --------------------------------------------- - -latex_elements = { -# The paper size ('letterpaper' or 'a4paper'). -#'papersize': 'letterpaper', - -# The font size ('10pt', '11pt' or '12pt'). -#'pointsize': '10pt', - -# Additional stuff for the LaTeX preamble. -#'preamble': '', - -# Latex figure (float) alignment -#'figure_align': 'htbp', -} - -# Grouping the document tree into LaTeX files. List of tuples -# (source start file, target name, title, -# author, documentclass [howto, manual, or own class]). -latex_documents = [ - ('index', 'labscript.tex', u'labscript Documentation', - u'Monash University', 'manual'), -] - -# The name of an image file (relative to this directory) to place at the top of -# the title page. -#latex_logo = None - -# For "manual" documents, if this is true, then toplevel headings are parts, -# not chapters. -#latex_use_parts = False - -# If true, show page references after internal links. -#latex_show_pagerefs = False - -# If true, show URL addresses after external links. -#latex_show_urls = False - -# Documents to append as an appendix to all manuals. -#latex_appendices = [] - -# If false, no module index is generated. -#latex_domain_indices = True - - -# -- Options for manual page output --------------------------------------- - -# One entry per manual page. List of tuples -# (source start file, name, description, authors, manual section). -man_pages = [ - ('index', 'labscript', u'labscript Documentation', - [u'Monash University'], 1) -] - -# If true, show URL addresses after external links. -#man_show_urls = False - - -# -- Options for Texinfo output ------------------------------------------- - -# Grouping the document tree into Texinfo files. List of tuples -# (source start file, target name, title, author, -# dir menu entry, description, category) -texinfo_documents = [ - ('index', 'labscript', u'labscript Documentation', - u'Monash University', 'labscript', 'One line description of project.', - 'Miscellaneous'), -] - -# Documents to append as an appendix to all manuals. -#texinfo_appendices = [] - -# If false, no module index is generated. -#texinfo_domain_indices = True - -# How to display URL addresses: 'footnote', 'no', or 'inline'. -#texinfo_show_urls = 'footnote' - -# If true, do not generate a @detailmenu in the "Top" node's menu. -#texinfo_no_detailmenu = False - - -# Example configuration for intersphinx: refer to the Python standard library. -intersphinx_mapping = {'http://docs.python.org/': None} +html_static_path = ['_static'] + +# Customize the html_theme +html_theme_options = {'navigation_depth': 3} + + +# Use m2r only for mdinclude and recommonmark for everything else +# https://github.com/readthedocs/recommonmark/issues/191#issuecomment-622369992 +def setup(app): + config = { + # 'url_resolver': lambda url: github_doc_root + url, + 'auto_toc_tree_section': 'Contents', + 'enable_eval_rst': True, + } + app.add_config_value('recommonmark_config', config, True) + app.add_transform(AutoStructify) + + # from m2r to make `mdinclude` work + app.add_config_value('no_underscore_emphasis', False, 'env') + app.add_config_value('m2r_parse_relative_links', False, 'env') + app.add_config_value('m2r_anonymous_references', False, 'env') + app.add_config_value('m2r_disable_inline_math', False, 'env') + app.add_directive('mdinclude', MdInclude) + app.add_stylesheet('custom.css') + + with open( + os.path.join(os.path.dirname(os.path.realpath(__file__)), 'component_docs.rst'), + 'w', + ) as f: + f.write("labscript suite components\n") + f.write("==========================\n") + f.write(" \n") + f.write(".. toctree::\n") + f.write(" :maxdepth: 2\n") + f.write(" \n") + if project != "the labscript suite": + f.write( + " labscript suite (metapackage)<{}>\n".format( + intersphinx_mapping['labscript-suite'][0] + ) + ) + for ls_prog in labscript_suite_programs: + f.write(" {} <{}>\n".format(ls_prog, intersphinx_mapping[ls_prog][0])) diff --git a/docs/source/img/labscript.ico b/docs/source/img/labscript.ico new file mode 100644 index 0000000000000000000000000000000000000000..28288fc88c1d3c2808ff74beee2b3e5fed11249d GIT binary patch literal 98716 zcmeHQ2V73y8^68nv@$NCbC0>ib7>&B_vTvBvDdn zYux`i<@CQDZ*JH7_VbhXem{a z7YY%CALwh{x|Ws|BZv}70U%LJ-)&0}BCUX?N-cc~=soHyKDkEGoqE7ZVf+6BA;+6cc292BjPnl3%#W0nFj& z+MEi6!yLn0OA-W_A-`{vB8ZlvES8;^px}KlzG^TKwlxiZUQ%R0Ic`6z)lrzzg_EAf{*)e#vPvr@E9@0a^eqo!8yTn4uEyT63!j! ze3B9qCAawb@p1o;;f~J(|IM38h!qt(h$X;uVq?|;c&-QJ>mBbEq@~Eyr%v&)|Bqvj z=EA9yCrOAIHU|m;w(z##&o&YKJRi;_KK6g!H4K~s_&NZu3jp|F8gSmkSgbYJoZ+we zf5<+M_I+yY=j)5F0VJ3Mt2m(#@9P2V>)q3X=Xz9o{Pv%>4sbXpEaG&ZP+X9;jk@nE zwp1V!pFij0{|E2?aDRo@YWTGwe1=3_1HiMSR`|XTukZQ$`=7VJbHdEm#|J+S6jPrW zf$KwfU%yU9RjC92-t8a0-&5xSyieCzxnmu^5Nql^0q`905fy)UPnW9CZ~yu00K8XB z#TY(2hQ|O2f@ll+>z?1k=L(PG;`sPCqx~Q5zwj9id`?H11J&Q(+p(hbks3pW@Ud@Z z*rW9uJ~yOd4ekj}{{AjUT|az=i{$zBpTF)?F@(>KsrY|?U+)UFFW}%oKK{*g|A+4n zP_YK@YK8(jmD(2-b%T$8GsPdiLqf$GyepIp=v-$*f49~Yo@0;Z16&6<#muDdXXE=7`#9b>&17s)_D{z@)PVan zAK{JHH^vR-8vmb-?^o>Oc;ocnhChxOuW6?F#O3M6gUi#=INmr-r;qdh^!=YMzufZi zd@-fz{4=$OHIUbhwtw=&D7qb z#2AuVnCi#HrjgY0Z|ifLUvBm3;^nn{9B-Va8&7lNbDLjo_384-Yx_9fI88U6=EmnX zz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Bw z6gR3-KVC1glOjV#)6ai+e*fuK1g>6pf9MCs_YS)F==iwZ#>%6(L0$9SJG?K#X`@^J z>CWGqnvai}&L5PAv3`#q#-0M(so>ivf6Mj?z5gl1dI{ctz5?S9I(6!A37Q~&>4*yf&yX;UWG#1CS(MZbTLkq{@}q@^|Y&}(7@zfFem*Zls002^o@ zg8RVK$&;FW{4hosD<}tH>~Mp>0|9gq?BC|^-)wULWBVR^A&41$r>Zswf`S%+SKUHH zxLM|4tDheUV*@c(!QcAT1daWn{{9iJ5zS#efH7E2vP8JU-#$6zkh}61UxRl zV;g`TnP%&|5Iy5zkfzK zfHgce)}9}LbEKMcrP?*}Kc17K+OY~;fn$d;P-DW|-~aor`}hCSi~bwEOnR-LXmo82 pzhwY7^xuQwzpmnM|Dg=9YsXTDPjoFUm|k0p=GWFT2xo-*{{UOUNag?l literal 0 HcmV?d00001 diff --git a/docs/source/img/labscript.svg b/docs/source/img/labscript.svg new file mode 100644 index 0000000..987cfe6 --- /dev/null +++ b/docs/source/img/labscript.svg @@ -0,0 +1,42 @@ + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + diff --git a/docs/source/index.rst b/docs/source/index.rst index e3db258..fc4e961 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -12,16 +12,14 @@ Contents .. toctree:: :maxdepth: 2 + :hidden: introduction connection_table api_reference/index + component_docs + Home Page + Source Code + BitBucket Archive -Indices and tables -================== - -* :ref:`genindex` -* :ref:`modindex` -* :ref:`search` - diff --git a/readthedocs.yaml b/readthedocs.yaml new file mode 100644 index 0000000..35084d6 --- /dev/null +++ b/readthedocs.yaml @@ -0,0 +1,27 @@ +# 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 docs/ directory with Sphinx +sphinx: + builder: dirhtml + configuration: docs/source/conf.py + fail_on_warning: false + +# Optionally build your docs in additional formats such as PDF +formats: + - pdf + - epub + +# Optionally set the version of Python and requirements required to build your docs +python: + version: 3.7 + install: + - method: pip + path: . + extra_requirements: + - docs + system_packages: true + \ No newline at end of file diff --git a/setup.cfg b/setup.cfg index 96927db..81ec730 100644 --- a/setup.cfg +++ b/setup.cfg @@ -30,3 +30,11 @@ install_requires = numpy>=1.15 scipy matplotlib + +[options.extras_require] +docs = + PyQt5 + Sphinx==3.0.1 + sphinx-rtd-theme==0.4.3 + recommonmark==0.6.0 + m2r==0.2.1 From 28dc675b4b4f6ed5a79726a7aadcbb36c8837118 Mon Sep 17 00:00:00 2001 From: philipstarkey Date: Tue, 16 Jun 2020 18:24:26 +1000 Subject: [PATCH 02/10] Removed unnecessary header and added intersphinx link --- docs/source/index.rst | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/docs/source/index.rst b/docs/source/index.rst index fc4e961..ec172b8 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -5,10 +5,8 @@ ``labscript`` documentation =========================== -``labscript``, a component of the labscript suite, is an API used to define the experiment logic of a buffered experiment shot. This documentation will outline the general device hierarchy used when defining a connection table, and the ``labscript`` classes used to command input and output. For device specific documentation, and documentation for adding support for new devices, please refer to the ``labscript_devices`` documentation. +``labscript``, a component of the labscript suite, is an API used to define the experiment logic of a buffered experiment shot. This documentation will outline the general device hierarchy used when defining a connection table, and the ``labscript`` classes used to command input and output. For device specific documentation, and documentation for adding support for new devices, please refer to the :doc:`labscript-devices ` documentation. -Contents -======== .. toctree:: :maxdepth: 2 From 234753dc673f35371f4d5d1e388aedfa5366fe1a Mon Sep 17 00:00:00 2001 From: philipstarkey Date: Thu, 18 Jun 2020 16:07:41 +1000 Subject: [PATCH 03/10] Updated as per the review in labscript-suite/labscript-suite#48 --- .gitignore | 13 +- docs/source/_static/custom.css | 4 + docs/source/conf.py | 170 ++++- docs/source/img/blacs_32nx32n.svg | 178 ++++++ ...suite-rectangular-transparent_138nx70n.svg | 579 ++++++++++++++++++ docs/source/img/labscript.svg | 42 -- docs/source/img/labscript_32nx32n.svg | 186 ++++++ docs/source/img/lyse_32nx32n.svg | 256 ++++++++ docs/source/img/runmanager_32nx32n.svg | 267 ++++++++ docs/source/img/runviewer_32nx32n.svg | 223 +++++++ docs/source/index.rst | 2 +- setup.cfg | 3 +- 12 files changed, 1844 insertions(+), 79 deletions(-) create mode 100644 docs/source/img/blacs_32nx32n.svg create mode 100644 docs/source/img/labscript-suite-rectangular-transparent_138nx70n.svg delete mode 100644 docs/source/img/labscript.svg create mode 100644 docs/source/img/labscript_32nx32n.svg create mode 100644 docs/source/img/lyse_32nx32n.svg create mode 100644 docs/source/img/runmanager_32nx32n.svg create mode 100644 docs/source/img/runviewer_32nx32n.svg diff --git a/.gitignore b/.gitignore index 140b788..bfda0d6 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,10 @@ +# This gitignore file consists of 2 parts: +# * The standard Python .gitignore rules from GitHub +# * custom ignore rules for the labscript suite. +# +# These should be kept separate so that the generic rules can be updated with a +# copy/paste without having to worry about whether we are removing custom rules + # Byte-compiled / optimized / DLL files __pycache__/ *.py[cod] @@ -130,6 +137,10 @@ dmypy.json # Pyre type checker .pyre/ +# +# Custom labscript suite .gitignore rules start below +# + # conda build results conda_build conda_packages @@ -144,4 +155,4 @@ conda_packages .vscode/ # dynamically generated docs -docs/source/component_docs.rst \ No newline at end of file +docs/source/components.rst \ No newline at end of file diff --git a/docs/source/_static/custom.css b/docs/source/_static/custom.css index ad5c1a8..d766bfa 100644 --- a/docs/source/_static/custom.css +++ b/docs/source/_static/custom.css @@ -57,3 +57,7 @@ details { 0px 8px 10px 1px rgba(0, 0, 0, 0.14), 0px 3px 14px 2px rgba(0, 0, 0, 0.12); margin-bottom: 24px; } + +img.labscript-suite-icon { + min-width: 32px; +} \ No newline at end of file diff --git a/docs/source/conf.py b/docs/source/conf.py index 028f19b..00f8dcf 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -11,6 +11,7 @@ # documentation root, use os.path.abspath to make it absolute, like shown here. # import os +from pathlib import Path from m2r import MdInclude from recommonmark.transform import AutoStructify @@ -25,8 +26,9 @@ release = version # HTML icons -html_logo = "img/{}.svg".format(project) -html_favicon = "img/{}.ico".format(project) +img_path = 'img' +html_logo = img_path + "/labscript_32nx32n.svg" +html_favicon = img_path + "/labscript.ico" # -- General configuration (should be identical across all projects) ------------------ @@ -89,18 +91,43 @@ } # list of all labscript suite components that have docs -labscript_suite_programs = [ - 'labscript', - 'runmanager', - 'runviewer', - 'blacs', - 'lyse', - 'labscript-utils', - 'labscript-devices', -] -# remove this current repo from the list -if project in labscript_suite_programs: - labscript_suite_programs.remove(project) +labscript_suite_programs = { + 'labscript': { + 'desc': 'Expressive composition of hardware-timed experiments', + 'img': img_path + '/labscript_32nx32n.svg', + 'type': 'lib', + }, + 'labscript-devices': { + 'desc': 'Plugin architecture for controlling experiment hardware', + 'img': img_path + '/labscript_32nx32n.svg', + 'type': 'lib', + }, + 'labscript-utils': { + 'desc': 'Shared modules used by the *labscript suite*', + 'img': img_path + '/labscript_32nx32n.svg', + 'type': 'lib', + }, + 'runmanager': { + 'desc': 'Graphical and remote interface to parameterized experiments', + 'img': img_path + '/runmanager_32nx32n.svg', + 'type': 'gui', + }, + 'blacs': { + 'desc': 'Graphical interface to scientific instruments and experiment supervision', + 'img': img_path + '/blacs_32nx32n.svg', + 'type': 'gui', + }, + 'lyse': { + 'desc': 'Online analysis of live experiment data', + 'img': img_path + '/lyse_32nx32n.svg', + 'type': 'gui', + }, + 'runviewer': { + 'desc': 'Visualize hardware-timed experiment instructions', + 'img': img_path + '/runviewer_32nx32n.svg', + 'type': 'gui', + }, +} # whether to use stable or latest version labscript_suite_doc_version = os.environ.get('READTHEDOCS_VERSION', 'latest') @@ -110,7 +137,7 @@ # add intersphinx references for each component for ls_prog in labscript_suite_programs: intersphinx_mapping[ls_prog] = ( - 'https://docs.labscript_suite.org/projects/{}/en/{}/'.format( + 'https://docs.labscriptsuite.org/projects/{}/en/{}/'.format( ls_prog, labscript_suite_doc_version ), None, @@ -119,7 +146,7 @@ # add intersphinx reference for the metapackage if project != "the labscript suite": intersphinx_mapping['labscript-suite'] = ( - 'https://docs.labscript_suite.org/en/{}/'.format(labscript_suite_doc_version), + 'https://docs.labscriptsuite.org/en/{}/'.format(labscript_suite_doc_version), None, ) @@ -143,7 +170,6 @@ # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. # -# html_theme = 'alabaster' html_theme = "sphinx_rtd_theme" html_title = "labscript suite | {project}".format( project=project @@ -160,6 +186,58 @@ # Customize the html_theme html_theme_options = {'navigation_depth': 3} +# Template for generating the components.rst file +# fmt:off +components_rst_template = \ +""" +{metapackage_toctree} + +*labscript suite* components +============================ + +The *labscript suite* is modular by design, and is comprised of: + +.. list-table:: Python libraries + :widths: 10 90 + :header-rows: 0 + +{lib} + +.. list-table:: Graphical applications + :widths: 10 90 + :header-rows: 0 + +{gui} + +.. toctree:: + :maxdepth: 2 + :hidden: + +{toctree_entires} + +{rst_defs} +""" + +components_rst_table_template = \ +""" * - .. image:: {img} + :target: {target} + :class: labscript-suite-icon + - |{prog}|_ --- {desc} +""" + +components_rst_link_template = \ +""".. |{prog}| replace:: **{prog}** +.. _{prog}: {target} +""" + +components_rst_metapackage_template = \ +""".. toctree:: + :maxdepth: 2 + :hidden: + + Metapackage documentation <{}> +""" +# fmt:on # Use m2r only for mdinclude and recommonmark for everything else # https://github.com/readthedocs/recommonmark/issues/191#issuecomment-622369992 @@ -180,21 +258,45 @@ def setup(app): app.add_directive('mdinclude', MdInclude) app.add_stylesheet('custom.css') - with open( - os.path.join(os.path.dirname(os.path.realpath(__file__)), 'component_docs.rst'), - 'w', - ) as f: - f.write("labscript suite components\n") - f.write("==========================\n") - f.write(" \n") - f.write(".. toctree::\n") - f.write(" :maxdepth: 2\n") - f.write(" \n") - if project != "the labscript suite": - f.write( - " labscript suite (metapackage)<{}>\n".format( - intersphinx_mapping['labscript-suite'][0] - ) + # generate the components.rst file dynamically so it points to stable/latest + # of subprojects correctly + components_rst_table = { + "lib": "", + "gui": "", + } + components_rst_link = "" + components_rst_toctree = "" + components_rst_metapackage = "" + if project != 'the labscript suite': + components_rst_metapackage = components_rst_metapackage_template.format( + intersphinx_mapping['labscript-suite'][0] + ) + metapackage_img = img_path + "/labscript-suite-rectangular-transparent_138nx70n.svg" + for ls_prog, data in labscript_suite_programs.items(): + components_rst_table[data['type']] += components_rst_table_template.format( + prog=ls_prog, + labscript_suite_doc_version=labscript_suite_doc_version, + target=intersphinx_mapping[ls_prog][0], + **data + ) + components_rst_link += components_rst_link_template.format( + prog=ls_prog, + labscript_suite_doc_version=labscript_suite_doc_version, + target=intersphinx_mapping[ls_prog][0], + ) + for ls_prog in sorted(labscript_suite_programs): + if ls_prog != project: + components_rst_toctree += " {} <{}>\n".format( + ls_prog, intersphinx_mapping[ls_prog][0] ) - for ls_prog in labscript_suite_programs: - f.write(" {} <{}>\n".format(ls_prog, intersphinx_mapping[ls_prog][0])) + + components_rst = components_rst_template.format( + toctree_entires=components_rst_toctree, + rst_defs=components_rst_link, + labscript_suite_doc_version=labscript_suite_doc_version, + metapackage_toctree=components_rst_metapackage, + **components_rst_table + ) + + with open(Path(__file__).resolve().parent / 'components.rst', 'w') as f: + f.write(components_rst) diff --git a/docs/source/img/blacs_32nx32n.svg b/docs/source/img/blacs_32nx32n.svg new file mode 100644 index 0000000..d6a2b0e --- /dev/null +++ b/docs/source/img/blacs_32nx32n.svg @@ -0,0 +1,178 @@ + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + diff --git a/docs/source/img/labscript-suite-rectangular-transparent_138nx70n.svg b/docs/source/img/labscript-suite-rectangular-transparent_138nx70n.svg new file mode 100644 index 0000000..828b77e --- /dev/null +++ b/docs/source/img/labscript-suite-rectangular-transparent_138nx70n.svg @@ -0,0 +1,579 @@ + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/source/img/labscript.svg b/docs/source/img/labscript.svg deleted file mode 100644 index 987cfe6..0000000 --- a/docs/source/img/labscript.svg +++ /dev/null @@ -1,42 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - diff --git a/docs/source/img/labscript_32nx32n.svg b/docs/source/img/labscript_32nx32n.svg new file mode 100644 index 0000000..97272af --- /dev/null +++ b/docs/source/img/labscript_32nx32n.svg @@ -0,0 +1,186 @@ + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + diff --git a/docs/source/img/lyse_32nx32n.svg b/docs/source/img/lyse_32nx32n.svg new file mode 100644 index 0000000..1ddcdcc --- /dev/null +++ b/docs/source/img/lyse_32nx32n.svg @@ -0,0 +1,256 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/source/img/runmanager_32nx32n.svg b/docs/source/img/runmanager_32nx32n.svg new file mode 100644 index 0000000..d9df689 --- /dev/null +++ b/docs/source/img/runmanager_32nx32n.svg @@ -0,0 +1,267 @@ + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/source/img/runviewer_32nx32n.svg b/docs/source/img/runviewer_32nx32n.svg new file mode 100644 index 0000000..ee5aa68 --- /dev/null +++ b/docs/source/img/runviewer_32nx32n.svg @@ -0,0 +1,223 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/source/index.rst b/docs/source/index.rst index ec172b8..7746a69 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -15,7 +15,7 @@ introduction connection_table api_reference/index - component_docs + components Home Page Source Code BitBucket Archive diff --git a/setup.cfg b/setup.cfg index 81ec730..d6d15af 100644 --- a/setup.cfg +++ b/setup.cfg @@ -30,7 +30,7 @@ install_requires = numpy>=1.15 scipy matplotlib - + [options.extras_require] docs = PyQt5 @@ -38,3 +38,4 @@ docs = sphinx-rtd-theme==0.4.3 recommonmark==0.6.0 m2r==0.2.1 + labscript_utils>=2.14.0dev0 From 1961a2cd12608d54fb375bcf4a26309d500d05eb Mon Sep 17 00:00:00 2001 From: philipstarkey Date: Thu, 18 Jun 2020 16:13:40 +1000 Subject: [PATCH 04/10] testing dependency fix --- setup.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.cfg b/setup.cfg index d6d15af..7059bcd 100644 --- a/setup.cfg +++ b/setup.cfg @@ -38,4 +38,4 @@ docs = sphinx-rtd-theme==0.4.3 recommonmark==0.6.0 m2r==0.2.1 - labscript_utils>=2.14.0dev0 + labscript_utils>=2.14.0dev0 From 42d3bc6de879a29a758584e5f7e28dc01be93eb9 Mon Sep 17 00:00:00 2001 From: philipstarkey Date: Thu, 18 Jun 2020 16:17:42 +1000 Subject: [PATCH 05/10] Updated install requirement to 3.0.0rc1+ --- setup.cfg | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/setup.cfg b/setup.cfg index 7059bcd..d37a723 100644 --- a/setup.cfg +++ b/setup.cfg @@ -26,7 +26,7 @@ packages = find: python_requires = >=3.6 install_requires = importlib_metadata - labscript_utils>=2.14.0 + labscript_utils>=3.0.0rc1 numpy>=1.15 scipy matplotlib @@ -38,4 +38,3 @@ docs = sphinx-rtd-theme==0.4.3 recommonmark==0.6.0 m2r==0.2.1 - labscript_utils>=2.14.0dev0 From 80aa5a1ae7e0d54bd6401265384afc3c9601764f Mon Sep 17 00:00:00 2001 From: philipstarkey Date: Thu, 18 Jun 2020 16:21:44 +1000 Subject: [PATCH 06/10] Restored 64 pixel logo accidentally replaced with 32 pixel logo --- docs/source/conf.py | 2 +- docs/source/img/labscript_64x64.svg | 42 +++++++++++++++++++++++++++++ 2 files changed, 43 insertions(+), 1 deletion(-) create mode 100644 docs/source/img/labscript_64x64.svg diff --git a/docs/source/conf.py b/docs/source/conf.py index 00f8dcf..c1c1564 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -27,7 +27,7 @@ # HTML icons img_path = 'img' -html_logo = img_path + "/labscript_32nx32n.svg" +html_logo = img_path + "/labscript_64x64.svg" html_favicon = img_path + "/labscript.ico" # -- General configuration (should be identical across all projects) ------------------ diff --git a/docs/source/img/labscript_64x64.svg b/docs/source/img/labscript_64x64.svg new file mode 100644 index 0000000..987cfe6 --- /dev/null +++ b/docs/source/img/labscript_64x64.svg @@ -0,0 +1,42 @@ + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + From a18a0d1ea5a018f7dfd979f70638a3442c9a4dce Mon Sep 17 00:00:00 2001 From: philipstarkey Date: Thu, 18 Jun 2020 16:39:35 +1000 Subject: [PATCH 07/10] Relocated custom sphinx git ignore rules --- .gitignore | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index bfda0d6..fb7260d 100644 --- a/.gitignore +++ b/.gitignore @@ -76,9 +76,7 @@ instance/ .scrapy # Sphinx documentation -docs/html/ docs/_build/ -docs/source/_build/ # PyBuilder target/ @@ -154,5 +152,7 @@ conda_packages # Editors .vscode/ -# dynamically generated docs +# Sphinx documentation +docs/html/ +docs/source/_build/ docs/source/components.rst \ No newline at end of file From d4474e21f254bc5fbf67ff0c41415e3430e11095 Mon Sep 17 00:00:00 2001 From: philipstarkey Date: Thu, 18 Jun 2020 16:43:10 +1000 Subject: [PATCH 08/10] Updated .gitignore with latest GitHub defaults --- .gitignore | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index fb7260d..a389d9f 100644 --- a/.gitignore +++ b/.gitignore @@ -27,7 +27,6 @@ parts/ sdist/ var/ wheels/ -pip-wheel-metadata/ share/python-wheels/ *.egg-info/ .installed.cfg @@ -57,6 +56,7 @@ coverage.xml *.py,cover .hypothesis/ .pytest_cache/ +cover/ # Translations *.mo @@ -79,6 +79,7 @@ instance/ docs/_build/ # PyBuilder +.pybuilder/ target/ # Jupyter Notebook @@ -89,6 +90,8 @@ profile_default/ ipython_config.py # pyenv +# For a library or package, you might want to ignore these files since the code is +# intended to run in multiple environments; otherwise, check them in: .python-version # pipenv @@ -135,6 +138,12 @@ dmypy.json # Pyre type checker .pyre/ +# pytype static type analyzer +.pytype/ + +# Cython debug symbols +cython_debug/ + # # Custom labscript suite .gitignore rules start below # From 7674a8ffdec2bbf81b59c42c3c7e02cf5273aac8 Mon Sep 17 00:00:00 2001 From: philipstarkey Date: Fri, 19 Jun 2020 11:19:33 +1000 Subject: [PATCH 09/10] Updated docs to use jinja template for component doc links --- docs/source/_templates/components.rst | 47 ++++++++++++ docs/source/conf.py | 103 +++----------------------- docs/source/index.rst | 14 ++++ 3 files changed, 72 insertions(+), 92 deletions(-) create mode 100644 docs/source/_templates/components.rst diff --git a/docs/source/_templates/components.rst b/docs/source/_templates/components.rst new file mode 100644 index 0000000..c3e5b16 --- /dev/null +++ b/docs/source/_templates/components.rst @@ -0,0 +1,47 @@ +{% if current_project != 'the labscript suite' %} +.. toctree:: + :maxdepth: 2 + :hidden: + + The labscript suite <{{intersphinx_mapping['labscript-suite'][0]}}> + +{% endif %} +*labscript suite* components +============================ + +The *labscript suite* is modular by design, and is comprised of: + +.. list-table:: Python libraries + :widths: 10 90 + :header-rows: 0 + + {% for prog, item in programs.items() if item.type == 'lib' %} + * - .. image:: {{item.img}} + :target: {{intersphinx_mapping['%s' | format(prog)][0]}} + :class: labscript-suite-icon + - |{{prog}}|_ --- {{item.desc}} + {% endfor %} + +.. list-table:: Graphical applications + :widths: 10 90 + :header-rows: 0 + + {% for prog, item in programs.items() if item.type == 'gui' %} + * - .. image:: {{item.img}} + :target: {{intersphinx_mapping['%s' | format(prog)][0]}} + :class: labscript-suite-icon + - |{{prog}}|_ --- {{item.desc}} + {% endfor %} + +.. toctree:: + :maxdepth: 2 + :hidden: + + {% for prog in programs|sort if prog != current_project %} + {{prog}} <{{intersphinx_mapping['%s' | format(prog)][0]}}> + {% endfor %} + +{% for prog in programs %} +.. |{{prog}}| replace:: **{{prog}}** +.. _{{prog}}: {{intersphinx_mapping['%s' | format(prog)][0]}} +{% endfor %} \ No newline at end of file diff --git a/docs/source/conf.py b/docs/source/conf.py index c1c1564..98e3412 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -14,6 +14,7 @@ from pathlib import Path from m2r import MdInclude from recommonmark.transform import AutoStructify +from jinja2 import FileSystemLoader, Environment # -- Project information (unique to each project) ------------------------------------- @@ -186,59 +187,6 @@ # Customize the html_theme html_theme_options = {'navigation_depth': 3} -# Template for generating the components.rst file -# fmt:off -components_rst_template = \ -""" -{metapackage_toctree} - -*labscript suite* components -============================ - -The *labscript suite* is modular by design, and is comprised of: - -.. list-table:: Python libraries - :widths: 10 90 - :header-rows: 0 - -{lib} - -.. list-table:: Graphical applications - :widths: 10 90 - :header-rows: 0 - -{gui} - -.. toctree:: - :maxdepth: 2 - :hidden: - -{toctree_entires} - -{rst_defs} -""" - -components_rst_table_template = \ -""" * - .. image:: {img} - :target: {target} - :class: labscript-suite-icon - - |{prog}|_ --- {desc} -""" - -components_rst_link_template = \ -""".. |{prog}| replace:: **{prog}** -.. _{prog}: {target} -""" - -components_rst_metapackage_template = \ -""".. toctree:: - :maxdepth: 2 - :hidden: - - Metapackage documentation <{}> -""" -# fmt:on - # Use m2r only for mdinclude and recommonmark for everything else # https://github.com/readthedocs/recommonmark/issues/191#issuecomment-622369992 def setup(app): @@ -260,43 +208,14 @@ def setup(app): # generate the components.rst file dynamically so it points to stable/latest # of subprojects correctly - components_rst_table = { - "lib": "", - "gui": "", - } - components_rst_link = "" - components_rst_toctree = "" - components_rst_metapackage = "" - if project != 'the labscript suite': - components_rst_metapackage = components_rst_metapackage_template.format( - intersphinx_mapping['labscript-suite'][0] - ) - metapackage_img = img_path + "/labscript-suite-rectangular-transparent_138nx70n.svg" - for ls_prog, data in labscript_suite_programs.items(): - components_rst_table[data['type']] += components_rst_table_template.format( - prog=ls_prog, - labscript_suite_doc_version=labscript_suite_doc_version, - target=intersphinx_mapping[ls_prog][0], - **data - ) - components_rst_link += components_rst_link_template.format( - prog=ls_prog, - labscript_suite_doc_version=labscript_suite_doc_version, - target=intersphinx_mapping[ls_prog][0], - ) - for ls_prog in sorted(labscript_suite_programs): - if ls_prog != project: - components_rst_toctree += " {} <{}>\n".format( - ls_prog, intersphinx_mapping[ls_prog][0] - ) - - components_rst = components_rst_template.format( - toctree_entires=components_rst_toctree, - rst_defs=components_rst_link, - labscript_suite_doc_version=labscript_suite_doc_version, - metapackage_toctree=components_rst_metapackage, - **components_rst_table - ) - + loader = FileSystemLoader(Path(__file__).resolve().parent / templates_path[0]) + env = Environment(loader=loader) + template = env.get_template('components.rst') with open(Path(__file__).resolve().parent / 'components.rst', 'w') as f: - f.write(components_rst) + f.write( + template.render( + intersphinx_mapping=intersphinx_mapping, + programs=labscript_suite_programs, + current_project=project, + ) + ) diff --git a/docs/source/index.rst b/docs/source/index.rst index 7746a69..a6ccbed 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -15,9 +15,23 @@ introduction connection_table api_reference/index + +.. toctree:: + :maxdepth: 2 + :hidden: + :caption: FURTHER DOCUMENTATION + components + +.. toctree:: + :maxdepth: 2 + :hidden: + :caption: LINKS + Home Page Source Code BitBucket Archive +.. todolist:: + From 52d3b9f72add927d77b50ac2e2dd378dbbe722af Mon Sep 17 00:00:00 2001 From: philipstarkey Date: Fri, 19 Jun 2020 16:04:04 +1000 Subject: [PATCH 10/10] Addressing latest review comments --- docs/source/_templates/components.rst | 6 +++--- docs/source/conf.py | 15 ++++++++------- docs/source/index.rst | 9 ++++++--- 3 files changed, 17 insertions(+), 13 deletions(-) diff --git a/docs/source/_templates/components.rst b/docs/source/_templates/components.rst index c3e5b16..f966939 100644 --- a/docs/source/_templates/components.rst +++ b/docs/source/_templates/components.rst @@ -3,7 +3,7 @@ :maxdepth: 2 :hidden: - The labscript suite <{{intersphinx_mapping['labscript-suite'][0]}}> + the labscript suite <{{intersphinx_mapping['labscript-suite'][0]}}> {% endif %} *labscript suite* components @@ -16,7 +16,7 @@ The *labscript suite* is modular by design, and is comprised of: :header-rows: 0 {% for prog, item in programs.items() if item.type == 'lib' %} - * - .. image:: {{item.img}} + * - .. image:: {{img_path}}/{{item.icon}} :target: {{intersphinx_mapping['%s' | format(prog)][0]}} :class: labscript-suite-icon - |{{prog}}|_ --- {{item.desc}} @@ -27,7 +27,7 @@ The *labscript suite* is modular by design, and is comprised of: :header-rows: 0 {% for prog, item in programs.items() if item.type == 'gui' %} - * - .. image:: {{item.img}} + * - .. image:: {{img_path}}/{{item.icon}} :target: {{intersphinx_mapping['%s' | format(prog)][0]}} :class: labscript-suite-icon - |{{prog}}|_ --- {{item.desc}} diff --git a/docs/source/conf.py b/docs/source/conf.py index 98e3412..f74c0b6 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -95,37 +95,37 @@ labscript_suite_programs = { 'labscript': { 'desc': 'Expressive composition of hardware-timed experiments', - 'img': img_path + '/labscript_32nx32n.svg', + 'icon': 'labscript_32nx32n.svg', 'type': 'lib', }, 'labscript-devices': { 'desc': 'Plugin architecture for controlling experiment hardware', - 'img': img_path + '/labscript_32nx32n.svg', + 'icon': 'labscript_32nx32n.svg', 'type': 'lib', }, 'labscript-utils': { 'desc': 'Shared modules used by the *labscript suite*', - 'img': img_path + '/labscript_32nx32n.svg', + 'icon': 'labscript_32nx32n.svg', 'type': 'lib', }, 'runmanager': { 'desc': 'Graphical and remote interface to parameterized experiments', - 'img': img_path + '/runmanager_32nx32n.svg', + 'icon': 'runmanager_32nx32n.svg', 'type': 'gui', }, 'blacs': { 'desc': 'Graphical interface to scientific instruments and experiment supervision', - 'img': img_path + '/blacs_32nx32n.svg', + 'icon': 'blacs_32nx32n.svg', 'type': 'gui', }, 'lyse': { 'desc': 'Online analysis of live experiment data', - 'img': img_path + '/lyse_32nx32n.svg', + 'icon': 'lyse_32nx32n.svg', 'type': 'gui', }, 'runviewer': { 'desc': 'Visualize hardware-timed experiment instructions', - 'img': img_path + '/runviewer_32nx32n.svg', + 'icon': 'runviewer_32nx32n.svg', 'type': 'gui', }, } @@ -217,5 +217,6 @@ def setup(app): intersphinx_mapping=intersphinx_mapping, programs=labscript_suite_programs, current_project=project, + img_path=img_path ) ) diff --git a/docs/source/index.rst b/docs/source/index.rst index a6ccbed..6921780 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -3,14 +3,15 @@ You can adapt this file completely to your liking, but it should at least contain the root `toctree` directive. -``labscript`` documentation -=========================== -``labscript``, a component of the labscript suite, is an API used to define the experiment logic of a buffered experiment shot. This documentation will outline the general device hierarchy used when defining a connection table, and the ``labscript`` classes used to command input and output. For device specific documentation, and documentation for adding support for new devices, please refer to the :doc:`labscript-devices ` documentation. +labscript +========= +**labscript**, a component of the labscript suite, is an API used to define the experiment logic of a buffered experiment shot. This documentation will outline the general device hierarchy used when defining a connection table, and the **labscript** classes used to command input and output. For device specific documentation, and documentation for adding support for new devices, please refer to the :doc:`labscript-devices ` documentation. .. toctree:: :maxdepth: 2 :hidden: + :caption: DOCUMENTATION introduction connection_table @@ -30,6 +31,8 @@ Home Page Source Code + PyPI + Anaconda Cloud BitBucket Archive .. todolist::