Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add optional inputId property to InputSpec interface #320

Closed
chrispcampbell opened this issue May 3, 2023 · 0 comments · Fixed by #321 or #322
Closed

Add optional inputId property to InputSpec interface #320

chrispcampbell opened this issue May 3, 2023 · 0 comments · Fixed by #321 or #322

Comments

@chrispcampbell
Copy link
Contributor

To support the improvements being made to the model-check tool in #315, it would be helpful if the InputSpec interface (from the build package) included an optional inputId property.

When the inputId is defined, it provides a more resilient way to compare a scenario between two versions of the model even if the variable is renamed.

The plugin-config package already includes an id column in inputs.csv for this purpose, so we just need to include that when initializing the InputSpec for each row.

Proposed API:

export interface InputSpec {
  /**
   * The stable input identifier.  It is recommended to set this to a value (for example, a
   * simple number like what `plugin-config` uses) that is separate from `varName` and is
   * stable between two versions of the model.  This way, if an input variable is renamed
   * between two versions of the model, comparisons can still be performed between the two.
   * If a distinct `inputId` is not available, plugins can infer one from `varName`, but
   * note that this approach will be less resilient to renames.
   */
  inputId?: string
  // ...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant