skypyproject / skypy

SkyPy: A package for modelling the Universe.
BSD 3-Clause "New" or "Revised" License
118 stars 38 forks source link

unexpected keyword argument '.depends' #464

Closed rrjbca closed 3 years ago

rrjbca commented 3 years ago

Describe the bug There are situations (I can't narrow down the exact conditions) where the Call class is passing .depends as a keyword argument to its function call (when run within a Pipeline). I am working on a fix.

Minimum working example

# bug.yml
tables:
  bug_table_1:
    a: !numpy.random.uniform [0, 1, 10]
  bug_table_2:
    .init: !astropy.table.vstack
      tables: [ $bug_table_1 ]
      .depends: [ bug_table_1.complete ]
>>> skypy -v bug.yml tmp.fits
2021-05-12 16:04:51,626 [ERROR] skypy: got an unexpected keyword argument '.depends'
Traceback (most recent call last):
  File "skypy/pipeline/scripts/skypy.py", line 42, in main
    pipeline = Pipeline(config)
  File "skypy/pipeline/_pipeline.py", line 106, in __init__
    settings.infer(context)
  File "skypy/pipeline/_items.py", line 66, in infer
    given = sig.bind_partial(*self.args, **self.kwargs)
  File "/usr/local/opt/python@3.8/Frameworks/Python.framework/Versions/3.8/lib/python3.8/inspect.py", line 3044, in bind_partial
    return self._bind(args, kwargs, partial=True)
  File "/usr/local/opt/python@3.8/Frameworks/Python.framework/Versions/3.8/lib/python3.8/inspect.py", line 3026, in _bind
    raise TypeError(
TypeError: got an unexpected keyword argument '.depends'