NLeSC / noodles

Computational workflow engine, making distributed computing in Python easy!
http://nlesc.github.io/noodles
Apache License 2.0
21 stars 7 forks source link

ENH: Move `print` calls to the noodles logger #85

Open BvB93 opened 2 years ago

BvB93 commented 2 years ago

As a feature request, would noodles be open for moving the print calls, scattered throughout the codebase, to the its logger?

The problem with directly dumping it in the stdout is the lack of downstream control over the output streams, an issue that manifests itself when, e.g. using the likes of pytest, resulting in a very messy output (see below).

If you're open to the suggestion then I'd very much like to create a PR.

Examples

test/test_read_cp2k_basis.py ..
test/test_schemas.py .
test/test_tools.py .
test/test_version.py .s...
Uncaught error running job: 139837629376704, Shapes do not match (existing (80,) vs new (100,))
Flushing queue and waiting for threads to close.
test/test_workflow_IPR.py Exception of type <class 'TypeError'> :
Shapes do not match (existing (80,) vs new (100,))
F
Uncaught error running job: 139837627987088, Shapes do not match (existing (80,) vs new (100,))
Flushing queue and waiting for threads to close.
test/test_workflow_coop.py Exception of type <class 'TypeError'> :
Shapes do not match (existing (80,) vs new (100,))
F
jhidding commented 2 years ago

I would welcome a PR to this effect.