ProjectPythia / cookbook-template

Project Pythia Cookbook template
https://projectpythia.org/cookbook-template/
Apache License 2.0
21 stars 16 forks source link

Should the cell outputs of notebooks be cleared prior to publishing? #106

Closed norlandrhagen closed 1 year ago

norlandrhagen commented 1 year ago

Wondering what the best practice is for notebooks within cookbooks. Is it generally preferred to clear the output of all cells or to push the notebooks with the rendered content included?

brian-rose commented 1 year ago

Yes, that is our standard practice, for two reasons:

However we're trying to avoid being too dogmatic about any of this, and there are exceptions to the rule. Some cookbooks have heavyweight content that isn't well suited to executing on our CI system. See for example the CESM LENS cookbook. You can see in its config file that one notebook is flagged for exclusion from executing. This one notebook was run elsewhere and committed with its output.

norlandrhagen commented 1 year ago

Thanks for the detailed explanation! I'll be sure to clear the cell outputs.