Skip to content

Commit 0e386f6

Browse files
committed
Prepare 3.0.0 federated release
1 parent 5c7722b commit 0e386f6

File tree

2 files changed

+43
-18
lines changed

2 files changed

+43
-18
lines changed

README.md

Lines changed: 42 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@ which represents a huge increase in complexity for the extension.
2323

2424
### A note on rate-limiting
2525

26-
This extension has both a client-side component (that is, Javascript that is bundled
26+
This extension has both a client-side component (that is, JavaScript that is bundled
2727
with JupyterLab), and a server-side component (that is, Python code that is added
28-
to the Jupyter notebook server). This extension _will_ work with out the server extension,
28+
to the Jupyter server). This extension _will_ work with out the server extension,
2929
with a major caveat: when making unauthenticated requests to GitHub
3030
(as we must do to get repository data), GitHub imposes fairly strict rate-limits
3131
on how many requests we can make. As such, you are likely to hit that limit
@@ -37,25 +37,31 @@ This process is described in the [installation](#Installation) section.
3737

3838
## Prerequisites
3939

40-
- JupyterLab 1.0
41-
- A GitHub account for the serverextension
40+
- JupyterLab 3.0
41+
- A GitHub account for the server extension
4242

4343
## Installation
4444

45-
As discussed above, this extension has both a serverextension and a labextension.
45+
As discussed above, this extension has both a server extension and a lab extension.
46+
Both extensions will be installed by default when installing from PyPI, but you may
47+
have only lab extension installed if you used the Extension Manager in JupyterLab 3.x.
48+
4649
We recommend installing both so as to not be rate-limited.
47-
The purpose of the serverextension is to add GitHub credentials that you will need to acquire
50+
The purpose of the server extension is to add GitHub credentials that you will need to acquire
4851
from https://github.com/settings/developers, and then to proxy your request to GitHub.
4952

50-
### 1. Installing the labextension
53+
For JupyterLab version older than 3 please see the instructions on the
54+
[2.x branch](https://github.com/jupyterlab/jupyterlab-github/tree/2.x).
55+
56+
### 1. Installing both server and prebuilt lab extension
5157

52-
To install the labextension, enter the following in your terminal:
58+
To install the both the server extension and (prebuilt) lab extension, enter the following in your terminal:
5359

5460
```bash
55-
jupyter labextension install @jupyterlab/github
61+
pip install jupyterlab-github
5662
```
5763

58-
With only this installed, the extension should work, and you can experience the joys of
64+
After the restarting JupyterLab, the extension should work, and you can experience the joys of
5965
being rate-limited first-hand!
6066

6167
### 2. Getting your credentials from GitHub
@@ -100,23 +106,42 @@ You can register an OAuth application with GitHub by following these steps:
100106
It is important to note that the "Client Secret" string is, as the name suggests, a secret.
101107
_Do not_ share this value online, as people may be able to use it to impersonate you on GitHub.
102108

103-
### 3. Installing the serverextension
109+
### 3. Enabling and configuring the server extension
110+
111+
The server extension will be enabled by default on new JupyterLab installations
112+
if you installed it with pip. If you used Extension Manager in JupyterLab 3.x,
113+
please uninstall the extension and install it again with the instructions from point (1).
114+
115+
Confirm that the server extension is installed and enabled with:
116+
117+
```bash
118+
jupyter server extension list
119+
```
120+
121+
you should see the following:
122+
123+
```
124+
- Validating jupyterlab_github...
125+
jupyterlab_github 3.0.0 OK
126+
```
104127

105-
Install the serverextension using pip, and then enable it:
128+
On some older installations (e.g. old JupyterHub versions) which use jupyter
129+
`notebook` server instead of the new `jupyter-server`, the extension needs to
130+
show up on the legacy `serverextensions` list (note: no space between _server_ and _extension_):
106131

107132
```bash
108-
pip install jupyterlab_github
133+
jupyter serverextension list
109134
```
110135

111-
If you are running Notebook 5.2 or earlier, enable the server extension by running
136+
If the extension is not enabled run:
112137

113138
```bash
114-
jupyter serverextension enable --sys-prefix jupyterlab_github
139+
jupyter server extension enable jupyterlab_github
115140
```
116141

117142
You now need to add the credentials you got from GitHub
118-
to your notebook configuration file. Instructions for generating a configuration
119-
file can be found [here](http://jupyter-notebook.readthedocs.io/en/stable/config_overview.html#configure-nbserver).
143+
to your server configuration file. Instructions for generating a configuration
144+
file can be found [here](https://jupyter-server.readthedocs.io/en/stable/users/configuration.html#configuring-a-jupyter-server).
120145
Once you have identified this file, add the following lines to it:
121146

122147
```python

jupyterlab_github/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
from notebook.utils import url_path_join, url_escape
1111
from notebook.base.handlers import APIHandler
1212

13-
__version__ = '2.0.0'
13+
from ._version import __version__
1414

1515

1616
link_regex = re.compile(r'<([^>]*)>;\s*rel="([\w]*)\"')

0 commit comments

Comments
 (0)