Skip to content

Commit a72d4b7

Browse files
ajbozarthfcollonvallresende
authored
Update to Jupyterlab 3.0 (#818)
Co-authored-by: Frédéric Collonval <[email protected]> Co-authored-by: Luciano Resende <[email protected]>
1 parent 90cfb96 commit a72d4b7

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+5935
-5117
lines changed

.eslintrc.js

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,17 @@ module.exports = {
1313
},
1414
plugins: ['@typescript-eslint'],
1515
rules: {
16-
'@typescript-eslint/camelcase': 'off',
1716
'@typescript-eslint/explicit-function-return-type': 'off',
18-
'@typescript-eslint/interface-name-prefix': [
19-
'error',
20-
{ prefixWithI: 'always' }
17+
"@typescript-eslint/naming-convention": [
18+
"error",
19+
{
20+
"selector": "interface",
21+
"format": ["PascalCase"],
22+
"custom": {
23+
"regex": "^I[A-Z]",
24+
"match": true
25+
}
26+
}
2127
],
2228
'@typescript-eslint/no-unused-vars': ['warn', { args: 'none' }],
2329
'@typescript-eslint/no-explicit-any': 'off',

.github/workflows/build.yml

Lines changed: 23 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
name: Test
1+
name: Build
22

33
on:
44
push:
5-
branches: [master]
5+
branches: master
66
pull_request:
77
branches: "*"
88

@@ -12,22 +12,25 @@ jobs:
1212
runs-on: ubuntu-latest
1313
strategy:
1414
matrix:
15-
python-version: ['3.6', '3.7', '3.8', '3.9']
15+
python-version: ["3.6", "3.7", "3.8", "3.9"]
1616
steps:
1717
- name: Checkout
1818
uses: actions/checkout@v2
19-
19+
- name: Install node
20+
uses: actions/setup-node@v1
21+
with:
22+
node-version: "12.x"
2023
- name: Setup Python ${{ matrix.python-version }}
2124
uses: actions/setup-python@v2
2225
with:
2326
python-version: ${{ matrix.python-version }}
24-
architecture: 'x64'
27+
architecture: "x64"
2528

2629
- name: Get pip cache dir
2730
id: pip-cache
2831
run: |
2932
echo "::set-output name=dir::$(pip cache dir)"
30-
33+
3134
- name: pip cache
3235
uses: actions/cache@v2
3336
with:
@@ -56,39 +59,28 @@ jobs:
5659
${{ runner.os }}-yarn-
5760
5861
- name: Install dependencies
59-
run: |
60-
pip install wheel
61-
pip install --upgrade --upgrade-strategy=eager "jupyterlab~=2.0"
62-
62+
run: python -m pip install -U jupyter_packaging~=0.7.9 jupyterlab~=3.0 pip wheel
6363
- name: Test the extension
6464
run: |
65-
# Build the sdist (identical to what will be uploaded to eg pypi on release)
66-
python setup.py sdist
67-
# Linter checks
68-
jlpm run eslint-check
69-
70-
# Install the extension from the sdist ensuring the cache is unused
71-
pip install jupyterlab_git[test] --pre --no-index --find-links=dist --no-deps --no-cache-dir -v
72-
# Install the extension dependencies based on the current setup.py
73-
pip install jupyterlab_git[test]
65+
jlpm
66+
jlpm run eslint:check
67+
python -m pip install -e .[dev]
7468
7569
# Python formatting checks
7670
black . --check
77-
71+
7872
# Run the Python tests
7973
pytest jupyterlab_git -r ap
8074
# Run the TS/JS tests
8175
jlpm run test
82-
83-
# Log the current state of jupyterlab's extensions
84-
jupyter labextension list
85-
# Rebuild jupyterlab to include our extension
86-
jupyter lab build
87-
# Run the standard jupyterlab browser integration test
88-
jupyter serverextension list 1>serverextensions 2>&1
89-
cat serverextensions | grep "jupyterlab_git.*OK"
90-
jupyter labextension list 1>labextensions 2>&1
91-
cat labextensions | grep "@jupyterlab/git.*OK"
76+
77+
python -m pip uninstall -y jupyterlab-git
78+
79+
# Integration test
80+
python -m pip install .
81+
jupyter server extension list 2>&1 | grep -ie "jupyterlab_git.*OK"
82+
83+
jupyter labextension list 2>&1 | grep -ie "@jupyterlab/git.*OK"
9284
python -m jupyterlab.browser_check
9385
# Run our extension-specific browser integration test
94-
python tests/test-browser/run_browser_test.py
86+
# python tests/test-browser/run_browser_test.py

.gitignore

Lines changed: 34 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,42 @@
1-
# os junk
2-
.DS_Store
3-
4-
# yarn/typescript build junk
5-
package-lock.json
1+
*.bundle.*
2+
lib/
3+
node_modules/
4+
*.egg-info/
5+
.ipynb_checkpoints
66
*.tsbuildinfo
7+
jupyterlab_git/labextension
8+
9+
# Created by https://www.gitignore.io/api/python
10+
# Edit at https://www.gitignore.io/?templates=python
711

12+
### Python ###
813
# Byte-compiled / optimized / DLL files
914
__pycache__/
1015
*.py[cod]
1116
*$py.class
12-
.pytest_cache/
1317

1418
# C extensions
1519
*.so
1620

1721
# Distribution / packaging
18-
*.egg
19-
*.egg-info/
20-
.eggs/
21-
.installed.cfg
2222
.Python
23-
env/
2423
build/
2524
develop-eggs/
2625
dist/
2726
downloads/
2827
eggs/
29-
jupyterlab_git/labextension/*.tgz
28+
.eggs/
3029
lib/
3130
lib64/
32-
MANIFEST
3331
parts/
3432
sdist/
3533
var/
3634
wheels/
35+
pip-wheel-metadata/
36+
share/python-wheels/
37+
.installed.cfg
38+
*.egg
39+
MANIFEST
3740

3841
# PyInstaller
3942
# Usually these files are written by a python script from a template
@@ -48,26 +51,20 @@ pip-delete-this-directory.txt
4851
# Unit test / coverage reports
4952
htmlcov/
5053
.tox/
54+
.nox/
5155
.coverage
5256
.coverage.*
5357
.cache
5458
nosetests.xml
5559
coverage.xml
5660
*.cover
5761
.hypothesis/
62+
.pytest_cache/
5863

5964
# Translations
6065
*.mo
6166
*.pot
6267

63-
# Django stuff:
64-
*.log
65-
local_settings.py
66-
67-
# Flask stuff:
68-
instance/
69-
.webassets-cache
70-
7168
# Scrapy stuff:
7269
.scrapy
7370

@@ -104,12 +101,26 @@ ENV/
104101
# Rope project settings
105102
.ropeproject
106103

104+
# Mr Developer
105+
.mr.developer.cfg
106+
.project
107+
.pydevproject
108+
107109
# mkdocs documentation
108110
/site
109111

110112
# mypy
111113
.mypy_cache/
112-
node_modules/
114+
.dmypy.json
115+
dmypy.json
116+
117+
# Pyre type checker
118+
.pyre/
119+
120+
# End of https://www.gitignore.io/api/python
121+
122+
# OSX files
123+
.DS_Store
113124

114125
# jetbrains ide stuff
115126
*.iml
@@ -122,5 +133,5 @@ node_modules/
122133

123134
# vim stuff
124135
*.swp
125-
.devcontainer/
136+
126137
src/version.ts

.prettierignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@ node_modules
22
**/node_modules
33
**/lib
44
**/package.json
5+
jupyterlab_git

.prettierrc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
{
2-
"singleQuote": true
2+
"singleQuote": true,
3+
"trailingComma": "none",
4+
"arrowParens": "avoid"
35
}

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Contributing
22

3-
You can contribute in many ways to move this project forwrad.
3+
You can contribute in many ways to move this project forward.
44

55
While anyone can contribute, only [Team Members](https://github.com/jupyterlab/jupyterlab-git#team) can merge in pull requests
66
or add labels to issues.

LICENSE

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
BSD 3-Clause License
22

3-
Copyright (c) 2017, Project Jupyter Contributors
4-
All rights reserved.
3+
Copyright (c) 2020, Jupyter Development Team All rights reserved.
54

65
Redistribution and use in source and binary forms, with or without
76
modification, are permitted provided that the following conditions are met:

MANIFEST.in

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,19 @@
11
include LICENSE
22
include README.md
3+
include pyproject.toml
4+
include jupyter-config/jupyterlab_git.json
35

4-
include setupbase.py
6+
include package.json
7+
include install.json
8+
include ts*.json
9+
10+
graft jupyterlab_git/labextension
11+
12+
# Javascript files
13+
graft src
14+
graft style
15+
prune **/node_modules
16+
prune lib
517

618
# Patterns to exclude from any directory
719
global-exclude *~

0 commit comments

Comments
 (0)