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

feat: change ModelSpec to allow for simple array of input/output var names #495

Merged
merged 7 commits into from
Jun 5, 2024

Conversation

chrispcampbell
Copy link
Contributor

Fixes #494

This loosens up the ModelSpec interface so that simple projects (that don't use plugin-config or plugin-check) can provide a simple array of input or output variable names instead of having to conjure up full InputSpec or OutputSpec instances. This has no impact on existing projects.

As part of this, I made a few small changes to the build package APIs (which should have no impact on existing projects or plugins):

  • Added ResolvedModelSpec interface; we now pass a ResolvedModelSpec to the plugin callback functions instead of a plain ModelSpec.

  • Changed the InputSpec interface to make the defaultValue, minValue, and maxValue properties optional.

  • Changed the ModelSpec interface to make the datFiles property optional (this no longer needs to be specified for projects that don't use dat files).

Also, one small behavior change to the plugin-check package:

  • The default bundle template will skip inputs that don't have the defaultValue, minValue, or maxValue properties set in the InputSpec and will warn the user. This shouldn't happen too much because most projects will provide these values (i.e., via plugin-config).

@chrispcampbell chrispcampbell merged commit 3130901 into main Jun 5, 2024
6 checks passed
@chrispcampbell chrispcampbell deleted the chris/494-model-spec-var-names branch June 5, 2024 22:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow for returning simple array of input/output variable names from modelSpec
1 participant