Skip to content

Commit 2c1b0f6

Browse files
authored
Merge branch 'main' into patch-1
2 parents 4727774 + 834a4bc commit 2c1b0f6

File tree

117 files changed

+22219
-17107
lines changed

Some content is hidden

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

117 files changed

+22219
-17107
lines changed

.github/workflows/check.yml

Lines changed: 60 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
lint:
1818
runs-on: ubuntu-20.04
1919
steps:
20-
- uses: actions/checkout@v3
20+
- uses: actions/checkout@v4
2121
- uses: actions/setup-python@v4
2222
with:
2323
python-version: '3.10'
@@ -36,7 +36,7 @@ jobs:
3636
- '3.7'
3737
- pypy3.7
3838
steps:
39-
- uses: actions/checkout@v3
39+
- uses: actions/checkout@v4
4040
- name: setup python for tox
4141
uses: actions/setup-python@v4
4242
with:
@@ -72,7 +72,7 @@ jobs:
7272
- pkg_desc
7373
- dev
7474
steps:
75-
- uses: actions/checkout@v3
75+
- uses: actions/checkout@v4
7676
- name: setup Python 3.10
7777
uses: actions/setup-python@v4
7878
with:
@@ -93,7 +93,7 @@ jobs:
9393
python-version: '3.10'
9494
- name: install build
9595
run: python -m pip install build
96-
- uses: actions/checkout@v3
96+
- uses: actions/checkout@v4
9797
- name: build package
9898
run: python -m build --sdist --wheel . -o dist
9999
- name: publish to PyPi
@@ -103,25 +103,49 @@ jobs:
103103
user: __token__
104104
password: ${{ secrets.pypi_password }}
105105

106+
build:
107+
runs-on: ubuntu-latest
108+
steps:
109+
- name: setup python to build package
110+
uses: actions/setup-python@v4
111+
with:
112+
python-version: '3.10'
113+
- name: install build
114+
run: python -m pip install build
115+
- uses: actions/checkout@v4
116+
- name: build package
117+
run: python -m build --sdist --wheel . -o dist
118+
- name: Upload builds
119+
uses: actions/upload-artifact@v3
120+
with:
121+
name: dist ${{ github.run_number }}
122+
path: ./dist
123+
106124
visual-regression-tests-ipw7:
107125
runs-on: ubuntu-latest
126+
needs: [build]
108127

109128
steps:
110129
- name: Checkout
111-
uses: actions/checkout@v3
130+
uses: actions/checkout@v4
112131

113-
- name: Setup conda
114-
uses: conda-incubator/setup-miniconda@v2
132+
- name: Install Conda environment with Micromamba
133+
uses: mamba-org/provision-with-micromamba@main
115134
with:
116-
activate-environment: ipydatagrid-test-ipw7
135+
environment-name: ipydatagrid-test-ipw7
117136
environment-file: test-environment-ipyw7.yaml
118137
python-version: 3.9
119-
mamba-version: '*'
120138
auto-activate-base: false
121139
channels: conda-forge
122140

141+
- uses: actions/download-artifact@v3
142+
with:
143+
name: dist ${{ github.run_number }}
144+
path: ./dist
145+
123146
- name: Install the package
124-
run: pip install -vv .
147+
run: pip install -vv ipydatagrid*.whl
148+
working-directory: dist
125149

126150
- name: Install Galata
127151
run: |
@@ -130,7 +154,7 @@ jobs:
130154
working-directory: ui-tests-ipw7
131155

132156
- name: Launch JupyterLab
133-
run: yarn run start:detached
157+
run: yarn run start:detached &
134158
working-directory: ui-tests-ipw7
135159

136160
- name: Wait for JupyterLab
@@ -147,56 +171,59 @@ jobs:
147171
if: always()
148172
uses: actions/upload-artifact@v3
149173
with:
150-
name: ui-test-output
174+
name: ui-test-output-ipw7
151175
path: |
152176
ui-tests-ipw7/playwright-report
153177
ui-tests-ipw7/test-results
154178
155179
visual-regression-tests-ipw8:
156180
runs-on: ubuntu-latest
181+
needs: [build]
157182

158183
steps:
159184
- name: Checkout
160-
uses: actions/checkout@v3
185+
uses: actions/checkout@v4
161186

162-
- name: Setup conda
163-
uses: conda-incubator/setup-miniconda@v2
187+
- name: Install Conda environment with Micromamba
188+
uses: mamba-org/provision-with-micromamba@main
164189
with:
165-
activate-environment: ipydatagrid-test-ipw8
190+
environment-name: ipydatagrid-test-ipw8
166191
environment-file: test-environment-ipyw8.yaml
167192
python-version: 3.9
168-
mamba-version: '*'
169193
auto-activate-base: false
170194
channels: conda-forge
171195

196+
- uses: actions/download-artifact@v3
197+
with:
198+
name: dist ${{ github.run_number }}
199+
path: ./dist
200+
172201
- name: Install the package
173-
run: pip install -vv .
202+
run: pip install -vv ipydatagrid*.whl
203+
working-directory: dist
174204

175-
- name: Install Galata
176-
run: |
177-
yarn install
178-
yarn playwright install chromium
205+
- name: Install dependencies
206+
shell: bash -l {0}
179207
working-directory: ui-tests-ipw8
208+
env:
209+
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
210+
run: jlpm install
180211

181-
- name: Launch JupyterLab
182-
run: yarn run start:detached
212+
- name: Install browser
213+
shell: bash -l {0}
214+
run: npx playwright install chromium
183215
working-directory: ui-tests-ipw8
184216

185-
- name: Wait for JupyterLab
186-
uses: ifaxity/wait-on-action@v1
187-
with:
188-
resource: http-get://localhost:8888/api
189-
timeout: 20000
190-
191-
- name: Run UI Tests
192-
run: yarn run test
217+
- name: Execute integration tests
218+
shell: bash -l {0}
193219
working-directory: ui-tests-ipw8
220+
run: npx playwright test
194221

195222
- name: Upload UI Test artifacts
196223
if: always()
197224
uses: actions/upload-artifact@v3
198225
with:
199-
name: ui-test-output
226+
name: ui-test-output-ipw8
200227
path: |
201228
ui-tests-ipw8/playwright-report
202229
ui-tests-ipw8/test-results

.github/workflows/jest.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,14 @@ jobs:
1111
runs-on: ubuntu-latest
1212
strategy:
1313
matrix:
14-
node-version: [14.x]
14+
node-version: [20.x]
1515

1616
steps:
17-
- uses: actions/checkout@v3
17+
- uses: actions/checkout@v4
1818
- name: Use Node.js ${{ matrix.node-version }}
1919
uses: actions/setup-node@v3
2020
with:
2121
node-version: ${{ matrix.node-version }}
22-
- run: npm install
23-
- run: npm run test
22+
- run: yarn set version stable
23+
- run: yarn install
24+
- run: yarn run test

.github/workflows/update_galata_references.yml

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020

2121
steps:
2222
- name: Checkout
23-
uses: actions/checkout@v3
23+
uses: actions/checkout@v4
2424
with:
2525
token: ${{ secrets.GITHUB_TOKEN }}
2626

@@ -49,14 +49,15 @@ jobs:
4949
github_token: ${{ secrets.GITHUB_TOKEN }}
5050
server_url: http-get://localhost:8888/
5151
test_folder: ui-tests-ipw7
52+
5253
update-reference-screenshots-ipw8:
5354
name: Update Galata References
5455
if: ${{ github.event.issue.pull_request && contains(github.event.comment.body, 'update galata references') }}
5556
runs-on: ubuntu-latest
5657

5758
steps:
5859
- name: Checkout
59-
uses: actions/checkout@v3
60+
uses: actions/checkout@v4
6061
with:
6162
token: ${{ secrets.GITHUB_TOKEN }}
6263

@@ -80,8 +81,16 @@ jobs:
8081

8182
- name: Install the package
8283
run: pip install -vv .
84+
85+
- name: Install dependencies
86+
working-directory: ui-tests
87+
env:
88+
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
89+
run: jlpm install
90+
8391
- uses: jupyterlab/maintainer-tools/.github/actions/update-snapshots@main
8492
with:
93+
npm_client: jlpm
8594
github_token: ${{ secrets.GITHUB_TOKEN }}
86-
server_url: http-get://localhost:8888/
95+
start_server_script: 'null'
8796
test_folder: ui-tests-ipw8

.gitignore

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ nosetests.xml
4646
coverage.xml
4747
*,cover
4848
.hypothesis/
49+
**/playwright-report
50+
**/test-results
4951

5052
# Translations
5153
*.mo
@@ -153,12 +155,20 @@ $RECYCLE.BIN/
153155
ipydatagrid/nbextension/index.*
154156
ipydatagrid/labextension/
155157

158+
# Yarn
159+
**/.yarn
160+
156161
# Coverage data
157162
# -------------
158163
**/coverage/
159164

160165
# Packed lab extensions
161166
ipydatagrid/labextension
167+
ipydatagrid/nbextension/*.svg
168+
ipydatagrid/nbextension/*.png
169+
170+
# Type checking
171+
**/.pyre
162172

163173
conda_out
164174
recipe

.pre-commit-config.yaml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ repos:
1717
- id: pyupgrade
1818
args: [ "--py36-plus" ]
1919
- repo: https://github.com/PyCQA/isort
20-
rev: 5.10.1
20+
rev: 5.12.0
2121
hooks:
2222
- id: isort
2323
- repo: https://github.com/psf/black
@@ -55,3 +55,13 @@ repos:
5555
- flake8-unused-arguments==0.0.9
5656
- flake8-noqa==1.2.1
5757
- pep8-naming==0.12.1
58+
- repo: https://github.com/pre-commit/mirrors-mypy
59+
rev: v1.5.1
60+
hooks:
61+
- id: mypy
62+
exclude: ui-tests-ipw[78]\/.*
63+
additional_dependencies:
64+
- "pandas-stubs"
65+
- "types-Pygments"
66+
- "types-colorama"
67+
- "types-setuptools"

.yarnrc.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
nodeLinker: node-modules
2+
pnpMode: "loose"

RELEASE.md

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,15 @@
33
### Tagging and creating a publishing environment
44

55
1. Create a new release branch: `git checkout -n release_1.0.x` (**replace .x with the actual version**).
6-
2. Bump the version in `package.json` and `ipydatagrid/._version.py`.
7-
3. Save, sign and commit your changes: `git commit -s -m "Release 1.0.x"`.
8-
4. Open a PR with your release branch: `git push -u origin release_1.0.x`.
9-
5. Once your PR has been merged (!), pull the new main branch `git checkout main && git pull upstream main`.
10-
6. Add a new release tag: `git tag -a 1.0.x -m "Release 1.0.x"`.
11-
7. Push the new tag to GitHub: `git push upstream --tags`.
12-
8. Create a new conda environment: `conda create -n release_grid -c conda-forge python=3.8 python-build`.
13-
9. Activate the environment: `conda activate release_grid`.
6+
2. Install `tbump` with `pip install tbump`.
7+
3. Bump the version with `tbump --only-patch 1.0.x`
8+
4. Save, sign and commit your changes: `git commit -s -m "Release 1.0.x"`.
9+
5. Open a PR with your release branch: `git push -u origin release_1.0.x`.
10+
6. Once your PR has been merged (!), pull the new main branch `git checkout main && git pull upstream main`.
11+
7. Add a new release tag: `git tag -a 1.0.x -m "Release 1.0.x"`.
12+
8. Push the new tag to GitHub: `git push upstream --tags`.
13+
9. Create a new conda environment: `conda create -n release_grid -c conda-forge python=3.8 python-build`.
14+
10. Activate the environment: `conda activate release_grid`.
1415

1516
### Releasing on pypi
1617

examples/CellEditing.ipynb

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -187,11 +187,27 @@
187187
"source": [
188188
"select_all_changed_cells()"
189189
]
190+
},
191+
{
192+
"cell_type": "markdown",
193+
"metadata": {},
194+
"source": [
195+
"Setting an entire row at once is also possible."
196+
]
197+
},
198+
{
199+
"cell_type": "code",
200+
"execution_count": null,
201+
"metadata": {},
202+
"outputs": [],
203+
"source": [
204+
"datagrid.set_row_value(0, [260, \"USA\", 10, \"Very fast car\", 0, \"1999-01-01\", 0, 0, 0])"
205+
]
190206
}
191207
],
192208
"metadata": {
193209
"kernelspec": {
194-
"display_name": "Python 3",
210+
"display_name": "Python 3 (ipykernel)",
195211
"language": "python",
196212
"name": "python3"
197213
},
@@ -205,7 +221,7 @@
205221
"name": "python",
206222
"nbconvert_exporter": "python",
207223
"pygments_lexer": "ipython3",
208-
"version": "3.7.6"
224+
"version": "3.11.5"
209225
}
210226
},
211227
"nbformat": 4,

ipydatagrid/_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# Copyright (c) Bloomberg.
22
# Distributed under the terms of the Modified BSD License.
33

4-
__version__ = "1.1.13"
4+
__version__ = "1.1.17"

0 commit comments

Comments
 (0)