Commit Graph

388 Commits

Author SHA1 Message Date
Stephan Fitzpatrick
37ffdaed60 feat(python): Refactor Windmill Python client (remove windmill-api) (#2665)
* "feat(python): Refactor Windmill Python client for better encapsulation and maintainability"

This PR obviates the need for the `windmill-api` library. I believe this makes the client package is easier to understand, debug, build, (and test) without it.

Additional updates were made to improve logging and add more robust error handling.

Here's what Jetbrains' AI assistant came up with to describe the changes based on the diff--I think it did a decent job:

> Simplified the Windmill Python client by refactoring out repeated code into more compact, reusable methods. Transitioned the client functions into a Windmill client class, enabling a better encapsulation of the client's state. Updated the README example to reflect this change. This improves code maintainability by making the code easier to understand and update, and improves user experience by providing a more intuitive client interface.

* "Refactor post method in Windmill Python client"

Removed the hard-coded param 'refresh_client' from the post method in wmill/client.py. since it's no longer used.

* "Update build script for Python client"

Updated the build script for the Python client for the backend to now include scaffolding code for generating the OpenAPI client, making changes to the generated client, and building the client. .

* "Add raise_for_status option in http methods"

Enhanced 'get' and 'post' methods in the client class to include a new optional parameter 'raise_for_status'. This allows for better error handling by raising exceptions for 4XX and 5XX responses, if requested. This way, non critical API calls can continue execution even if they receive a client or server error.

* "Removed refresh_client condition in post method"

* Replace `create_job` with `start_execution` in wmill client

This commit changes the method `create_job` to `start_execution` in the wmill client. The change was made to better reflect the function's purpose and make the code even more self-explanatory. Additionally, references to this changed method in README.md and various portions of client.py are also updated. The change will enhance readability and make it easier for newcomers to understand the code.

* Fix type hints and default arguments in wmill client

This commit adjusts typing hints for several methods from Dict[str, Any] to Any in wmill client since the result of a script isn't always a dictionary. Null arguments are also adjusted from {} to None, ensuring better Python standard practices and less unpredicted behaviors. These changes are aimed to enhance maintainability and make the functions more resilient.

* Update client.py

* Update pyproject.toml

* Update client.py

---------

Co-authored-by: Ruben Fiszel <ruben@rubenfiszel.com>
2023-11-22 09:49:50 +01:00
Ruben Fiszel
60d2f79677 chore(main): release 1.213.0 (#2658)
* chore(main): release 1.213.0

* Apply automatic changes

---------

Co-authored-by: rubenfiszel <rubenfiszel@users.noreply.github.com>
2023-11-21 15:50:42 +01:00
Ruben Fiszel
cd8919d46f chore(main): release 1.212.0 (#2653)
* chore(main): release 1.212.0

* Apply automatic changes

---------

Co-authored-by: rubenfiszel <rubenfiszel@users.noreply.github.com>
2023-11-20 14:20:34 +01:00
Ruben Fiszel
1acf78e782 chore(main): release 1.211.0 (#2651)
* chore(main): release 1.211.0

* Apply automatic changes

---------

Co-authored-by: rubenfiszel <rubenfiszel@users.noreply.github.com>
2023-11-20 02:09:45 +01:00
Stephan Fitzpatrick
c7a30f7c9d feat(python): Add functionality and resiliency to wmill python client (#2650)
* Refine wmill client.py `run_script_sync` and `run_script_by_path_sync` with more features

This commit enriches the functionality of the `run_script_sync` and `run_script_by_path_sync` functions. New features introduced include script cancellation upon exit, logging capabilities,
and script execution timeout. These enhancements improve script execution control and provide better debug information. The `get_result` function was also adjusted to enable the control
of 'is not None' assertion on the job result. Consequently, user flexibility is enhanced, and the method can cater to cases where a `None` result is within the expected behavior.

* remove unnecessary local import and rename cancel_atexit to cleanup
2023-11-20 02:07:20 +01:00
Ruben Fiszel
eef6432637 chore(main): release 1.210.1 (#2647)
* chore(main): release 1.210.1

* Apply automatic changes

---------

Co-authored-by: rubenfiszel <rubenfiszel@users.noreply.github.com>
2023-11-18 17:40:36 +01:00
Ruben Fiszel
6ae1a69b75 fix: make wmill compatible with python 3.7 2023-11-18 17:15:05 +01:00
Ruben Fiszel
84df0328a5 chore(main): release 1.210.0 (#2645)
* chore(main): release 1.210.0

* Apply automatic changes

---------

Co-authored-by: rubenfiszel <rubenfiszel@users.noreply.github.com>
2023-11-17 21:25:51 +01:00
Ruben Fiszel
8a3f03963b chore(main): release 1.209.0 (#2636)
* chore(main): release 1.209.0

* Apply automatic changes

---------

Co-authored-by: rubenfiszel <rubenfiszel@users.noreply.github.com>
2023-11-17 18:36:22 +01:00
Ruben Fiszel
940ad96f24 chore(main): release 1.208.0 (#2633)
* chore(main): release 1.208.0

* Apply automatic changes

---------

Co-authored-by: rubenfiszel <rubenfiszel@users.noreply.github.com>
2023-11-15 20:31:02 +01:00
Guillaume Bouvignies
90093656b4 feat: Add Python SDK capabilities to generate Polars and DuckDB connection settings to S3 (#2625)
* feat: Add Python SDK capabilities to generate Polars and DuckDB connection settings to S3

* Add endpoint to list S3 objects

* Add FE to set the workspace S3 resource

* Fix openapi

* sqlx prepare

* Hide Windmil LFS tab
2023-11-15 19:37:02 +01:00
Ruben Fiszel
9c684dac24 chore(main): release 1.207.0 (#2617)
* chore(main): release 1.207.0

* Apply automatic changes

---------

Co-authored-by: rubenfiszel <rubenfiszel@users.noreply.github.com>
2023-11-15 17:01:18 +01:00
Ruben Fiszel
9f4d53e0f2 chore(main): release 1.206.0 (#2615)
* chore(main): release 1.206.0

* Apply automatic changes

---------

Co-authored-by: rubenfiszel <rubenfiszel@users.noreply.github.com>
2023-11-13 00:29:55 +01:00
Ruben Fiszel
272240abad chore(main): release 1.205.0 (#2613)
* chore(main): release 1.205.0

* Apply automatic changes

---------

Co-authored-by: rubenfiszel <rubenfiszel@users.noreply.github.com>
2023-11-11 11:37:41 +01:00
Ruben Fiszel
4b07d7e2df chore(main): release 1.204.1 (#2610)
* chore(main): release 1.204.1

* Apply automatic changes

---------

Co-authored-by: rubenfiszel <rubenfiszel@users.noreply.github.com>
2023-11-10 13:32:45 +01:00
Ruben Fiszel
88e3648ee4 fix: optimize single step iterative forloops (#2596)
* cc

* fixed
2023-11-10 13:17:39 +01:00
Ruben Fiszel
5eca0e8784 chore(main): release 1.204.0 (#2606)
* chore(main): release 1.204.0

* Apply automatic changes

---------

Co-authored-by: rubenfiszel <rubenfiszel@users.noreply.github.com>
2023-11-10 11:20:06 +01:00
Ruben Fiszel
33180795e7 chore(main): release 1.203.0 (#2590)
* chore(main): release 1.203.0

* Apply automatic changes

---------

Co-authored-by: rubenfiszel <rubenfiszel@users.noreply.github.com>
2023-11-09 20:23:34 +01:00
Ruben Fiszel
fbe43c4273 chore(main): release 1.202.1 (#2587)
* chore(main): release 1.202.1

* Apply automatic changes

---------

Co-authored-by: rubenfiszel <rubenfiszel@users.noreply.github.com>
2023-11-07 21:01:16 +01:00
Ruben Fiszel
436b5ee28a chore(main): release 1.202.0 (#2575)
* chore(main): release 1.202.0

* Apply automatic changes

---------

Co-authored-by: rubenfiszel <rubenfiszel@users.noreply.github.com>
2023-11-07 20:27:29 +01:00
Ruben Fiszel
e4721022e5 chore(main): release 1.201.0 (#2564)
* chore(main): release 1.201.0

* Apply automatic changes

---------

Co-authored-by: rubenfiszel <rubenfiszel@users.noreply.github.com>
2023-11-06 19:14:41 +01:00
Ruben Fiszel
4d22ec664a chore(main): release 1.200.0 (#2559)
* chore(main): release 1.200.0

* Apply automatic changes

---------

Co-authored-by: rubenfiszel <rubenfiszel@users.noreply.github.com>
2023-11-04 09:41:02 +01:00
Ruben Fiszel
1595f79bc3 chore(main): release 1.199.0 (#2557)
* chore(main): release 1.199.0

* Apply automatic changes

---------

Co-authored-by: rubenfiszel <rubenfiszel@users.noreply.github.com>
2023-11-04 00:56:30 +01:00
Ruben Fiszel
0fcebe4420 chore(main): release 1.198.0 (#2550)
* chore(main): release 1.198.0

* Apply automatic changes

---------

Co-authored-by: rubenfiszel <rubenfiszel@users.noreply.github.com>
2023-11-03 22:12:18 +01:00
Ruben Fiszel
bfa4bd8f7b chore(main): release 1.197.1 (#2548)
* chore(main): release 1.197.1

* Apply automatic changes

---------

Co-authored-by: rubenfiszel <rubenfiszel@users.noreply.github.com>
2023-11-02 22:37:23 +01:00
Ruben Fiszel
00bc1b9671 chore(main): release 1.197.0 (#2538)
* chore(main): release 1.197.0

* Apply automatic changes

---------

Co-authored-by: rubenfiszel <rubenfiszel@users.noreply.github.com>
2023-11-02 20:27:33 +01:00
Ruben Fiszel
f9c07bd6ec chore(main): release 1.196.0 (#2535)
* chore(main): release 1.196.0

* Apply automatic changes

---------

Co-authored-by: rubenfiszel <rubenfiszel@users.noreply.github.com>
2023-11-01 13:18:00 +01:00
Ruben Fiszel
d069be74b6 chore(main): release 1.195.0 (#2531)
* chore(main): release 1.195.0

* Apply automatic changes

---------

Co-authored-by: rubenfiszel <rubenfiszel@users.noreply.github.com>
2023-11-01 00:55:33 +01:00
Ruben Fiszel
a87a441c14 chore(main): release 1.194.0 (#2523)
* chore(main): release 1.194.0

* Apply automatic changes

---------

Co-authored-by: rubenfiszel <rubenfiszel@users.noreply.github.com>
2023-10-30 20:17:31 +01:00
Ruben Fiszel
0a2648f560 chore(main): release 1.193.0 (#2513)
* chore(main): release 1.193.0

* Apply automatic changes

---------

Co-authored-by: rubenfiszel <rubenfiszel@users.noreply.github.com>
2023-10-28 15:04:26 +02:00
Ruben Fiszel
17f7356403 chore(main): release 1.192.0 (#2509)
* chore(main): release 1.192.0

* Apply automatic changes

---------

Co-authored-by: rubenfiszel <rubenfiszel@users.noreply.github.com>
2023-10-25 10:13:51 +02:00
Ruben Fiszel
b9c9a20dd6 chore(main): release 1.191.0 (#2506)
* chore(main): release 1.191.0

* Apply automatic changes

---------

Co-authored-by: rubenfiszel <rubenfiszel@users.noreply.github.com>
2023-10-25 01:27:28 +02:00
Ruben Fiszel
f752f83c94 chore(main): release 1.190.3 (#2502)
* chore(main): release 1.190.3

* Apply automatic changes

---------

Co-authored-by: rubenfiszel <rubenfiszel@users.noreply.github.com>
2023-10-24 10:21:50 +02:00
Ruben Fiszel
cc17e36702 chore(main): release 1.190.2 (#2501)
* chore(main): release 1.190.2

* Apply automatic changes

---------

Co-authored-by: rubenfiszel <rubenfiszel@users.noreply.github.com>
2023-10-24 09:54:41 +02:00
Ruben Fiszel
410cdd5526 chore(main): release 1.190.1 (#2497)
* chore(main): release 1.190.1

* Apply automatic changes

---------

Co-authored-by: rubenfiszel <rubenfiszel@users.noreply.github.com>
2023-10-24 09:31:20 +02:00
Ruben Fiszel
d75860af19 chore(main): release 1.190.0 (#2491)
* chore(main): release 1.190.0

* Apply automatic changes

---------

Co-authored-by: rubenfiszel <rubenfiszel@users.noreply.github.com>
2023-10-23 21:49:32 +02:00
Ruben Fiszel
fa51a6cb4a chore(main): release 1.189.0 (#2481)
* chore(main): release 1.189.0

* Apply automatic changes

---------

Co-authored-by: rubenfiszel <rubenfiszel@users.noreply.github.com>
2023-10-23 17:21:30 +02:00
Ruben Fiszel
724d92d037 chore(main): release 1.188.1 (#2479)
* chore(main): release 1.188.1

* Apply automatic changes

---------

Co-authored-by: rubenfiszel <rubenfiszel@users.noreply.github.com>
2023-10-21 14:51:57 +02:00
Ruben Fiszel
7dbdb8bb9c chore(main): release 1.188.0 (#2478)
* chore(main): release 1.188.0

* Apply automatic changes

---------

Co-authored-by: rubenfiszel <rubenfiszel@users.noreply.github.com>
2023-10-21 14:44:48 +02:00
Ruben Fiszel
9df33ff660 chore(main): release 1.187.0 (#2472)
* chore(main): release 1.187.0

* Apply automatic changes

---------

Co-authored-by: rubenfiszel <rubenfiszel@users.noreply.github.com>
2023-10-21 02:34:57 +02:00
Ruben Fiszel
e6308f4c42 chore(main): release 1.186.0 (#2466)
* chore(main): release 1.186.0

* Apply automatic changes

---------

Co-authored-by: rubenfiszel <rubenfiszel@users.noreply.github.com>
2023-10-20 01:44:40 +02:00
Ruben Fiszel
b5bb247bab chore(main): release 1.185.0 (#2461)
* chore(main): release 1.185.0

* Apply automatic changes

---------

Co-authored-by: rubenfiszel <rubenfiszel@users.noreply.github.com>
2023-10-19 15:57:12 +02:00
Ruben Fiszel
646f0ddc9e chore(main): release 1.184.0 (#2438)
* chore(main): release 1.184.0

* Apply automatic changes

---------

Co-authored-by: rubenfiszel <rubenfiszel@users.noreply.github.com>
2023-10-18 01:35:50 +02:00
Ruben Fiszel
5b8e39c9cd chore(main): release 1.183.0 (#2433)
* chore(main): release 1.183.0

* Apply automatic changes

---------

Co-authored-by: rubenfiszel <rubenfiszel@users.noreply.github.com>
2023-10-11 17:18:03 +02:00
Ruben Fiszel
d97325f178 chore(main): release 1.182.3 (#2424)
* chore(main): release 1.182.3

* Apply automatic changes

---------

Co-authored-by: rubenfiszel <rubenfiszel@users.noreply.github.com>
2023-10-10 17:33:26 +02:00
Ruben Fiszel
aef26ea567 chore(main): release 1.182.2 (#2422)
* chore(main): release 1.182.2

* Apply automatic changes

---------

Co-authored-by: rubenfiszel <rubenfiszel@users.noreply.github.com>
2023-10-10 17:22:37 +02:00
Ruben Fiszel
dcc6e64f01 chore(main): release 1.182.1 (#2420)
* chore(main): release 1.182.1

* Apply automatic changes

---------

Co-authored-by: rubenfiszel <rubenfiszel@users.noreply.github.com>
2023-10-10 17:08:38 +02:00
Ruben Fiszel
c37c6f5d5d chore(main): release 1.182.0 (#2393)
* chore(main): release 1.182.0

* Apply automatic changes

---------

Co-authored-by: rubenfiszel <rubenfiszel@users.noreply.github.com>
2023-10-10 15:40:11 +02:00
Ruben Fiszel
0f1de9af48 chore(main): release 1.181.0 (#2369)
* chore(main): release 1.181.0

* Apply automatic changes

---------

Co-authored-by: rubenfiszel <rubenfiszel@users.noreply.github.com>
2023-10-05 09:56:30 +02:00
Ruben Fiszel
4166931b94 chore(main): release 1.180.0 (#2366)
* chore(main): release 1.180.0

* Apply automatic changes

---------

Co-authored-by: rubenfiszel <rubenfiszel@users.noreply.github.com>
2023-10-01 21:06:13 +02:00