Commit Graph

1389 Commits

Author SHA1 Message Date
Ruben Fiszel
f067259f5d improve client 2023-11-22 10:04:44 +01:00
Stephan Fitzpatrick
56a3783aa5 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
737f60e2ec 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
3532c9a89f 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
48b182e560 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
d1b1459ebb 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
23b9f9d432 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
b9dc8b6cff fix: make wmill compatible with python 3.7 2023-11-18 17:15:05 +01:00
Ruben Fiszel
f74d542396 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
b9859a4875 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
1de15a800c 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
f932e4c916 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
3875a13865 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
db4eea5e22 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
9eaa506787 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
7bb4c6fde1 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
c65a90e41a fix: optimize single step iterative forloops (#2596)
* cc

* fixed
2023-11-10 13:17:39 +01:00
Ruben Fiszel
8ec1775465 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
469017126b 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
3c1e77c57b 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
5400e96452 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
86baae43ce 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
4616379014 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
57e25ee0c8 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
cf0aa95f7f 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
248ec9d171 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
4129ec1020 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
4d956d01d8 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
a43ce39e60 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
d2fca5b1c6 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
37293b533e 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
1a95c7f923 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
e555b30517 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
6a20bc8d89 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
efe21eea75 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
67e4b314bb 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
402d0e3cef 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
e86c7f1f3f 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
43f5c234ba 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
3ac45ce79c 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
1e212161d2 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
976e6a34d1 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
b91b133e0e 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
4b0736f7fd 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
cf44852267 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
b08a5b9a43 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
83c8d72a7f 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
48289fb7e6 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
e133e0e090 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
c9285b539d 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