Giter Site home page Giter Site logo

jupytext_tutorial's Introduction

Jupytext - sync notebooks as simpler text files

Jupyter Notebooks in Jupyter Lab, VSCode, GitHub, Papermill and Jupytext - a good ensemble - a scientific use case

Start Tutorial

Have a look at the tutorial instructions (should be visible in jupyter lab)

Outline

  1. Link Jupyter Notebook with percentage script
  2. Motivate different representations of files
    • Refactoring vs sharing outputs
    • Life exploration of object attributes (or methods) when working with data
    • different notebook view in VSCode
    • two views, two kernels, two states
  3. Jupyter notebooks
  4. Run notebook in VSCode and JupyterLab
  5. Use Papermill and paramterize tutorial script

Setup

Start in repository folder: Explore Binder setup

Topic

jupytext is a lightweight tool to keep scripts either as notebooks (.ipynb) or simpler text based file formats, such as markdown files (.md) which can be easily rendered on GitHub or python files (.py) which can be executed in VSCode’s interactive shell and are better for version control. Some tools still need ipynb to work, e.g. [papermill](https://papermill.readthedocs.io/en/latest/). Therefore it is handy to keep different version of a script in sync. Otherwise one can also only use python files and render these as notebook in e.g. jupyter lab. Especially if the code is only kept for version control, but executed versions are keep in a project folder using a workflow environment (as snakemake or nextflow) this comes in handy. I’ll intend to give you an overview over my stack and practices working in life sciences. Hopefully you learn some interesting tools and more about the possibilities around jupyter, which can be compared to quarto or rmarkdown.

Why do I use more than one file version for the same document?

  • jupyter kernels allow live exploration of attributes
  • jupyter lab has a great scratch cell for exploration, while keeping the general structure of a notebook
  • VSCode is great for applying changes in many places (”refactoring”)
  • VSCode allows the search over many files

Papermill

  • needs ipynb → if you work from *.py files, you can use jupytext cli

jupytext_tutorial's People

Contributors

betatim avatar fhoehle avatar jdkent avatar nthiery avatar tkukurin avatar xhochy avatar yuvipanda avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.