Giter VIP home page Giter VIP logo

jupyterlab-github's Introduction

Installation | Documentation | Contributing | License | Team | Getting help |

PyPI version Downloads Build Status Build Status Documentation Status Crowdin GitHub Discourse Gitter Gitpod

Binder

An extensible environment for interactive and reproducible computing, based on the Jupyter Notebook and Architecture.

JupyterLab is the next-generation user interface for Project Jupyter offering all the familiar building blocks of the classic Jupyter Notebook (notebook, terminal, text editor, file browser, rich outputs, etc.) in a flexible and powerful user interface.

JupyterLab can be extended using npm packages that use our public APIs. The prebuilt extensions can be distributed via PyPI, conda, and other package managers. The source extensions can be installed directly from npm (search for jupyterlab-extension) but require an additional build step. You can also find JupyterLab extensions exploring GitHub topic jupyterlab-extension. To learn more about extensions, see the user documentation.

Read the current JupyterLab documentation on ReadTheDocs.

Important

JupyterLab 3 will reach its end of maintenance date on May 15, 2024, anywhere on Earth. To help us make this transition, fixes for critical issues will still be backported until December 31, 2024. If you are still running JupyterLab 3, we strongly encourage you to upgrade to JupyterLab 4 as soon as possible. For more information, see JupyterLab 3 end of maintenance on the Jupyter Blog.


Getting started

Installation

If you use conda, mamba, or pip, you can install JupyterLab with one of the following commands.

  • If you use conda:
    conda install -c conda-forge jupyterlab
  • If you use mamba:
    mamba install -c conda-forge jupyterlab
  • If you use pip:
    pip install jupyterlab
    If installing using pip install --user, you must add the user-level bin directory to your PATH environment variable in order to launch jupyter lab. If you are using a Unix derivative (e.g., FreeBSD, GNU/Linux, macOS), you can do this by running export PATH="$HOME/.local/bin:$PATH". If you are using a macOS version that comes with Python 2, run pip3 instead of pip.

For more detailed instructions, consult the installation guide. Project installation instructions from the git sources are available in the contributor documentation.

Installing with Previous Versions of Jupyter Notebook

When using a version of Jupyter Notebook earlier than 5.3, the following command must be run after installing JupyterLab to enable the JupyterLab server extension:

jupyter serverextension enable --py jupyterlab --sys-prefix

Running

Start up JupyterLab using:

jupyter lab

JupyterLab will open automatically in the browser. See the documentation for additional details.

If you encounter an error like "Command 'jupyter' not found", please make sure PATH environment variable is set correctly. Alternatively, you can start up JupyterLab using ~/.local/bin/jupyter lab without changing the PATH environment variable.

Prerequisites and Supported Browsers

The latest versions of the following browsers are currently known to work:

  • Firefox
  • Chrome
  • Safari

See our documentation for additional details.


Getting help

We encourage you to ask questions on the Discourse forum. A question answered there can become a useful resource for others.

Bug report

To report a bug please read the guidelines and then open a Github issue. To keep resolved issues self-contained, the lock bot will lock closed issues as resolved after a period of inactivity. If a related discussion is still needed after an issue is locked, please open a new issue and reference the old issue.

Feature request

We also welcome suggestions for new features as they help make the project more useful for everyone. To request a feature please use the feature request template.


Development

Extending JupyterLab

To start developing an extension for JupyterLab, see the developer documentation and the API docs.

Contributing

To contribute code or documentation to JupyterLab itself, please read the contributor documentation.

JupyterLab follows the Jupyter Community Guides.

License

JupyterLab uses a shared copyright model that enables all contributors to maintain the copyright on their contributions. All code is licensed under the terms of the revised BSD license.

Team

JupyterLab is part of Project Jupyter and is developed by an open community. The maintenance team is assisted by a much larger group of contributors to JupyterLab and Project Jupyter as a whole.

JupyterLab's current maintainers are listed in alphabetical order, with affiliation, and main areas of contribution:

  • Mehmet Bektas, Netflix (general development, extensions).
  • Alex Bozarth, IBM (general development, extensions).
  • Eric Charles, Datalayer, (general development, extensions).
  • Frédéric Collonval, WebScIT (general development, extensions).
  • Martha Cryan, Mito (general development, extensions).
  • Afshin Darian, QuantStack (co-creator, application/high-level architecture, prolific contributions throughout the code base).
  • Vidar T. Fauske, JPMorgan Chase (general development, extensions).
  • Brian Granger, AWS (co-creator, strategy, vision, management, UI/UX design, architecture).
  • Jason Grout, Databricks (co-creator, vision, general development).
  • Michał Krassowski, Quansight (general development, extensions).
  • Max Klein, JPMorgan Chase (UI Package, build system, general development, extensions).
  • Gonzalo Peña-Castellanos, QuanSight (general development, i18n, extensions).
  • Fernando Perez, UC Berkeley (co-creator, vision).
  • Isabela Presedo-Floyd, QuanSight Labs (design/UX).
  • Steven Silvester, MongoDB (co-creator, release management, packaging, prolific contributions throughout the code base).
  • Jeremy Tuloup, QuantStack (general development, extensions).

Maintainer emeritus:

  • Chris Colbert, Project Jupyter (co-creator, application/low-level architecture, technical leadership, vision, PhosphorJS)
  • Jessica Forde, Project Jupyter (demo, documentation)
  • Tim George, Cal Poly (UI/UX design, strategy, management, user needs analysis).
  • Cameron Oelsen, Cal Poly (UI/UX design).
  • Ian Rose, Quansight/City of LA (general core development, extensions).
  • Andrew Schlaepfer, Bloomberg (general development, extensions).
  • Saul Shanabrook, Quansight (general development, extensions)

This list is provided to give the reader context on who we are and how our team functions. To be listed, please submit a pull request with your information.


Weekly Dev Meeting

We have videoconference meetings every week where we discuss what we have been working on and get feedback from one another.

Anyone is welcome to attend, if they would like to discuss a topic or just listen in.

Notes are archived on GitHub Jupyter Frontends team compass.

jupyterlab-github's People

Contributors

andersy005 avatar blink1073 avatar dependabot[bot] avatar ellisonbg avatar fcollonval avatar gcbeltramini avatar ian-r-rose avatar jtpio avatar krassowski avatar ktong avatar lresende avatar mahendrapaipuri avatar toddrme2178 avatar vidartf avatar willingc avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

jupyterlab-github's Issues

RuntimeError: JupyterLab failed to build

It works on Windows 10/Anaconda(version=2019.10).

I've tried on AWS/Linux EC2, there was an issue.
Tested in two cases: on JupyterHub and on Jupyter notebok - the same result!
One point, I did it when JupyterHub and Jupyter was runnning, after failed I stooped and tried again - the same result!

Run command:
(base) []$ jupyter labextension install @jupyterlab/github
Building jupyterlab assets (build:prod:minimize)
An error occured.
RuntimeError: JupyterLab failed to build
See the log file for details: /tmp/jupyterlab-debug-te2pdi6d.log

From log file

node /home/ec2-user/anaconda3/lib/python3.7/site-packages/jupyterlab/staging/yarn.js yarn-deduplicate -s fewer
yarn run v1.15.2
$ /home/ec2-user/anaconda3/share/jupyter/lab/staging/node_modules/.bin/yarn-deduplicate -s fewer
Done in 1.02s.

node /home/ec2-user/anaconda3/lib/python3.7/site-packages/jupyterlab/staging/yarn.js run build:prod:minimize
yarn run v1.15.2
$ cross-env NODE_OPTIONS=--max_old_space_size=4096 webpack --config webpack.prod.minimize.config.js
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

JupyterLab failed to build
Traceback (most recent call last):

File "/home/ec2-user/anaconda3/lib/python3.7/site-packages/jupyterlab/debuglog.py", line 47, in debug_logging
yield

File "/home/ec2-user/anaconda3/lib/python3.7/site-packages/jupyterlab/labextensions.py", line 105, in start
core_config=self.core_config)

File "/home/ec2-user/anaconda3/lib/python3.7/site-packages/jupyterlab/commands.py", line 378, in build
command=command, clean_staging=clean_staging)

File "/home/ec2-user/anaconda3/lib/python3.7/site-packages/jupyterlab/commands.py", line 583, in build
raise RuntimeError(msg)

RuntimeError: JupyterLab failed to build

Exiting application: jupyter

Changeable github URL?

Can this integration be used with a private github URL instead of the actual github.com? In other words, can the URL be configurable (leaving the default to github.com)?

Working directory - Deviating behavior from the Files tab

Expected behaviour

If I open some-notebook.ipynb in /home/jovyan/some-folder from the Files tab, the working directory for the kernel will be /home/jovyan/some-folder.

Unexpected behaviour

If I open some-notebook.ipynb while browsing using the GitHub tab, it seems like the working directory for the kernel will always be /home/jovyan.
jupyterlab-github-cwd

Escape spaces

Files with spaces in their names need to be escaped, otherwise they fail to load.

jupyter labextension list showing github extension as "disabled"

Followed the instructions in the README. "jupyter labextension list" command shows github is disabled. Tried enabling with "jupyter serverextension enable --py jupyterlab_github". No luck. Any help would be appreciated.

screen shot 2019-01-16 at 10 03 59 pm

Version details : -

OS - MacOS Mojave
Jupyter Notebook version - 5.6.0
Jupyter Lab version - 0.35.4
Jupyter Hub version - 0.9.4

GitLab support?

Hi,
great plugin - thanks!

We would like to have a tab in our jupyterhub/jupyterlab setup, which directs users to example notebooks prepared especially for our clusters.

Therefore I would like to use your plugin with our own gitlab server.
How difficult do you think would it be to make this possible?

Best,
Jens

Set default github repository on start

Hello,

we would like to use your jupyterlab-github extension in a multiuser jupyterhub installation on our cluster, which shows users example notebooks (same purpose as explained in #43).

Is it possible to set a default github repository at installation time for all users
which is linked to the Home-button instead of an ?

Best,
Jens Henrik

[GitHub] Deprecation Notice

On April 7th, 2020 at 19:31 (UTC) you used a password to access an endpoint through the GitHub API using python-requests/2.18.4:

I did not access my account on that specific hour . I even forgot about this website. How come i get such notice if I don’t use the account???

c.GitHubConfig.access_token is not recognized as the name of a cmdlet, function, script file, or operable program.

I have done step by step according to this code file, installed labextension and got my personal access token from Github.
While in the step 3. after installing jupyter_github, generating a configuration file named jupyter_notebook_config.py in my directory and run this file, when I type in c.GitHubConfig.access_token = '< ACCESS_TOKEN >', it returned an error message.

Code:
PS C:\Users\Username.jupyter> jupyter labextension install @jupyterlab/github

PS C:\Users\Username.jupyter> pip install jupyterlab_github
PS C:\Users\Username.jupyter> jupyter serverextension enable --sys-prefix jupyterlab_github

Then generated jupyter_notebook_config.py in the directory of PS C:\Users\Username.jupyter

PS C:\Users\Username.jupyter> c.GitHubConfig.access_token = '< YOUR_ACCESS_TOKEN >'

Error Return:
c.GithubConfig.access_token : The term 'c.GitHubConfig.access_token' is not recognised as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name. or if a path was included, verify that the path is correct and try again.
At line:1 char:1

  • c.GitHubConfig.access_token = '< dsfsddsgxxxxxxxx >'
    +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    • CategoryInfo : ObjectNotFound: (c.GitHubConfig.access_token:String) [], CommandNotFoundException
    • FullyQualifiedErrorId: CommanNotFoundException

Thank you!!!

Distinguish 403 errors

One can get 403 errors from being rate-limited and from trying to open files larger than 1Mb. We need to properly distinguish those cases.

Safari: User name input does not lead to listing of repos

Using J-Lab in Safari with this plugin, i put a username and it does not show the available repos.
I verified via Chrome, that the plugin was installed successfully, as things work there.

Here's what the javascript console says:

screenshot 2018-04-26 11 27 11

Here's my jupyters:

(stable) └─❱❱❱ conda list jupyter                                       +7857 11:46 ❰─┘
# packages in environment at /Users/klay6683/miniconda3/envs/stable:
#
# Name                    Version                   Build  Channel
jupyter                   1.0.0                      py_1    conda-forge
jupyter_client            5.2.3                    py36_0    conda-forge
jupyter_console           5.2.0                    py36_0    conda-forge
jupyter_contrib_core      0.3.3                    py36_1    conda-forge
jupyter_contrib_nbextensions 0.5.0                    py36_0    conda-forge
jupyter_core              4.4.0                      py_0    conda-forge
jupyter_highlight_selected_word 0.2.0                    py36_0    conda-forge
jupyter_latex_envs        1.4.4                    py36_0    conda-forge
jupyter_nbextensions_configurator 0.4.0                    py36_0    conda-forge
jupyterlab                0.32.0                   py36_1    conda-forge
jupyterlab_launcher       0.10.5                   py36_0    conda-forge

and my conda info:

(stable) └─❱❱❱ conda info                                               +7858 11:47 ❰─┘

     active environment : stable
    active env location : /Users/klay6683/miniconda3/envs/stable
            shell level : 1
       user config file : /Users/klay6683/.condarc
 populated config files : /Users/klay6683/.condarc
          conda version : 4.5.1
    conda-build version : not installed
         python version : 3.6.5.final.0
       base environment : /Users/klay6683/miniconda3  (writable)
           channel URLs : https://conda.anaconda.org/menpo/osx-64
                          https://conda.anaconda.org/menpo/noarch
                          https://conda.anaconda.org/jlaura/osx-64
                          https://conda.anaconda.org/jlaura/noarch
                          https://conda.anaconda.org/conda-forge/osx-64
                          https://conda.anaconda.org/conda-forge/noarch
                          https://conda.anaconda.org/conda-canary/osx-64
                          https://conda.anaconda.org/conda-canary/noarch
                          https://repo.anaconda.com/pkgs/main/osx-64
                          https://repo.anaconda.com/pkgs/main/noarch
                          https://repo.anaconda.com/pkgs/free/osx-64
                          https://repo.anaconda.com/pkgs/free/noarch
                          https://repo.anaconda.com/pkgs/r/osx-64
                          https://repo.anaconda.com/pkgs/r/noarch
                          https://repo.anaconda.com/pkgs/pro/osx-64
                          https://repo.anaconda.com/pkgs/pro/noarch
                          https://conda.anaconda.org/NSIDC/osx-64
                          https://conda.anaconda.org/NSIDC/noarch
          package cache : /Users/klay6683/miniconda3/pkgs
                          /Users/klay6683/.conda/pkgs
       envs directories : /Users/klay6683/miniconda3/envs
                          /Users/klay6683/.conda/envs
               platform : osx-64
             user-agent : conda/4.5.1 requests/2.18.4 CPython/3.6.5 Darwin/16.7.0 OSX/10.12.6
                UID:GID : 273771:2260
             netrc file : None
           offline mode : False

Github deprecation notice

Hi!
First, thanks for your software!
I used it today to browse the public repos of a github user and subsequently received this deprecation notice in my email:

On February 5th, 2020 at 23:32 (UTC) your personal access token using JupyterLab GitHub was used as part of a query parameter to access an endpoint through the GitHub API:
https://api.github.com/
Please use the Authorization HTTP header instead, as using the access_token query parameter is deprecated.
Depending on your API usage, we'll be sending you this email reminder once every 3 days for each token and User-Agent used in API calls made on your behalf.
Just one URL that was accessed with a token and User-Agent combination will be listed in the email reminder, not all.
Visit https://developer.github.com/changes/2019-11-05-deprecated-passwords-and-authorizations-api/#authenticating-using-query-parameters for more information.
Thanks,
The GitHub Team

I'm using jupyterlab-github 1.0.0 and jupyterlab 1.2.6.

compatibility issue with jupyter lab version 1.0.0a1

I installed Jupyter lab in developer mode(version=1.0.0a1). and tried to install jupyterlab-github from extensions manager in jupyter lab. It is causing the following compatibility errors.:
**An error occurred installing @jupyterlab/github.

Error message:

No version of @jupyterlab/github could be found that is compatible with the current version of JupyterLab.

Conflicting Dependencies:
JupyterLab Extension Package

=1.0.0-alpha.3 <2.0.0 >=0.19.1 <0.20.0 @jupyterlab/filebrowser
=1.0.0-alpha.3 <2.0.0 >=0.19.1 <0.20.0 @jupyterlab/docmanager
=1.0.0-alpha.3 <2.0.0 >=0.19.1 <0.20.0 @jupyterlab/apputils
=1.0.0-alpha.3 <2.0.0 >=0.19.1 <0.20.0 @jupyterlab/application**

screen shot 2019-02-20 at 1 27 22 pm

Lab extension compatibility glitch

Hi @ian-r-rose,

What an amazing work ❤️

Would you consider updating the version in package.json for this extension to work with the current Jupyter labextension 0.12.0+ version? I currently have this error (JPLab 0.29.1) when trying to install the labextension:

ValueError:
"@jupyterlab/[email protected]" is not compatible with the current JupyterLab
Conflicting Dependencies:
JupyterLab              Extension            Package
>=0.12.0-0 <0.13.0-0    >=0.11.0-0 <0.12.0-0 @jupyterlab/application
>=0.12.4-0 <0.13.0-0    >=0.11.0-0 <0.12.0-0 @jupyterlab/apputils
>=0.12.0-0 <0.13.0-0    >=0.11.0-0 <0.12.0-0 @jupyterlab/coreutils
>=0.12.0-0 <0.13.0-0    >=0.11.0-0 <0.12.0-0 @jupyterlab/docmanager
>=0.12.0-0 <0.13.0-0    >=0.11.0-0 <0.12.0-0 @jupyterlab/filebrowser
>=0.51.0-0 <0.52.0-0    >=0.50.0-0 <0.51.0-0 @jupyterlab/services

Cheers

add a button to clone the repo

Currently extension supports browsing the repo and opening the current repo either in binder or github itself. It would be useful to be able to clone the repo in current working directory or user defined directory.

Add Copy & Paste for files and directories

In version 2.1.2 I can't find "Copy" item in the context menu of the Files Browser as it is shown in the documentation on the picture. "Cut" item is available though.

Is it possible that my installation is somehow misconfigured or it is a bug?

My config:

c.NotebookApp.ip = '0.0.0.0'
c.NotebookApp.port = 8888
c.NotebookApp.notebook_dir = '/app/home'
c.NotebookApp.password = 'sha1:salt:hash'
c.NotebookApp.open_browser = False
c.NotebookApp.allow_password_change = False
c.NotebookApp.allow_root = True

The app is launched as jupyter lab.

unusable link generated from relative paths inside notebooks

Hello,

thanks for the great extension. It plays an important role for our cluster-wide installation of JupyterHub/JupyterLab and allows users to browse example notebooks easily.

These example notebooks often include links to other notebooks in the same github repository in Markdown cells like this:

* [Notebook Basics](examples/Notebook/Notebook Basics.ipynb)
* [IPython - beyond plain python](examples/IPython Kernel/Beyond Plain Python.ipynb)
* [Markdown Cells](examples/Notebook/Working With Markdown Cells.ipynb)

This will lead to a generated but wrong/damaged link like this:
github:<notebook-path-on-github>/<relative-path-to-file>

This is also relevant, if notebooks refer to images, which are part of the repository.

Best,
Jens Henrik

JupyterLab failed to build Error: Cannot find module './_baseValues'

Description

Hello, I am new to Python and I decided to use your environment.
An error appear when I try to install extensions.

"jupyter labextension install @jupyterlab/github"
"jupyter lab build"

I get the error :
jupyterLab failed to build

The log file shows an issue finding the module './_baseValues'
Error: Cannot find module './_baseValues'

I have not been able to find a solution.

I tried using
npm install ../_baseValues

Jupyterhub Integration

This is really a great addition to Jupyterlab. I'm wondering if anyone has devised a way of setting the token in Jupyterhub (and specificity using the Zero to Jupyterhub helm chart)? Thanks in advance.

Cannot open `directory` because it is a submodule'

Hi,

I'm having an issue with Git submodules as described below:

Description

When a directory is a GIT submodule, an attempt to open it with the @jupyterlab/github extension
displays an error:

Annotation 2019-09-30 232058

Reproduce

  1. Create a GIT submodule on the file system typing something like this on the
    command line
# To add and clone a new submodule
$ git submodule add https://github.com/chaconinc/DbConnector
$ git clone https://github.com/chaconinc/MainProject
$ git submodule init
$ git submodule update
  1. Open Jupyter Lab with the @jupyterlab/github extension installed.
  2. Open the GIT panels and browse to the submodule
  3. See error 'Cannot open <directory> because it is a submodule'

Expected behavior

Git submodules should be supported like regular Git modules. That would be extremely helpful!

Context

  • Python package version:

    # packages in environment at c:\Miniconda:
    #
    # Name                Version               Build  Channel
    jupyterlab-github    1.0.0                 pypi_0    pypi
    

Thanks,

WetHat

Non-English characters. Problem with Encoding.

There is a wrong text encoding if you try to open any file with non-english characters like russian or japanese. You can see that in README.md for github-repository on russian here: Skaarj7/netology or on japanese: gogotanaka/Primes. Just trash instead of cyrillic symbols or hieroglyphs.
screen

Config option `client_id` not recognized by `GitHubConfig`

I had this running fine for a while, but since a few weeks ago, I'm getting this error in my server log, despite the fact that browsing user's GitHub repos actually works?

/Users/klay6683/miniconda3/envs/py37/lib/python3.7/site-packages/traitlets/config/configurable.py:84: UserWarning: Config option `client_id` not recognized by `GitHubConfig`.
  self.config = config
/Users/klay6683/miniconda3/envs/py37/lib/python3.7/site-packages/traitlets/config/configurable.py:84: UserWarning: Config option `client_secret` not recognized by `GitHubConfig`.
  self.config = config

I have an OAuth configured and have c.GitHubConfig.client_id and c.GitHubConfig.client_secret defined in jupyter_notebook_config.py.

My Jlab version is 1.1.4 and I have updated to the latest jupyterlab-github via the Jlab extension manager plugin.

Private repos in organization I have access to are not listed (only public ones)

This seems to be fixed in #48 but not for me...

I have access to all private repositories in an organization. I have created an access token (for my user, not for the organization) with full repo permissions and added it to jupyter as described in your README:

~:: cat ~/.jupyter/jupyter_notebook_config.py 
c.GitHubConfig.access_token = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'

Still only public repos are listed for the organization in jupyterlab.

Tab is missing name

I'm running this extension successfully in a py36 conda env, with this minor hiccup that the tab name is blank:

screenshot 2017-11-12 22 07 30

My installed jupyter related versions are:

(stable) └─❱❱❱ conda list jupyter                                         +7004 22:06 ❰─┘
# packages in environment at /Users/klay6683/miniconda3/envs/stable:
#
jupyter                   1.0.0                    py36_0    conda-forge
jupyter_client            5.1.0                    py36_0    conda-forge
jupyter_console           5.2.0                    py36_0    conda-forge
jupyter_contrib_core      0.3.3                    py36_0    conda-forge
jupyter_contrib_nbextensions 0.3.3                    py36_0    conda-forge
jupyter_core              4.4.0                      py_0    conda-forge
jupyter_highlight_selected_word 0.1.0                    py36_0    conda-forge
jupyter_latex_envs        1.3.8.2                  py36_1    conda-forge
jupyter_nbextensions_configurator 0.2.8                    py36_0    conda-forge
jupyterlab                0.29.1                   py36_0    conda-forge
jupyterlab-github         0.2.0                     <pip>
jupyterlab_launcher       0.5.5                    py36_0    conda-forge

Cannot import .py file on github repo

Some people have their config py files on their repo and use such files in their notebook, but this extension cannot import such py files. It will throw a ModuleNotFoundError.

Client-side fallback

We should detect if the server proxy is not installed and use the extension purely client-side (with a warning). Then the user could get a few minutes of use before being rate limited.

[Design question] Why not simply git clone the repositories?

@ian-r-rose @dhirschfeld
We're building a similar plugin for GitLab and had a couple of questions about design choices you made in this repo. We would be grateful if you could answer some of these as it'll set us on the right path.

  • I see that you are fetching repository contents via GitHub API and converting them into Jupyter models (Contents.IModel etc.). Why not simply run a git clone from the server extension? That way the contents would be available under the regular file browser of Jupyter

  • Are the repository contents backed on disk somewhere? Does the refresh from repo overwrite the local edits?

  • I'm wondering if we were to go git clone way, how hard/easy would it be to later support 2-way synch (commit/push to repo etc.). Maybe we could read the repository state on disk and allow users to do git add/commit/push etc. Maybe use the git extension on the top.

Feel free to mention anything else I should be aware of. Thanks for your time!

make filebrowser filelist disappear

after i installed this github extension,filelists in the filebrowser disappeared。i've googled and tried a lot,but can't fix it ,finally had to reinstall jupyterlab and delete all the node_modules@jupyterlab . it returned to normal, i guess sth is not compatible with filebrowser.
image

environment: windows 10 python 3.6.8
jupyter core : 4.5.0
jupyter-notebook : 6.0.1
qtconsole : not installed
ipython : 7.8.0
ipykernel : 5.1.2
jupyter client : 5.3.1
jupyter lab : 1.0.2
nbconvert : 5.5.0
ipywidgets : not installed
nbformat : 4.4.0
traitlets : 4.3.2

Support more than 30 repos per user/org

Typing in my username in the username field, I only gets the first 30 repositories. This is irrespective of sorting order.

Edit: If I type in minrk, I only get to repo names starting with 'b' before being cut off ;)

[Question] Anyway to change refresh duration in file browser

For content from github, it really does not need refresh every 10 seconds.

As we have more than 1000 repos in an org, the list always changed back to repos of org even user enter a repo because the request of repos in org is longer than 10 sec.

Viewing private repos

I'm trying to view private repos for my org. I'm running JupyterHub in minikube with JupyterLab configured. I've also installed both the lab as well as server extensions by adding the following to my userimage dockerfile

RUN jupyter labextension install @jupyterlab/github

RUN pip install jupyterlab_github
RUN jupyter serverextension enable --sys-prefix jupyterlab_github

I've confirmed that the python package version is 0.6 and I am running jupyterlab version 0.32.0.

I've added my access token to helm values file as:

hub:
  extraEnv:
    JUPYTER_ENABLE_LAB: 1
  extraConfig: |
    c.KubeSpawner.cmd = ['jupyter-labhub']
    c.GitHubConfig.access_token = 'XXXXXXXXXXXXXXXXXXXXXXXX'

I cannot see any of the private repos.

I'm also seeing sporadic rate-limiting which makes me believe that possibly the server extension is not properly installed?

Any guidance would be appreciated.

Cannot set default github repo during docker build

Hi all,
I'm trying to pre-load the default github repo that is shown when a docker is loaded up using the something like the following in my dockerfile (and needless to say, not working):

#Set up github access (this is temporary; real version will request key at container runtime)
RUN echo "c.GitHubConfig.access_token = 'ToBeReplacedWithLineInRunTimeShellScript'" >> ~/.jupyter/jupyter_notebook_config.py

RUN mkdir -p ~/.jupyter/lab/user-settings/@jupyterlab/github && \
    echo "{\n  "defaultRepo": "alexlicohen/script-toolbox"\n}" >> ~/.jupyter/lab/user-settings/@jupyterlab/github/drive.jupyterlab-settings

How to copy a file locally?

The extension is really nice to run a notebook directly from a GitHub repository.

I think a common use case is to create a local copy of a notebook so that it can be modified and saved locally. I can't find an easy way to copy a file from the GitHub drive to the local filesystem.

I tried to use "Copy" from the contextual menu (when right clicking on a file) and then "Paste" but nothing happens.

The only way I found so far is to open the notebook in a text editor, copy the content, create a text file, paste, and rename the file. Not super user friendly. Is there a better way to do that?

Include org/user in the path

This will give resources on GitHub a unique path from JupyterLab's perspective, and will allow, among other things, page refresh to work correctly.

@jupyterlab/github doesn't appear to be on npm registry

@ian-r-rose ... was trying to install this via a Dockerfile, but hitting this error. Is the plan to post this as a package to npmjs.org? Thanks.

Step 33/52 : RUN jupyter labextension install @jupyterlab/github
 ---> Running in 53c901e7972e
> npm pack @jupyterlab/github
npm ERR! Linux 4.4.0-1020-aws
npm ERR! argv "/opt/conda/bin/node" "/opt/conda/bin/npm" "pack" "@jupyterlab/github"
npm ERR! node v6.11.0
npm ERR! npm  v3.10.10
npm ERR! code E404

npm ERR! 404 Not found : @jupyterlab/github
npm ERR! 404 
npm ERR! 404  '@jupyterlab/github' is not in the npm registry.
npm ERR! 404 You should bug the author to publish it (or use the name yourself!)
npm ERR! 404 
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, http url, or git url.

ValueError: The extension does not support current version od JupyterLab

jupyter labextension install @jupyterlab/git brings me:
An error occured.
ValueError: The extension "@jupyterlab/git" does not yet support the current version of JupyterLab.
Conflicting Dependencies:
JupyterLab --- Extension --- Package

=2.1.0 <2.2.0 --- >=1.1.0 <2.0.0 --- @jupyterlab/application
=2.1.0 <2.2.0 --- >=1.1.0 <2.0.0 --- @jupyterlab/apputils
=2.1.0 <2.2.0 --- >=1.1.0 <2.0.0 ---@jupyterlab/console
=4.1.0 <4.2.0 --- >=3.1.0 <4.0.0 ---@jupyterlab/coreutils
=2.1.0 <2.2.0 --- >=1.1.0 <2.0.0 --- @jupyterlab/filebrowser
=5.1.0 <5.2.0 --- >=4.1.0 <5.0.0 --- @jupyterlab/services
=2.1.0 <2.2.0 --- >=1.1.0 <2.0.0 --- @jupyterlab/terminal
=16.9.0 <16.10.0 --- >=16.8.4 <16.9.0 --- react
=16.9.0 <16.10.0 --- >=16.8.4 <16.9.0 --- react-dom

is this extension working??

Private Repository Access?

Hi All,

I have installed the jupyterlab-github client and serverside extension as per the instructions in the ReadMe. The application is working great, but I am not able to access (or even view) my private repositories. Is private repository access currently supported, or in the works (hopefully)?

Thanks!
-Rick

File Load Error when trying to open a notebook

When I try to open a notebook using the extension, I always get the error:

File Load Error for ....
undefined is not an object (evaluating 'value.cells')

If I download the file locally, I have no issue opening it.
I'm using (installed from conda-forge):

  - jupyter_client=5.2.3=py_1
  - jupyter_core=4.4.0=py_0
  - jupyterlab=0.35.4=py36_0
  - jupyterlab_server=0.2.0=py_0
  - notebook=5.7.2=py36_1000
  - pip:
    - jupyterlab-github==0.7.0

lab extension:
@jupyterlab/github v0.10.0  enabled  OK

file_load_error

Error Loading Theme

Error Loading Theme
Stylesheet failed to load: /lab/api/themes/@jupyterlab/theme-light-extension/index.css

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.