Skip to content

Commit 18273ea

Browse files
fcollonvaljtpio
andauthored
Integration of all parts (#91)
* Fix new repository name * Init lerna * WIP multipackages * Integrate navigator within Python package * WIP integration of all code * Fix build CI * Fix packaging * Update binder * Ensure labextension folder exists * Correct configuration for binder * Fix casperjs not found * Fix link to icon in binder * Update READMEs * Fix casperjs paths * Fix infinite loop on test * Add webpack analyzer * Fix fontawesome treeshaking * Fix coverall * Apply suggestions from code review Co-authored-by: Jeremy Tuloup <[email protected]> * Some tweaks following review * Fix setup.py * Fix undone renaming Co-authored-by: Jeremy Tuloup <[email protected]>
1 parent 57f3362 commit 18273ea

File tree

122 files changed

+26572
-1272
lines changed

Some content is hidden

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

122 files changed

+26572
-1272
lines changed

.github/workflows/build.yml

+26-32
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
uses: actions/cache@v2
2222
env:
2323
# Increase this value to reset cache
24-
CACHE_NUMBER: 1
24+
CACHE_NUMBER: 2
2525
with:
2626
path: ~/conda_pkgs_dir
2727
key: ${{ runner.os }}-conda-${{ matrix.python-version }}-${{ env.CACHE_NUMBER }}-${{ hashFiles('requirements_dev.txt') }}
@@ -37,7 +37,7 @@ jobs:
3737
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
3838
env:
3939
# Increase this value to reset cache
40-
CACHE_NUMBER: 2
40+
CACHE_NUMBER: 3
4141
with:
4242
path: |
4343
${{ steps.yarn-cache-dir-path.outputs.dir }}
@@ -61,26 +61,22 @@ jobs:
6161
run: |
6262
conda activate test_jupyter_conda
6363
conda install -n test_jupyter_conda --file requirements_dev.txt
64-
conda install -n test_jupyter_conda coveralls jupyterlab~=2.0
65-
npm install
64+
conda install -n test_jupyter_conda coveralls jupyterlab=2
65+
yarn install
6666
npm install -g casperjs
6767
pip install .
68-
cd labextension
69-
jlpm install
70-
jupyter labextension install .
71-
cd ..
68+
jupyter labextension link packages/common/ packages/labextension/
7269
shell: bash -l {0}
7370

7471
- name: Test the extension
7572
run: |
7673
conda activate test_jupyter_conda
7774
flake8 setup.py jupyter_conda
7875
coverage run -m pytest jupyter_conda
79-
coverage report
80-
cd labextension
81-
npm run eslint:check
82-
npm run test
83-
cd ..
76+
coverage report
77+
yarn run eslint:check
78+
yarn run test
79+
8480
jupyter serverextension list 1>serverextensions 2>&1
8581
cat serverextensions | grep "jupyter_conda.*OK"
8682
jupyter labextension list 1>labextensions 2>&1
@@ -100,10 +96,10 @@ jobs:
10096
run: |
10197
conda activate test_jupyter_conda
10298
gem install coveralls-lcov
103-
cd labextension
104-
coveralls-lcov -v -n coverage/lcov.info > jscoverage.json
105-
cd ..
106-
python -m coveralls --merge=labextension/jscoverage.json
99+
cd packages/common/
100+
coveralls-lcov -v -n coverage/lcov.info > ../../common-jscoverage.json
101+
cd ../../
102+
python -m coveralls --merge=common-jscoverage.json
107103
shell: bash -l {0}
108104

109105
coveralls:
@@ -135,7 +131,7 @@ jobs:
135131
uses: actions/cache@v2
136132
env:
137133
# Increase this value to reset cache
138-
CACHE_NUMBER: 1
134+
CACHE_NUMBER: 2
139135
with:
140136
path: ~/conda_pkgs_dir
141137
key: ${{ matrix.os }}-conda-3.7-${{ env.CACHE_NUMBER }}-${{ hashFiles('requirements_dev.txt') }}
@@ -151,7 +147,7 @@ jobs:
151147
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
152148
env:
153149
# Increase this value to reset cache
154-
CACHE_NUMBER: 1
150+
CACHE_NUMBER: 2
155151
with:
156152
path: |
157153
${{ steps.yarn-cache-dir-path.outputs.dir }}
@@ -175,14 +171,13 @@ jobs:
175171
run: |
176172
conda activate test_jupyter_conda
177173
conda install -n test_jupyter_conda --file requirements_dev.txt
178-
conda install -n test_jupyter_conda coveralls jupyterlab~=2.0
179-
npm install
174+
conda install -n test_jupyter_conda coveralls jupyterlab=2
175+
yarn install
180176
npm install -g casperjs@^1.1.1 phantomjs-prebuilt@^2.1.7
181177
pip install .
182-
cd labextension
183-
jlpm install
184-
jupyter labextension install .
185-
cd ..
178+
179+
yarn install
180+
jupyter labextension link packages/common/ packages/labextension/
186181
shell: bash -l {0}
187182

188183
- name: Test the extension
@@ -191,12 +186,11 @@ jobs:
191186
run: |
192187
conda activate test_jupyter_conda
193188
flake8 setup.py jupyter_conda
194-
coverage run -m pytest jupyter_conda
195-
coverage report
196-
cd labextension
197-
npm run eslint:check
198-
npm run test
199-
cd ..
189+
coverage run -m pytest jupyter_conda
190+
coverage report
191+
yarn run eslint:check
192+
yarn run test
193+
200194
jupyter serverextension list
201195
jupyter labextension list
202196
if [ "${OS_RUNNER}" != "windows-latest" ]; then python -m jupyterlab.browser_check; fi
@@ -239,7 +233,7 @@ jobs:
239233
run: |
240234
conda activate test_jupyter_conda
241235
mamba install -n test_jupyter_conda --file requirements_dev.txt
242-
npm install
236+
yarn install
243237
npm install -g casperjs
244238
pip install .
245239
shell: bash -l {0}

.github/workflows/navigator.yml

-28
This file was deleted.

.github/workflows/publish.yml

+3-4
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,9 @@ jobs:
2525
- name: Build and publish NPM package
2626
if: ${{ startsWith(github.ref, 'refs/tags/jupyterlab_conda') }}
2727
run: |
28-
cd labextension
29-
jlpm
30-
npm publish
31-
cd ..
28+
npm install -g yarn
29+
yarn install
30+
yarn run publish
3231
env:
3332
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
3433
- name: Publish Python package

.gitignore

+6-2
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,10 @@ screenshots/
6161
node_modules/
6262

6363
.vscode/
64-
*/tsconfig.tsbuildinfo
64+
**/tsconfig.tsbuildinfo
6565
.pytest_cache/
66-
labextension/coverage/
66+
jupyter_conda/navigator/static/**
67+
!jupyter_conda/navigator/static/.gitkeep
68+
packages/**/coverage/**
69+
jupyter_conda/labextension/**
70+
packages/navigator/webpack-report.html

MANIFEST.in

+11-8
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,21 @@
11
include LICENSE
22
include README.md
3-
include setup.py
4-
include requirements.txt
53
include requirements_dev.txt
64

75
recursive-include jupyter-config *.json
86
recursive-include jupyter_conda *
97

108
include package.json
11-
graft labextension
12-
prune labextension/coverage
13-
prune labextension/lib
14-
prune labextension/build
15-
prune labextension/node_modules
9+
include lerna.json
10+
include yarn.lock
11+
include tsconfig.json
12+
include tsconfig-base.json
13+
include eslint-base.js
14+
graft packages
15+
prune packages/**/coverage
16+
prune packages/**/lib
17+
prune packages/**/build
18+
prune packages/**/node_modules
1619
prune **/.ipynb_checkpoints
1720
prune **/.vscode
1821

@@ -22,4 +25,4 @@ global-exclude *.pyc
2225
global-exclude *.pyo
2326
global-exclude *.gif
2427
global-exclude *.tsbuildinfo
25-
global-exclude *.log
28+
global-exclude *.log

0 commit comments

Comments
 (0)