-
Notifications
You must be signed in to change notification settings - Fork 35
Add doc on jupyterlab-gallery #528
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
Merged
Merged
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
2f54938
add doc on jupyter gallery
c10f6b9
fix my inability to spell
a495364
yarn linter
eab3757
fix token description, add cross references jupyterlab overrides section
62f0f81
Fix typo
krassowski 7bd1374
Merge branch 'main' into jupyter-gallery
viniciusdc 92fc0ae
fix lint typo
viniciusdc b188378
Merge branch 'main' into jupyter-gallery
viniciusdc 252fcfe
yarn run format --write
viniciusdc 4b8e6b8
Apply suggestions from code review
viniciusdc 96db8a4
run format
viniciusdc File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,105 @@ | ||
| --- | ||
| title: Share Git Repository via JupyterLab-Gallery | ||
| description: Share files or tutorials with your team | ||
| --- | ||
|
|
||
| # How to set up a Git Repository via JupyterLab-Gallery | ||
|
|
||
| [JupyterLab-Gallery ](https://github.com/nebari-dev/jupyterlab-gallery) is a JupyterLab plugin | ||
| that allows users to share a Git Repository. JupyterLab users are presented with a tile in | ||
| the JupyterLab launch screen. Users can choose to download the Exhibit. | ||
|
|
||
| By default, if no JupyterLab-Gallery items are added to the config, users will not see this section | ||
| in the JupyterLab Launcher. | ||
|
|
||
| This feature was added to Nebari in the 2024.6.1 release. | ||
|
|
||
| ## Configure JupyterLb-Gallery | ||
|
|
||
| In Nebari, the JupyterLab-Gallery configuration is set in the Nebari configuration, `nebari-config.yaml`. | ||
|
|
||
| The configuration is set under the `jupyterlab` section under the subsection `gallery_settings`. | ||
| Users may set a title for the Gallery section of the Launcher screen and a destination (i.e. folder) | ||
| for the location of the cloned repos. | ||
|
|
||
| Several repositories can be configured to display as individual gallery tiles. Under the `exhibits` | ||
| section, each repository must have a `title` and a `git` location. There are also several other | ||
| optional config options. | ||
|
|
||
| The configuration is set at two different levels. Top level gallery settings define the title of | ||
| the Gallery section and the location in which the repositories are downloaded. The repository | ||
| level settings are defined for each repository. The settings in each section are described | ||
| below. | ||
|
|
||
| **Top Level Gallery Settings** | ||
|
|
||
| | Section | Description | | ||
| | ----------- | -------------------------------------------------- | | ||
| | title | Title on the gallery tile | | ||
| | destination | Location on disk where the repo will be downloaded | | ||
|
|
||
| **Repository Level Settings** | ||
|
|
||
| | Section | Description | | ||
| | ----------- | ----------------------------------------------------------------------------------- | | ||
| | title | Title on the gallery tile | | ||
| | git | URL of the git repository | | ||
| | homepage | (Optional) | | ||
| | description | Description of the repository to appear on the gallery tile (Optional) | | ||
| | icon | URL or base64 encoded image to use an icon to appear on the gallery tile (Optional) | | ||
| | account | (Optional) | | ||
| | token | Private Access Token to enable access to private repositories (Optional) | | ||
|
|
||
| ### Sample configuration | ||
|
|
||
| Below is an example of the Gallery settings from the `nebari-config.yaml`. Note that \<encoding\> | ||
| and \<PAT\> should be replaced with the actual encoding and Private Access Token, respectively. | ||
|
|
||
| ``` | ||
| jupyterlab: | ||
| gallery_settings: | ||
| title: Demos | ||
| destination: demos | ||
| exhibits: | ||
| - title: Data of an Unusual Size | ||
| git: https://github.com/nebari-dev/big-data-tutorial.git | ||
| description: Big data tutorial focusing on Dask usage in Nebari | ||
| icon: "data:image/png;base64,<encoding>" | ||
| homepage: https://github.com/nebari-dev/big-data-tutorial/ | ||
| - title: From RAGs to riches | ||
| git: https://github.com/Quansight/ragna-presentations.git | ||
| homepage: https://github.com/Quansight/ragna-presentations/ | ||
| - title: Private Examples | ||
| description: Internal company examples | ||
| icon: "data:image/png;base64,<encoding>" | ||
| git: https://gitlab....net/companyxyz/examples.git | ||
| account: examples | ||
| token: "<PAT>" | ||
| ``` | ||
|
|
||
| ## Using JupyterLab-Gallery | ||
|
|
||
| Once the repositories are configured in the Nebari config and redeployed, all users will have | ||
| a section on their JupyterLab Launcher screen for the Gallery. | ||
|
|
||
|  | ||
|
|
||
| Each tile points to a different gallery entry in the configuration. The Gallery repositories | ||
| will not be downloaded until users trigger the download for each gallery item. To do so, users | ||
| will hover over the tile and click the download button. | ||
|
|
||
|  | ||
|
|
||
| The repository will download to the location specified in the config (in each user's private | ||
| space). After the download is complete, hover on the gallery tile present the users with two | ||
| new options - the folder icon allows them to jump to the location in the JupyterLab file browser, | ||
| and the download button allows them to fetch an updated copy of the repo (if available). | ||
|
|
||
|  | ||
|
|
||
| ## Conclusion | ||
|
|
||
| For more information on the JupyterLab-Gallery project, visit the | ||
| [JupyterLab-Gallery codebase repo](https://github.com/nebari-dev/jupyterlab-gallery). | ||
|
|
||
| For more information about custom JupyterLab Overrides in the Nebari config, visit the [Custom Overrides Configurations](../explanations/custom-overrides-configuration#jupyterlab) documentation. | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a note: currently the tiles are designed so that they are most beautiful when there is a description. I would personally say that adding description is recommended, but do not want to push it either.