fonsp / Pluto.jl

🎈 Simple reactive notebooks for Julia
https://plutojl.org/
MIT License
4.94k stars 285 forks source link

Pluto.jl as a literate programming environment #744

Closed Rahuketu86 closed 3 years ago

Rahuketu86 commented 3 years ago

I am new to Pluto and Julia ecosystem as a whole. I come from the python world. I recently took the task to learn julia and build a package / library in it.

There are a few tools which has become a mainstay of my toolkit in python. They include nbdev and jupyterbook . Nbdev in particular is a literate programming environment for python which combines utilities to develop python packages , documentation, testing and deployment all in a nice useful comprehensive package based on jupyter notebooks. My first impulse for choosing a personal project was to start by implementing a version of nbdev specific to julia language. After exploring a bit more around the julia eco-system & watching a few videos on youtube, I came to know about Pluto.

I now feel Pluto.jl can become base of a much more robust julia package(/ library) development environment or a literate programming tool. However it still lacks a few things to get the same level of productivity I get with nbdev . I believe an extension to Pluto.jl base package or an utility package built around Pluto.jl and providing a workflow for package management can help achieve the same. I would like to file this issue to put forth some of those ideas into discussion

  1. Pluto.jl at present is very much an alternative for jupyter. As such it concentrates on individual julia file without providing any workflow or utility for library development or literate programming

  2. Package documentation : An utility which can do bulk export of multiple Pluto.jl notebooks into something like an executable book site(https://jupyterbook.org/start/build.html) or nbdev (jekyll -documentation) site(https://nbdev.fast.ai/) can be incredibly useful

  3. Concept of export cells/ flags : If an utility can be built which can introduce concept of flags limiting export / visibility of certain cells . It can go a long way for a more fine-grained documentation and control.

  4. Concept of testing +code coverage+ combination with build actions similar to nbdev.

stillyslalom commented 3 years ago

You may be interested in https://github.com/fonsp/PlutoUtils.jl. This issue is probably better to relocate there, since Fons is trying to keep the main Pluto.jl repo narrowly focused on core functionality.

Rahuketu86 commented 3 years ago

Thank you I will do the same now . 1

fonsp commented 3 years ago

We believe that you can already use Pluto notebooks to write a package, with testing and documentation! We will soon rewrite PlutoUI.jl to a series of Pluto notebooks as a proof-of-concept, so stay tuned!

What do you think is missing for "Literate programming"? The sample notebooks are a good example of this in Pluto

fonsp commented 3 years ago

About 3: some people use a semicolon (;) at the end of their cell to disable output display, and then also hide the output. This creates a 'hidden' cell

fonsp commented 3 years ago

Moved to https://github.com/fonsp/PlutoUtils.jl/issues/37