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
10 changes: 5 additions & 5 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -751,11 +751,11 @@ Notes:
that return "not implemented", so they are not wrapped.
- A pandas view of statuses is deferred; `sample_status_conversions` returns plain Python objects and needs no extras.
- Verified end to end by `tests/integration/test_sample_status_client_integration.py` against a live Annotation
Service built from dp-service `main` (the 1.16.0 API, **not yet released** — the newest tag everywhere is
`rel-1.15.0`): exact nanosecond timestamp round-trip through both axis forms, absent-stays-absent, full-replace
upsert, and layer independence. The tests probe for the API first and skip with an actionable message against a
pre-1.16.0 server, since reachability alone does not imply the RPCs exist. Status *filtering* of query results
is still unit-tested only — it needs ingested sample data to attach to (#17).
Service built from dp-service `main` carrying the 1.16.0 API: exact nanosecond timestamp round-trip through both
axis forms, absent-stays-absent, full-replace upsert, and layer independence. The tests probe for the API first
and skip with an actionable message against a pre-1.16.0 server, since reachability alone does not imply the RPCs
exist. Status *filtering* of query results is still unit-tested only — it needs ingested sample data to attach
to (#17).

### Configuration Priority (High to Low)
1. **Explicit parameters** (direct channels, config objects)
Expand Down
2 changes: 0 additions & 2 deletions doc/cookbook/connecting.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
Constructing an `MldpClient`, pointing it at your services, and knowing which sub-clients you
actually got.

> **Verified against:** dp-python-lib 1.15.0.

See [API conventions](conventions.md) for the patterns every call shares once you have a client.

## Contents
Expand Down
8 changes: 3 additions & 5 deletions doc/cookbook/conventions.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,9 @@
Patterns that recur throughout `dp_python_lib`. Recipes in this cookbook link here rather than
repeating them.

> **Verified against:** dp-python-lib 1.15.0.
> This package's version tracks the dp-grpc version its stubs were generated from. Note that
> **1.15.0 is ahead of the latest dp-grpc release** (`rel-1.14.0`): the 1.15.0 stubs come from
> unreleased dp-grpc work, so a server running the current release will not implement everything
> documented here. See each recipe's own verified-against note.
> This package's version tracks the dp-grpc version its stubs were generated from, so a server
> older than your `dp_python_lib` will not implement everything documented here. Where a recipe
> uses something added in a particular release, it says so.

For the wire-level view of these same conventions — the protobuf messages and the `oneof result`
pattern this library wraps — see the
Expand Down
9 changes: 3 additions & 6 deletions doc/cookbook/datasets-and-annotations.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,11 @@
Naming a region of the archive so you can find it again, attaching derived values to it with a
record of what they were computed from, and exporting the result.

> **Target API version:** dp-grpc 1.16.0, which is **not yet released** — the newest tag is
> `rel-1.15.0`. The modernized DataSet / Annotation / Export API is new in 1.16.0 and will not work
> against a `rel-1.15.0` server, which answers these calls with `UNIMPLEMENTED`.
>
> **Verified against:** a dp-service build from `main` at commit `fddf692`, carrying the 1.16.0 API.

See [API conventions](conventions.md) for result checking, paging, and time handling.

> The modernized DataSet / Annotation / Export API was added in 1.16.0 and is not available in
> earlier releases.

Examples use `client.annotation.datasets`, `client.annotation.annotations`, and
`client.annotation.export`. Note that `client.annotation` itself is `None` unless an annotation
channel is configured, so guard on it before reaching through.
Expand Down
3 changes: 0 additions & 3 deletions doc/cookbook/machine-configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@
Describing how the machine was set up, when each setup was in effect, and answering *"what was
the machine doing at 18:04 last Tuesday?"*

> **Verified against:** dp-python-lib 1.15.0.
> The machine configuration API is unchanged since 1.14.0; these recipes apply to both.

See [API conventions](conventions.md) for result checking, paging, and criteria rules.

All examples use `client.annotation.machine_config`. Note that `client.annotation` itself is `None`
Expand Down
3 changes: 0 additions & 3 deletions doc/cookbook/pv-metadata.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@
Recording what a PV *is* — the device it belongs to, where it sits in the machine, what kind of
element it measures — and then finding PVs by those properties instead of by name.

> **Verified against:** dp-python-lib 1.15.0.
> The PV metadata API is unchanged since 1.14.0; these recipes apply to both.

See [API conventions](conventions.md) for result checking, paging, and criteria rules, and
[Creating and connecting a client](connecting.md) for getting a client in the first place.

Expand Down
10 changes: 3 additions & 7 deletions doc/cookbook/query.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,15 @@
Retrieving archived PV samples over a time range — by name, by what the PVs *are*, or by what the
machine was *doing* — and getting the results into pandas or NumPy.

> **Verified against:** dp-python-lib 1.15.0.
> ⚠️ **This API requires a server newer than the latest dp-grpc release.** `querySamples`,
> `PvSelector`, and `common.TimeRange` do not exist in `rel-1.14.0`, which is currently the newest
> published dp-grpc release — they come from unreleased work that dp-python-lib 1.15.0 was
> generated from. Against a `rel-1.14.0` server these calls fail; the rest of this cookbook works
> on both. Check what your deployment actually runs before relying on this recipe.

See [API conventions](conventions.md) for result checking and paging. The metadata- and
configuration-driven queries below read the catalogue built in
[Cataloguing PVs](pv-metadata.md) and [Recording machine configuration](machine-configuration.md).

All examples use `client.query`, which is `None` unless a query channel is configured.

> The v2 query API (`querySamples`, `PvSelector`, `common.TimeRange`) was added in 1.15.0 and
> is not available in earlier releases.

### Imports used by the examples

```python
Expand Down
9 changes: 2 additions & 7 deletions doc/cookbook/sample-status.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,10 @@
Recording that *this particular sample, at this particular instant, was bad* — and then querying
data with the flagged samples left out.

> **Target API version:** dp-grpc 1.16.0, which is **not yet released** — the newest tag is
> `rel-1.15.0`. The sample status API is new in 1.16.0 and will not work against a `rel-1.15.0`
> server, which answers these calls with `UNIMPLEMENTED`.
>
> **Verified against:** a pre-release Annotation Service built from dp-service `main` carrying the
> 1.16.0 API.

See [API conventions](conventions.md) for result checking, paging, and time handling.

> The sample status API was added in 1.16.0 and is not available in earlier releases.

All examples use `client.annotation.sample_status`. Note that `client.annotation` itself is `None`
unless an annotation channel is configured, so guard on `client.annotation` before reaching through it.

Expand Down
Loading