Skip to content

Commit e51258f

Browse files
authored
Merge pull request #6294 from jtpio/notebook-7
Notebook v7 scaffolding
2 parents d7ade66 + d726fb7 commit e51258f

File tree

627 files changed

+28194
-90947
lines changed

Some content is hidden

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

627 files changed

+28194
-90947
lines changed

.babelrc

-3
This file was deleted.

.bowerrc

-3
This file was deleted.

.bumpversion.cfg

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
[bumpversion]
2+
current_version = 7, 0, 0, 'alpha', 0
3+
commit = False
4+
tag = False
5+
parse = (?P<major>\d+)\,\ (?P<minor>\d+)\,\ (?P<patch>\d+)\,\ \'(?P<release>\S+)\'\,\ (?P<build>\d+)
6+
serialize =
7+
{major}, {minor}, {patch}, '{release}', {build}
8+
9+
[bumpversion:part:release]
10+
optional_value = final
11+
values =
12+
alpha
13+
beta
14+
candidate
15+
final
16+
17+
[bumpversion:part:build]
18+
19+
[bumpversion:file:notebook/_version.py]

.eslintignore

+22-5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,22 @@
1-
*.min.js
2-
*components*
3-
*node_modules*
4-
*built*
5-
*build*
1+
lint-staged.config.js
2+
.eslintrc.js
3+
4+
node_modules
5+
**/build
6+
**/lib
7+
**/node_modules
8+
**/mock_packages
9+
**/static
10+
**/typings
11+
**/schemas
12+
**/themes
13+
coverage
14+
*.map.js
15+
*.bundle.js
16+
17+
# jetbrains IDE stuff
18+
.idea/
19+
20+
# ms IDE stuff
21+
.history/
22+
.vscode/

.eslintrc.js

+57
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
module.exports = {
2+
env: {
3+
browser: true,
4+
es6: true,
5+
commonjs: true,
6+
node: true,
7+
'jest/globals': true
8+
},
9+
root: true,
10+
extends: [
11+
'eslint:recommended',
12+
'plugin:@typescript-eslint/eslint-recommended',
13+
'plugin:@typescript-eslint/recommended',
14+
'plugin:prettier/recommended',
15+
'plugin:react/recommended',
16+
'plugin:jest/recommended'
17+
],
18+
parser: '@typescript-eslint/parser',
19+
parserOptions: {
20+
project: 'tsconfig.eslint.json',
21+
sourceType: 'module'
22+
},
23+
plugins: ['@typescript-eslint', 'jest'],
24+
rules: {
25+
'@typescript-eslint/naming-convention': [
26+
'error',
27+
{
28+
selector: 'interface',
29+
format: ['PascalCase'],
30+
custom: {
31+
regex: '^I[A-Z]',
32+
match: true
33+
}
34+
}
35+
],
36+
'@typescript-eslint/no-unused-vars': ['warn', { args: 'none' }],
37+
'@typescript-eslint/no-explicit-any': 'off',
38+
'@typescript-eslint/no-namespace': 'off',
39+
'@typescript-eslint/no-var-requires': 'off',
40+
'@typescript-eslint/no-use-before-define': 'off',
41+
'@typescript-eslint/no-empty-interface': 'off',
42+
'@typescript-eslint/quotes': [
43+
'error',
44+
'single',
45+
{ avoidEscape: true, allowTemplateLiterals: false }
46+
],
47+
'jest/no-done-callback': 'off',
48+
curly: ['error', 'all'],
49+
eqeqeq: 'error',
50+
'prefer-arrow-callback': 'error'
51+
},
52+
settings: {
53+
react: {
54+
version: 'detect'
55+
}
56+
}
57+
};

.eslintrc.json

+11-11
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
{
2-
"parserOptions": {
3-
"ecmaVersion": 6,
4-
"sourceType": "module"
5-
},
6-
"rules": {
7-
"semi": 1,
8-
"no-cond-assign": 2,
9-
"no-debugger": 2,
10-
"comma-dangle": 0,
11-
"no-unreachable" : 2
12-
}
2+
"parserOptions": {
3+
"ecmaVersion": 6,
4+
"sourceType": "module"
5+
},
6+
"rules": {
7+
"semi": 1,
8+
"no-cond-assign": 2,
9+
"no-debugger": 2,
10+
"comma-dangle": 0,
11+
"no-unreachable": 2
12+
}
1313
}

.github/ISSUE_TEMPLATE/bug_report.md

+8-8
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
11
---
2+
23
name: Is this a bug in Notebook? Open an issue.
34
about: If you're not sure, feel free to post your question on Jupyter's Discourse channel.
45
title: ''
56
labels: ''
67
assignees: ''
7-
8-
---
9-
10-
<!--
8+
---<!--
119
BEFORE YOU OPEN AN ISSUE, PLEASE READ THIS
1210

1311
Hello! Thank you for using Jupyter Notebook. We're glad you're here.
@@ -23,13 +21,14 @@ If you're having issues installing Jupyter Notebook, or you're having another is
2321
1. scan the "What to do when things go wrong" (https://jupyter-notebook.readthedocs.io/en/stable/troubleshooting.html#what-to-do-when-things-go-wrong) page in our documentation to see if your question has already been answered
2422

2523
2. post your question on the Jupyter Notebook discourse channel (https://discourse.jupyter.org/c/notebook/31). There are many more people in the Jupyter community that engage on that channel.
26-
-->
24+
-->
2725

2826
**Describe the bug**
2927
A clear and concise description of what the bug is.
3028

3129
**To Reproduce**
3230
Steps to reproduce the behavior:
31+
3332
1. Go to '...'
3433
2. Click on '....'
3534
3. Scroll down to '....'
@@ -42,9 +41,10 @@ A clear and concise description of what you expected to happen.
4241
If applicable, add screenshots to help explain your problem.
4342

4443
**Desktop (please complete the following information):**
45-
- OS: [e.g. iOS]
46-
- Browser [e.g. chrome, safari]
47-
- Version [e.g. 22]
44+
45+
- OS: [e.g. iOS]
46+
- Browser [e.g. chrome, safari]
47+
- Version [e.g. 22]
4848

4949
**Additional context**
5050
Add any other context about the problem here.

.github/actions/build-dist/action.yml

+44
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: "Build Jupyter Notebook"
2+
description: "Build Jupyter Notebook from source"
3+
runs:
4+
using: "composite"
5+
steps:
6+
- name: Base Setup
7+
uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
8+
9+
- name: Install dependencies
10+
shell: bash
11+
run: |
12+
python -m pip install --upgrade jupyter_packaging~=0.10 "jupyterlab>=4.0.0a20,<5" build
13+
14+
- name: Build pypi distributions
15+
shell: bash
16+
run: |
17+
python -m build
18+
19+
- name: Build npm distributions
20+
shell: bash
21+
run: |
22+
mkdir pkgs
23+
jlpm lerna exec -- npm pack
24+
cp packages/*/*.tgz pkgs
25+
26+
- name: Build checksum file
27+
shell: bash
28+
run: |
29+
cd dist
30+
sha256sum * | tee SHA256SUMS
31+
cd ../pkgs
32+
sha256sum * | tee SHA256SUMS
33+
34+
- name: Upload distributions
35+
uses: actions/upload-artifact@v2
36+
with:
37+
name: notebook-dist-${{ github.run_number }}
38+
path: ./dist
39+
40+
- name: Upload distributions
41+
uses: actions/upload-artifact@v2
42+
with:
43+
name: notebook-pkgs-${{ github.run_number }}
44+
path: ./pkgs

.github/workflows/binder.yml

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
name: Binder Badge
2+
on:
3+
pull_request_target:
4+
types: [opened]
5+
6+
jobs:
7+
binder:
8+
runs-on: ubuntu-latest
9+
permissions:
10+
pull-requests: write
11+
steps:
12+
- uses: jupyterlab/maintainer-tools/.github/actions/binder-link@v1
13+
with:
14+
github_token: ${{ secrets.github_token }}
15+
url_path: tree

.github/workflows/build.yml

+110
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
name: Build
2+
3+
on:
4+
push:
5+
branches:
6+
- '*'
7+
pull_request:
8+
branches:
9+
- '*'
10+
11+
permissions:
12+
contents:
13+
write
14+
15+
env:
16+
PIP_DISABLE_PIP_VERSION_CHECK: 1
17+
18+
defaults:
19+
run:
20+
shell: bash -l {0}
21+
22+
jobs:
23+
build:
24+
runs-on: ubuntu-latest
25+
steps:
26+
- name: Checkout
27+
uses: actions/checkout@v2
28+
29+
- name: Build
30+
uses: ./.github/actions/build-dist
31+
32+
test:
33+
runs-on: ubuntu-latest
34+
steps:
35+
- name: Checkout
36+
uses: actions/checkout@v2
37+
38+
- name: Base Setup
39+
uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
40+
41+
- name: Install dependencies
42+
run: |
43+
python -m pip install -U jupyter_packaging~=0.10
44+
45+
- name: Install the package
46+
run: |
47+
python -m pip install .
48+
jupyter labextension list 2>&1 | grep -ie "@jupyter-notebook/lab-extension.*enabled.*ok" -
49+
jupyter server extension list 2>&1 | grep -ie "notebook.*enabled" -
50+
python -m jupyterlab.browser_check
51+
52+
- name: Lint
53+
run: |
54+
jlpm
55+
jlpm run eslint:check
56+
jlpm run prettier:check
57+
58+
- name: Test
59+
run: |
60+
jlpm run build:test
61+
jlpm run test
62+
63+
install:
64+
needs: [build]
65+
runs-on: ${{ matrix.os }}-latest
66+
strategy:
67+
fail-fast: false
68+
matrix:
69+
os: [ubuntu, macos, windows]
70+
python: ['3.7', '3.10']
71+
include:
72+
- python: '3.7'
73+
dist: 'notebook*.tar.gz'
74+
- python: '3.10'
75+
dist: 'notebook*.whl'
76+
- os: windows
77+
py_cmd: python
78+
- os: macos
79+
py_cmd: python3
80+
- os: ubuntu
81+
py_cmd: python
82+
steps:
83+
- name: Install Python
84+
uses: actions/setup-python@v2
85+
with:
86+
python-version: ${{ matrix.python }}
87+
architecture: 'x64'
88+
- uses: actions/download-artifact@v2
89+
with:
90+
name: notebook-dist-${{ github.run_number }}
91+
path: ./dist
92+
- name: Install the prerequisites
93+
run: |
94+
${{ matrix.py_cmd }} -m pip install pip wheel
95+
- name: Install the package
96+
run: |
97+
cd dist
98+
${{ matrix.py_cmd }} -m pip install -vv ${{ matrix.dist }}
99+
- name: Validate environment
100+
run: |
101+
${{ matrix.py_cmd }} -m pip freeze
102+
${{ matrix.py_cmd }} -m pip check
103+
- name: Validate the install
104+
run: |
105+
jupyter labextension list
106+
jupyter labextension list 2>&1 | grep -ie "@jupyter-notebook/lab-extension.*enabled.*ok" -
107+
jupyter server extension list
108+
jupyter server extension list 2>&1 | grep -ie "notebook.*enabled" -
109+
jupyter notebook --version
110+
jupyter notebook --help

0 commit comments

Comments
 (0)