Skip to content

Commit

Permalink
Port to JupyterLab 3 (#43)
Browse files Browse the repository at this point in the history
  • Loading branch information
fcollonval committed Jan 3, 2021
1 parent c7bdd77 commit aa6ce55
Show file tree
Hide file tree
Showing 32 changed files with 4,125 additions and 1,785 deletions.
9 changes: 0 additions & 9 deletions .binder/environment.yml

This file was deleted.

8 changes: 0 additions & 8 deletions .binder/postBuild

This file was deleted.

5 changes: 5 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
node_modules
dist
coverage
**/*.d.ts
tests
32 changes: 32 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
module.exports = {
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/eslint-recommended',
'plugin:@typescript-eslint/recommended',
'plugin:prettier/recommended'
],
parser: '@typescript-eslint/parser',
parserOptions: {
project: 'tsconfig.json',
sourceType: 'module'
},
plugins: ['@typescript-eslint'],
rules: {
'@typescript-eslint/interface-name-prefix': [
'error',
{ prefixWithI: 'always' }
],
'@typescript-eslint/no-unused-vars': ['warn', { args: 'none' }],
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-namespace': 'off',
'@typescript-eslint/no-use-before-define': 'off',
'@typescript-eslint/quotes': [
'error',
'single',
{ avoidEscape: true, allowTemplateLiterals: false }
],
curly: ['error', 'all'],
eqeqeq: 'error',
'prefer-arrow-callback': 'error'
}
};
36 changes: 36 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Build

on:
push:
branches: master
pull_request:
branches: '*'

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install node
uses: actions/setup-node@v1
with:
node-version: '14.x'
- name: Install Python
uses: actions/setup-python@v2
with:
python-version: '3.9'
architecture: 'x64'
- name: Install dependencies
run: python -m pip install jupyterlab pytest pytest-jupyter[server]
- name: Build the extension
run: |
jlpm
jlpm run eslint:check
python -m pip install .
pytest jupyter_archive
jupyter server extension list 2>&1 | grep -ie "jupyter_archive.*OK"
jupyter labextension list 2>&1 | grep -ie "@hadim/jupyter-archive.*OK"
python -m jupyterlab.browser_check
108 changes: 79 additions & 29 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,65 +1,115 @@
labextension

yarn-error.log
tsconfig.tsbuildinfo
*.bundle.*
lib/
node_modules/
*.egg-info/
.ipynb_checkpoints
*.tsbuildinfo
jupyter_archive/labextension

.ipynb_checkpoints/
# Created by https://www.gitignore.io/api/python
# Edit at https://www.gitignore.io/?templates=python

### Python ###
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Packages
*.egg
*.egg-info
dist
build
eggs
parts
bin
var
sdist
develop-eggs
# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
pip-wheel-metadata/
share/python-wheels/
.installed.cfg
lib
lib64
*.egg
MANIFEST

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.tox
.coverage.*
.cache
nosetests.xml
htmlcov
coverage.xml
*.cover
.hypothesis/
.pytest_cache/

# Translations
*.mo
*.pot

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
target/

# pyenv
.python-version

# celery beat schedule file
celerybeat-schedule

# SageMath parsed files
*.sage.py

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# Mr Developer
.mr.developer.cfg
.project
.pydevproject

# Complexity
output/*.html
output/*/index.html
# mkdocs documentation
/site

# Sphinx
docs/_build
# mypy
.mypy_cache/
.dmypy.json
dmypy.json

MANIFEST
# Pyre type checker
.pyre/

*.tif
# End of https://www.gitignore.io/api/python

# Rever
rever/
# OSX files
.DS_Store

.vscode/
.pytest_cache/
4 changes: 4 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
node_modules
**/node_modules
**/lib
**/package.json
3 changes: 3 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"singleQuote": true
}
29 changes: 0 additions & 29 deletions .travis.yml

This file was deleted.

13 changes: 4 additions & 9 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,20 +1,15 @@
include LICENSE
include README.md

include setupbase.py
include pyproject.toml
include jupyter-config/jupyter-archive.json

include package.json
include *.config.js
include setupJest.js
include install.json
include ts*.json
include jupyter_archive/labextension/*.tgz

# Tests
graft tests
prune tests/build
graft jupyter_archive/labextension

# Javascript files
graft schema
graft src
graft style
prune **/node_modules
Expand Down

0 comments on commit aa6ce55

Please sign in to comment.