facebookincubator / ptr

Python Test Runner.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add step name / process to fail output

cooperlees opened this issue · comments

How is ptr not doing what you expect?

Today, we just print the failure output and do not state where it came from - e.g. coverage, mypy or black.

What is your suggestion to make this better?

Prefix the output with something to indicate this. E.g. “mypy error:\n”

How can a developer reproduce this?

Make a mypy error occur and run ptr. You will see the mypy output but will have no indication it’s from mypy.

This might be a good opportunity to switch from the hardcoded steps to a pluggable set of classes and/or decorated functions. These could simply list their name, command, and an optional list of steps that must be completed before this step can run. Eg, the coverage report could list the coverage/test run to be completed first, and anything without dependencies could be run simultaneously, ticking the box for #21 and also potentially improving overall runtime.

Yup. Really want to do that. I'll book some time to design this with you when I get back.

I might still push a simple fix for this and track that refactor in #4.