Skip to content

Commit

Permalink
Merge pull request #6294 from jtpio/notebook-7
Browse files Browse the repository at this point in the history
Notebook v7 scaffolding
  • Loading branch information
Zsailer authored Mar 7, 2022
2 parents d7ade66 + d726fb7 commit e51258f
Show file tree
Hide file tree
Showing 627 changed files with 28,194 additions and 90,947 deletions.
3 changes: 0 additions & 3 deletions .babelrc

This file was deleted.

3 changes: 0 additions & 3 deletions .bowerrc

This file was deleted.

19 changes: 19 additions & 0 deletions .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
[bumpversion]
current_version = 7, 0, 0, 'alpha', 0
commit = False
tag = False
parse = (?P<major>\d+)\,\ (?P<minor>\d+)\,\ (?P<patch>\d+)\,\ \'(?P<release>\S+)\'\,\ (?P<build>\d+)
serialize =
{major}, {minor}, {patch}, '{release}', {build}
[bumpversion:part:release]
optional_value = final
values =
alpha
beta
candidate
final
[bumpversion:part:build]
[bumpversion:file:notebook/_version.py]
27 changes: 22 additions & 5 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,22 @@
*.min.js
*components*
*node_modules*
*built*
*build*
lint-staged.config.js
.eslintrc.js

node_modules
**/build
**/lib
**/node_modules
**/mock_packages
**/static
**/typings
**/schemas
**/themes
coverage
*.map.js
*.bundle.js

# jetbrains IDE stuff
.idea/

# ms IDE stuff
.history/
.vscode/
57 changes: 57 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
module.exports = {
env: {
browser: true,
es6: true,
commonjs: true,
node: true,
'jest/globals': true
},
root: true,
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/eslint-recommended',
'plugin:@typescript-eslint/recommended',
'plugin:prettier/recommended',
'plugin:react/recommended',
'plugin:jest/recommended'
],
parser: '@typescript-eslint/parser',
parserOptions: {
project: 'tsconfig.eslint.json',
sourceType: 'module'
},
plugins: ['@typescript-eslint', 'jest'],
rules: {
'@typescript-eslint/naming-convention': [
'error',
{
selector: 'interface',
format: ['PascalCase'],
custom: {
regex: '^I[A-Z]',
match: true
}
}
],
'@typescript-eslint/no-unused-vars': ['warn', { args: 'none' }],
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-namespace': 'off',
'@typescript-eslint/no-var-requires': 'off',
'@typescript-eslint/no-use-before-define': 'off',
'@typescript-eslint/no-empty-interface': 'off',
'@typescript-eslint/quotes': [
'error',
'single',
{ avoidEscape: true, allowTemplateLiterals: false }
],
'jest/no-done-callback': 'off',
curly: ['error', 'all'],
eqeqeq: 'error',
'prefer-arrow-callback': 'error'
},
settings: {
react: {
version: 'detect'
}
}
};
22 changes: 11 additions & 11 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"parserOptions": {
"ecmaVersion": 6,
"sourceType": "module"
},
"rules": {
"semi": 1,
"no-cond-assign": 2,
"no-debugger": 2,
"comma-dangle": 0,
"no-unreachable" : 2
}
"parserOptions": {
"ecmaVersion": 6,
"sourceType": "module"
},
"rules": {
"semi": 1,
"no-cond-assign": 2,
"no-debugger": 2,
"comma-dangle": 0,
"no-unreachable": 2
}
}
16 changes: 8 additions & 8 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
---

name: Is this a bug in Notebook? Open an issue.
about: If you're not sure, feel free to post your question on Jupyter's Discourse channel.
title: ''
labels: ''
assignees: ''

---

<!--
---<!--
BEFORE YOU OPEN AN ISSUE, PLEASE READ THIS

Hello! Thank you for using Jupyter Notebook. We're glad you're here.
Expand All @@ -23,13 +21,14 @@ If you're having issues installing Jupyter Notebook, or you're having another is
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

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.
-->
-->

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

**To Reproduce**
Steps to reproduce the behavior:

1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
Expand All @@ -42,9 +41,10 @@ A clear and concise description of what you expected to happen.
If applicable, add screenshots to help explain your problem.

**Desktop (please complete the following information):**
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]

- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]

**Additional context**
Add any other context about the problem here.
44 changes: 44 additions & 0 deletions .github/actions/build-dist/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: "Build Jupyter Notebook"
description: "Build Jupyter Notebook from source"
runs:
using: "composite"
steps:
- name: Base Setup
uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1

- name: Install dependencies
shell: bash
run: |
python -m pip install --upgrade jupyter_packaging~=0.10 "jupyterlab>=4.0.0a20,<5" build
- name: Build pypi distributions
shell: bash
run: |
python -m build
- name: Build npm distributions
shell: bash
run: |
mkdir pkgs
jlpm lerna exec -- npm pack
cp packages/*/*.tgz pkgs
- name: Build checksum file
shell: bash
run: |
cd dist
sha256sum * | tee SHA256SUMS
cd ../pkgs
sha256sum * | tee SHA256SUMS
- name: Upload distributions
uses: actions/upload-artifact@v2
with:
name: notebook-dist-${{ github.run_number }}
path: ./dist

- name: Upload distributions
uses: actions/upload-artifact@v2
with:
name: notebook-pkgs-${{ github.run_number }}
path: ./pkgs
15 changes: 15 additions & 0 deletions .github/workflows/binder.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: Binder Badge
on:
pull_request_target:
types: [opened]

jobs:
binder:
runs-on: ubuntu-latest
permissions:
pull-requests: write
steps:
- uses: jupyterlab/maintainer-tools/.github/actions/binder-link@v1
with:
github_token: ${{ secrets.github_token }}
url_path: tree
110 changes: 110 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
name: Build

on:
push:
branches:
- '*'
pull_request:
branches:
- '*'

permissions:
contents:
write

env:
PIP_DISABLE_PIP_VERSION_CHECK: 1

defaults:
run:
shell: bash -l {0}

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Build
uses: ./.github/actions/build-dist

test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Base Setup
uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1

- name: Install dependencies
run: |
python -m pip install -U jupyter_packaging~=0.10
- name: Install the package
run: |
python -m pip install .
jupyter labextension list 2>&1 | grep -ie "@jupyter-notebook/lab-extension.*enabled.*ok" -
jupyter server extension list 2>&1 | grep -ie "notebook.*enabled" -
python -m jupyterlab.browser_check
- name: Lint
run: |
jlpm
jlpm run eslint:check
jlpm run prettier:check
- name: Test
run: |
jlpm run build:test
jlpm run test
install:
needs: [build]
runs-on: ${{ matrix.os }}-latest
strategy:
fail-fast: false
matrix:
os: [ubuntu, macos, windows]
python: ['3.7', '3.10']
include:
- python: '3.7'
dist: 'notebook*.tar.gz'
- python: '3.10'
dist: 'notebook*.whl'
- os: windows
py_cmd: python
- os: macos
py_cmd: python3
- os: ubuntu
py_cmd: python
steps:
- name: Install Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python }}
architecture: 'x64'
- uses: actions/download-artifact@v2
with:
name: notebook-dist-${{ github.run_number }}
path: ./dist
- name: Install the prerequisites
run: |
${{ matrix.py_cmd }} -m pip install pip wheel
- name: Install the package
run: |
cd dist
${{ matrix.py_cmd }} -m pip install -vv ${{ matrix.dist }}
- name: Validate environment
run: |
${{ matrix.py_cmd }} -m pip freeze
${{ matrix.py_cmd }} -m pip check
- name: Validate the install
run: |
jupyter labextension list
jupyter labextension list 2>&1 | grep -ie "@jupyter-notebook/lab-extension.*enabled.*ok" -
jupyter server extension list
jupyter server extension list 2>&1 | grep -ie "notebook.*enabled" -
jupyter notebook --version
jupyter notebook --help
Loading

0 comments on commit e51258f

Please sign in to comment.