anaconda-project icon indicating copy to clipboard operation
anaconda-project copied to clipboard

How to silence warnings about notebooks without run commands

Open habemus-papadum opened this issue 4 years ago • 6 comments

Hello, When I run anaconda-project, I see warnings such as anaconda-project.yml: No commands run notebooks notebooks/foo.ipynb, etc.

This warning is not helpful as it does not really match my use case. Is there a way to silence it?

In general it would be nice to have a "quiet" mode that does not try to write output unless there is an explicit error.

thanks!

habemus-papadum avatar Apr 11 '20 19:04 habemus-papadum

Agreed, this warning can be alarming even when nothing is wrong and you just want to use the simplicity of:

commands:
  notebooks:
    notebook: .

jlstevens avatar Jun 25 '21 15:06 jlstevens

Would anyone be opposed to just removing the warning all together?

AlbertDeFusco avatar Jun 26 '21 14:06 AlbertDeFusco

Personally, I've never found it useful.

jlstevens avatar Jun 26 '21 14:06 jlstevens

I've found a work-around while I get the next version out. Place this in your anaconda-project.yml

skip_imports:
  notebooks: True

AlbertDeFusco avatar Jun 28 '21 20:06 AlbertDeFusco

The workaround does the job, thanks!

This approach is fine though 1) it is not documented yet 2) skip_imports is a rather strange name for what it does here (silencing warnings).

jlstevens avatar Jun 30 '21 10:06 jlstevens

Part of the reason for this I found in the code is that there are some cases (likely completely unused now) where anaconda-project would add a notebook command automatically.

AlbertDeFusco avatar Jul 01 '21 16:07 AlbertDeFusco