Skip to content
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

Display info about where to get a package #9

Closed
tcompa opened this issue Dec 11, 2024 · 3 comments · Fixed by #14
Closed

Display info about where to get a package #9

tcompa opened this issue Dec 11, 2024 · 3 comments · Fixed by #14
Assignees

Comments

@tcompa
Copy link
Collaborator

tcompa commented Dec 11, 2024

We'd like to tell whoever visits the public task page how they can use these tasks.

What is this information

The different options are:

  • For a PyPI-available package, here is the task name.
  • For a remote wheel URL, here is the URL to the wheel file.

It's simple to generate this piece of metadata in the script where we are producing the data for https://fractal-analytics-platform.github.io/fractal_tasks. We can come up with any kind of (internal) representation of this information, e.g. an attribute with values like:

  • pypi:fractal_tasks_core
  • remote_wheel:https://github.com/fmi-basel/gliberal-scMultipleX/releases/download/v0.8.0/scmultiplex-0.8.0-py3-none-any.whl.

Question A: where does this info live?

Is it OK that this information is only generated here when preparing this public page?

Or would it need to be an actual task-package piece of metadata? (note it could be a bit annoying to include wheel URLs in the manifest before the actual release, although they can be guessed).

My opinion: it's easy to generate it on the fly, and I would spare the task maintainers this burden.

Question B: how is this info displayed?

Some examples:

  1. Clicking somewhere (e.g. on the task-package name, or on a new icon/column) opens up a modal showing a processed version of the attribute described above. E.g. it would say either "Use the fractal_tasks_core package name" or "Download this wheel file and upload it to your favorite Fractal instance".
    • If we have something like this, is it specific for the public-tasks-page table or does it affect fractal-web as well? I'd say it is specific, because within a Fractal instance you don't need to re-add existing tasks. This also depend on the question A above.
  2. On a different page, we list all "known" task packages and for each one of them we describe how to add it to a Fractal instance.
@jluethi
Copy link
Collaborator

jluethi commented Dec 11, 2024

A: Yes, let's generate this on-the-fly for the public page

B: Display. Let's add a button to each task row: +. Opens a modal with installation instructions.
pypi:
Add to Fractal: pypi name
Local installation in Python:: "pip install package-name"

Github release whl:
Add to Fractal: Download whl & add to Fractal
Local installation in Python: Download & and pip install whl

Qs:
extras?
Hard-code it in the list we keep on the public page: We have custom strings on how things would need to be installed for non-standard case
That field overwrites auto-generated installation instructions, it's set by Fractal admins when adding a task

@tcompa
Copy link
Collaborator Author

tcompa commented Dec 11, 2024

In practice:

  1. Enrich the sources list. Each source may be associated to a markdown string that says how to add/install the package. If present, this overrides the autogenerated content.
  2. Store this new piece of information in a install_instructions property of tasks.

@tcompa
Copy link
Collaborator Author

tcompa commented Dec 11, 2024

With #11 we have an example for this new property - now waiting for fractal-analytics-platform/fractal-web#674

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 a pull request may close this issue.

2 participants