Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 25 additions & 25 deletions docs/source/_templates/autosummary-module.rst
Original file line number Diff line number Diff line change
@@ -1,23 +1,9 @@
{{ fullname | escape | underline}}

{% block submodules %}
{% if modules %}
.. rubric:: {{ _('Sub-Modules') }}
.. autosummary::
:toctree:
:template: autosummary-module.rst
:recursive:

{% for item in modules %}
{{ item }}
{%- endfor %}
{% endif %}
{% endblock %}

.. automodule:: {{ fullname }}

{% block attributes %}
{% if attributes %}
{%- if attributes %}
.. rubric:: {{ _('Module Attributes') }}

.. autosummary::
Expand All @@ -26,10 +12,10 @@
{{ item }}
{%- endfor %}
{% endif %}
{% endblock %}
{%- endblock %}

{% block functions %}
{% if functions %}
{%- block functions %}
{%- if functions %}
.. rubric:: {{ _('Functions') }}

.. autosummary::
Expand All @@ -38,10 +24,10 @@
{{ item }}
{%- endfor %}
{% endif %}
{% endblock %}
{%- endblock %}

{% block classes %}
{% if classes %}
{%- block classes %}
{%- if classes %}
.. rubric:: {{ _('Classes') }}

.. autosummary::
Expand All @@ -51,10 +37,10 @@
{{ item }}
{%- endfor %}
{% endif %}
{% endblock %}
{%- endblock %}

{% block exceptions %}
{% if exceptions %}
{%- block exceptions %}
{%- if exceptions %}
.. rubric:: {{ _('Exceptions') }}

.. autosummary::
Expand All @@ -63,4 +49,18 @@
{{ item }}
{%- endfor %}
{% endif %}
{% endblock %}
{%- endblock %}

{%- block modules %}
{%- if modules %}
.. rubric:: Modules

.. autosummary::
:toctree:
:template: autosummary-module.rst
:recursive:
{% for item in modules %}
{{ item }}
{%- endfor %}
{% endif %}
{%- endblock %}
1 change: 1 addition & 0 deletions docs/source/api/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ API Reference

.. autosummary::
:toctree: _autosummary
:template: autosummary-module.rst
:recursive:

labscript_utils
Expand Down
15 changes: 12 additions & 3 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,20 +163,29 @@
labscript_suite_doc_version = 'latest'

# add intersphinx references for each component
labscript_intersphinx_mapping = {}
for ls_prog in labscript_suite_programs:
intersphinx_mapping[ls_prog] = (
val = (
'https://docs.labscriptsuite.org/projects/{}/en/{}/'.format(
ls_prog, labscript_suite_doc_version
),
None,
)
labscript_intersphinx_mapping[ls_prog] = val
if ls_prog != project:
# don't add intersphinx for current project
# if internal links break, they can silently be filled by links to existing online docs
# this is confusing and difficult to detect
intersphinx_mapping[ls_prog] = val

# add intersphinx reference for the metapackage
if project != "the labscript suite":
intersphinx_mapping['labscript-suite'] = (
val = (
'https://docs.labscriptsuite.org/en/{}/'.format(labscript_suite_doc_version),
None,
)
intersphinx_mapping['labscript-suite'] = val
labscript_intersphinx_mapping['labscript-suite'] = val

# Make `some code` equivalent to :code:`some code`
default_role = 'code'
Expand Down Expand Up @@ -226,7 +235,7 @@ def setup(app):
with open(Path(__file__).resolve().parent / 'components.rst', 'w') as f:
f.write(
template.render(
intersphinx_mapping=intersphinx_mapping,
intersphinx_mapping=labscript_intersphinx_mapping,
programs=labscript_suite_programs,
current_project=project,
img_path=img_path
Expand Down
4 changes: 3 additions & 1 deletion docs/source/labconfig.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ The name of this file must be the host computer's system name.
So if my system's name was `heisenberg`, the labconfig file name would be `heisenberg.ini`.
This file should be located in the `labscript-suite` directory in the user space, in the `labconfig` subdirectory.

When :doc:`installing the **labscript-suite** for the first time <labscript-suite:installation/index>`, running the `labscript-profile-create` command will automatically generate the `labscript-suite` user space directory in the correct place and generate a `labconfig.ini` file for use on your system.
When :doc:`installing the **labscript-suite** for the first time <labscript-suite:installation/index>`,
running the `labscript-profile-create` command will automatically generate the `labscript-suite` user space directory in the correct place
and generate a `labconfig.ini` file for use on your system.
By editing the `ini` file named after your system, you can update the configuration settings of your **labscript-suite** installation.

The Default *labconfig.ini*
Expand Down