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

docs for URI and CODE #4204

Open
wants to merge 12 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 59 additions & 0 deletions docs/Catalog/URI.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
<!-- markdownlint-disable-next-line first-line-h1 -->
Every package and object in the Bucket and Packages views has a "CODE" pane,
which contains code snippets that can be used to download and upload a package
or object via either:

- Python (API) ![Python](../imgs/uri-python.png)
- CLI (shell commands) ![CLI](../imgs/uri-cli.png)

In addition, Packages have a third tab that returns a Quilt+ URI:

- URI (identifier) ![URI](../imgs/uri-uri.png)

They all have a `copy` button that copies the code to the clipboard.

## Quilt+ URIs

Quilt+ URIs are a way to uniquely identify a package or object in the Quilt
drernie marked this conversation as resolved.
Show resolved Hide resolved
catalog. They are used to reference packages and objects relative to a Quilt
bucket. For example:
drernie marked this conversation as resolved.
Show resolved Hide resolved

<!-- markdownlint-disable-next-line line-length -->
`quilt+s3://quilt-example#package=akarve/cord19@e21682f00929661879633a5128aaa27cc7bc1e2973d49d4c868a90f9fad9f34b&path=CORD19.ipynb`

The URI above references a specific version of the `CORD19.ipynb` notebook in
the `akarve/cord19` package of the `quilt-example` bucket.

### Catalog Usage

URIs can be used to quickly navigate to a specific package or object from the
Catalog. If your window is wide enough, there will be a "URI" button to the
drernie marked this conversation as resolved.
Show resolved Hide resolved
right of the search bar. Clicking this button will display a dialog where you
can paste a URI and "Resolve" it to navigate to the package or object it
references.

![Resolving URIs](../imgs/uri-resolve.png)

### Syntax

A Quilt+ URI most contain the following components:
drernie marked this conversation as resolved.
Show resolved Hide resolved
drernie marked this conversation as resolved.
Show resolved Hide resolved

- `quilt+`: The scheme of the URI. This is always `quilt+`.
- `s3://`: The protocol of the URI. This is currently `s3://`.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

well, AFAIK URI scheme is quilt+s3

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

At the moment, but we already have local and sharepoint repositories...

Copy link
Member Author

@drernie drernie Nov 5, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But yeah, I should use the term scheme correctly. Does this work?

`quilt+<protocol>`: The scheme of the URI. This always begins with `quilt+`.
  Currently the only supported protocol is `s3`.

- `<bucket>`: The name of the bucket containing the package or object, e.g.
`quilt-example`.
- `#package=<package>`: A fragment for the name of the package containing the
object, e.g. `akarve/cord19`.
drernie marked this conversation as resolved.
Show resolved Hide resolved

In addition, it may contain the following optional components:
drernie marked this conversation as resolved.
Show resolved Hide resolved

- `<package>@<top_hash>`: The hash for this specific package, e.g.
drernie marked this conversation as resolved.
Show resolved Hide resolved
`e21682f00929661879633a5128aaa27cc7bc1e2973d49d4c868a90f9fad9f34b`.
- `<package>:tag`: The tag for this specific package. Currently, only the
drernie marked this conversation as resolved.
Show resolved Hide resolved
`latest` tag is supported. You may not specify both a top_hash and a tag.
- `&path=<path>`: Fragment for the path to the object within the package, if
any, e.g.ß `CORD19.ipynb`.
drernie marked this conversation as resolved.
Show resolved Hide resolved
was located.
drernie marked this conversation as resolved.
Show resolved Hide resolved

Note that a given bucket may be available from zero or more catalogs,
each of which may support different users and access controls.
1 change: 1 addition & 0 deletions docs/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
* [Document Previews](Catalog/Preview.md)
* [Embeddable iFrames](Catalog/Embed.md)
* [Search & Query](Catalog/SearchQuery.md)
* [Quilt+ URIs](Catalog/URI.md)
* [Qurator Omni](Catalog/Qurator.md) AI Assistant
* [Visualization & Dashboards](Catalog/VisualizationDashboards.md)
* **Advanced**
Expand Down
Binary file added docs/imgs/uri-cli.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/imgs/uri-python.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/imgs/uri-resolve.png
drernie marked this conversation as resolved.
Show resolved Hide resolved
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/imgs/uri-uri.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.