Skip to content

Commit be4a5fa

Browse files
authored
Standalone pip package (#415)
* Standalone pip package * Move python tests in package * Correct travis script * Use yarn and add conda for server manager * Install from sdist
1 parent 6329d29 commit be4a5fa

20 files changed

+850
-54
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,3 +105,5 @@ node_modules/
105105
.vscode/
106106

107107
package-lock.json
108+
MANIFEST
109+
jupyterlab_git/labextension/*.tgz

.travis.yml

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,14 @@ cache:
55
pip: true
66
directories:
77
- /home/travis/.yarn-cache/
8-
install: pip install pytest "jupyterlab>=1.0.3"
98
script:
10-
- pytest tests/unit
11-
- yarn
12-
- yarn build
13-
- yarn test
14-
- pip install .
15-
- jupyter serverextension enable --py jupyterlab_git
16-
- jupyter labextension install .
9+
- python setup.py sdist
10+
- pip install --find-links=dist jupyterlab_git[test]
11+
- pytest jupyterlab_git
12+
- jlpm install
13+
- jlpm run build
14+
- jlpm run test
15+
- jupyter lab build
1716
- python -m jupyterlab.browser_check
18-
- yarn run lint
19-
- python -m tests.test-browser.run_browser_test
17+
- jlpm run lint
18+
- python tests/test-browser/run_browser_test.py

MANIFEST.in

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
include LICENSE
2+
include README.md
3+
4+
include setupbase.py
5+
6+
include package.json
7+
include *.config.js
8+
include setupJest.js
9+
include ts*.json
10+
include jupyterlab_git/labextension/*.tgz
11+
12+
# Tests
13+
graft tests
14+
prune tests/build
15+
16+
# Javascript files
17+
graft src
18+
graft style
19+
prune **/node_modules
20+
prune lib
21+
22+
# Patterns to exclude from any directory
23+
global-exclude *~
24+
global-exclude *.pyc
25+
global-exclude *.pyo
26+
global-exclude .git
27+
global-exclude .ipynb_checkpoints

README.md

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,8 @@ A JupyterLab extension for version control using git
2020
To install perform the following steps:
2121

2222
```bash
23-
jupyter labextension install @jupyterlab/git
2423
pip install --upgrade jupyterlab-git
25-
jupyter serverextension enable --py jupyterlab_git
24+
jupyter lab build
2625
```
2726

2827
## Development
@@ -59,24 +58,20 @@ Requires node 4+ and npm 4+
5958
# Clone the repo to your local environment
6059
git clone https://github.com/jupyterlab/jupyterlab-git.git
6160
cd jupyterlab-git
62-
# Install dependencies
63-
npm install # or yarn
61+
# Install the server extension in development mode
62+
pip install -e .
63+
jupyter serverextension enable --py jupyterlab_git
64+
# Install Javascript dependencies
65+
jlpm install
6466
# Build Typescript source
65-
npm run build # or yarn build
67+
jlpm run build
6668
# Link your development version of the extension with JupyterLab
6769
jupyter labextension link .
68-
# Rebuild Typescript source after making changes
69-
npm run build # or yarn build
70-
```
71-
72-
```bash
73-
pip install .
74-
jupyter serverextension enable --py jupyterlab_git
7570
```
7671

77-
To rebuild the package and the JupyterLab app:
72+
To rebuild the package after a change and the JupyterLab app:
7873

7974
```bash
80-
npm run build
75+
jlpm run build
8176
jupyter lab build
8277
```
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"NotebookApp": {
3+
"nbserver_extensions": {
4+
"jupyterlab_git": true
5+
}
6+
}
7+
}

jupyterlab_git/README.md

Lines changed: 0 additions & 6 deletions
This file was deleted.

jupyterlab_git/_version.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Copyright (c) Project Jupyter.
2+
# Distributed under the terms of the Modified BSD License.
3+
4+
version_info = (0, 8, 2)
5+
__version__ = ".".join(map(str, version_info))
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)