Skip to content

Commit 4557b89

Browse files
author
Frédéric Collonval
committed
Misc enhancements
1 parent 409aae1 commit 4557b89

File tree

4 files changed

+129
-129
lines changed

4 files changed

+129
-129
lines changed

.github/workflows/build.yml

Lines changed: 78 additions & 79 deletions
Original file line numberDiff line numberDiff line change
@@ -4,87 +4,86 @@ on:
44
push:
55
branches: master
66
pull_request:
7-
branches: '*'
7+
branches: "*"
88

99
jobs:
1010
build:
1111
runs-on: ubuntu-latest
1212
steps:
13-
- name: Checkout
14-
uses: actions/checkout@v2
15-
16-
- name: Install node
17-
uses: actions/setup-node@v2
18-
with:
19-
node-version: '12.x'
20-
21-
- name: Install Python
22-
uses: actions/setup-python@v2
23-
with:
24-
python-version: '3.7'
25-
architecture: 'x64'
26-
27-
- name: Setup pip cache
28-
uses: actions/cache@v2
29-
with:
30-
path: ~/.cache/pip
31-
key: pip-3.7-${{ hashFiles('package.json') }}
32-
restore-keys: |
33-
pip-3.7-
34-
pip-
35-
36-
- name: Get npm cache directory
37-
id: npm-cache
38-
run: |
39-
echo "::set-output name=dir::$(npm config get cache)"
40-
41-
- uses: actions/cache@v2
42-
with:
43-
path: ${{ steps.npm-cache.outputs.dir }}
44-
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
45-
restore-keys: |
46-
${{ runner.os }}-node-
47-
48-
- name: Install dependencies
49-
run: |
50-
python -m pip install -U pip setuptools cookiecutter
51-
52-
- name: Test the extension
53-
run: |
54-
cookiecutter . --config-file tests/testconfig.yaml --no-input
55-
pushd jupyter-widget-testwidgets
56-
python -m pip install --upgrade -v -e ".[test, examples, docs]"
57-
yarn run lint:check
58-
59-
pytest
60-
yarn run test
61-
popd
62-
63-
- name: Check docs can be build + links
64-
run: |
65-
sudo apt install -y pandoc
66-
pushd jupyter-widget-testwidgets/docs
67-
make html
68-
popd
69-
70-
python -m pytest --check-links
71-
72-
- name: Make a non-local install so the data_files get populated
73-
run: |
74-
pip uninstall -y jupyter_widget_testwidgets
75-
pushd jupyter-widget-testwidgets
76-
77-
pip install .
78-
79-
# Validate nbextension (enable does not use exit code):
80-
jupyter nbextension enable --py --sys-prefix jupyter_widget_testwidgets
81-
python -c "from notebook.nbextensions import validate_nbextension; import sys; sys.exit(validate_nbextension('jupyter_widget_testwidgets/extension') or 0)"
82-
83-
# Validate labextension
84-
pip install -U jupyterlab~=3.0 jupyter_packaging~=0.7
85-
# Make sure our lab extension was installed.
86-
jupyter labextension list 2>&1 | grep -ie "jupyter-widget-testwidgets.*OK"
87-
# Make sure our lab extension can be develop installed.
88-
jupyter labextension develop . --overwrite
89-
90-
popd
13+
- name: Checkout
14+
uses: actions/checkout@v2
15+
16+
- name: Install node
17+
uses: actions/setup-node@v2
18+
with:
19+
node-version: "12.x"
20+
21+
- name: Install Python
22+
uses: actions/setup-python@v2
23+
with:
24+
python-version: "3.7"
25+
architecture: "x64"
26+
27+
- name: Setup pip cache
28+
uses: actions/cache@v2
29+
with:
30+
path: ~/.cache/pip
31+
key: pip-3.7-${{ hashFiles('package.json') }}
32+
restore-keys: |
33+
pip-3.7-
34+
pip-
35+
36+
- name: Get npm cache directory
37+
id: npm-cache
38+
run: |
39+
echo "::set-output name=dir::$(npm config get cache)"
40+
41+
- uses: actions/cache@v2
42+
with:
43+
path: ${{ steps.npm-cache.outputs.dir }}
44+
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
45+
restore-keys: |
46+
${{ runner.os }}-node-
47+
48+
- name: Install dependencies
49+
run: |
50+
python -m pip install -U pip setuptools cookiecutter
51+
52+
- name: Test the extension
53+
run: |
54+
cookiecutter . --config-file tests/testconfig.yaml --no-input
55+
pushd jupyter-widget-testwidgets
56+
python -m pip install --upgrade -v -e ".[test, examples, docs]"
57+
yarn run lint:check
58+
59+
pytest
60+
yarn run test
61+
popd
62+
63+
- name: Check docs can be build + links
64+
run: |
65+
sudo apt install -y pandoc
66+
pushd jupyter-widget-testwidgets/docs
67+
make html
68+
python -m pytest --check-links
69+
popd
70+
71+
- name: Make a non-local install so the data_files get populated
72+
run: |
73+
pip uninstall -y jupyter_widget_testwidgets
74+
pushd jupyter-widget-testwidgets
75+
76+
pip install .
77+
78+
# Validate nbextension (enable does not use exit code):
79+
jupyter nbextension enable --py --sys-prefix jupyter_widget_testwidgets
80+
python -c "from notebook.nbextensions import validate_nbextension; import sys; sys.exit(validate_nbextension('jupyter_widget_testwidgets/extension') or 0)"
81+
82+
# Validate labextension
83+
pip install -U jupyterlab~=3.0 jupyter_packaging~=0.7
84+
# Make sure our lab extension was installed.
85+
jupyter labextension list 2>&1 | grep -ie "jupyter-widget-testwidgets.*OK"
86+
# Make sure our lab extension can be develop installed.
87+
jupyter labextension develop . --overwrite
88+
89+
popd

{{cookiecutter.github_project_name}}/.github/workflows/build.yml

Lines changed: 47 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -4,61 +4,60 @@ on:
44
push:
55
branches: main
66
pull_request:
7-
branches: '*'
7+
branches: "*"
88

99
jobs:
1010
build:
1111
runs-on: ubuntu-latest
1212
steps:
13-
- name: Checkout
14-
uses: actions/checkout@v2
15-
- name: Install node
16-
uses: actions/setup-node@v1
17-
with:
18-
node-version: '12.x'
19-
- name: Install Python
20-
uses: actions/setup-python@v2
21-
with:
22-
python-version: '3.7'
23-
architecture: 'x64'
13+
- name: Checkout
14+
uses: actions/checkout@v2
15+
- name: Install node
16+
uses: actions/setup-node@v1
17+
with:
18+
node-version: "12.x"
19+
- name: Install Python
20+
uses: actions/setup-python@v2
21+
with:
22+
python-version: "3.7"
23+
architecture: "x64"
2424

25-
- name: Setup pip cache
26-
uses: actions/cache@v2
27-
with:
28-
path: ~/.cache/pip
29-
key: pip-3.7-${{ hashFiles('package.json') }}
30-
restore-keys: |
31-
pip-3.7-
32-
pip-
25+
- name: Setup pip cache
26+
uses: actions/cache@v2
27+
with:
28+
path: ~/.cache/pip
29+
key: pip-3.7-${{ hashFiles('package.json') }}
30+
restore-keys: |
31+
pip-3.7-
32+
pip-
3333
34-
- name: Get npm cache directory
35-
id: npm-cache
36-
run: |
37-
echo "::set-output name=dir::$(npm config get cache)"
38-
- uses: actions/cache@v2
39-
with:
40-
path: ${{ steps.npm-cache.outputs.dir }}
41-
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
42-
restore-keys: |
43-
${{ runner.os }}-node-
34+
- name: Get npm cache directory
35+
id: npm-cache
36+
run: |
37+
echo "::set-output name=dir::$(npm config get cache)"
38+
- uses: actions/cache@v2
39+
with:
40+
path: ${{ steps.npm-cache.outputs.dir }}
41+
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
42+
restore-keys: |
43+
${{ runner.os }}-node-
4444
45-
- name: Install dependencies
46-
run: |
47-
python -m pip install -U pip setuptools codecov
48-
npm install -g codecov
49-
- name: Test the extension
50-
run: |
51-
python -m pip install --upgrade -v -e ".[test, examples, docs]"
52-
yarn run lint:check
45+
- name: Install dependencies
46+
run: |
47+
python -m pip install -U pip setuptools codecov
48+
npm install -g codecov
49+
- name: Test the extension
50+
run: |
51+
python -m pip install --upgrade -v -e ".[test, examples, docs]"
52+
yarn run lint:check
5353
54-
pytest
55-
yarn run test
54+
pytest
55+
yarn run test
5656
57-
- name: Check docs can be build + links
58-
run: |
59-
python -m pip install jupyter_sphinx sphinx sphinx_rtd_theme nbsphinx nbsphinx-link pytest-check-links
60-
pushd docs
61-
make html
62-
popd
63-
python -m pytest --check-links
64-
57+
- name: Check docs can be build + links
58+
run: |
59+
sudo apt install -y pandoc
60+
pushd docs
61+
make html
62+
python -m pytest --check-links
63+
popd

{{cookiecutter.github_project_name}}/setup.cfg

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,6 @@
22
universal=1
33

44
[metadata]
5-
description-file = README.md
5+
long_description = file: README.md
6+
long_description_content_type = "text/markdown"
67
license_file = LICENSE.txt

{{cookiecutter.github_project_name}}/tsconfig.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,6 @@
2020
"include": [
2121
"src/**/*.ts",
2222
"src/**/*.tsx",
23-
]
23+
],
24+
"exclude": ["src/**/__tests__"]
2425
}

0 commit comments

Comments
 (0)