Skip to content

Load functions embedded in modules#13

Merged
tuckermcclure merged 1 commit into
mainfrom
tucker/load-functions-from-modules
Apr 16, 2026
Merged

Load functions embedded in modules#13
tuckermcclure merged 1 commit into
mainfrom
tucker/load-functions-from-modules

Conversation

@tuckermcclure
Copy link
Copy Markdown
Member

@tuckermcclure tuckermcclure commented Apr 16, 2026

Writing a function to a YAML will look like this:

my_function_wrapper:
    type: FunctionWrapper
    fcn: Main.ModuleA.ModuleB.foo

Those can then be loaded in correctly.

Note that this has nothing to do with running a function (when the type to load is in fact a Function and not a Type{Function}). When the type is Function, the syntax is "run the function with the given keyword arguments". When loading Type{Function}, the function itself is what is returned.

Obviously, anonymous functions don't work, and we check for that explicitly.

@tuckermcclure tuckermcclure merged commit a843029 into main Apr 16, 2026
3 checks passed
@tuckermcclure tuckermcclure deleted the tucker/load-functions-from-modules branch April 16, 2026 19:56
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.

1 participant