Skip to content

Commit

Permalink
Merge pull request #40 from waldiez/dev
Browse files Browse the repository at this point in the history
bump to 0.1.16
  • Loading branch information
lazToum authored Dec 5, 2024
2 parents 6f6e1b4 + 39f7524 commit d272598
Show file tree
Hide file tree
Showing 10 changed files with 611 additions and 641 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements/main.txt -r requirements/dev.txt -r requirements/test.txt
pip install -r requirements/main.txt
pip install -r requirements/dev.txt
pip install -r requirements/test.txt
- name: pylint
run: pylint --rcfile=pyproject.toml .
- name: isort
Expand Down Expand Up @@ -82,7 +84,9 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements/main.txt -r requirements/dev.txt -r requirements/test.txt
pip install -r requirements/main.txt
pip install -r requirements/dev.txt
pip install -r requirements/test.txt
- name: Run tests
run: |
python -m pytest -c pyproject.toml --cov=waldiez_jupyter --cov-report lcov:reports/lcov.info
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.16

- Updated @waldiez/react to v0.1.17
- Changed filtering of flow messages
- Other js dependencies updates
- Other py dependencies updates

## v0.1.15

- Updated waldiez to v0.1.13
Expand Down
42 changes: 21 additions & 21 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@waldiez/jupyter",
"version": "0.1.15",
"version": "0.1.16",
"description": "A Waldiez JupyterLab extension.",
"keywords": [
"waldiez",
Expand Down Expand Up @@ -71,36 +71,36 @@
"dependencies": {
"@jupyter-widgets/base": "^6.0.10",
"@jupyter-widgets/jupyterlab-manager": "^5.0.13",
"@jupyterlab/application": "^4.3.1",
"@jupyterlab/cells": "^4.3.1",
"@jupyterlab/codeeditor": "^4.3.1",
"@jupyterlab/coreutils": "^6.3.1",
"@jupyterlab/docregistry": "^4.3.1",
"@jupyterlab/fileeditor": "^4.3.1",
"@jupyterlab/launcher": "^4.3.1",
"@jupyterlab/logconsole": "^4.3.1",
"@jupyterlab/mainmenu": "^4.3.1",
"@jupyterlab/notebook": "^4.3.1",
"@jupyterlab/rendermime": "^4.3.1",
"@jupyterlab/services": "^7.3.1",
"@jupyterlab/settingregistry": "^4.3.1",
"@jupyterlab/ui-components": "^4.3.1",
"@jupyterlab/ui-components-extension": "^4.3.1",
"@jupyterlab/application": "^4.3.2",
"@jupyterlab/cells": "^4.3.2",
"@jupyterlab/codeeditor": "^4.3.2",
"@jupyterlab/coreutils": "^6.3.2",
"@jupyterlab/docregistry": "^4.3.2",
"@jupyterlab/fileeditor": "^4.3.2",
"@jupyterlab/launcher": "^4.3.2",
"@jupyterlab/logconsole": "^4.3.2",
"@jupyterlab/mainmenu": "^4.3.2",
"@jupyterlab/notebook": "^4.3.2",
"@jupyterlab/rendermime": "^4.3.2",
"@jupyterlab/services": "^7.3.2",
"@jupyterlab/settingregistry": "^4.3.2",
"@jupyterlab/ui-components": "^4.3.2",
"@jupyterlab/ui-components-extension": "^4.3.2",
"@lumino/algorithm": "^2.0.2",
"@lumino/widgets": "^2.5.0",
"@waldiez/react": "0.1.16"
"@waldiez/react": "0.1.17"
},
"devDependencies": {
"@jest/globals": "^29.7.0",
"@jupyterlab/builder": "^4.3.1",
"@jupyterlab/testutils": "^4.3.1",
"@jupyterlab/builder": "^4.3.2",
"@jupyterlab/testutils": "^4.3.2",
"@stylistic/eslint-plugin": "^2.11.0",
"@testing-library/react": "^16.0.1",
"@trivago/prettier-plugin-sort-imports": "^4.3.0",
"@types/jest": "^29.5.14",
"@types/json-schema": "^7.0.15",
"@types/node": "^22.10.1",
"@types/react": "^18.3.12",
"@types/react": "^18.3.13",
"@types/react-addons-linked-state-mixin": "^0.14.27",
"@typescript-eslint/eslint-plugin": "^8.17.0",
"@typescript-eslint/parser": "^8.17.0",
Expand All @@ -116,7 +116,7 @@
"mini-css-extract-plugin": "^2.9.2",
"mkdirp": "^3.0.1",
"npm-run-all": "^4.1.5",
"prettier": "^3.4.1",
"prettier": "^3.4.2",
"rimraf": "^6.0.1",
"source-map-loader": "^5.0.0",
"style-loader": "^4.0.0",
Expand Down
8 changes: 4 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,28 +29,28 @@ dynamic = ["version", "description", "authors", "urls", "keywords"]
[project.optional-dependencies]
test = [
"coverage==7.6.8",
"pytest==8.3.3",
"pytest==8.3.4",
'pytest-datadir==1.5.0',
"pytest-cov==6.0.0",
'pytest-html==4.1.1',
'pytest-sugar==1.0.0',
'pytest-timeout==2.3.1',
'pytest-xdist==3.6.1',
"pytest-jupyter[server]>=0.10.1"
"pytest-jupyter[server]>=0.10.1",
]
dev = [
'autoflake==2.3.1',
'bandit==1.8.0',
'black[jupyter]==24.10.0',
'flake8==7.1.1',
'isort==5.13.2',
'jupyterlab==4.3.1',
'jupyterlab==4.3.2',
'mypy==1.13.0',
'pre-commit==4.0.1',
'pydocstyle==6.3.0',
'pylint==3.3.2',
'python-dotenv==1.0.1',
'ruff==0.8.1',
'ruff==0.8.2',
'toml==0.10.2',
'types-PyYAML==6.0.12.20240917',
'types-toml==0.10.8.20240310',
Expand Down
4 changes: 2 additions & 2 deletions requirements/dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ isort==5.13.2
# via waldiez-jupyter (pyproject.toml)
jupyter-server==2.14.2
# via waldiez-jupyter (pyproject.toml)
jupyterlab==4.3.1
jupyterlab==4.3.2
# via waldiez-jupyter (pyproject.toml)
mypy==1.13.0
# via waldiez-jupyter (pyproject.toml)
Expand All @@ -26,7 +26,7 @@ pylint==3.3.2
# via waldiez-jupyter (pyproject.toml)
python-dotenv==1.0.1
# via waldiez-jupyter (pyproject.toml)
ruff==0.8.1
ruff==0.8.2
# via waldiez-jupyter (pyproject.toml)
toml==0.10.2
# via waldiez-jupyter (pyproject.toml)
Expand Down
2 changes: 1 addition & 1 deletion requirements/test.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ jupyter-server==2.14.2
# via waldiez-jupyter (pyproject.toml)
pathvalidate==3.2.1
# via waldiez-jupyter (pyproject.toml)
pytest==8.3.3
pytest==8.3.4
# via waldiez-jupyter (pyproject.toml)
pytest-cov==6.0.0
# via waldiez-jupyter (pyproject.toml)
Expand Down
2 changes: 1 addition & 1 deletion src/__tests__/runner.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ describe('WaldiezRunner', () => {
runner.run(mockKernelConnectionSuccess, 'path/to/file.waldiez');
runner['_messages'] = [
'Installing requirements...',
WALDIEZ_STRINGS.STARTING_WORKFLOW,
WALDIEZ_STRINGS.AFTER_INSTALL_NOTE,
'Step 1 completed',
'Step 2 completed',
'Input required'
Expand Down
3 changes: 2 additions & 1 deletion src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ export namespace WALDIEZ_STRINGS {
export const CHANGE_KERNEL = 'Change kernel';
export const RECONNECT_TO_KERNEL = 'Reconnect to kernel';
export const LOGGER_INITIALIZED = 'Waldiez logger initialized';
export const STARTING_WORKFLOW = 'Starting workflow...';
export const AFTER_INSTALL_NOTE =
'NOTE: If new packages were added and you are using Jupyter, you might need to restart the kernel.';
export const NO_KERNEL = 'No kernel';
export const NO_KERNEL_MESSAGE =
'Please start a kernel before running the workflow.';
Expand Down
17 changes: 10 additions & 7 deletions src/runner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,13 +96,16 @@ export class WaldiezRunner {
* @memberof WaldiezRunner
*/
getPreviousMessages(inputPrompt: string) {
// filter previous messages (like installing requirements)
// and start from the `starting workflow` message
const starting = WALDIEZ_STRINGS.STARTING_WORKFLOW;
const start = this._messages.findIndex(
// msg => msg === starting || msg === `${starting}\n`
msg => msg.startsWith(starting) || msg.startsWith(`${starting}\n`)
);
// try to filter previous messages (like installing requirements)
let start = -1;
for (let i = this._messages.length - 1; i >= 0; i--) {
if (
this._messages[i].includes(WALDIEZ_STRINGS.AFTER_INSTALL_NOTE)
) {
start = i;
break;
}
}
if (start >= 0) {
this._messages = this._messages.slice(start + 1);
}
Expand Down
Loading

0 comments on commit d272598

Please sign in to comment.