Skip to content

kunalb/nbstyle

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 

Repository files navigation

nbstyle

The notebook behind my JupyterCon 2020 presentation: Video -- including speaker notes.

Introduction

This notebook was written to accompany a talk around patterns I've observed that make notebooks easier to read, write and maintain: both from experience writing and using notebooks for several different purposes, as well as stealing from far more accomplished authors.

Minimal, 30 second version

  • Keep minimal global state core to the notebook, manipulate it with pure functions.
  • Assertions and tests throughout the notebook, preferably at the end of each cell.
  • Structure it appropriately with headings.
  • Make sure it runs cleanly with a run-all.
  • Make sure it's meaningfully reproducible.
  • Minimize noise from unnecessary output, like logging.
  • Follow best practices for prose.
  • Follow best practices for programming: PEP8, YAGNI, etc.

Releases

No releases published

Packages

No packages published