docs: make new zensical docs #125

Merged
perl_d merged 1 commits from docs/redo_docs into main 2026-08-04 14:20:35 +02:00
8 changed files with 446 additions and 289 deletions
+33
View File
@@ -0,0 +1,33 @@
name: Docs build and publish
on:
push:
branches:
- main
workflow_dispatch:
jobs:
docker:
runs-on: ubuntu-latest-intranet
container:
image: gitea.psi.ch/images/alpine-zensical
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Build page
run: /opt/python-env/bin/zensical build --clean
- name: Configure Git
run: |
git config --global user.name "Gitea Actions"
git config --global user.email "actions@gitea.local"
- name: Push to gitea-pages branch
run: |
git checkout --orphan gitea-pages
git reset --hard
mv site/* .
git add .
git commit -m "Update site - $(date)"
git push -f https://${{ secrets.GITHUB_TOKEN }}@gitea.psi.ch/${{ github.repository }}.git gitea-pages
-49
View File
@@ -1,52 +1,3 @@
# AareDAQ
AareDAQ is the Data Acquisition system for MX beamlines at PSI.
## GUI Controls Cheat Sheet
### Sample Camera
- `Left click`: move sample to clicked position
- `Shift + Left click`: Z-alignment click behaviour
- `Ctrl + Left click` on active raster grid: move to clicked position under the grid
- `Left drag` on active raster grid: move active raster grid
- `Right click`: open sample camera context menu
- `Right drag` on empty area: draw raster grid
- `Right drag` on active raster grid: resize raster grid
- `Mouse wheel`: rotate omega by 90°
- `Shift + Mouse wheel`: rotate omega by 10°
- `Ctrl + Mouse wheel`: change sample camera exposure by a large step
- `Alt + Mouse wheel`: change sample camera exposure by a small step
- `Shift + Mouse move`: inspect/load raster image under cursor
### Video Views
- `Ctrl + Mouse wheel`: zoom in/out
- `F`: fit to view
- `R`: reset zoom
- `+` or `=`: zoom in
- `-`: zoom out
### Sample Queue
- `Delete`: remove selected samples
- `Space`: run / pause queue automation
### Workflow Panel
- `Delete`: remove selected queue items
- `Space`: pause / resume workflow
- `Ctrl + R`: refresh workflow queue
- `Ctrl + Delete`: clear non-running workflow queue items
### Global Shortcuts
- `F1`: open mouse / keyboard controls help
- `Ctrl + Q`: quit application
- `Ctrl + Shift + R`: restore default view layout
- `Ctrl + 1`: switch to Sample camera tab
- `Ctrl + 2`: switch to Gonio camera tab
- `Ctrl + 3`: switch to Beamline view tab
- `Ctrl + 4`: switch to Beamline combined view tab
- `Ctrl + L`: raise Sample List panel
- `Ctrl + J`: raise Automation list panel
- `Ctrl + M`: go to Sample camera tab
- `Ctrl + W`: toggle Workflow panel
- `Ctrl + Shift + T`: toggle Target stability panel
- `Ctrl + Shift + P`: toggle Prediction Metrics panel
- `Ctrl + Shift + S`: toggle Smargon trace panel
+53
View File
@@ -0,0 +1,53 @@
# GUI Controls Cheat Sheet
### Sample Camera
- `Left click`: move sample to clicked position
- `Shift + Left click`: Z-alignment click behaviour
- `Ctrl + Left click` on active raster grid: move to clicked position under the grid
- `Left drag` on active raster grid: move active raster grid
- `Right click`: open sample camera context menu
- `Right drag` on empty area: draw raster grid
- `Right drag` on active raster grid: resize raster grid
- `Mouse wheel`: rotate omega by 90°
- `Shift + Mouse wheel`: rotate omega by 10°
- `Ctrl + Mouse wheel`: change sample camera exposure by a large step
- `Alt + Mouse wheel`: change sample camera exposure by a small step
- `Shift + Mouse move`: inspect/load raster image under cursor
### Video Views
- `Ctrl + Mouse wheel`: zoom in/out
- `F`: fit to view
- `R`: reset zoom
- `+` or `=`: zoom in
- `-`: zoom out
### Sample Queue
- `Delete`: remove selected samples
- `Space`: run / pause queue automation
### Workflow Panel
- `Delete`: remove selected queue items
- `Space`: pause / resume workflow
- `Ctrl + R`: refresh workflow queue
- `Ctrl + Delete`: clear non-running workflow queue items
### Global Shortcuts
- `F1`: open mouse / keyboard controls help
- `Ctrl + Q`: quit application
- `Ctrl + Shift + R`: restore default view layout
- `Ctrl + 1`: switch to Sample camera tab
- `Ctrl + 2`: switch to Gonio camera tab
- `Ctrl + 3`: switch to Beamline view tab
- `Ctrl + 4`: switch to Beamline combined view tab
- `Ctrl + L`: raise Sample List panel
- `Ctrl + J`: raise Automation list panel
- `Ctrl + M`: go to Sample camera tab
- `Ctrl + W`: toggle Workflow panel
- `Ctrl + Shift + T`: toggle Target stability panel
- `Ctrl + Shift + P`: toggle Prediction Metrics panel
- `Ctrl + Shift + S`: toggle Smargon trace panel
-164
View File
@@ -1,164 +0,0 @@
# Configuration file for the Sphinx documentation builder.
#
# For the full list of built-in configuration values, see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html
import os
import sys
sys.path.insert(0, os.path.abspath("../src"))
sys.path.insert(0, os.path.abspath("../src/aare"))
sys.path.insert(0, os.path.abspath("../src/aare/daq"))
sys.path.insert(0, os.path.abspath("../src/aare/common"))
sys.path.insert(0, os.path.abspath("../src/aare/gui"))
# -- Project information -----------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information
project = "AareDAQ"
copyright = "2026, Paul Scherrer Institute"
author = "Martin Appleby, Guillaume Gotthard, Filip Leonarski and Dawn (Jiaxin) Daun"
release = "0.3.1"
master_doc = "index"
root_doc = "index"
# -- General configuration ---------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
autodoc_mock_imports = [
"aaredb",
"jfjoch_client",
"numpy",
"requests",
"pyJW",
"pyzmq",
"opencv-python-headless",
"PySide6",
"pyepics",
"redis",
"python-redis-lock",
"fastapi",
"uvicorn",
"python_multipart",
"websocket-client",
"sseclient-py",
"psi-pshell",
]
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]
extensions = [
# 'fuse_search',
"sphinx.ext.intersphinx",
"myst_parser",
"sphinx_immaterial",
"sphinx.ext.autodoc",
"sphinx.ext.napoleon",
"sphinx.ext.viewcode",
]
# Optional: allow includes in Markdown
myst_enable_extensions = [
"colon_fence",
"deflist",
"html_admonition",
"html_image",
"linkify",
"substitution",
"smartquotes",
"tasklist",
]
templates_path = ["_templates"]
myst_heading_anchor = 3
# -- Options for Fuzzy Search ------------------------------------------------
# Fuse.js configuration
# fuse_js_options = {
# 'includeScore': True,
# 'includeMatches': True,
# 'threshold': 0.3, # More fuzzy (0.0 = exact, 1.0 = match everything)
# 'distance': 100,
# 'minMatchCharLength': 2,
# 'keys': [
# {'name': 'title', 'weight': 0.8},
# {'name': 'content', 'weight': 0.5},
# {'name': 'tags', 'weight': 0.3},
# ]
# }
# Static Files
html_static_path = ["_static"]
html_css_files = [
"https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css"
# 'css/fuse-search.css',
]
# html_js_files = [
# 'js/fuse-search.js',
# ]
# -- Options for HTML output -------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output
html_theme = "sphinx_immaterial"
html_theme_options = {
"icon": {
"repo": "fontawesome/brands/github" # or gitlab/gitea icon
},
"site_url": "https://gitea.psi.ch/mx/aaredaq",
"repo_url": "https://gitea.psi.ch/mx/aaredaq",
"repo_name": "AareDAQ",
"social": [
{
"icon": "fontawesome/brands/github",
"link": "https://gitea.psi.ch/mx/aaredaq",
"name": "AareDAQ on Gitea",
}
],
"palette": [
{
"media": "(prefers-color-scheme: light)",
"scheme": "default",
"primary": "indigo",
"accent": "lime",
"toggle": {"icon": "material/lightbulb-outline", "name": "Switch to dark mode"},
},
{
"media": "(prefers-color-scheme: dark)",
"scheme": "slate",
"primary": "indigo",
"accent": "lime",
"toggle": {"icon": "material/lightbulb", "name": "Switch to light mode"},
},
],
"features": [
"navigation.expand",
"navigation.sections",
"navigation.top",
"search.share",
"toc.follow",
"navigation.instant",
"content.tabs.link",
"content.code.annotate",
"content.code.copy",
],
"globaltoc_collapse": False,
"toc_title": "On this page",
"toc_title_container": True,
"font": {"code": "JetBrains Mono"},
}
html_theme_options["google_fonts"] = []
html_sidebars = {"**": ["logo-text.html", "globaltoc.html", "searchbox.html"]}
html_show_sourcelink = False
# Optional
autodoc_default_options = {
"members": True,
"undoc-members": True,
"show-inheritance": True,
"member-order": "bysource",
}
+11
View File
@@ -0,0 +1,11 @@
---
icon: lucide/rocket
---
# AareDAQ
AareDAQ is the Data Acquisition application for MX beamlines at PSI.
# Get started
See the list of controls in the [cheat sheet](./cheatsheet.md)!
-39
View File
@@ -1,39 +0,0 @@
.. AareDAQ documentation master file, created by
sphinx-quickstart on Tue Mar 31 14:58:01 2026.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
Welcome to AareDAQ
=================
AareDAQ is the Data Acquisition system for MX beamlines at the Paul Scherrer Institute (PSI).
It provides a robust backend for orchestrating beamline devices and a user-friendly GUI for data collection.
Overview
--------
* :doc:`User Guide <readme>`: New to AareDAQ? Check out the overview and cheat sheet.
* :doc:`Changelog <changelog>`: See what's new in the latest version.
* :doc:`API Reference <api/aare>`: Detailed documentation for all AareDAQ modules and classes.
.. toctree::
:maxdepth: 2
:caption: Documentation
:hidden:
README <readme>
CHANGELOG <changelog>
.. toctree::
:maxdepth: 2
:caption: Development
:hidden:
API Reference <api/aare>
Indices and tables
==================
* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`
-37
View File
@@ -1,37 +0,0 @@
alabaster==1.0.0
babel==2.16.0
beautifulsoup4==4.12.3
certifi==2024.8.30
charset-normalizer==3.4.0
css-html-js-minify==2.5.5
docutils==0.21.2
idna==3.10
imagesize==1.4.1
Jinja2==3.1.4
linkify-it-py==2.0.3
lxml==5.3.0
markdown-it-py==3.0.0
MarkupSafe==3.0.2
mdit-py-plugins==0.4.2
mdurl==0.1.2
myst-parser==4.0.0
packaging==24.2
Pygments==2.18.0
python-slugify==8.0.4
PyYAML==6.0.2
requests==2.32.3
snowballstemmer==2.2.0
soupsieve==2.6
Sphinx==8.1.3
sphinx-material==0.0.36
sphinxcontrib-applehelp==2.0.0
sphinxcontrib-devhelp==2.0.0
sphinxcontrib-htmlhelp==2.1.0
sphinxcontrib-jsmath==1.0.1
sphinxcontrib-qthelp==2.0.0
sphinxcontrib-serializinghtml==2.0.0
text-unidecode==1.3
uc-micro-py==1.0.3
Unidecode==1.3.8
urllib3==2.2.3
sphinx_immaterial==0.13.8
+349
View File
@@ -0,0 +1,349 @@
# ============================================================================
#
# The configuration produced by default is meant to highlight the features
# that Zensical provides and to serve as a starting point for your own
# projects.
#
# ============================================================================
[project]
# The site_name is shown in the page header and the browser window title
#
# Read more: https://zensical.org/docs/setup/basics/#site_name
site_name = "Documentation"
# The site_description is included in the HTML head and should contain a
# meaningful description of the site content for use by search engines.
#
# Read more: https://zensical.org/docs/setup/basics/#site_description
site_description = "A new project generated from the default template project."
# The site_author attribute. This is used in the HTML head element.
#
# Read more: https://zensical.org/docs/setup/basics/#site_author
site_author = "<your name here>"
# The site_url is the canonical URL for your site. When building online
# documentation you should set this.
# Read more: https://zensical.org/docs/setup/basics/#site_url
#site_url = "https://www.example.com/"
# The copyright notice appears in the page footer and can contain an HTML
# fragment.
#
# Read more: https://zensical.org/docs/setup/basics/#copyright
copyright = """
Copyright &copy; 2026 Martin Appleby, Jiaxin Duan, Filip Leonarski, David Perl
"""
# Zensical supports both implicit navigation and explicitly defined navigation.
# If you decide not to define a navigation here then Zensical will simply
# derive the navigation structure from the directory structure of your
# "docs_dir". The definition below demonstrates how a navigation structure
# can be defined using TOML syntax.
#
# Read more: https://zensical.org/docs/setup/navigation/
# nav = [
# { "Get started" = "index.md" },
# { "Markdown in 5min" = "markdown.md" },
# ]
# With the "extra_css" option you can add your own CSS styling to customize
# your Zensical project according to your needs. You can add any number of
# CSS files.
#
# The path provided should be relative to the "docs_dir".
#
# Read more: https://zensical.org/docs/customization/#additional-css
#
#extra_css = ["stylesheets/extra.css"]
# With the `extra_javascript` option you can add your own JavaScript to your
# project to customize the behavior according to your needs.
#
# The path provided should be relative to the "docs_dir".
#
# Read more: https://zensical.org/docs/customization/#additional-javascript
#extra_javascript = ["javascripts/extra.js"]
# ----------------------------------------------------------------------------
# Section for configuring theme options
# ----------------------------------------------------------------------------
[project.theme]
# change this to "classic" to use the traditional Material for MkDocs look.
#variant = "classic"
# Zensical allows you to override specific blocks, partials, or whole
# templates as well as to define your own templates. To do this, uncomment
# the custom_dir setting below and set it to a directory in which you
# keep your template overrides.
#
# Read more:
# - https://zensical.org/docs/customization/#extending-the-theme
#
#custom_dir = "overrides"
# With the "favicon" option you can set your own image to use as the icon
# browsers will use in the browser title bar or tab bar. The path provided
# must be relative to the "docs_dir".
#
# Read more:
# - https://zensical.org/docs/setup/logo-and-icons/#favicon
# - https://developer.mozilla.org/en-US/docs/Glossary/Favicon
#
#favicon = "images/favicon.png"
# Zensical supports more than 60 different languages. This means that the
# labels and tooltips that Zensical's templates produce are translated.
# The "language" option allows you to set the language used. This language
# is also indicated in the HTML head element to help with accessibility
# and guide search engines and translation tools.
#
# The default language is "en" (English). It is possible to create
# sites with multiple languages and configure a language selector. See
# the documentation for details.
#
# Read more:
# - https://zensical.org/docs/setup/language/
#
language = "en"
# Zensical provides a number of feature toggles that change the behavior
# of the documentation site.
features = [
# Zensical includes an announcement bar. This feature allows users to
# dismiss it when they have read the announcement.
# https://zensical.org/docs/setup/header/#announcement-bar
"announce.dismiss",
# If you have a repository configured and turn on this feature, Zensical
# will generate an edit button for the page. This works for common
# repository hosting services.
# https://zensical.org/docs/setup/repository/#content-actions
#"content.action.edit",
# If you have a repository configured and turn on this feature, Zensical
# will generate a button that allows the user to view the Markdown
# code for the current page.
# https://zensical.org/docs/setup/repository/#content-actions
#"content.action.view",
# Code annotations allow you to add an icon with a tooltip to your
# code blocks to provide explanations at crucial points.
# https://zensical.org/docs/authoring/code-blocks/#code-annotations
"content.code.annotate",
# This feature turns on a button in code blocks that allow users to
# copy the content to their clipboard without first selecting it.
# https://zensical.org/docs/authoring/code-blocks/#code-copy-button
"content.code.copy",
# Code blocks can include a button to allow for the selection of line
# ranges by the user.
# https://zensical.org/docs/authoring/code-blocks/#code-selection-button
"content.code.select",
# Zensical can render footnotes as inline tooltips, so the user can read
# the footnote without leaving the context of the document.
# https://zensical.org/docs/authoring/footnotes/#footnote-tooltips
"content.footnote.tooltips",
# If you have many content tabs that have the same titles (e.g., "Python",
# "JavaScript", "Cobol"), this feature causes all of them to switch to
# at the same time when the user chooses their language in one.
# https://zensical.org/docs/authoring/content-tabs/#linked-content-tabs
"content.tabs.link",
# With this feature enabled users can add tooltips to links that will be
# displayed when the mouse pointer hovers the link.
# https://zensical.org/docs/authoring/tooltips/#improved-tooltips
"content.tooltips",
# With this feature enabled, Zensical will automatically hide parts
# of the header when the user scrolls past a certain point.
# https://zensical.org/docs/setup/header/#automatic-hiding
# "header.autohide",
# Turn on this feature to expand all collapsible sections in the
# navigation sidebar by default.
# https://zensical.org/docs/setup/navigation/#navigation-expansion
# "navigation.expand",
# This feature turns on navigation elements in the footer that allow the
# user to navigate to a next or previous page.
# https://zensical.org/docs/setup/footer/#navigation
"navigation.footer",
# When section index pages are enabled, documents can be directly attached
# to sections, which is particularly useful for providing overview pages.
# https://zensical.org/docs/setup/navigation/#section-index-pages
"navigation.indexes",
# When instant navigation is enabled, clicks on all internal links will be
# intercepted and dispatched via XHR without fully reloading the page.
# https://zensical.org/docs/setup/navigation/#instant-navigation
"navigation.instant",
# With instant prefetching, your site will start to fetch a page once the
# user hovers over a link. This will reduce the perceived loading time
# for the user.
# https://zensical.org/docs/setup/navigation/#instant-prefetching
"navigation.instant.prefetch",
# In order to provide a better user experience on slow connections when
# using instant navigation, a progress indicator can be enabled.
# https://zensical.org/docs/setup/navigation/#progress-indicator
#"navigation.instant.progress",
# When navigation paths are activated, a breadcrumb navigation is rendered
# above the title of each page
# https://zensical.org/docs/setup/navigation/#navigation-path
"navigation.path",
# When pruning is enabled, only the visible navigation items are included
# in the rendered HTML, reducing the size of the built site by 33% or more.
# https://zensical.org/docs/setup/navigation/#navigation-pruning
#"navigation.prune",
# When sections are enabled, top-level sections are rendered as groups in
# the sidebar for viewports above 1220px, but remain as-is on mobile.
# https://zensical.org/docs/setup/navigation/#navigation-sections
"navigation.sections",
# When tabs are enabled, top-level sections are rendered in a menu layer
# below the header for viewports above 1220px, but remain as-is on mobile.
# https://zensical.org/docs/setup/navigation/#navigation-tabs
#"navigation.tabs",
# When sticky tabs are enabled, navigation tabs will lock below the header
# and always remain visible when scrolling down.
# https://zensical.org/docs/setup/navigation/#sticky-navigation-tabs
#"navigation.tabs.sticky",
# A back-to-top button can be shown when the user, after scrolling down,
# starts to scroll up again.
# https://zensical.org/docs/setup/navigation/#back-to-top-button
"navigation.top",
# When anchor tracking is enabled, the URL in the address bar is
# automatically updated with the active anchor as highlighted in the table
# of contents.
# https://zensical.org/docs/setup/navigation/#anchor-tracking
"navigation.tracking",
# When search highlighting is enabled and a user clicks on a search result,
# Zensical will highlight all occurrences after following the link.
# https://zensical.org/docs/setup/search/#search-highlighting
"search.highlight",
# When anchor following for the table of contents is enabled, the sidebar
# is automatically scrolled so that the active anchor is always visible.
# https://zensical.org/docs/setup/navigation/#anchor-following
# "toc.follow",
# When navigation integration for the table of contents is enabled, it is
# always rendered as part of the navigation sidebar on the left.
# https://zensical.org/docs/setup/navigation/#navigation-integration
#"toc.integrate",
]
# ----------------------------------------------------------------------------
# You can configure your own logo to be shown in the header using the "logo"
# option in the "theme" subsection. The logo must be a relative path to a file
# in your "docs_dir", e.g., to use `docs/assets/logo.png` you would set:
# ----------------------------------------------------------------------------
#logo = "assets/logo.png"
# ----------------------------------------------------------------------------
# If you don't have a dedicated project logo, you can use a built-in icon from
# the icon sets shipped in Zensical. Please note that the setting lives in a
# different subsection, and that the above take precedence over the icon.
#
# Read more:
# - https://zensical.org/docs/setup/logo-and-icons
# - https://github.com/zensical/ui/tree/master/dist/.icons
# ----------------------------------------------------------------------------
#[project.theme.icon]
#logo = "lucide/smile"
# ----------------------------------------------------------------------------
# In the "font" subsection you can configure the fonts used. By default, fonts
# are loaded from Google Fonts, giving you a wide range of choices from a set
# of suitably licensed fonts. There are options for a normal text font and for
# a monospaced font used in code blocks.
# ----------------------------------------------------------------------------
#[project.theme.font]
#text = "Inter"
#code = "Jetbrains Mono"
# ----------------------------------------------------------------------------
# In the "palette" subsection you can configure options for the color scheme.
# You can configure different color schemes, e.g., to turn on dark mode,
# that the user can switch between. Each color scheme can be further
# customized.
#
# Read more:
# - https://zensical.org/docs/setup/colors/
# ----------------------------------------------------------------------------
[[project.theme.palette]]
scheme = "default"
toggle.icon = "lucide/sun"
toggle.name = "Switch to dark mode"
[[project.theme.palette]]
scheme = "slate"
toggle.icon = "lucide/moon"
toggle.name = "Switch to light mode"
# ----------------------------------------------------------------------------
# The "extra" section contains miscellaneous settings.
# ----------------------------------------------------------------------------
#[[project.extra.social]]
#icon = "fontawesome/brands/github"
#link = "https://github.com/user/repo"
# ----------------------------------------------------------------------------
# In this section you can configure the Markdown extensions that are used when
# rendering your documentation. We enable the most useful extensions by default,
# but you can customize this list to your needs.
#
# Read more:
# - https://zensical.org/docs/setup/extensions/
# ----------------------------------------------------------------------------
[project.markdown_extensions.abbr]
[project.markdown_extensions.admonition]
[project.markdown_extensions.attr_list]
[project.markdown_extensions.def_list]
[project.markdown_extensions.footnotes]
[project.markdown_extensions.md_in_html]
[project.markdown_extensions.toc]
permalink = true
[project.markdown_extensions.pymdownx.arithmatex]
generic = true
[project.markdown_extensions.pymdownx.betterem]
[project.markdown_extensions.pymdownx.caret]
[project.markdown_extensions.pymdownx.details]
[project.markdown_extensions.pymdownx.emoji]
emoji_generator = "zensical.extensions.emoji.to_svg"
emoji_index = "zensical.extensions.emoji.twemoji"
[project.markdown_extensions.pymdownx.highlight]
anchor_linenums = true
line_spans = "__span"
pygments_lang_class = true
[project.markdown_extensions.pymdownx.inlinehilite]
[project.markdown_extensions.pymdownx.keys]
[project.markdown_extensions.pymdownx.magiclink]
[project.markdown_extensions.pymdownx.mark]
[project.markdown_extensions.pymdownx.smartsymbols]
[project.markdown_extensions.pymdownx.superfences]
custom_fences = [
{ name = "mermaid", class = "mermaid", format = "pymdownx.superfences.fence_code_format" }
]
[project.markdown_extensions.pymdownx.tabbed]
alternate_style = true
combine_header_slug = true
[project.markdown_extensions.pymdownx.tasklist]
custom_checkbox = true
[project.markdown_extensions.pymdownx.tilde]