Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
00f822c
docs: Stage A scaffold
coretl Jun 11, 2026
00e7a45
docs: point commented FPGA xref at /main (was /master)
coretl Jun 11, 2026
b81f6bc
docs: convert reference/support.md from RST (Prompt D)
coretl Jun 11, 2026
3c5f76e
docs: Prompt D bulk conversion — all quadrants (PandABlocks-server)
coretl Jun 11, 2026
4f4dcf6
docs: convert commands, fields, capture; extract capture-options
coretl Jun 11, 2026
8816ea2
docs: apply fresh-eyes review fixes (source-verified)
coretl Jun 12, 2026
9c55c71
devcontainer: add ubuntu-devcontainer-based devcontainer
coretl Jun 12, 2026
0e0edb7
ci: publish docs to gh-pages from the docs branch too
coretl Jun 12, 2026
37c0ca0
docs: Stage B — link GitHub issues into stubs and verify notes
coretl Jun 12, 2026
f607d07
docs: replace {doc} roles with markdown links
coretl Jun 17, 2026
2e539da
devcontainer: update base image, add npm, and persistent caches
coretl Jun 17, 2026
5bfb940
docs: migrate to MyST build and published version-switcher plugin
coretl Jun 17, 2026
9442cc7
docs: output page URLs by folder name
coretl Jun 17, 2026
9ff317d
docs: document interim /docs xref target and stable plan
coretl Jun 17, 2026
056e4b7
docs: convert meta-panda links to xrefs
coretl Jun 17, 2026
536f1ed
docs: enable PandABlocks-FPGA xref and fix meta-panda xref path
coretl Jun 18, 2026
2433959
Merge pull request #86 from PandABlocks/migrate-version-switcher
coretl Jun 18, 2026
d89ea5b
docs: build with myst --strict
coretl Jun 18, 2026
0a1666c
docs: enforce link quality via error_rules
coretl Jun 18, 2026
50eb3ec
removed AI comment as command still works
adedamola-sode Jun 19, 2026
eb6a1aa
Merge pull request #89 from PandABlocks/IDN
adedamola-sode Jun 19, 2026
71cebb1
Docs: migrate to myst-version-switcher assemble model (v0.5.0)
coretl Jun 22, 2026
45c5395
Merge pull request #91 from PandABlocks/docs-version-switcher-assemble
coretl Jun 22, 2026
4756555
changed documentation from sphinx to mystmd
adedamola-sode Jun 19, 2026
6caa79d
adding node to CI container for building docs during zpkg build
adedamola-sode Jun 19, 2026
bd5fb6f
Removed rootfs kernel and zpkg
adedamola-sode Jun 19, 2026
cde459c
Docs: re-deploy docs version after closing the docs->main preview race
coretl Jun 22, 2026
7b19bb3
Docs: overlay legacy main/ from gh-pages during migration
coretl Jun 22, 2026
6b55daa
Docs: verify the deployed Pages origin matches the assembled switcher…
coretl Jun 22, 2026
69e1499
Docs CI: consume shared reusable workflows @v0.7.0
coretl Jun 24, 2026
be4ad7a
docs: pin favicon to the PandA logo + set logo_text
coretl Jun 24, 2026
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
55 changes: 55 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
// For format details, see https://containers.dev/implementors/json_reference/
{
"name": "PandABlocks-server Developer Container",
"build": {
"dockerfile": "../Dockerfile",
"target": "developer"
},
"remoteEnv": {
// Allow X11 apps to run inside the container
"DISPLAY": "${localEnv:DISPLAY}",
// Put things that allow it in the persistent cache
"PRE_COMMIT_HOME": "/cache/pre-commit",
"UV_CACHE_DIR": "/cache/uv",
"UV_PYTHON_CACHE_DIR": "/cache/uv-python",
},
"customizations": {
"vscode": {
// Set *default* container specific settings.json values on container create.
"settings": {
// Workaround to prevent garbled python REPL in the terminal
// https://github.com/microsoft/vscode-python/issues/25505
"python.terminal.shellIntegration.enabled": false
},
// Add the IDs of extensions you want installed when the container is created.
"extensions": [
"ms-python.python",
"ms-azuretools.vscode-docker"
]
}
},
// Create the config folder for the bash-config feature and uv cache
"initializeCommand": "mkdir -p ${localEnv:HOME}/.config/terminal-config",
"runArgs": [
// Allow the container to access the host X11 display and EPICS CA
"--net=host",
// Make sure SELinux does not disable with access to host filesystems like tmp
"--security-opt=label=disable"
],
"mounts": [
// Mount in the user terminal config folder so it can be edited
{
"source": "${localEnv:HOME}/.config/terminal-config",
"target": "/user-terminal-config",
"type": "bind"
},
// Keep a persistent cross container cache for uv, pre-commit, and the venvs
{
"source": "devcontainer-shared-cache",
"target": "/cache",
"type": "volume"
}
],
// Mount the parent as /workspaces so we can pip install peers as editable
"workspaceMount": "source=${localWorkspaceFolder}/..,target=/workspaces,type=bind",
}
17 changes: 17 additions & 0 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Contributing

Contributions and issues are most welcome! All issues and pull requests are handled
through [GitHub](https://github.com/PandABlocks/PandABlocks-server/issues). Please check
for any existing issues before filing a new one.

## Issue or Pull Request?

Raise an issue if you want to report a bug or request a feature. Open a pull request if
you already have a change ready to propose. If you are unsure, raise an issue first to
discuss the change.

## Documentation

Documentation is built with [MyST](https://mystmd.org) and published to GitHub Pages.
The docs follow the [Diátaxis](https://diataxis.fr) framework — tutorials, how-to
guides, reference and explanations.
9 changes: 0 additions & 9 deletions .github/pages/index.html

This file was deleted.

67 changes: 67 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
name: Docs CI

# Build + verify the docs on every event, then publish on INTERNAL events. The
# build (the shared `docs.yml`) runs for PRs (including forks), pushes to main, and
# tags, and uploads each build's `docs` artifact. Publishing is nested here (the
# `publish` job -> the shared `publish.yml`) so its status is visible on the
# PR/commit, but ONLY for internal events on this repo: a fork PR's build runs with a
# read-only token and must never deploy.
#
# Both halves are consumed from DiamondLightSource/myst-version-switcher-plugin at a
# pinned tag — this repo carries no docs-build/publish workflow of its own.
# publish.yml reconstructs the whole versioned site from durable sources (main's
# latest build persisted at _sources/main.zip, each release's docs.zip asset, every
# open PR's build artifact) and deploys it to Pages directly; there is no gh-pages
# branch.
on:
pull_request:
push:
branches: [main]
tags: ['*'] # '*' never matches '/'

jobs:
docs:
uses: DiamondLightSource/myst-version-switcher-plugin/.github/workflows/docs.yml@v0.7.0
with:
# `make docs` drives npx mystmd (pinned by MYSTMD_VERSION) and reads build
# settings from CONFIG, so create it first. eval runs the compound command.
build-command: cp CONFIG.example CONFIG && make docs
# The fork-PR warning links here so a maintainer can publish a fork preview.
preview-workflow: preview-fork.yml

# Tag-only: attach this build's docs.zip (bare html/ root) to the GitHub Release
# so `assemble` can reconstruct that released version on future deploys.
docs-release:
needs: [docs]
if: github.ref_type == 'tag'
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/download-artifact@v4
with:
name: docs
- env:
GH_TOKEN: ${{ github.token }}
run: gh release upload "${{ github.ref_name }}" docs.zip --clobber --repo "${{ github.repository }}"

# Internal events only: an internal PR, or a push to main/tag, has a same-repo
# build we can trust + deploy. Fork PRs (head repo != this repo) are excluded —
# docs.yml's build job warns them instead. publish.yml defaults guard-default-branch
# to true, so every deploy asserts main is present and can never silently drop
# /main/ (main is self-durable via _sources/main.zip).
publish:
needs: [docs]
if: >-
github.repository == 'PandABlocks/PandABlocks-server' &&
( github.event_name != 'pull_request' ||
github.event.pull_request.head.repo.full_name == github.repository )
uses: DiamondLightSource/myst-version-switcher-plugin/.github/workflows/publish.yml@v0.7.0
with:
version-name: ${{ needs.docs.outputs.version-name }}
permissions:
contents: read
actions: read
pages: write
id-token: write
statuses: write
2 changes: 1 addition & 1 deletion .github/workflows/code.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
cd PandABlocks-rootfs
ln -s CONFIG.example CONFIG
make kernel PLATFORM=${{matrix.platform}}

- name: Make zpkg
run: |
cd PandABlocks-server
Expand Down
54 changes: 0 additions & 54 deletions .github/workflows/docs.yml

This file was deleted.

31 changes: 31 additions & 0 deletions .github/workflows/preview-fork.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Preview fork PR

# Maintainer opt-in to publish a versioned docs preview for an EXTERNAL fork PR.
# Fork PRs build + verify in Docs CI but never auto-publish (their build runs with a
# read-only token), so this is the only path that deploys one. A reusable workflow
# can't be workflow_dispatch'd cross-repo, so this thin wrapper lives here and passes
# the PR number through to the shared publish.yml via workflow_call.
#
# It approves the fork PR's CURRENT head SHA (a `preview-approved` commit status) and
# assembles the site with that PR's artifact included. A later push to the PR (new
# SHA) drops the preview until you re-run this. version-name is empty: there is no
# in-run build to inject, so publish.yml does a pure durable gather.
on:
workflow_dispatch:
inputs:
pr:
description: Fork PR number to approve + preview.
required: true

jobs:
preview:
uses: DiamondLightSource/myst-version-switcher-plugin/.github/workflows/publish.yml@v0.7.0
with:
version-name: ""
pr: ${{ inputs.pr }}
permissions:
contents: read
actions: read
pages: write
id-token: write
statuses: write
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,6 @@
*.pyc
tests/fpga_sequences
/venv

# MyST build output
docs/_build/
6 changes: 4 additions & 2 deletions CONFIG.example
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,11 @@ BUILD_DIR = /build/build-server
#
PYTHON = python3

# Sphinx build for documentation.
# Version of mystmd (https://mystmd.org) used to build the documentation with
# `make docs` / `make docs-dev`. Run on demand via npx, so no global install is
# needed.
#
SPHINX_BUILD = sphinx-build
MYSTMD_VERSION = 1.10.1

# Compiler settings. Default cross compile prefix given here. If BINUTILS_DIR
# is specified it will be prepended to the path for building the driver and
Expand Down
10 changes: 10 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# The devcontainer should use the developer target and run as root with podman
# or docker with user namespaces.
FROM ghcr.io/diamondlightsource/ubuntu-devcontainer:resolute AS developer

# Add any system dependencies for the developer/build environment here.
# Candidates: an ARMv7-A cross-compiler toolchain for on-PandA builds; the
# native toolchain below is enough for the simulation server and docs.
RUN apt-get update -y && apt-get install -y --no-install-recommends \
npm \
&& apt-get dist-clean
29 changes: 23 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ TOP := $(CURDIR)

BUILD_DIR = $(TOP)/build
PYTHON = python3
SPHINX_BUILD = sphinx-build
MYSTMD_VERSION = 1.10.1
COMPILER_PREFIX = $(COMPILER_PREFIX_$(PLATFORM))
KERNEL_DIR = $(error Define KERNEL_DIR in CONFIG file)
PANDA_ROOTFS = $(error Define PANDA_ROOTFS in CONFIG file)
Expand Down Expand Up @@ -140,16 +140,33 @@ slow_load: $(SLOW_LOAD)

# ------------------------------------------------------------------------------
# Documentation
#
# Docs are built with MyST (mystmd), run through npx so no global install is
# needed; pin the version with MYSTMD_VERSION (see CONFIG.example). `make docs`
# mirrors `myst build --html --strict` and `make docs-dev` mirrors `myst start`,
# matching the docs/ task runner. MyST writes its output into docs/_build/html.
# --strict exits non-zero on any error-severity message (e.g. an unresolved
# cross-repo xref) so CI fails rather than publishing broken links.

$(DOCS_BUILD_DIR)/index.html: $(wildcard docs/*.rst docs/*/*.rst docs/conf.py)
$(SPHINX_BUILD) -b html docs $(DOCS_BUILD_DIR)
MYST = npx --yes --package mystmd@$(MYSTMD_VERSION) myst

docs: $(DOCS_BUILD_DIR)/index.html
docs:
cd docs && $(MYST) build --html --strict

docs-dev:
cd docs && $(MYST) start

clean-docs:
rm -rf $(DOCS_BUILD_DIR)
rm -rf $(TOP)/docs/_build

.PHONY: docs clean-docs
.PHONY: docs docs-dev clean-docs

# The zpkg packaging installs the built docs from $(DOCS_BUILD_DIR) (the `html`
# entry in etc/panda-server.list), so stage the MyST output there for zpkg.
$(DOCS_BUILD_DIR)/index.html: docs
rm -rf $(DOCS_BUILD_DIR)
mkdir -p $(DOCS_BUILD_DIR)
cp -r $(TOP)/docs/_build/html/. $(DOCS_BUILD_DIR)


# ------------------------------------------------------------------------------
Expand Down
24 changes: 24 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# PandABlocks-server

The PandA socket server provides a bridge between the register interface to the
FPGA firmware controlling the PandA hardware and users and other software. The
interface is designed to be simple and robust.

The PandA firmware is structured into numerous functional blocks, each
configured via a number of fields. This structure is directly reflected in the
functional interface provided by this server: most commands read or write
specific fields.

The server publishes two socket end points: one for configuration control
(simple ASCII commands, ASCII responses) and one for streamed data capture
(no commands, a lightly structured binary stream).

<!-- README only content. Anything below this line will be excluded from the index page -->

## Where to find things

| | |
|---|---|
| Source code | <https://github.com/PandABlocks/PandABlocks-server> |
| Documentation | <https://PandABlocks.github.io/PandABlocks-server> |
| Releases | <https://github.com/PandABlocks/PandABlocks-server/releases> |
Loading
Loading