Skip to content

Commit cca9b24

Browse files
author
Dou Du
committed
update all files for ipywidgets 8.x
1 parent be52168 commit cca9b24

File tree

20 files changed

+53
-85
lines changed

20 files changed

+53
-85
lines changed

.eslintrc.js

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,19 +15,14 @@ module.exports = {
1515
'@typescript-eslint/no-unused-vars': ['warn', { args: 'none' }],
1616
'@typescript-eslint/no-explicit-any': 'off',
1717
'@typescript-eslint/no-namespace': 'off',
18-
'prefer-rest-params': 'off',
1918
'@typescript-eslint/no-use-before-define': 'off',
2019
'@typescript-eslint/quotes': [
2120
'error',
2221
'single',
2322
{ avoidEscape: true, allowTemplateLiterals: false }
2423
],
25-
'@typescript-eslint/no-this-alias': [
26-
'error',
27-
{ "allowDestructuring": true, "allowedNames": ["_this"] }
28-
],
2924
curly: ['error', 'all'],
3025
eqeqeq: 'error',
3126
'prefer-arrow-callback': 'error'
3227
}
33-
};
28+
};

.github/workflows/build.yml

Lines changed: 16 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -8,56 +8,37 @@ on:
88

99
jobs:
1010
build:
11-
runs-on: ubuntu-latest
11+
runs-on: ${{ matrix.os }}
12+
strategy:
13+
fail-fast: false
14+
matrix:
15+
os: [ubuntu-latest, windows-latest, macos-latest]
16+
python-version: ["3.7", "3.10"]
1217
steps:
1318
- name: Checkout
1419
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"
2420

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-
33-
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-
21+
- uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
4422

4523
- name: Install dependencies
4624
run: |
47-
python -m pip install -U pip setuptools codecov
25+
python -m pip install -U codecov
4826
npm install -g codecov
4927
- name: Test the extension
5028
run: |
5129
python -m pip install --upgrade -v -e ".[test, examples, docs]"
52-
yarn run lint:check
53-
54-
pytest
30+
python -m pytest
5531
yarn run test
5632
33+
- name: Linting
34+
if: ${{ matrix.os == 'ubuntu-latest' }}
35+
run: |
36+
yarn run lint:check
37+
5738
- name: Check docs can be build + links
39+
if: ${{ matrix.os == 'ubuntu-latest' }}
40+
working-directory: docs
5841
run: |
5942
sudo apt install -y pandoc
60-
pushd docs
6143
make html
6244
python -m pytest --check-links
63-
popd

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,6 @@ $RECYCLE.BIN/
146146

147147
**/node_modules/
148148
widget_code_input/nbextension/index.*
149-
widget_code_input/labextension/*.tgz
150149

151150
# Coverage data
152151
# -------------

LICENSE.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2022 Dou Du
1+
Copyright (c) 2022 Dou Du and Giovanni Pizzi
22
All rights reserved.
33

44
Redistribution and use in source and binary forms, with or without

docs/source/conf.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,8 @@
5959

6060
# General information about the project.
6161
project = 'widget_code_input'
62-
copyright = '2022, Dou Du'
63-
author = 'Dou Du'
62+
copyright = '2022, Dou Du and Giovanni Pizzi'
63+
author = 'Dou Du and Giovanni Pizzi'
6464

6565
# The version info for the project you're documenting, acts as replacement for
6666
# |version| and |release|, also used in various other places throughout the
@@ -148,7 +148,7 @@
148148
# author, documentclass [howto, manual, or own class]).
149149
latex_documents = [
150150
(master_doc, 'widget_code_input.tex', 'widget_code_input Documentation',
151-
'Dou Du', 'manual'),
151+
'Dou Du and Giovanni Pizzi', 'manual'),
152152
]
153153

154154

docs/source/installing.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ notebook (as opposed to Jupyterlab), run::
2525
with the `appropriate flag`_. If you are using Jupyterlab, install the extension
2626
with::
2727

28-
jupyter labextension install widget-code-input
28+
jupyter labextension install widget_code_input
2929

3030
If you are installing using conda, these commands should be unnecessary, but If
3131
you need to run them the commands should be the same (just make sure you choose the

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"name": "widget-code-input",
3-
"version": "3.5.0",
2+
"name": "widget_code_input",
3+
"version": "3.5.5",
44
"description": "A widget to allow input of a python function, with syntax highlighting.",
55
"keywords": [
66
"jupyter",

pyproject.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ readme = "README.md"
1212
license = { file = "LICENSE.txt" }
1313
requires-python = ">=3.7"
1414
authors = [
15-
{ name = "Dou Du", email = "[email protected]" },
15+
{ name = "Dou Du and Giovanni Pizzi", email = "[email protected]" },
1616
]
1717
keywords = [
1818
"IPython",
@@ -34,7 +34,7 @@ classifiers = [
3434
dependencies = [
3535
"ipywidgets>=7.0.0",
3636
]
37-
version = "3.5.0.dev0"
37+
version = "3.5.5"
3838

3939
[project.optional-dependencies]
4040
docs = [
@@ -104,7 +104,7 @@ file = [
104104
]
105105

106106
[tool.tbump.version]
107-
current = "3.5.0.dev0"
107+
current = "3.5.5"
108108
regex = "(?P<major>\\d+)\\.(?P<minor>\\d+)\\.(?P<patch>\\d+)((?P<channel>a|b|rc|.dev)(?P<release>\\d+))?"
109109

110110
[tool.tbump.git]

setup.cfg

Lines changed: 0 additions & 7 deletions
This file was deleted.

src/__tests__/index.spec.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,20 @@
66

77
import { createTestModel } from './utils';
88

9-
import { WidgetCodeModel } from '..';
9+
import { ExampleModel } from '..';
1010

1111
describe('Example', () => {
12-
describe('WidgetCodeModel', () => {
12+
describe('ExampleModel', () => {
1313
it('should be createable', () => {
14-
const model = createTestModel(WidgetCodeModel);
15-
expect(model).toBeInstanceOf(WidgetCodeModel);
14+
const model = createTestModel(ExampleModel);
15+
expect(model).toBeInstanceOf(ExampleModel);
1616
expect(model.get('value')).toEqual('Hello World');
1717
});
1818

1919
it('should be createable with a value', () => {
2020
const state = { value: 'Foo Bar!' };
21-
const model = createTestModel(WidgetCodeModel, state);
22-
expect(model).toBeInstanceOf(WidgetCodeModel);
21+
const model = createTestModel(ExampleModel, state);
22+
expect(model).toBeInstanceOf(ExampleModel);
2323
expect(model.get('value')).toEqual('Foo Bar!');
2424
});
2525
});

0 commit comments

Comments
 (0)