-
Notifications
You must be signed in to change notification settings - Fork 3
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
How do I load a single file into kiara using the python API #9
Comments
The only 'stable' file import operation at the moment is The single argument is
No, nothing.
No. Except I'm thinking about a more generic module that can take all kinds of strings and is smart enough to figure out how to retrieve the file from wherever it is (in the If you want to load files from github, there is only the very alpha one in the onboarding plugin at the moment, but I wouldn't recommend to use that atm; it is an area I intend to focus on in the near/medium-term future, and create a set of modules that complement each other well and are able to get retrieve and import datasets from any of the potential sources we've identified. For the type of functionality you need but that isn't ready yet, it might be a good idea to create your own plugin project and add very basic modules that do what you need. The advantage there is that with those we don't need to think too much about their interface (inputs/outputs schema) yet, and you can replace them fairly easily once there is an 'official' one. And they can be used as input to designing the 'official' one in the first place. |
You can assign an alias to the imported file. In the cli you'd do it something like:
In Python, you'd do something like:
|
Can I have an example using the python API ( |
Yeah, I'm about to write it up, one sec. |
Up, finished my comment (above). Happy to change the docstring for that function if you have any suggestions. I guess one area to write up would be the whole concept of storage, but that would probably be too much for this particular comment and needs to go into its own sections in the future docs. |
Btw, you don't need to store a value if you don't want to persist it and don't need a (human-readable) alias in the UI (often it's not necessary for temp data). The value will be available in the runtime until you restart the Python process. |
So the relevant things I learned here was to not use the operations in the onboarding module, and that you have to have files locally. So I've got a bunch of rewriting to do in my app prototype. I'll write this up in a how-to doc and send a PR shortly. In the future, please could you avoid giving CLI examples, I find it really confusing and hard to follow, because it's similar but not quite the same as usage via the Python API. I think the consensus from Mariella's research was that no end user wants to use the CLI, and I don't want to spend extra time documenting it. |
Ah, and you might rather use
|
closed via #11 |
Yes I know some of this is in the operation docs, but I really need concrete examples of how to load a file from github and from the user's filesystem.
The text was updated successfully, but these errors were encountered: