Seth Stokes
10/09/2024, 5:44 PMError: Type requirement mismatch. Expected jira:<class 'jira.JiraAPI'> got <__main__.JiraAPI object at 0x0000028361459B50>:<class '__main__.JiraAPI'> instead.
Could this be due to this JiraAPI being defined in the same cell to use with jupyter_magic cell_to_module ?Seth Stokes
10/09/2024, 5:45 PMAny but the error persistsThierry Jean
10/09/2024, 5:50 PM.execute(...) with the inputs kwargs, there is type validation on the input values. The way some libraries are typed, it can be problematic.
I'm surprised that using Any in raw_jira_issues_initial(jira: Any, ...) doesn't fix the issue. What's the exception for that?
As a workaround, can you try creating a function and see if it works?
def jira(...) -> JiraAPI:
returnThierry Jean
10/09/2024, 5:52 PMinputs.
This would work because type hints match and there's no actual type enforcement on node results
def foo() -> np.ndarray:
return True
def bar(foo: np.ndarray) -> np.ndarray:
return foo is True
dr.execute(["bar"])
This wouldn't work and raise foo isn't np.ndarray
def bar(foo: np.ndarray) -> np.ndarray:
return foo is True
# ...
dr.execute(["bar"], inputs={"foo": True})Seth Stokes
10/09/2024, 5:52 PMdr.execute(["all_paginated_responses"], inputs={"jira": jira_api, "jql": jql})
I'm surprised that usingWhen usinginAnydoesn't fix the issue. What's the exception for that?raw_jira_issues_initial(jira: Any, ...)
cell_to_module does jupyter kernel need to be reloaded or is re-running the cell enough? I think that may be why I get the same exceptionThierry Jean
10/09/2024, 5:54 PM%%cell_to_module MODULE_NAME it will update the module MODULE_NAME in memory.
You can manually check that by calling MODULE_NAME.raw_jira_issues_initial() if you wantThierry Jean
10/09/2024, 5:55 PMAny on both raw_jira_issues_initial and raw_jira_issues_responses ?Seth Stokes
10/09/2024, 5:56 PMEach time you execute the cell that hasThat is what I would expect but when I amend the code to useit will update the module%%cell_to_module MODULE_NAMEin memory.MODULE_NAME
Any instead, the --display 'd DAG does not reflect the code changesThierry Jean
10/09/2024, 5:57 PM