-
Notifications
You must be signed in to change notification settings - Fork 90
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
Add a way to pre-fill metadata on push #2963
Comments
This is quite reasonable and simple, too. I would recommend that the entrypoint values and names follow some kind of "before" or "inner" method naming convention. So for instance:
It's very likely that plugins are the cleanest option but, for completeness, though I wonder if we could do something similar and even simpler with a |
The simplest solution for users is to
I think you misunderstand. The
So I can see three different designs:
I think the cons for the third option are relatively small ones if the quilt side code is robust, has nice typing, covers cases correctly, and has nice error messages in case of mistakes. |
@flying-sheep Your proposal looks like a working option to solve a problem, but seems a bit complicated to me. |
Sure, but any checks that can be circumvented by not using the wrapper are less effective of course. I no longer work at Cellarity, so I don’t know what their current needs are anyway. |
Details
Hi, the current solution @Cellarity wants to replace with Quilt automatically derives metadata from the current environment. We need that capability in Quilt for parity.
Specifically, we use a jupyterlab extension to insert a UUID into .ipynb file metadata. Our current solution determines the notebook from which
push
is run, reads out the UUID, and injects it into the metadata.Design
I can think of two possible design strategies, only one of which I think is feasible.
Alternative Design
We could also make the jupyterlab extension modify the workflow to add the current notebook’s UUID to the list of allowed values. If workflow validation allows for a custom message, we could add one to inform the user of code they’re supposed to use, e.g.
However, @akarve said that frequently modifying a workflow is not ideal, and this increases the amount of code that has to be used, increasing the risk of users copy&pasting code they don’t understand.
I think the ideal design would leverage Python’s built in mechanism for extension entry points. Quilt could e.g. discover plugins using the
entry_points
/EntryPoint
API and use it to pre-fill metadata similarly to this:All a plugin has to do is provide package metadata:
To round off that feature, a message could tell users to install the pre-fill package.
@akarve, you should have access to https://github.com/Cellarity/quilt-nb-hook. If Quilt had the capabilities as specified above, installing that package would allow us to automatically infer UUID metadata.
The text was updated successfully, but these errors were encountered: