OpenEnergyPlatform / OpenEnergyPlatform/oeplatform

Academy notebook: publish a scenario bundle with the API

Open
#2,463 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

documentation OEKG-API
Dominant language
Python
Stars
65
Forks
29
Avg merge
15h 25m
Merged PRs (30d)
32

Description

Parent

Spec: #2454 — Document and teach the OEKG REST API. Derived from WF-15 decisions D11–D16.

Cross-repo: this ticket is work in OpenEnergyPlatform/academy, not in this repository. It is tracked here because it is part of the same effort.

What to build

A researcher with a modelling pipeline opens a notebook in the OEP Academy and goes from a platform token to a published scenario bundle — the case the whole API was built for, and which the academy today teaches only through the UI.

The notebook is executed once and the outputs committed, so it is a frozen snapshot. Everything below exists because a reader will nevertheless download it and run it again, possibly after an interrupted earlier attempt.

It is fully standalone. The academy's only existing chained pair breaks at exactly the seam a chain would create here: the second notebook hardcodes a table name while the first randomises and deletes, and that second notebook has never been executed.

Acceptance criteria

  • A new tutorials folder for scenario bundles, with its own entry in the academy's navigation — that navigation lists tutorial folders explicitly, so a new folder does not appear on its own.
  • The token comes from an environment variable, else a prompt, exactly as the existing upload tutorial does; the published page never contains a credential.
  • The demo bundle's acronym is stable per reader and derived from the reader's own identity, supplied the way the token is — the API has no "who am I" route, so it cannot be derived from the token.
  • The acronym has no working default: the notebook fails loudly when it is unset. A shared fallback plus the guard below would have two readers silently deleting each other's bundle.
  • Every section opens with a guard that finds and deletes a bundle left by an earlier run, then proceeds clean — not adopt-and-continue, which would skip the create it means to teach, and not refuse-and-halt.
  • The arc: create a bundle, read it back, patch one field under a precondition, add sub-resources, read the history, then delete with the two-step protocol.
  • The demo bundle is deleted at the end, so following the tutorial leaves nothing in the public knowledge graph; a closing cell says now do it for real.
  • The nine semantic rules are linked, not restated — a frozen notebook is the worst possible home for a rule that can change.
  • A dated banner names the date and the platform release the notebook was verified against.
  • The feedback cell carries a real issue number, not a placeholder.
  • The notebook is executed once and its outputs committed. Note this publishes the author's own platform username, since it appears inside the tutorial acronym.

Blocked by

  • #2460 — the client rules page — the notebook links those rules.
  • External, outside this spec: the API slice Delete a whole bundle, in two steps. The notebook's cleanup and its final lesson both need it.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Work in the OpenEnergyPlatform/academy repository, starting with the existing upload tutorial and the academy navigation that lists tutorial folders explicitly. Review blocked issue #2460 and the external whole-bundle deletion API before implementing the standalone scenario-bundle notebook. Done means the notebook is executed with committed outputs, linked rules, cleanup, navigation entry, dated verification banner, and a real feedback issue number.

Written by the indexing model from the issue text.

Assessment

Tech stack
jupyter-notebook, python
Domain
api, documentation
Issue type
Documentation
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.