Skip to content

Pazzzzzz/going-beyond-with-jupyter-notebooks

 
 

Repository files navigation

Going beyond with Jupyter notebooks

Why using Jupyter notebooks to publish packages

Jupyter notebook is a tool that combines text and code on the same file, this concept is called “literate programming” and it’s considered a programming paradigm focused on humans.

Jupyter notebook allows programmers to tell a story with their code

Although being a very well-regarded concept discussed by respected researchers like Donald Knuth, literate programming tools like Jupyter notebooks are considered inefficient for serious software development. This perception has limited Jupyter notebooks to simple python scripts and educational materials.

The Nbdev library has proven that literate programming is useful in developing big and serious projects, like FastAi. This tutorial will show attendees how to get the benefits of literate programming while also following software development best practices. We’ll get an hands-on experience in writing and publishing a Python Package while using Jupyter Notebooks. In addition to publishing the package, we’ll also learn how to deploy the docs, run simple tests and run them on CI/CD, making sure that our package will only get published if the tests pass.

Which package will be developed?

A French Deck, one of the most common decks in games, that contains 52 cards split between 4 suits.

The package will be used to develop a simple blackjack as a proof of concept.

Authoring

Ítalo Epifânio is a RnD Python Developer that has been working for the last couple years developing and publishing packages using nbdev.

Presentation

The tutorial presentation is available at the presentation folder. Run the presentation by using quarto preview presentation/index.qmd

You can install quarto from the official website or using nbdev CLI by running nbdev_install_quarto

Getting started

We recommend to create a virtual environment to install the dependencies required to create the presentation and run the included notebooks

  • python -m venv venv
  • source venv/bin/activate
  • pip install -e .[dev] or pip install nbdev jupyterlab matplotlib black ipytest ipywidgets

Releases

No releases published

Packages

No packages published

Languages

  • Jupyter Notebook 71.8%
  • Python 25.0%
  • CSS 2.7%
  • Shell 0.5%