Skip to content

Commit

Permalink
Merge branch 'main' into patch-1
Browse files Browse the repository at this point in the history
  • Loading branch information
gaborbernat authored Sep 8, 2023
2 parents 4727774 + 834a4bc commit 2c1b0f6
Show file tree
Hide file tree
Showing 117 changed files with 22,219 additions and 17,107 deletions.
93 changes: 60 additions & 33 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
lint:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: '3.10'
Expand All @@ -36,7 +36,7 @@ jobs:
- '3.7'
- pypy3.7
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: setup python for tox
uses: actions/setup-python@v4
with:
Expand Down Expand Up @@ -72,7 +72,7 @@ jobs:
- pkg_desc
- dev
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: setup Python 3.10
uses: actions/setup-python@v4
with:
Expand All @@ -93,7 +93,7 @@ jobs:
python-version: '3.10'
- name: install build
run: python -m pip install build
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: build package
run: python -m build --sdist --wheel . -o dist
- name: publish to PyPi
Expand All @@ -103,25 +103,49 @@ jobs:
user: __token__
password: ${{ secrets.pypi_password }}

build:
runs-on: ubuntu-latest
steps:
- name: setup python to build package
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: install build
run: python -m pip install build
- uses: actions/checkout@v4
- name: build package
run: python -m build --sdist --wheel . -o dist
- name: Upload builds
uses: actions/upload-artifact@v3
with:
name: dist ${{ github.run_number }}
path: ./dist

visual-regression-tests-ipw7:
runs-on: ubuntu-latest
needs: [build]

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup conda
uses: conda-incubator/setup-miniconda@v2
- name: Install Conda environment with Micromamba
uses: mamba-org/provision-with-micromamba@main
with:
activate-environment: ipydatagrid-test-ipw7
environment-name: ipydatagrid-test-ipw7
environment-file: test-environment-ipyw7.yaml
python-version: 3.9
mamba-version: '*'
auto-activate-base: false
channels: conda-forge

- uses: actions/download-artifact@v3
with:
name: dist ${{ github.run_number }}
path: ./dist

- name: Install the package
run: pip install -vv .
run: pip install -vv ipydatagrid*.whl
working-directory: dist

- name: Install Galata
run: |
Expand All @@ -130,7 +154,7 @@ jobs:
working-directory: ui-tests-ipw7

- name: Launch JupyterLab
run: yarn run start:detached
run: yarn run start:detached &
working-directory: ui-tests-ipw7

- name: Wait for JupyterLab
Expand All @@ -147,56 +171,59 @@ jobs:
if: always()
uses: actions/upload-artifact@v3
with:
name: ui-test-output
name: ui-test-output-ipw7
path: |
ui-tests-ipw7/playwright-report
ui-tests-ipw7/test-results
visual-regression-tests-ipw8:
runs-on: ubuntu-latest
needs: [build]

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup conda
uses: conda-incubator/setup-miniconda@v2
- name: Install Conda environment with Micromamba
uses: mamba-org/provision-with-micromamba@main
with:
activate-environment: ipydatagrid-test-ipw8
environment-name: ipydatagrid-test-ipw8
environment-file: test-environment-ipyw8.yaml
python-version: 3.9
mamba-version: '*'
auto-activate-base: false
channels: conda-forge

- uses: actions/download-artifact@v3
with:
name: dist ${{ github.run_number }}
path: ./dist

- name: Install the package
run: pip install -vv .
run: pip install -vv ipydatagrid*.whl
working-directory: dist

- name: Install Galata
run: |
yarn install
yarn playwright install chromium
- name: Install dependencies
shell: bash -l {0}
working-directory: ui-tests-ipw8
env:
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
run: jlpm install

- name: Launch JupyterLab
run: yarn run start:detached
- name: Install browser
shell: bash -l {0}
run: npx playwright install chromium
working-directory: ui-tests-ipw8

- name: Wait for JupyterLab
uses: ifaxity/wait-on-action@v1
with:
resource: http-get://localhost:8888/api
timeout: 20000

- name: Run UI Tests
run: yarn run test
- name: Execute integration tests
shell: bash -l {0}
working-directory: ui-tests-ipw8
run: npx playwright test

- name: Upload UI Test artifacts
if: always()
uses: actions/upload-artifact@v3
with:
name: ui-test-output
name: ui-test-output-ipw8
path: |
ui-tests-ipw8/playwright-report
ui-tests-ipw8/test-results
9 changes: 5 additions & 4 deletions .github/workflows/jest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,14 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [14.x]
node-version: [20.x]

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- run: npm install
- run: npm run test
- run: yarn set version stable
- run: yarn install
- run: yarn run test
15 changes: 12 additions & 3 deletions .github/workflows/update_galata_references.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}

Expand Down Expand Up @@ -49,14 +49,15 @@ jobs:
github_token: ${{ secrets.GITHUB_TOKEN }}
server_url: http-get://localhost:8888/
test_folder: ui-tests-ipw7

update-reference-screenshots-ipw8:
name: Update Galata References
if: ${{ github.event.issue.pull_request && contains(github.event.comment.body, 'update galata references') }}
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}

Expand All @@ -80,8 +81,16 @@ jobs:

- name: Install the package
run: pip install -vv .

- name: Install dependencies
working-directory: ui-tests
env:
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
run: jlpm install

- uses: jupyterlab/maintainer-tools/.github/actions/update-snapshots@main
with:
npm_client: jlpm
github_token: ${{ secrets.GITHUB_TOKEN }}
server_url: http-get://localhost:8888/
start_server_script: 'null'
test_folder: ui-tests-ipw8
10 changes: 10 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ nosetests.xml
coverage.xml
*,cover
.hypothesis/
**/playwright-report
**/test-results

# Translations
*.mo
Expand Down Expand Up @@ -153,12 +155,20 @@ $RECYCLE.BIN/
ipydatagrid/nbextension/index.*
ipydatagrid/labextension/

# Yarn
**/.yarn

# Coverage data
# -------------
**/coverage/

# Packed lab extensions
ipydatagrid/labextension
ipydatagrid/nbextension/*.svg
ipydatagrid/nbextension/*.png

# Type checking
**/.pyre

conda_out
recipe
Expand Down
12 changes: 11 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ repos:
- id: pyupgrade
args: [ "--py36-plus" ]
- repo: https://github.com/PyCQA/isort
rev: 5.10.1
rev: 5.12.0
hooks:
- id: isort
- repo: https://github.com/psf/black
Expand Down Expand Up @@ -55,3 +55,13 @@ repos:
- flake8-unused-arguments==0.0.9
- flake8-noqa==1.2.1
- pep8-naming==0.12.1
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.5.1
hooks:
- id: mypy
exclude: ui-tests-ipw[78]\/.*
additional_dependencies:
- "pandas-stubs"
- "types-Pygments"
- "types-colorama"
- "types-setuptools"
2 changes: 2 additions & 0 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
nodeLinker: node-modules
pnpMode: "loose"
17 changes: 9 additions & 8 deletions RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,15 @@
### Tagging and creating a publishing environment

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

### Releasing on pypi

Expand Down
20 changes: 18 additions & 2 deletions examples/CellEditing.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -187,11 +187,27 @@
"source": [
"select_all_changed_cells()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Setting an entire row at once is also possible."
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"datagrid.set_row_value(0, [260, \"USA\", 10, \"Very fast car\", 0, \"1999-01-01\", 0, 0, 0])"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
Expand All @@ -205,7 +221,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.6"
"version": "3.11.5"
}
},
"nbformat": 4,
Expand Down
2 changes: 1 addition & 1 deletion ipydatagrid/_version.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) Bloomberg.
# Distributed under the terms of the Modified BSD License.

__version__ = "1.1.13"
__version__ = "1.1.17"
Loading

0 comments on commit 2c1b0f6

Please sign in to comment.