waldiez 0.2.0__py3-none-any.whl → 0.2.2__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of waldiez might be problematic. Click here for more details.

waldiez/_version.py CHANGED
@@ -1,3 +1,3 @@
1
1
  """Version information for Waldiez."""
2
2
 
3
- __version__ = "0.2.0"
3
+ __version__ = "0.2.2"
waldiez/cli_extras.py CHANGED
@@ -4,13 +4,16 @@
4
4
  # isort: skip_file
5
5
  """Extra typer commands for CLI."""
6
6
 
7
+ from typing import Callable
8
+
7
9
  import typer
10
+ from typer.models import CommandInfo
8
11
  import subprocess # nosemgrep # nosec
9
12
 
10
13
  HAVE_STUDIO = False
11
14
  HAVE_JUPYTER = False
12
15
  try:
13
- from waldiez_studio.cli import app as studio_app
16
+ from waldiez_studio.cli import run as studio_app
14
17
 
15
18
  HAVE_STUDIO = True
16
19
  except BaseException:
@@ -38,18 +41,17 @@ def add_cli_extras(app: typer.Typer) -> None:
38
41
  The app with the extra commands added
39
42
  """
40
43
  if HAVE_STUDIO:
41
- app.add_typer(
42
- studio_app,
43
- name="studio",
44
- help="Start Waldiez Studio.",
45
- no_args_is_help=False,
44
+ app.registered_commands.append(
45
+ CommandInfo(name="studio", callback=studio_app)
46
46
  )
47
47
  if HAVE_JUPYTER:
48
48
  jupyter_app = get_jupyter_app()
49
- app.add_typer(jupyter_app, name="lab")
49
+ app.registered_commands.append(
50
+ CommandInfo(name="lab", callback=jupyter_app)
51
+ )
50
52
 
51
53
 
52
- def get_jupyter_app() -> typer.Typer:
54
+ def get_jupyter_app() -> Callable[..., None]:
53
55
  """Get the Jupyter Typer app.
54
56
 
55
57
  Returns
@@ -58,26 +60,22 @@ def get_jupyter_app() -> typer.Typer:
58
60
  The Jupyter Typer app
59
61
  """
60
62
  jupyter_app = typer.Typer(
61
- name="lab",
62
- help="Start jupyter lab with the waldiez extension.",
63
+ add_completion=False,
64
+ no_args_is_help=False,
65
+ pretty_exceptions_enable=False,
66
+ )
67
+
68
+ @jupyter_app.callback(
69
+ name="start",
70
+ help="Start JupyterLab.",
63
71
  context_settings={
64
72
  "help_option_names": ["-h", "--help"],
65
73
  "allow_extra_args": True,
66
74
  "ignore_unknown_options": True,
67
75
  },
68
- add_completion=False,
69
76
  no_args_is_help=False,
70
77
  invoke_without_command=True,
71
78
  add_help_option=True,
72
- pretty_exceptions_enable=False,
73
- epilog=(
74
- "Use `waldiez lab [COMMAND] --help` for command-specific help. "
75
- ),
76
- )
77
-
78
- @jupyter_app.command(
79
- name="start",
80
- help="Start JupyterLab.",
81
79
  )
82
80
  def start(
83
81
  port: int = typer.Option(
@@ -92,8 +90,7 @@ def get_jupyter_app() -> typer.Typer:
92
90
  ),
93
91
  browser: bool = typer.Option(
94
92
  False,
95
- "--no-browser",
96
- help="Don't open the browser.",
93
+ help="Open the browser after starting JupyterLab.",
97
94
  ),
98
95
  password: str = typer.Option(
99
96
  None,
@@ -111,7 +108,7 @@ def get_jupyter_app() -> typer.Typer:
111
108
  "--ServerApp.allow_origin='*'",
112
109
  "--ServerApp.disable_check_xsrf=True",
113
110
  ]
114
- if browser:
111
+ if not browser:
115
112
  command.append("--no-browser")
116
113
  if password:
117
114
  from jupyter_server.auth import passwd
@@ -120,4 +117,4 @@ def get_jupyter_app() -> typer.Typer:
120
117
  command.append(f"--ServerApp.password={hashed_password}")
121
118
  subprocess.run(command)
122
119
 
123
- return jupyter_app
120
+ return start
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: waldiez
3
- Version: 0.2.0
3
+ Version: 0.2.2
4
4
  Summary: waldiez
5
5
  Project-URL: homepage, https://waldiez.github.io/waldiez/python
6
6
  Project-URL: repository, https://github.com/waldiez/python.git
@@ -53,7 +53,7 @@ Requires-Dist: pylint==3.3.3; extra == 'dev'
53
53
  Requires-Dist: python-dotenv==1.0.1; extra == 'dev'
54
54
  Requires-Dist: ruff==0.8.4; extra == 'dev'
55
55
  Requires-Dist: toml; (python_version <= '3.10') and extra == 'dev'
56
- Requires-Dist: types-pyyaml==6.0.12.20240917; extra == 'dev'
56
+ Requires-Dist: types-pyyaml==6.0.12.20241221; extra == 'dev'
57
57
  Requires-Dist: types-toml==0.10.8.20240310; extra == 'dev'
58
58
  Requires-Dist: yamllint==1.35.1; extra == 'dev'
59
59
  Provides-Extra: docs
@@ -68,9 +68,9 @@ Requires-Dist: mkdocstrings-python==1.12.2; extra == 'docs'
68
68
  Requires-Dist: mkdocstrings[crystal,python]==0.27.0; extra == 'docs'
69
69
  Provides-Extra: jupyter
70
70
  Requires-Dist: jupyterlab>=4.3.0; extra == 'jupyter'
71
- Requires-Dist: waldiez-jupyter==0.2.0; extra == 'jupyter'
71
+ Requires-Dist: waldiez-jupyter==0.2.2; extra == 'jupyter'
72
72
  Provides-Extra: studio
73
- Requires-Dist: waldiez-studio==0.2.0; extra == 'studio'
73
+ Requires-Dist: waldiez-studio==0.2.2; extra == 'studio'
74
74
  Provides-Extra: test
75
75
  Requires-Dist: pytest-cov==6.0.0; extra == 'test'
76
76
  Requires-Dist: pytest-html==4.1.1; extra == 'test'
@@ -120,17 +120,17 @@ The repo for the js library is [here](https://github.com/waldiez/react).
120
120
  - You also can use the vscode extension:
121
121
  - [repo](https://github.com/waldiez/vscode)
122
122
  - [marketplace](https://marketplace.visualstudio.com/items?itemName=Waldiez.waldiez-vscode)
123
- - Finally, you can use [waldiez-studio](https://github.com/waldiez/studio)
123
+ - Finally, you can use [waldiez-studio](https://github.com/waldiez/studio), which includes a FastAPI app to handle the conversion and running of waldiez flows.
124
124
 
125
- <!--
126
- The jupyterlab extension and studio also provided as extras in the main package.
125
+ The jupyterlab extension and waldiez studio are also provided as extras in the main package.
127
126
 
128
127
  ```shell
129
128
  pip install waldiez[studio] # or pip install waldiez_studio
130
129
  pip install waldiez[jupyter] # or pip install waldiez_jupyter
131
130
  # or both
132
131
  pip install waldiez[studio,jupyter]
133
- ``` -->
132
+ ```
133
+
134
134
  ### CLI
135
135
 
136
136
  ```bash
@@ -1,8 +1,8 @@
1
1
  waldiez/__init__.py,sha256=06YinMpFcPN2mGHwloBAaCUXvWJYN9HW6sxLwRz_0G4,2056
2
2
  waldiez/__main__.py,sha256=mUQWu4CF03Jbbscvcfb_9EFTnIMliJJJmAuWf0sRRZU,110
3
- waldiez/_version.py,sha256=PIBgTgbbj2qAk3hBgyVeGwyQnBcPkQ0T8gUfCv_5jIY,62
3
+ waldiez/_version.py,sha256=unGlwga1PykxDeWOaTFSIbEfv1EcyKFLju1lsfFRMAM,62
4
4
  waldiez/cli.py,sha256=yaPq02XRN1z0xS0lNn63rIO7SI7eHv7xksTwyrNm0RI,6544
5
- waldiez/cli_extras.py,sha256=ZB-1cGBo19epjWJ3hBM6H-TLRNnYZNbqlDmjRmGJTJk,3007
5
+ waldiez/cli_extras.py,sha256=deJlQ31WnUS5RTHJ9M6a6OQPrVZQeI2T3u_ll1IurRg,2926
6
6
  waldiez/conflict_checker.py,sha256=E-w0TfTivDAVpNvjd_NSBeaaFsWtWAyxKoSz0-g6x2U,880
7
7
  waldiez/exporter.py,sha256=yDtJL-p-wm4DeJnNE5xlyQUAeMTBkeFz5e9DikjDX5k,9517
8
8
  waldiez/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -85,8 +85,8 @@ waldiez/models/model/model_data.py,sha256=IBXZLaTs4RzEb0xaHuouqesTLgKp3jEBlKlIKN
85
85
  waldiez/models/skill/__init__.py,sha256=rU88bajKOGMYoHFcE8MP0jW9H0MswbQmvz5wxS35BYE,169
86
86
  waldiez/models/skill/skill.py,sha256=fhsAI413an2_d4DBIkf7dzEuWk6rGs2t4sl97a4dj20,3473
87
87
  waldiez/models/skill/skill_data.py,sha256=RTWn8Od6w7g-nRIpsS29sqZ8sPm5dCPiK7-qXmU-KD4,815
88
- waldiez-0.2.0.dist-info/METADATA,sha256=4UkJ_6EcVTb0xxwkf1xgsPsX7pPu8vYH5KJEVTxdZnM,8659
89
- waldiez-0.2.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
90
- waldiez-0.2.0.dist-info/entry_points.txt,sha256=9MQ8Y1rD19CU7UwjNPwoyTRpQsPs2QimjrtwTD0bD6k,44
91
- waldiez-0.2.0.dist-info/licenses/LICENSE,sha256=5ds5KvqN0audHYSaoarNtEITRRx9cZhq4wWPmFvmU48,1065
92
- waldiez-0.2.0.dist-info/RECORD,,
88
+ waldiez-0.2.2.dist-info/METADATA,sha256=kmKg8v8CgE2t-hu30FZcOQqH8H2YX4we_5Zz9E0-fU4,8748
89
+ waldiez-0.2.2.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
90
+ waldiez-0.2.2.dist-info/entry_points.txt,sha256=9MQ8Y1rD19CU7UwjNPwoyTRpQsPs2QimjrtwTD0bD6k,44
91
+ waldiez-0.2.2.dist-info/licenses/LICENSE,sha256=5ds5KvqN0audHYSaoarNtEITRRx9cZhq4wWPmFvmU48,1065
92
+ waldiez-0.2.2.dist-info/RECORD,,