NRLMMD-GEOIPS / NRLMMD-GEOIPS/pluginify

Collect malformed-plugin samples to inform PluginValidationError diagnostics

Open
#18 1 comment 0 reactions 1 assignee View on GitHub

@coleman-m is already working on this.

Since May 22, 2026.

bug
Dominant language
Python
Stars
1
Forks
0
PR merge metrics
No merged PRs in 30d

Description

Requested Update

Description
  • Collect real-world malformed plugin YAML samples so we can later design
    better PluginValidationError diagnostics based on evidence rather than
    guesses.
Background and Motivation
  • Pluginify PR #17 ports PluginValidationError from GeoIPS PR #1269. The wrapper
    works well for simple models, but for union models (e.g. sectors) one
    structural mistake can still produce 60+ error lines.
  • We could add heuristics to pinpoint the actual root cause, but without
    real failure samples we would be designing for one anecdote. Better to
    collect samples first.
Alternative Solutions
  • Skip the data-collection step and implement heuristics now based on the
    one observed case. Rejected because it risks misleading users on
    mistakes we have not yet seen.
Code to demonstrate issue

To submit a sample, comment on this issue with all four items below. See the follow-up comment for a worked example.

  1. Bad YAML. Paste (or attach) the plugin YAML that failed validation.

  2. Raw pydantic error. Run the snippet below, replacing the interface and model names with the ones that match your plugin (for example ConfigPluginModel from pluginify.pydantic_models.v1.configs), and the path with your bad YAML file. Paste the printed output.

    import yaml
    from pydantic import ValidationError
    from pluginify.pydantic_models.v1.<interface> import <YourPluginModel>
    
    with open("<path-to-your-bad-plugin>.yaml") as f:
        data = yaml.safe_load(f)
    
    try:
        <YourPluginModel>(**data)
    except ValidationError as exc:
        print(exc)
    
  3. Current wrapped error. Try to load the plugin normally and copy the PluginValidationError message from the traceback:

    from pluginify.interfaces import <interface>
    
    <interface>.get_plugin("<your_plugin_name>")
    
  4. One-line description. What were you trying to express in the plugin (for example, "static sector with a region block")?

Checklist for Completion
  • Collect ~5-10 distinct real-world malformed plugin samples in this
    thread, each with the bad YAML, raw pydantic error, current wrapped
    error, and a short description (preferably one-line) of the user's intent (preferably one-line).
  • Open a follow-up issue or PR to design diagnostic improvements once
    enough examples exist.

Contributor guide

No contributing guide indexed for this repository

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.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.