-
Notifications
You must be signed in to change notification settings - Fork 26
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
Feature / user-function input/output field decorators #1072
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…s. SimSpecs and GenSpecs can extract and set
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #1072 +/- ##
============================================
- Coverage 90.23% 71.78% -18.45%
============================================
Files 91 92 +1
Lines 8200 8328 +128
Branches 1454 1483 +29
============================================
- Hits 7399 5978 -1421
- Misses 569 2090 +1521
- Partials 232 260 +28 ☔ View full report in Codecov by Sentry. |
jmlarson1
approved these changes
Dec 14, 2023
This was referenced Dec 18, 2023
Closed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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