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
2 changes: 1 addition & 1 deletion .github/workflows/code.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.11", "3.12"]
python-version: ["3.11", "3.12", "3.13"]

steps:
- uses: actions/checkout@v4
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,5 @@ dist
pid
logs
.secop-ophyd

_api
18 changes: 4 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,12 @@
[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)
[![PyPI](https://img.shields.io/pypi/v/secop-ophyd.svg)](https://pypi.org/project/secop-ophyd)

# secop-ophyd

This package allows seamless itegration of hardware that provides a SECoP interface into bluesky.
# SECoP-Ophyd

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

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

SECoP-Ophyd acts as a bridge between SECoP-enabled hardware and Bluesky's ophyd layer. It uses [Frappy](https://github.com/SampleEnvironment/frappy) to communicate with SECoP nodes over TCP, automatically generating [ophyd-async](https://blueskyproject.io/ophyd-async/main/index.html) device objects from the node's descriptive data. These devices can then be used in [Bluesky plans](https://blueskyproject.io/bluesky/main/tutorial.html#the-run-engine-and-plans) just like any other ophyd device, enabling seamless integration with EPICS, Tango, and other control system backends.


## Getting Started
A demo repository that shows the full functionality of the integration is provided here:

[secop-sim](https://codebase.helmholtz.cloud/rock-it-secop/secop-sim)


## Further information:

#### SECoP (https://github.com/SampleEnvironment/SECoP)
#### Frappy (https://github.com/SampleEnvironment/frappy)
For more information, see the [full documentation](https://sampleenvironment.github.io/secop-ophyd/).
Binary file added docs/images/favicon.ico
Binary file not shown.
111 changes: 111 additions & 0 deletions docs/images/logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions docs/source/_static/custom.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/* Allow a wider screen so we can fit 88 chars of source code on it */
.bd-page-width {
max-width: 100rem; /* default is 88rem */
}
132 changes: 105 additions & 27 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,64 +3,142 @@
# For the full list of built-in configuration values, see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html

import secop_ophyd

# -- Project information -----------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information

project = "SECoP-Ophyd"
copyright = "2024, Peter Braun"
author = "Peter Braun"
release = secop_ophyd.__version__

# Clean up version for display - extract just X.Y.Z from version strings like "0.13.9.dev0+gb43270d29.d20251029"
if "+" in secop_ophyd.__version__:
# Development version - use short version or "dev"
release = secop_ophyd.__version__.split("+")[0]
else:
release = secop_ophyd.__version__

version = secop_ophyd.__version__

language = "en"

source_suffix = ".rst"
master_doc = "index"


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

extensions = [
"sphinx.ext.autodoc",
"sphinx.ext.autosummary",
"sphinx.ext.githubpages",
# for diagrams
"sphinxcontrib.mermaid",
# Use this for generating API docs
"autodoc2",
# For linking to external sphinx documentation
"sphinx.ext.intersphinx",
"sphinx.ext.mathjax",
# Add links to source code in API docs
"sphinx.ext.viewcode",
# Add a copy button to each code block
"sphinx_copybutton",
# For the card element
"sphinx_design",
# To make .nojekyll
"sphinx.ext.githubpages",
# To make the {ipython} directive
"IPython.sphinxext.ipython_directive",
# To syntax highlight "ipython" language code blocks
"IPython.sphinxext.ipython_console_highlighting",
# To embed matplotlib plots generated from code
"matplotlib.sphinxext.plot_directive",
"numpydoc",
"sphinx_click",
"sphinx_copybutton",
# To parse markdown
"myst_parser",
"sphinxcontrib.jquery",
"sphinxcontrib.mermaid",
]

templates_path = ["_templates"]
exclude_patterns = [] # type: ignore

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

html_theme = "alabaster"
html_static_path = ["_static"]
# Which package to load and document
autodoc2_packages = [{"path": "../../src/secop_ophyd", "auto_mode": True}]

# Put them in docs/_api which is git ignored
autodoc2_output_dir = "_api"

# Generate the API documentation when building
autosummary_generate = True
numpydoc_show_class_members = False

source_suffix = ".rst"
# Don't document private things
autodoc2_hidden_objects = {"private", "dunder", "inherited"}

master_doc = "index"
# MyST parser extensions
myst_enable_extensions = ["colon_fence", "fieldlist"]

import secop_ophyd
# Intersphinx configuration for linking to external documentation
intersphinx_mapping = {
"python": ("https://docs.python.org/3", None),
"bluesky": ("https://blueskyproject.io/bluesky/main", None),
"ophyd-async": ("https://blueskyproject.io/ophyd-async/main", None),
"numpy": ("https://numpy.org/devdocs/", None),
}

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

language = "en"

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

# Generate the API documentation when building
autosummary_generate = True
numpydoc_show_class_members = False


# -- 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 = "sphinx_rtd_theme"
import sphinx_rtd_theme
html_theme = "pydata_sphinx_theme"

# Theme options for pydata_sphinx_theme
html_theme_options = {
"use_edit_page_button": True,
"github_url": "https://github.com/SampleEnvironment/secop-ophyd",
"icon_links": [
{
"name": "PyPI",
"url": "https://pypi.org/project/secop-ophyd",
"icon": "fas fa-cube",
},
],
"external_links": [
{
"name": "SECoP Specification",
"url": "https://sampleenvironment.github.io/secop-site/",
},
],
"navigation_with_keys": False,
"show_toc_level": 3,
}

html_logo = "../images/logo.svg"
html_favicon = "../images/favicon.ico"

html_context = {
"github_user": "SampleEnvironment",
"github_repo": "secop-ophyd",
"github_version": "main",
"doc_path": "docs",
}

# If true, "Created using Sphinx" is shown in the HTML footer.
html_show_sphinx = False

# If true, "(C) Copyright ..." is shown in the HTML footer.
html_show_copyright = False

# Custom CSS
html_css_files = ["custom.css"]
Loading