Skip to content

chore(examples): migrate the example notebooks off the pre-rename Hapi package #183

Description

@MAfarrag

Context

The package was renamed Hapihapi (c38d7cb) and the plotting API moved to cleopatra, but the 16
tracked notebooks under examples/ still import Hapi.* and use the removed CamelCase plot kwargs.
The nbval pre-commit gate currently excludes ^examples/ precisely because none of them can execute.

Problem / Current Behaviour

Every notebook fails at its first import cell. The notebooks pixi task is documented as
currently red, and the nbval hook exclude means nothing prevents further drift.

Affected locations

File Symbol Notes
examples/hydrological-model/Note books/*.ipynb all 12 from Hapi... import ...
examples/hydrological-model/coello/prepare-Input-data/notebooks/*.ipynb all 4 same
.pre-commit-config.yaml nbval hook remove exclude: ^examples/ when done
pyproject.toml [tool.pixi.tasks.notebooks] drop the currently-red note

Proposed Solution

Migrate each notebook to the hapi.* imports, the pyramids Dataset API, and the cleopatra
snake_case plot kwargs; point data paths at the bundled Coello test data where possible; then lift
the nbval exclude so the gate guards them.

Out of Scope

Writing new tutorial notebooks; documentation-site integration.

Effort Estimate

Size: L
Rationale: 16 notebooks needing per-cell API migration, data-path fixes, and execution validation.

Definition of Done

  • all notebooks import hapi.* and execute end-to-end
  • nbval exclude: ^examples/ removed and the hook passes
  • pixi run -e dev notebooks is green

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions