FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

HydroModPy/tools/doc_gallery/manifests at dev · HydroModPy/HydroModPy · GitHub

Latest commit

 

History

History
 
 

README.md

JSON Manifests

These files are meant for small declarative gallery inventories where adding one case should mostly be data entry, not Python editing.

The fastest starting point is:

python -m tools.doc_gallery.new_case \
  --manifest geographic_cases.json \
  --category geographic \
  --slug geographic_example_case \
  --title "Example Geographic Case"

Good Fit

  • copy_assets cases with committed PNG inputs
  • stable inventories such as geographic or code_comparison
  • pages whose metadata is mostly title, summary, tabs, and source pointers

Required Fields Per Case

  • slug
  • title
  • category
  • deck
  • summary
  • reproduction_command
  • generator
  • image_assets

defaults can provide shared values for category, generator, reproduction_command, walkthrough links, or common metadata.

Image Assets

Each image_assets entry must declare:

  • filename
  • caption
  • alt_text
  • source_path for copy_assets cases

Filenames must be unique inside one case.

Guardrails Enforced By The Loader

  • slugs must be unique inside one manifest
  • categories must exist in CATEGORY_SPECS
  • copy_assets cases must declare at least one image
  • copy_assets cases must not point to results_stable/
  • metadata.lead_image_filenames and metadata.tab_specs can only reference declared image filenames

Minimal Example

{
  "defaults": {
    "category": "geographic",
    "generator": "copy_assets",
    "reproduction_command": "hmp run examples/projects/05_nancon_data_overview/config_overview.toml"
  },
  "cases": [
    {
      "slug": "example_case",
      "title": "Example Case",
      "deck": "One-line page description.",
      "summary": "Longer paragraph shown on the case page.",
      "what_it_shows": [
        "First reading point.",
        "Second reading point."
      ],
      "source_paths": [
        "examples/projects/09_capability_gallery/geographic/example_case/example_case.png"
      ],
      "image_assets": [
        {
          "filename": "example_case.png",
          "caption": "Committed figure copied into the docs gallery.",
          "alt_text": "Example gallery case",
          "source_path": "examples/projects/09_capability_gallery/geographic/example_case/example_case.png"
        }
      ]
    }
  ]
}

Back | FazBrowse Home | New Git URL