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 docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@
("py:class", "fastcs.logging._graylog.GraylogStaticFields"),
("py:class", "fastcs.logging._graylog.GraylogEnvFields"),
("py:obj", "fastcs.control_system.build_controller_api"),
("docutils", "fastcs.demo.controllers.TemperatureControllerSettings"),
("docutils", "fastcs.demo.temperature_attr.TemperatureControllerSettings"),
# TypeVar without docstrings still give warnings
("py:class", "strawberry.schema.schema.Schema"),
]
Expand Down
18 changes: 8 additions & 10 deletions src/fastcs/demo/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,23 +24,22 @@ decorator) — there is no `io=` object and no `DataType`.
| Module | Concept | Backend | Issue |
|--------|---------|---------|-------|
| `hello_world.py` | pure-soft `@attr` decorator over in-memory values | none (soft) | [#398](https://github.com/DiamondLightSource/fastcs/issues/398) |
| `temperature_attr.py` | `getter`/`setter` callables in `__init__` (`AttrRW(getter=…, setter=…)`) | temperature sim | [#404](https://github.com/DiamondLightSource/fastcs/issues/404) |
| `controllers.py` | composition & methods: sub-controllers / `ControllerVector`, `@scan`, `@command` (getter/setter IO) | temperature sim | [#390](https://github.com/DiamondLightSource/fastcs/issues/390) |
| `temperature_attr.py` | `getter`/`setter` callables in `__init__` (`AttrRW(getter=…, setter=…)`), then composition & methods: sub-controllers / `ControllerVector`, `@scan`, `@command` | temperature sim | [#404](https://github.com/DiamondLightSource/fastcs/issues/404), [#390](https://github.com/DiamondLightSource/fastcs/issues/390) |
| `temperature_scpi.py` (+ `scpi.py`) | declarative annotated attributes; `ControllerFiller` builds each getter/setter from **static** `SCPIParam` extras metadata | temperature sim | [#405](https://github.com/DiamondLightSource/fastcs/issues/405) |
| `eiger.py` (+ `simulation/eiger.py`) | introspectable device: bare hints filled from a **runtime** REST parameter tree | Eiger REST sim | [#391](https://github.com/DiamondLightSource/fastcs/issues/391) |

## The four tutorials

Five modules, **four** tutorials (the old "reusable `io=` object" rung is gone —
Four modules, **four** tutorials (the old "reusable `io=` object" rung is gone —
`io=` objects were replaced by getter/setter callables, so there is nothing to
factor into):

1. **hello world** — `hello_world.py` (soft `@attr`).
2. **getter/setter** — `temperature_attr.py`; closes with *"when the shared
pattern is worth naming, reach for the declarative style →"*.
3. **declarative** — `temperature_scpi.py` (annotated `SCPIParam` + filler),
and this is where **composition + `@scan` + `@command`** are shown, walking
the full multi-ramp temperature controller (`controllers.py`, #390).
2. **getter/setter** — `temperature_attr.py`; the full multi-ramp temperature
controller, so this is also where **composition + `@scan` + `@command`**
are shown (#390). Closes with *"when the shared pattern is worth naming,
reach for the declarative style →"*.
3. **declarative** — `temperature_scpi.py` (annotated `SCPIParam` + filler).
4. **introspectable** — `eiger.py`.

Notes:
Expand All @@ -67,8 +66,7 @@ Notes:

## Baselines vs framework PRs

`temperature_attr.py`, `controllers.py`, and `eiger.py` have current-API
baselines that can be written **now** (deliberately messy against the
`temperature_attr.py` and `eiger.py` have current-API baselines that can be written **now** (deliberately messy against the
pre-refactor API) and are cleaned up as each framework PR lands. `hello_world.py`
and `temperature_scpi.py` need framework work first (`@attr` #397;
`ControllerFiller` #394). See each issue's `Blocked by:` line.
Expand Down
2 changes: 1 addition & 1 deletion src/fastcs/demo/__main__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from fastcs import __version__
from fastcs.launch import launch

from .controllers import TemperatureController
from .temperature_attr import TemperatureController

launch(TemperatureController, version=__version__)
147 changes: 0 additions & 147 deletions src/fastcs/demo/controllers.py

This file was deleted.

Loading
Loading