Skip to content

Commit

Permalink
Merge pull request #38 from waldiez/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
lazToum authored Dec 3, 2024
2 parents 6588860 + de00cf0 commit d18ba53
Show file tree
Hide file tree
Showing 12 changed files with 237 additions and 169 deletions.
57 changes: 46 additions & 11 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,33 @@ jobs:
- name: ruff
run: ruff check --config pyproject.toml .

test-py:
lint-js:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
- uses: actions/setup-python@v5
with:
python-version: 3.12
- run: |
corepack enable
yarn set version stable
- name: Install jlpm
run: |
python -m pip install --upgrade pip jupyterlab
- name: Install dependencies
run: jlpm install
- name: Run linters
run: jlpm lint

test-py:
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12"]
os: [ubuntu-latest, windows-latest, macos-latest]

steps:
- uses: actions/checkout@v4
Expand All @@ -63,19 +85,32 @@ jobs:
pip install -r requirements/main.txt -r requirements/dev.txt -r requirements/test.txt
- name: Run tests
run: |
python -m pytest \
-c pyproject.toml \
--cov=waldiez_jupyter \
--cov-report=term-missing:skip-covered \
--cov-report html:reports/html \
--cov-report xml:reports/coverage.xml \
--cov-report lcov:reports/lcov.info \
--junitxml=reports/xunit.xml
python -m pytest -c pyproject.toml --cov=waldiez_jupyter --cov-report lcov:reports/lcov.info
- name: Report to Coveralls
# only send latest Python version's report
if: matrix.python-version == '3.12'
if: matrix.python-version == '3.12' && matrix.os == 'ubuntu-latest'
uses: coverallsapp/github-action@v2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: ./reports/lcov.info
# we suld add lint-js and test-js jobs here (or maybe in a separate file)

test-js:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
- uses: actions/setup-python@v5
with:
python-version: 3.12
- run: |
corepack enable
yarn set version stable
- name: Install jlpm
run: |
python -m pip install --upgrade pip jupyterlab
- name: Install dependencies
run: jlpm install
- name: Run tests
run: jlpm test
5 changes: 5 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@
"copyfiles",
"coreutils",
"Cori",
"coverallsapp",
"cryptanalysed",
"cryptologist",
"cryptosystem",
Expand Down Expand Up @@ -173,6 +174,7 @@
"Joseon",
"jpserver",
"jpwaldie",
"junitxml",
"jupyterlab",
"jupytext",
"jwks",
Expand All @@ -191,6 +193,7 @@
"kilby",
"kirch",
"kowalevski",
"kwargs",
"labapp",
"labextension",
"labextensions",
Expand Down Expand Up @@ -288,6 +291,7 @@
"radioimmunoassay",
"Raman",
"Ratna",
"rcfile",
"recognised",
"rendermime",
"Ritchie",
Expand Down Expand Up @@ -354,6 +358,7 @@
"webfonts",
"Websockets",
"xdist",
"xunit",
"xyflow",
"ydoc",
"yfinance"
Expand Down
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@

## [unreleased]

## v0.1.14

- Updated @waldiez/react to v0.16
- Updated waldiez to v0.1.12
- Other js dependencies
- Other py dependencies

## v0.1.13

- Updated @waldiez/react to v0.15
Expand Down
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@waldiez/jupyter",
"version": "0.1.13",
"version": "0.1.14",
"description": "A Waldiez JupyterLab extension.",
"keywords": [
"waldiez",
Expand Down Expand Up @@ -62,7 +62,7 @@
"prettier:check": "jlpm prettier:base --check",
"stylelint": "jlpm stylelint:check --fix",
"stylelint:check": "stylelint --cache \"style/**/*.css\"",
"test": "NODE_NO_WARNINGS=1 jest --coverage",
"test": "NODE_NO_WARNINGS=1 jest --coverage --coverageReporters text text-summary lcov",
"test:ui": "NODE_NO_WARNINGS=1 cd ui-tests && yarn install && yarn test",
"watch": "run-p watch:src watch:labextension",
"watch:src": "tsc -w --sourceMap",
Expand All @@ -88,7 +88,7 @@
"@jupyterlab/ui-components-extension": "^4.3.1",
"@lumino/algorithm": "^2.0.2",
"@lumino/widgets": "^2.5.0",
"@waldiez/react": "0.1.15"
"@waldiez/react": "0.1.16"
},
"devDependencies": {
"@jest/globals": "^29.7.0",
Expand All @@ -102,8 +102,8 @@
"@types/node": "^22.10.1",
"@types/react": "^18.3.12",
"@types/react-addons-linked-state-mixin": "^0.14.27",
"@typescript-eslint/eslint-plugin": "^8.16.0",
"@typescript-eslint/parser": "^8.16.0",
"@typescript-eslint/eslint-plugin": "^8.17.0",
"@typescript-eslint/parser": "^8.17.0",
"add": "^2.0.6",
"copyfiles": "^2.4.1",
"css-loader": "^7.1.2",
Expand All @@ -126,7 +126,7 @@
"stylelint-prettier": "^5.0.2",
"ts-jest": "^29.2.5",
"typescript": "~5.7.2",
"typescript-eslint": "^8.16.0",
"typescript-eslint": "^8.17.0",
"yarn-deduplicate": "^6.0.2",
"yjs": "^13.6.20"
},
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ classifiers = [
dependencies = [
"jupyter_server>=2.0.1,<3",
"pathvalidate==3.2.1",
"waldiez==0.1.11",
"waldiez==0.1.12",
]
dynamic = ["version", "description", "authors", "urls", "keywords"]
[project.optional-dependencies]
Expand All @@ -48,7 +48,7 @@ dev = [
'mypy==1.13.0',
'pre-commit==4.0.1',
'pydocstyle==6.3.0',
'pylint==3.3.1',
'pylint==3.3.2',
'python-dotenv==1.0.1',
'ruff==0.8.1',
'toml==0.10.2',
Expand Down
4 changes: 2 additions & 2 deletions requirements/dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ pre-commit==4.0.1
# via waldiez-jupyter (pyproject.toml)
pydocstyle==6.3.0
# via waldiez-jupyter (pyproject.toml)
pylint==3.3.1
pylint==3.3.2
# via waldiez-jupyter (pyproject.toml)
python-dotenv==1.0.1
# via waldiez-jupyter (pyproject.toml)
Expand All @@ -34,7 +34,7 @@ types-pyyaml==6.0.12.20240917
# via waldiez-jupyter (pyproject.toml)
types-toml==0.10.8.20240310
# via waldiez-jupyter (pyproject.toml)
waldiez==0.1.11
waldiez==0.1.12
# via waldiez-jupyter (pyproject.toml)
yamllint==1.35.1
# via waldiez-jupyter (pyproject.toml)
17 changes: 15 additions & 2 deletions requirements/main.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ cffi==1.17.1
# via argon2-cffi-bindings
charset-normalizer==3.3.2
# via requests
click==8.1.7
# via typer
defusedxml==0.7.1
# via nbconvert
diskcache==5.6.3
Expand Down Expand Up @@ -101,6 +103,7 @@ markdown-it-py==3.0.0
# via
# jupytext
# mdit-py-plugins
# rich
markupsafe==2.1.5
# via
# jinja2
Expand Down Expand Up @@ -154,7 +157,9 @@ pydantic==2.9.0
pydantic-core==2.23.2
# via pydantic
pygments==2.18.0
# via nbconvert
# via
# nbconvert
# rich
python-dateutil==2.9.0.post0
# via
# arrow
Expand Down Expand Up @@ -190,12 +195,16 @@ rfc3986-validator==0.1.1
# via
# jsonschema
# jupyter-events
rich==13.9.4
# via typer
rpds-py==0.20.0
# via
# jsonschema
# referencing
send2trash==1.8.3
# via jupyter-server
shellingham==1.5.4
# via typer
six==1.16.0
# via
# bleach
Expand Down Expand Up @@ -236,6 +245,8 @@ traitlets==5.14.3
# nbclient
# nbconvert
# nbformat
typer==0.12.5
# via waldiez
types-python-dateutil==2.9.0.20240906
# via arrow
typing-extensions==4.12.2
Expand All @@ -244,6 +255,8 @@ typing-extensions==4.12.2
# openai
# pydantic
# pydantic-core
# rich
# typer
tzdata==2024.1
# via pydantic
uri-template==1.3.0
Expand All @@ -252,7 +265,7 @@ urllib3==2.2.2
# via
# docker
# requests
waldiez==0.1.11
waldiez==0.1.12
# via waldiez-jupyter (pyproject.toml)
webcolors==24.8.0
# via jsonschema
Expand Down
2 changes: 1 addition & 1 deletion requirements/test.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,5 @@ pytest-timeout==2.3.1
# via waldiez-jupyter (pyproject.toml)
pytest-xdist==3.6.1
# via waldiez-jupyter (pyproject.toml)
waldiez==0.1.11
waldiez==0.1.12
# via waldiez-jupyter (pyproject.toml)
3 changes: 2 additions & 1 deletion src/__tests__/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,8 @@ export const editorContext = {
changed: {
connect: jest.fn()
}
}
},
toString: () => '{"type": "flow"}'
},
pathChanged: {
connect: jest.fn()
Expand Down
1 change: 1 addition & 0 deletions src/__tests__/widget.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { Signal } from '@lumino/signaling';
import { EditorWidget, IWaldiezEditorProps } from '../widget';

const waldiezFlow = {
type: 'flow',
name: 'Test Flow',
description: 'Test Description',
requirements: [],
Expand Down
2 changes: 1 addition & 1 deletion src/factory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ export class WaldiezEditorFactory extends ABCWidgetFactory<
alignment: 'start',
spacing: 0
});
panel.title.label = 'Waldie';
panel.title.label = 'Waldiez';
panel.title.closable = true;
const editor = new WaldiezEditor({
context,
Expand Down
Loading

0 comments on commit d18ba53

Please sign in to comment.