Skip to content

Commit 9570a18

Browse files
committed
Merge remote-tracking branch 'origin/main' into 20_user_facing_dae
2 parents 39c4bc5 + f358372 commit 9570a18

28 files changed

+432
-193
lines changed
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
name: sphinx
2+
3+
on: [push, pull_request, workflow_call]
4+
5+
jobs:
6+
call_sphinx_builder:
7+
uses: ISISComputingGroup/reusable-workflows/.github/workflows/sphinx.yml@main
8+
secrets: inherit

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,3 +158,7 @@ cython_debug/
158158
.vscode/
159159

160160
coverage_html_report/
161+
162+
# Sphinx generated
163+
doc/generated/*
164+
_build/

doc/_api.rst

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
:orphan:
2+
3+
API
4+
===
5+
6+
.. autosummary::
7+
:toctree: generated
8+
:template: custom-module-template.rst
9+
:recursive:
10+
11+
ibex_bluesky_core
12+
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
2+
3+
{{ ('``' + fullname + '``') | underline }}
4+
5+
{%- set filtered_members = [] %}
6+
{%- for item in members %}
7+
{%- if item in functions + classes + exceptions + attributes %}
8+
{% set _ = filtered_members.append(item) %}
9+
{%- endif %}
10+
{%- endfor %}
11+
12+
.. automodule:: {{ fullname }}
13+
:members:
14+
:show-inheritance:
15+
16+
{% block modules %}
17+
{% if modules %}
18+
.. rubric:: Submodules
19+
20+
.. autosummary::
21+
:toctree:
22+
:template: custom-module-template.rst
23+
:recursive:
24+
{% for item in modules %}
25+
{{ item }}
26+
{%- endfor %}
27+
{% endif %}
28+
{% endblock %}
29+
30+
{% block members %}
31+
{% if filtered_members %}
32+
.. rubric:: Members
33+
34+
.. autosummary::
35+
:nosignatures:
36+
{% for item in filtered_members %}
37+
{{ item }}
38+
{%- endfor %}
39+
{% endif %}
40+
{% endblock %}

doc/architectural_decisions/001-repo-structure.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
# Repository structure
22

3-
### Status
3+
## Status
44

55
Current
66

7-
### Context
7+
## Context
88

99
We need to decide how to structure our bluesky and scans code, in
1010
terms of technical repository layout.
1111

12-
### Present
12+
## Present
1313

1414
Tom & Kathryn
1515

16-
### Decision
16+
## Decision
1717

1818
We will create a `core` repository, and publish it on PyPI.
1919

@@ -31,7 +31,7 @@ depend on this repository.
3131
This `core` repository is analogous to a similar repo, `dodal`, being used at
3232
Diamond.
3333

34-
### Consequences
34+
## Consequences
3535

3636
- We will have some bluesky code across multiple repositories.
3737
- Other groups should be able to:

doc/architectural_decisions/002-use-ophyd-async.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
# Use `ophyd-async`
22

3-
### Status
3+
## Status
44

55
Current
66

7-
### Context
7+
## Context
88

99
We need to decide whether to use `ophyd` or `ophyd-async` as our bluesky
1010
device abstraction layer.
@@ -20,15 +20,15 @@ The *primary* differences are:
2020
- `ophyd-async` has better support for non-channel-access backends (notably, PVA)
2121
- Reduction in boilerplate
2222

23-
### Present
23+
## Present
2424

2525
Tom & Kathryn
2626

27-
### Decision
27+
## Decision
2828

2929
We will use `ophyd-async`.
3030

31-
### Consequences
31+
## Consequences
3232

3333
- `ophyd-async` will allow us to use PVAccess easily.
3434
- `ophyd-async` will allow us to do fly scanning, if required in future, more easily than `ophyd`

doc/architectural_decisions/003-run-in-process.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,26 @@
11
# Run in-process
22

3-
### Status
3+
## Status
44

55
Current
66

7-
### Context
7+
## Context
88

99
`bluesky` code can be run in several ways:
1010
- By the user at an interactive shell, directly calling the run engine in-process.
1111
- By a central worker process, to which the user would "submit" plans to run.
1212
- See DLS's `blueapi` for an example of a REST API for submitting plans to the run engine.
1313

14-
### Present
14+
## Present
1515

1616
Tom & Kathryn
1717

18-
### Decision
18+
## Decision
1919

2020
We will run bluesky plans in-process for now, while not _excluding_ the possibility
2121
that they could be run behind a worker process at some point in future.
2222

23-
### Consequences
23+
## Consequences
2424

2525
- We will not, at least initially, have to write or use an extra worker process.
2626
- Users will have the ability to call the run engine directly
File renamed without changes.
File renamed without changes.

doc/conf.py

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# Configuration file for the Sphinx documentation builder.
2+
#
3+
# For the full list of built-in configuration values, see the documentation:
4+
# https://www.sphinx-doc.org/en/master/usage/configuration.html
5+
6+
# -- Project information -----------------------------------------------------
7+
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information
8+
9+
import os
10+
import sys
11+
12+
sys.path.insert(0, os.path.abspath("../src"))
13+
14+
project = "ibex_bluesky_core"
15+
copyright = ""
16+
author = "ISIS Experiment Controls"
17+
release = "0.1"
18+
19+
20+
# -- General configuration ---------------------------------------------------
21+
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
22+
23+
extensions = [
24+
"myst_parser",
25+
"sphinx.ext.autodoc",
26+
# and making summary tables at the top of API docs
27+
"sphinx.ext.autosummary",
28+
# This can parse google style docstrings
29+
"sphinx.ext.napoleon",
30+
# For linking to external sphinx documentation
31+
"sphinx.ext.intersphinx",
32+
# Add links to source code in API docs
33+
"sphinx.ext.viewcode",
34+
]
35+
napoleon_google_docstring = True
36+
napoleon_numpy_docstring = False
37+
38+
templates_path = ["_templates"]
39+
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]
40+
41+
42+
# -- Options for HTML output -------------------------------------------------
43+
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output
44+
45+
html_theme = "sphinx_rtd_theme"
46+
html_static_path = ["_static"]
47+
48+
autoclass_content = "both"

0 commit comments

Comments
 (0)