.py task files are now more intuitive to use.
At the bare minimum, all users have to do is write Python code in a .py file and gusty will pass `PythonOperator` a small function to execute the .py file. A `PythonOperator` task can be generated with as little code as:
python
print("hello world")
For parameters and configuration, a raw markdown chunk like below will work behave like any other task file:
python
---
dependencies:
- other_task
---
print("hello world")
.py task files can accept an `operator` parameter in markdown, which means that users can run whatever operator they wish against their Python code.
Lastly, if a user does specify a function name under `python_callable`, and the operator for the .py file inherits Airflow's `PythonOperator`, then gusty will search the .py task file for a function named the same as what is specified in the markdown. For example this markdown will tell gusty to look for a function named `say_hello` in the .py task file contents:
python
---
dependencies:
- other_task
python_callable: say_hello
---
def say_hello():
print("hello world")
These improvements make starting with .py task files as easy as just writing any Python code, and allow for a greater level of configuration compared to previously.