When I add a dependency, I get the error message: "TypeError: run_stata_script() got an unexpected keyword argument 'my_keyword_for_dependency'".
I tried to follow your description, which says, "pytask assumes that all function arguments that are not passed to the argument produces are dependencies of the task". My code looks as follows:
from pathlib import Path
from pytask import mark
from mymodule.config import BLD, SRC
@mark.stata(script = SRC / "analysis" / "test.do")
def task_test_stata(my_keyword_for_dependency: Path = BLD / "data" / "data_file.dta"):
pass
What works is:
- Using the standard pytask for Python code and adding a dependency in the same way.
- Adding
produces as a keyword and a product of the Stata file.
I installed the current version of pytask and pytask-stata.
When I add a dependency, I get the error message: "TypeError: run_stata_script() got an unexpected keyword argument 'my_keyword_for_dependency'".
I tried to follow your description, which says, "pytask assumes that all function arguments that are not passed to the argument
producesare dependencies of the task". My code looks as follows:What works is:
producesas a keyword and a product of the Stata file.I installed the current version of pytask and pytask-stata.