Give a pragmatic solution to suppressing noisy output - #153
Conversation
|
Thanks very much for being so fast and responsive on this @steppi! Very much appreciated. 🙏
I think we've all been there before, so no worries. :) |
| if app.env.config.jupyterlite_silence: | ||
| kwargs["stdout"] = subprocess.DEVNULL | ||
| kwargs["stderr"] = subprocess.DEVNULL | ||
| subprocess.run(command, **kwargs) |
There was a problem hiding this comment.
I think we should check the recur code of subprocess run (CompletedProcess(args=..., returncode=1=...)) and fail if it is Non-zero (i'll check).
I also think that we might want to have stdout/err be PIPE and print them anyway if the return code is non-zero
No worries! I stopped counting the number of broken releases I made 🙈 |
|
I've made it so |
Thanks. That makes me feel better. |
|
@Carreau, @martinRenou, @jtpio. Can we merge this and make a release? It would fix a broken build in one of SciPy’s CI jobs. |
|
Ok, let's merge this and try. It's ok to do broken releases, it happens. |
|
Thanks @Carreau! |
|
Yes, thanks all for working on this! |
This PR replaces the broken means of suppressing noisy output from #150 with a pragmatic hack. (Note that although @Carreau submitted #150, I was the one who came up with this broken solution, and he was only implementing my idea).
The pragmatic hack I've made is to offer an option
jupyterlite_silenceinconfig.py. Setting this toTruecauses thestderrandstoutfrom the call tojupyterlite buildto be directed todev/null. I've verified that this works for suppressing output, and that the notebooks still work. I have not madejupyterlite_silence=Truethe default because it's a drastic step which suppresses even warnings and errors.I think it's reasonable to go with this hack, at least for the time being, until the necessary changes can be made in
jupyterliteremoving unguardedprintstatements and makingdoitfor tasks configurable.Many apologies for jumping the gun and making a broken release. I will be sure to learn my lesson from this. I will need help revoking the bad release from PyPI.
cc @Carreau, @martinRenou, @jtpio @matthewfeickert