Knowledge-Graph-Hub / kg-microbe

https://knowledge-graph-hub.github.io/kg-microbe/index.html
BSD 3-Clause "New" or "Revised" License
15 stars 3 forks source link

Build process fails due to missing argument for transform function #48

Closed caufieldjh closed 1 year ago

caufieldjh commented 1 year ago

Build currently fails when calling transforms:

11:51:07  + python3.8 run.py transform
11:51:09  Traceback (most recent call last):
11:51:09    File "run.py", line 121, in <module>
11:51:09      cli()
11:51:09    File "/var/lib/jenkins/workspace/edge-graph-hub_kg-microbe_master/gitrepo/venv/lib/python3.8/site-packages/click/core.py", line 1130, in __call__
11:51:09      return self.main(*args, **kwargs)
11:51:09    File "/var/lib/jenkins/workspace/edge-graph-hub_kg-microbe_master/gitrepo/venv/lib/python3.8/site-packages/click/core.py", line 1055, in main
11:51:09      rv = self.invoke(ctx)
11:51:09    File "/var/lib/jenkins/workspace/edge-graph-hub_kg-microbe_master/gitrepo/venv/lib/python3.8/site-packages/click/core.py", line 1657, in invoke
11:51:09      return _process_result(sub_ctx.command.invoke(sub_ctx))
11:51:09    File "/var/lib/jenkins/workspace/edge-graph-hub_kg-microbe_master/gitrepo/venv/lib/python3.8/site-packages/click/core.py", line 1404, in invoke
11:51:09      return ctx.invoke(self.callback, **ctx.params)
11:51:09    File "/var/lib/jenkins/workspace/edge-graph-hub_kg-microbe_master/gitrepo/venv/lib/python3.8/site-packages/click/core.py", line 760, in invoke
11:51:09      return __callback(*args, **kwargs)
11:51:09    File "run.py", line 69, in transform
11:51:09      kg_transform(*args, **kwargs)
11:51:09    File "/var/lib/jenkins/workspace/edge-graph-hub_kg-microbe_master/gitrepo/kg_microbe/transform.py", line 43, in transform
11:51:09      t.run()
11:51:09  TypeError: run() missing 1 required positional argument: 'data_file'

If the function is reaching t.run() without including any sources, then some sources exist but aren't being recognized by name.

Could be related to specifying

def transform(input_dir: str, output_dir: str, sources: Optional[List[str]] = None) -> None:

instead of

def transform(input_dir: str, output_dir: str, sources: List[str] = None) -> None:

to avoid the no-implicit-optional thing.