Feature / user-function input/output field decorators #1072
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Addresses #1011
So immutable input/output fields of user functions are attributes. Users don't need to specify data-types of functions they're not actively developing, and upon discovering a function can immediately tell what the function inputs and outputs:
WHY?
Consider the common example request or scenario:
The user can't currently browse functions and immediately tell what fields are both required and configurable the way they can for the rest of libE's Python interface. They need to copy/paste the gen/sim_specs from an example. Furthermore, unless the user is also adjusting the function much of the copy/pasted specs currently can't be modified by the user.
If a given function, say APOSMM, has been decorated with its immutable data-types, the user should still append
the fields with attributes chosen later, e.g. dimension:
Any user function that has been decorated has those input/output fields automatically appended to the function's docstring:
https://libensemble--1072.org.readthedocs.build/en/1072/examples/sim_funcs.html#six_hump_camel.six_hump_camel