anaconda / anaconda-project

Tool for encapsulating, running, and reproducing data science projects
https://anaconda-project.readthedocs.io/en/latest/
Other
221 stars 88 forks source link

How to silence warnings about notebooks without run commands #263

Open habemus-papadum opened 4 years ago

habemus-papadum commented 4 years ago

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!

jlstevens commented 3 years ago

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

commands:
  notebooks:
    notebook: .
AlbertDeFusco commented 3 years ago

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

jlstevens commented 3 years ago

Personally, I've never found it useful.

AlbertDeFusco commented 3 years ago

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

skip_imports:
  notebooks: True
jlstevens commented 3 years ago

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).

AlbertDeFusco commented 3 years ago

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.