Commit Graph

396 Commits

Author SHA1 Message Date
Stephan Fitzpatrick b2f705d01e Updated Windmill client constructor to accept workspace (#2822)
This commit introduces a change in the Windmill class constructor (in wmill/client.py) to include 'workspace' as a parameter. This addition is intended to make "workspace" universally configurable either via an argument or the 'WM_WORKSPACE' environment variable. If not provided, the program will now assert a missing workspace with an informative error message.
2023-12-09 00:22:41 +01:00
Ruben Fiszel 7c64a36624 chore(main): release 1.222.0 (#2801)
* chore(main): release 1.222.0

* Apply automatic changes

---------

Co-authored-by: rubenfiszel <rubenfiszel@users.noreply.github.com>
2023-12-07 19:04:46 +01:00
Ruben Fiszel b75e8a55ba chore(main): release 1.221.0 (#2786)
* chore(main): release 1.221.0

* Apply automatic changes

---------

Co-authored-by: rubenfiszel <rubenfiszel@users.noreply.github.com>
2023-12-07 00:50:26 +01:00
Ruben Fiszel 0333ce78bd chore(main): release 1.220.0 (#2744)
* chore(main): release 1.220.0

* Apply automatic changes

---------

Co-authored-by: rubenfiszel <rubenfiszel@users.noreply.github.com>
2023-12-05 19:52:32 +01:00
Ruben Fiszel 042504f905 fix: add run_flow_sync to python client + few nits 2023-12-05 19:49:18 +01:00
Guillaume Bouvignies 5cb3c34e44 feat: Various minor improvements for S3 DX (#2760)
* feat: Various minor improvements for S3 DX

* Fix openAPI yaml

* Remove unused imports
2023-12-04 13:20:04 +01:00
Ruben Fiszel 1d90434f12 chore(main): release 1.219.1 (#2742)
* chore(main): release 1.219.1

* Apply automatic changes

---------

Co-authored-by: rubenfiszel <rubenfiszel@users.noreply.github.com>
2023-12-01 07:41:18 +01:00
Ruben Fiszel 49803e26f6 chore(main): release 1.219.0 (#2739)
* chore(main): release 1.219.0

* Apply automatic changes

---------

Co-authored-by: rubenfiszel <rubenfiszel@users.noreply.github.com>
2023-12-01 01:20:38 +01:00
Ruben Fiszel bb7f11fcda chore(main): release 1.218.0 (#2731)
* chore(main): release 1.218.0

* Apply automatic changes

---------

Co-authored-by: rubenfiszel <rubenfiszel@users.noreply.github.com>
2023-11-30 17:22:05 +01:00
Ruben Fiszel 651f74b00e improve python client 2023-11-29 21:41:44 +01:00
Ruben Fiszel 72bb15f6a0 chore(main): release 1.217.0 (#2705)
* chore(main): release 1.217.0

* Apply automatic changes

---------

Co-authored-by: rubenfiszel <rubenfiszel@users.noreply.github.com>
2023-11-29 18:28:51 +01:00
Ruben Fiszel 772c04c9b3 update python-client 2023-11-29 18:19:47 +01:00
Ruben Fiszel 095da9e76e chore(main): release 1.216.0 (#2692)
* chore(main): release 1.216.0

* Apply automatic changes

---------

Co-authored-by: rubenfiszel <rubenfiszel@users.noreply.github.com>
2023-11-26 14:40:33 +01:00
Stephan Fitzpatrick 3bb2a0c960 Corrently handle terminal state when invoking job through run_script method (#2703) 2023-11-25 09:38:53 +01:00
Stephan Fitzpatrick 603e7ff67f feat(python): Update return type for 'get_resource' function (#2695)
* Update return type for 'get_resource' function

Modified the 'get_resource' function in 'wmill/client.py' to additionally return a 'dict', providing support for dictionaries in addition to strings and None. This change caters towards use-cases where getting a dictionary resource is needed, enhancing flexibility of resource handling in Windmill client operations. Code updated in two locations for consistency.

* Update README.md for python-client

Expanded and updated the 'README.md' to include detailed explanations about the basic and advanced usage of the 'wmill' package. The previous version wasn't as comprehensive and lacked examples. Now it includes thorough usage guidance, additional explanations, and code examples. Change improves usability for new developers approaching the project.
2023-11-24 20:17:30 +01:00
Ruben Fiszel 9d32bdf5a6 chore(main): release 1.215.0 (#2689)
* chore(main): release 1.215.0

* Apply automatic changes

---------

Co-authored-by: rubenfiszel <rubenfiszel@users.noreply.github.com>
2023-11-23 15:07:52 +01:00
Ruben Fiszel b4bbb794b5 chore(main): release 1.214.1 (#2673)
* chore(main): release 1.214.1

* Apply automatic changes

---------

Co-authored-by: rubenfiszel <rubenfiszel@users.noreply.github.com>
2023-11-23 08:51:19 +01:00
Stephan Fitzpatrick 1c2abcda23 Feat(python): Quality of Life improvements to Python client (#2686)
* Fix references to `Windmill.start_script_async`

* Improve client usability and extend functionalities

This commit introduces several changes to improve the usability of the module and extend its functionalities. Line breaks have been added for long function calls to improve readability. A state setter has been added for the 'state' property to facilitate state updates. New functions 'cancel_running' and 'run_script' have been added to provide more control to the user over the script executions. The README file has been updated to reflect these changes and provide more comprehensive usage instructions including both basic and advanced usage of the module.

* Add line breaks and update README.md for readability

Inserted line breaks into function calls for improved readability in python-client/wmill/README.md. This enhances module usability by making code easier to follow. 'state' property setter, 'cancel_running' and 'run_script' functions have been added to enrich module's functionality. README was updated to reflect these changes and provide clearer instructions.
2023-11-23 08:39:38 +01:00
Stephan Fitzpatrick 9783abba0a Fix references to Windmill.start_script_async (#2685) 2023-11-23 07:48:48 +01:00
Stephan Fitzpatrick 449974404a Update method name in wmill README sample code (#2679)
In the README's example code for the wmill Python client, the method name `start_execution` has been changed to `run_script_async`. This change is in line with the recent updates we made to the client's public API. The naming adjustment adds more clarity to the method's functionality, and ensures that the sample code in the README is accurate and stays updated with the latest changes in the wmill Python client's API.
2023-11-22 17:16:07 +01:00
Ruben Fiszel 391f4ab551 chore(main): release 1.214.0 (#2669)
* chore(main): release 1.214.0

* Apply automatic changes

---------

Co-authored-by: rubenfiszel <rubenfiszel@users.noreply.github.com>
2023-11-22 10:32:07 +01:00
Ruben Fiszel 6377605821 fix client 2023-11-22 10:28:17 +01:00
Ruben Fiszel 6797d4d114 improve client 2023-11-22 10:04:44 +01:00
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