When you’re building Hypar functions, it’s useful to publish frequently to test in real workflows. When you do this, it’s important to be careful not to break any version of your function that others may already be using. Function Staging is a way to ensure that you can try out new versions of your function and test to make sure they work as expected before releasing them to the general public.
To stage a function, just use the
hypar publishcommand in the Hypar CLI. All functions are automatically staged for you.
Hypar keeps track of two independent versions for every function:
The “Live” version, which is accessible to anyone you’ve shared your function with, and
The “Test” version, which is only available to you and any collaborators you’ve added to your function’s permissions.
When you publish a function, you are updating its “Test” version, and when you release, you are setting the “Live” version to be the same as the current “Test” version.
In order to try out the newly staged “Test” version of your function, go to the Hypar web UI and add the function to a workflow. You should see a “Test” button on the corner of your function:
When you click that button, you start utilizing the test version, instead of the live, published version of your function. You’ll know you’re in the test version because you’ll see this icon next to the function name:
Within the function, you’ll also see a new button when you’re in “Test” mode:
Release will set the current “live” version to be the test version — so all staged changes will be made available to anyone with access to the function.
Note: Model_Dependencies and Model_Output in functions use the latest released function, be sure to release functions prior to testing if you are inputting and outputting elements between functions.
You can return to using the live, released version by clicking the “To live” button:
No. Function visibility + sharing is independent from whether a function is released or not. However, if your function is not released, no one else will be able to use it, even if you make it public.