Skip to content

Commit 51429a3

Browse files
author
Peter Braun
committed
added documantation
1 parent b432702 commit 51429a3

File tree

13 files changed

+2078
-740
lines changed

13 files changed

+2078
-740
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,5 @@ dist
99
pid
1010
logs
1111
.secop-ophyd
12+
13+
_api

README.md

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,24 @@
22
[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)
33
[![PyPI](https://img.shields.io/pypi/v/secop-ophyd.svg)](https://pypi.org/project/secop-ophyd)
44

5-
# secop-ophyd
6-
7-
This package allows seamless itegration of hardware that provides a SECoP interface into bluesky.
5+
# SECoP-Ophyd
86

7+
**SECoP-Ophyd** enables seamless integration of SECoP (Sample Environment Communication Protocol) devices into the Bluesky experiment orchestration framework.
98

109
![secop-ophyd-arch](https://github.com/user-attachments/assets/cd82cfbe-68dc-4b3c-b872-5b1b7c7db82a)
1110

11+
## Documentation
1212

13+
| Resource | Link |
14+
| :-------------: | :----------------------------------------------------------: |
15+
| Documentation | <https://sampleenvironment.github.io/secop-ophyd/> |
16+
| Demo Repository | <https://codebase.helmholtz.cloud/rock-it-secop/secop-sim> |
17+
| PyPI | <https://pypi.org/project/secop-ophyd> |
18+
| Issue Tracker | <https://github.com/SampleEnvironment/secop-ophyd/issues> |
1319

14-
## Getting Started
15-
A demo repository that shows the full functionality of the integration is provided here:
16-
17-
[secop-sim](https://codebase.helmholtz.cloud/rock-it-secop/secop-sim)
18-
19-
20-
## Further information:
20+
## Further Information
2121

22-
#### SECoP (https://github.com/SampleEnvironment/SECoP)
23-
#### Frappy (https://github.com/SampleEnvironment/frappy)
22+
- [SECoP Specification](https://sampleenvironment.github.io/secop-site/)
23+
- [Frappy (Framework for implementing SEC nodes)](https://github.com/SampleEnvironment/frappy)
24+
- [Ophyd-async Documentation](https://blueskyproject.io/ophyd-async/main/index.html)
25+
- [Bluesky Project](https://blueskyproject.io/)

docs/images/favicon.ico

15 KB
Binary file not shown.

docs/images/logo.svg

Lines changed: 111 additions & 0 deletions
Loading

docs/source/_static/custom.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
/* Allow a wider screen so we can fit 88 chars of source code on it */
2+
.bd-page-width {
3+
max-width: 100rem; /* default is 88rem */
4+
}

docs/source/conf.py

Lines changed: 105 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -3,64 +3,142 @@
33
# For the full list of built-in configuration values, see the documentation:
44
# https://www.sphinx-doc.org/en/master/usage/configuration.html
55

6+
import secop_ophyd
7+
68
# -- Project information -----------------------------------------------------
79
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information
810

11+
project = "SECoP-Ophyd"
12+
copyright = "2024, Peter Braun"
13+
author = "Peter Braun"
14+
release = secop_ophyd.__version__
15+
16+
# Clean up version for display - extract just X.Y.Z from version strings like "0.13.9.dev0+gb43270d29.d20251029"
17+
if "+" in secop_ophyd.__version__:
18+
# Development version - use short version or "dev"
19+
release = secop_ophyd.__version__.split("+")[0]
20+
else:
21+
release = secop_ophyd.__version__
22+
23+
version = secop_ophyd.__version__
24+
25+
language = "en"
26+
27+
source_suffix = ".rst"
28+
master_doc = "index"
29+
930

1031
# -- General configuration ---------------------------------------------------
1132
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
1233

1334
extensions = [
14-
"sphinx.ext.autodoc",
15-
"sphinx.ext.autosummary",
16-
"sphinx.ext.githubpages",
35+
# for diagrams
36+
"sphinxcontrib.mermaid",
37+
# Use this for generating API docs
38+
"autodoc2",
39+
# For linking to external sphinx documentation
1740
"sphinx.ext.intersphinx",
18-
"sphinx.ext.mathjax",
41+
# Add links to source code in API docs
1942
"sphinx.ext.viewcode",
43+
# Add a copy button to each code block
44+
"sphinx_copybutton",
45+
# For the card element
46+
"sphinx_design",
47+
# To make .nojekyll
48+
"sphinx.ext.githubpages",
49+
# To make the {ipython} directive
2050
"IPython.sphinxext.ipython_directive",
51+
# To syntax highlight "ipython" language code blocks
2152
"IPython.sphinxext.ipython_console_highlighting",
53+
# To embed matplotlib plots generated from code
2254
"matplotlib.sphinxext.plot_directive",
23-
"numpydoc",
24-
"sphinx_click",
25-
"sphinx_copybutton",
55+
# To parse markdown
2656
"myst_parser",
27-
"sphinxcontrib.jquery",
28-
"sphinxcontrib.mermaid",
2957
]
3058

3159
templates_path = ["_templates"]
3260
exclude_patterns = [] # type: ignore
3361

34-
# -- Options for HTML output -------------------------------------------------
35-
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output
3662

37-
html_theme = "alabaster"
38-
html_static_path = ["_static"]
63+
# Which package to load and document
64+
autodoc2_packages = [{"path": "../../src/secop_ophyd", "auto_mode": True}]
3965

66+
# Put them in docs/_api which is git ignored
67+
autodoc2_output_dir = "_api"
4068

41-
# Generate the API documentation when building
42-
autosummary_generate = True
43-
numpydoc_show_class_members = False
4469

45-
source_suffix = ".rst"
70+
# Don't document private things
71+
autodoc2_hidden_objects = {"private", "dunder", "inherited"}
4672

47-
master_doc = "index"
73+
# MyST parser extensions
74+
myst_enable_extensions = ["colon_fence", "fieldlist"]
4875

49-
import secop_ophyd
76+
# Intersphinx configuration for linking to external documentation
77+
intersphinx_mapping = {
78+
"python": ("https://docs.python.org/3", None),
79+
"bluesky": ("https://blueskyproject.io/bluesky/main", None),
80+
"ophyd-async": ("https://blueskyproject.io/ophyd-async/main", None),
81+
"numpy": ("https://numpy.org/devdocs/", None),
82+
}
5083

51-
project = "SECoP-Ophyd"
52-
copyright = "2024, Peter Braun"
53-
author = "Peter Braun"
54-
release = secop_ophyd.__version__
55-
version = secop_ophyd.__version__
84+
# Set copy-button to ignore python and bash prompts
85+
copybutton_prompt_text = (
86+
r">>> |\\.\\.\\. |\\$ |In \\[\\d*\\]: | {2,5}\\.\\.\\.: | {5,8}: "
87+
)
88+
copybutton_prompt_is_regexp = True
5689

57-
language = "en"
90+
91+
# -- Options for HTML output -------------------------------------------------
92+
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output
93+
94+
# Generate the API documentation when building
95+
autosummary_generate = True
96+
numpydoc_show_class_members = False
5897

5998

6099
# -- Options for HTML output ----------------------------------------------
61100

62101
# The theme to use for HTML and HTML Help pages. See the documentation for
63102
# a list of builtin themes.
64103
#
65-
html_theme = "sphinx_rtd_theme"
66-
import sphinx_rtd_theme
104+
html_theme = "pydata_sphinx_theme"
105+
106+
# Theme options for pydata_sphinx_theme
107+
html_theme_options = {
108+
"use_edit_page_button": True,
109+
"github_url": "https://github.com/SampleEnvironment/secop-ophyd",
110+
"icon_links": [
111+
{
112+
"name": "PyPI",
113+
"url": "https://pypi.org/project/secop-ophyd",
114+
"icon": "fas fa-cube",
115+
},
116+
],
117+
"external_links": [
118+
{
119+
"name": "SECoP Specification",
120+
"url": "https://sampleenvironment.github.io/secop-site/",
121+
},
122+
],
123+
"navigation_with_keys": False,
124+
"show_toc_level": 3,
125+
}
126+
127+
html_logo = "../images/logo.svg"
128+
html_favicon = "../images/favicon.ico"
129+
130+
html_context = {
131+
"github_user": "SampleEnvironment",
132+
"github_repo": "secop-ophyd",
133+
"github_version": "main",
134+
"doc_path": "docs",
135+
}
136+
137+
# If true, "Created using Sphinx" is shown in the HTML footer.
138+
html_show_sphinx = False
139+
140+
# If true, "(C) Copyright ..." is shown in the HTML footer.
141+
html_show_copyright = False
142+
143+
# Custom CSS
144+
html_css_files = ["custom.css"]

0 commit comments

Comments
 (0)