pytask-dev / pytask

pytask is a workflow management system that facilitates reproducible data analyses.
https://pytask-dev.readthedocs.io/en/stable
Other
114 stars 10 forks source link

ENH: Disable capturing from inside a task #320

Open augustebaum opened 1 year ago

augustebaum commented 1 year ago

Is your feature request related to a problem?

I wish pytask had the same "capture-related" fixtures as pytest, like the ones described here. In particular I'd like to be able to use the

with capsys.disabled():
    ...

behaviour, in the hope that tqdm progress bars don't break when using the -s flag.

Describe the solution you'd like

I don't know precisely how pytask differs from pytest, but perhaps it would be possible to just re-use the above mentioned fixtures from pytest?

API breaking implications

Hopefully none, this is just adding fixtures.

Describe alternatives you've considered

None so far ^^'; I can track the progress of my task in other ways so I haven't pursued this very far.

tobiasraabe commented 1 year ago

Hi @augustebaum, currently, there is no fixture mechanism in pytask and I still have to come up with a plan for implementation. But, it should be implemented at some point. And starting with capturing seems like a good idea since it is more internal. In the meantime, maybe pytask -v 0 -s also helps as a workaround.