Skip to content

Commit 35d9882

Browse files
committed
initial commit
0 parents  commit 35d9882

27 files changed

+931
-0
lines changed

.eslintignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
node_modules
2+
dist
3+
coverage
4+
**/*.d.ts
5+
tests
6+
7+
**/__tests__
8+
ui-tests

.eslintrc.js

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
module.exports = {
2+
extends: [
3+
'eslint:recommended',
4+
'plugin:@typescript-eslint/eslint-recommended',
5+
'plugin:@typescript-eslint/recommended',
6+
'plugin:prettier/recommended'
7+
],
8+
parser: '@typescript-eslint/parser',
9+
parserOptions: {
10+
project: 'tsconfig.json',
11+
sourceType: 'module'
12+
},
13+
plugins: ['@typescript-eslint'],
14+
rules: {
15+
'@typescript-eslint/naming-convention': [
16+
'error',
17+
{
18+
selector: 'interface',
19+
format: ['PascalCase'],
20+
custom: {
21+
regex: '^I[A-Z]',
22+
match: true
23+
}
24+
}
25+
],
26+
'@typescript-eslint/no-unused-vars': ['warn', { args: 'none' }],
27+
'@typescript-eslint/no-explicit-any': 'off',
28+
'@typescript-eslint/no-namespace': 'off',
29+
'@typescript-eslint/no-use-before-define': 'off',
30+
'@typescript-eslint/quotes': [
31+
'error',
32+
'single',
33+
{ avoidEscape: true, allowTemplateLiterals: false }
34+
],
35+
curly: ['error', 'all'],
36+
eqeqeq: 'error',
37+
'prefer-arrow-callback': 'error'
38+
}
39+
};

.github/workflows/binder-on-pr.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# Reference https://mybinder.readthedocs.io/en/latest/howto/gh-actions-badges.html
2+
name: Binder Badge
3+
on:
4+
pull_request_target:
5+
types: [opened]
6+
7+
permissions:
8+
pull-requests: write
9+
10+
11+
jobs:
12+
binder:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: comment on PR with Binder link
16+
uses: actions/github-script@v3
17+
with:
18+
github-token: ${{secrets.GITHUB_TOKEN}}
19+
script: |
20+
var PR_HEAD_USERREPO = process.env.PR_HEAD_USERREPO;
21+
var PR_HEAD_REF = process.env.PR_HEAD_REF;
22+
github.issues.createComment({
23+
issue_number: context.issue.number,
24+
owner: context.repo.owner,
25+
repo: context.repo.repo,
26+
body: `[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/${PR_HEAD_USERREPO}/${PR_HEAD_REF}?urlpath=lab) :point_left: Launch a Binder on branch _${PR_HEAD_USERREPO}/${PR_HEAD_REF}_`
27+
})
28+
env:
29+
PR_HEAD_REF: ${{ github.event.pull_request.head.ref }}
30+
PR_HEAD_USERREPO: ${{ github.event.pull_request.head.repo.full_name }}
31+

.github/workflows/build.yml

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
name: Build
2+
3+
on:
4+
push:
5+
branches: main
6+
pull_request:
7+
branches: '*'
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Checkout
15+
uses: actions/checkout@v2
16+
17+
- name: Base Setup
18+
uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
19+
20+
- name: Install dependencies
21+
run: python -m pip install -U jupyterlab~=3.1 check-manifest
22+
23+
- name: Lint the extension
24+
run: |
25+
set -eux
26+
jlpm
27+
jlpm run lint:check
28+
29+
- name: Build the extension
30+
run: |
31+
set -eux
32+
python -m pip install .[test]
33+
34+
jupyter labextension list
35+
jupyter labextension list 2>&1 | grep -ie "jupyterlab-lego-boost.*OK"
36+
python -m jupyterlab.browser_check
37+
38+
- name: Package the extension
39+
run: |
40+
set -eux
41+
check-manifest -v
42+
43+
pip install build
44+
python -m build
45+
pip uninstall -y "jupyterlab_lego_boost" jupyterlab
46+
47+
- name: Upload extension packages
48+
uses: actions/upload-artifact@v2
49+
with:
50+
name: extension-artifacts
51+
path: dist/jupyterlab_lego_boost*
52+
if-no-files-found: error
53+
54+
test_isolated:
55+
needs: build
56+
runs-on: ubuntu-latest
57+
58+
steps:
59+
- name: Checkout
60+
uses: actions/checkout@v2
61+
- name: Install Python
62+
uses: actions/setup-python@v2
63+
with:
64+
python-version: '3.9'
65+
architecture: 'x64'
66+
- uses: actions/download-artifact@v2
67+
with:
68+
name: extension-artifacts
69+
- name: Install and Test
70+
run: |
71+
set -eux
72+
# Remove NodeJS, twice to take care of system and locally installed node versions.
73+
sudo rm -rf $(which node)
74+
sudo rm -rf $(which node)
75+
76+
pip install "jupyterlab~=3.1" jupyterlab_lego_boost*.whl
77+
78+
79+
jupyter labextension list
80+
jupyter labextension list 2>&1 | grep -ie "jupyterlab-lego-boost.*OK"
81+
python -m jupyterlab.browser_check --no-chrome-test
82+

.github/workflows/check-release.yml

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
name: Check Release
2+
on:
3+
push:
4+
branches:
5+
- main
6+
pull_request:
7+
branches:
8+
- main
9+
10+
permissions:
11+
contents: write
12+
13+
jobs:
14+
check_release:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Checkout
18+
uses: actions/checkout@v2
19+
- name: Install Python
20+
uses: actions/setup-python@v2
21+
with:
22+
python-version: 3.9
23+
architecture: 'x64'
24+
- name: Install node
25+
uses: actions/setup-node@v2
26+
with:
27+
node-version: '14.x'
28+
29+
30+
- name: Get pip cache dir
31+
id: pip-cache
32+
run: |
33+
echo "::set-output name=dir::$(pip cache dir)"
34+
- name: Cache pip
35+
uses: actions/cache@v1
36+
with:
37+
path: ${{ steps.pip-cache.outputs.dir }}
38+
key: ${{ runner.os }}-pip-${{ hashFiles('package.json') }}
39+
restore-keys: |
40+
${{ runner.os }}-pip-
41+
- name: Cache checked links
42+
uses: actions/cache@v2
43+
with:
44+
path: ~/.cache/pytest-link-check
45+
key: ${{ runner.os }}-linkcheck-${{ hashFiles('**/.md') }}-md-links
46+
restore-keys: |
47+
${{ runner.os }}-linkcheck-
48+
- name: Upgrade packaging dependencies
49+
run: |
50+
pip install --upgrade pip setuptools wheel jupyter-packaging~=0.10 --user
51+
- name: Install Dependencies
52+
run: |
53+
pip install .
54+
- name: Check Release
55+
uses: jupyter-server/jupyter_releaser/.github/actions/check-release@v1
56+
with:
57+
token: ${{ secrets.GITHUB_TOKEN }}
58+
59+
- name: Upload Distributions
60+
uses: actions/upload-artifact@v2
61+
with:
62+
name: jupyterlab_lego_boost-releaser-dist-${{ github.run_number }}
63+
path: .jupyter_releaser_checkout/dist

.gitignore

Lines changed: 118 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,118 @@
1+
*.bundle.*
2+
lib/
3+
node_modules/
4+
.eslintcache
5+
.stylelintcache
6+
*.egg-info/
7+
.ipynb_checkpoints
8+
*.tsbuildinfo
9+
jupyterlab_lego_boost/labextension
10+
11+
# Integration tests
12+
ui-tests/test-results/
13+
ui-tests/playwright-report/
14+
15+
# Created by https://www.gitignore.io/api/python
16+
# Edit at https://www.gitignore.io/?templates=python
17+
18+
### Python ###
19+
# Byte-compiled / optimized / DLL files
20+
__pycache__/
21+
*.py[cod]
22+
*$py.class
23+
24+
# C extensions
25+
*.so
26+
27+
# Distribution / packaging
28+
.Python
29+
build/
30+
develop-eggs/
31+
dist/
32+
downloads/
33+
eggs/
34+
.eggs/
35+
lib/
36+
lib64/
37+
parts/
38+
sdist/
39+
var/
40+
wheels/
41+
pip-wheel-metadata/
42+
share/python-wheels/
43+
.installed.cfg
44+
*.egg
45+
MANIFEST
46+
47+
# PyInstaller
48+
# Usually these files are written by a python script from a template
49+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
50+
*.manifest
51+
*.spec
52+
53+
# Installer logs
54+
pip-log.txt
55+
pip-delete-this-directory.txt
56+
57+
# Unit test / coverage reports
58+
htmlcov/
59+
.tox/
60+
.nox/
61+
.coverage
62+
.coverage.*
63+
.cache
64+
nosetests.xml
65+
coverage.xml
66+
*.cover
67+
.hypothesis/
68+
.pytest_cache/
69+
70+
# Translations
71+
*.mo
72+
*.pot
73+
74+
# Scrapy stuff:
75+
.scrapy
76+
77+
# Sphinx documentation
78+
docs/_build/
79+
80+
# PyBuilder
81+
target/
82+
83+
# pyenv
84+
.python-version
85+
86+
# celery beat schedule file
87+
celerybeat-schedule
88+
89+
# SageMath parsed files
90+
*.sage.py
91+
92+
# Spyder project settings
93+
.spyderproject
94+
.spyproject
95+
96+
# Rope project settings
97+
.ropeproject
98+
99+
# Mr Developer
100+
.mr.developer.cfg
101+
.project
102+
.pydevproject
103+
104+
# mkdocs documentation
105+
/site
106+
107+
# mypy
108+
.mypy_cache/
109+
.dmypy.json
110+
dmypy.json
111+
112+
# Pyre type checker
113+
.pyre/
114+
115+
# End of https://www.gitignore.io/api/python
116+
117+
# OSX files
118+
.DS_Store

.prettierignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
node_modules
2+
**/node_modules
3+
**/lib
4+
**/package.json
5+
jupyterlab_lego_boost

.prettierrc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"singleQuote": true,
3+
"trailingComma": "none",
4+
"arrowParens": "avoid",
5+
"endOfLine": "auto"
6+
}

.stylelintrc

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"extends": [
3+
"stylelint-config-recommended",
4+
"stylelint-config-standard",
5+
"stylelint-prettier/recommended"
6+
],
7+
"rules": {
8+
"property-no-vendor-prefix": null,
9+
"selector-no-vendor-prefix": null,
10+
"value-no-vendor-prefix": null
11+
}
12+
}

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Changelog
2+
3+
<!-- <START NEW CHANGELOG ENTRY> -->
4+
5+
<!-- <END NEW CHANGELOG ENTRY> -->

0 commit comments

Comments
 (0)