Skip to content

Commit 2961450

Browse files
authored
Typing (#106)
* Move ui-tests directory to root * Add mypy chack * Fix workflow, licence and import
1 parent 1761ea8 commit 2961450

Some content is hidden

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

42 files changed

+49
-27
lines changed

.github/workflows/build.yml

Lines changed: 24 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ jobs:
120120
python -m pip install "jupyterlab>=4.0.0,<5" jupyterlab_chat*.whl
121121
122122
- name: Install dependencies
123-
working-directory: python/jupyterlab-chat/ui-tests
123+
working-directory: ui-tests
124124
env:
125125
YARN_ENABLE_IMMUTABLE_INSTALLS: 0
126126
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
@@ -135,10 +135,10 @@ jobs:
135135

136136
- name: Install browser
137137
run: jlpm playwright install chromium
138-
working-directory: python/jupyterlab-chat/ui-tests
138+
working-directory: ui-tests
139139

140140
- name: Execute integration tests
141-
working-directory: python/jupyterlab-chat/ui-tests
141+
working-directory: ui-tests
142142
run: |
143143
jlpm playwright test --retries=2
144144
@@ -148,8 +148,27 @@ jobs:
148148
with:
149149
name: jupyterlab_chat-playwright-tests
150150
path: |
151-
python/jupyterlab-chat/ui-tests/test-results
152-
python/jupyterlab-chat/ui-tests/playwright-report
151+
ui-tests/test-results
152+
ui-tests/playwright-report
153+
154+
typing-tests:
155+
name: Typing test
156+
runs-on: ubuntu-latest
157+
steps:
158+
- name: Checkout
159+
uses: actions/checkout@v4
160+
161+
- name: Base Setup
162+
uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
163+
164+
- name: Install extension dependencies and build the extension
165+
run: ./scripts/dev_install.sh
166+
167+
- name: Run mypy
168+
run: |
169+
set -eux
170+
mypy --version
171+
mypy python/jupyterlab-chat
153172
154173
check_links:
155174
name: Check Links

.github/workflows/update-integration-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,4 +79,4 @@ jobs:
7979
github_token: ${{ secrets.GITHUB_TOKEN }}
8080
# Playwright knows how to start JupyterLab server
8181
start_server_script: 'null'
82-
test_folder: python/jupyterlab-chat/ui-tests
82+
test_folder: ui-tests

.gitignore

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ packages/jupyter-chat/junit.xml
1818
packages/jupyterlab-chat/junit.xml
1919

2020
# Integration tests
21-
python/jupyterlab-chat/ui-tests/test-results/
22-
python/jupyterlab-chat/ui-tests/playwright-report/
21+
ui-tests/test-results/
22+
ui-tests/playwright-report/
2323

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

.licenserc.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ header:
88
Distributed under the terms of the Modified BSD License.
99
1010
paths-ignore:
11+
- '**/*.typed'
1112
- '**/*.ipynb'
1213
- '**/*.json'
1314
- '**/*.md'

docs/source/developers/contributing/jupyterlab-chat-extension.md

Lines changed: 2 additions & 2 deletions

packages/jupyter-chat/package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,8 +110,7 @@
110110
"coverage",
111111
"**/*.d.ts",
112112
"tests",
113-
"**/__tests__",
114-
"ui-tests"
113+
"**/__tests__"
115114
],
116115
"eslintConfig": {
117116
"extends": [

packages/jupyterlab-chat/package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,8 +114,7 @@
114114
"coverage",
115115
"**/*.d.ts",
116116
"tests",
117-
"**/__tests__",
118-
"ui-tests"
117+
"**/__tests__"
119118
],
120119
"eslintConfig": {
121120
"extends": [

pyproject.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,3 +54,6 @@ before-bump-version = [
5454

5555
[tool.check-wheel-contents]
5656
ignore = ["W002"]
57+
58+
[tool.mypy]
59+
check_untyped_defs = true

python/jupyterlab-chat/README.md

Lines changed: 1 addition & 1 deletion

python/jupyterlab-chat/jupyterlab_chat/py.typed

Whitespace-only changes.

0 commit comments

Comments
 (0)