Skip to content

cells, pluto, ipython, and olive readers and writers

License

Notifications You must be signed in to change notification settings

ChifiSource/IPyCells.jl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

81 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation


version deps

IPyCells

IPyCells provides parametric cell-based functionality, as well as readers and writers for different cell formats (Ipynb notebooks and three different types of Julia), as well as offering the option to extend the cells via parametric typing.

Adding

julia> using Pkg; Pkg.add("IPyCells")
julia> ]
pkg> add IPyCells

Usage

Either .ipynb or .jl files may be read with this API. When reading Julia files, the reader will delinate which type of julia it is -- whether Pluto cells, Olive cells, or just plain julia.

read_jl(uri::String)
read_ipynb(f::String)

The different forms of Julia all have their own parsers, which may be used independently to parse text:

parse_pluto(raw::String)
parse_olive(str::String)
parse_julia(raw::String)

We can also call all of the read functions individually to get the same result from a file URI, rather than a String. read functions exist for Olive, Pluto, and IPynb, but not parse_julia directly -- in this case we would simply use read_jl -- both Pluto and Olive require pretty specific symbols, so it is pretty easy for the reader to tell if a file is Olive, Pluto, or regular Julia.

read_pluto(uri::String)
read_olive(uri::String)

Cells can be saved with save for julia files and save_ipynb for ipynb files.

save(cells::Vector{<:AbstractCell}, path::String)
save_ipynb(cells::Vector{<:AbstractCell}, path::String)

For quick conversions from Julia to nbformat or nbformat to Julia, there are ipyjl and jlipy respectively.

ipyjl(ipynb_path::String, output_path::String)
jlipy(ipynb_path::String, output_path::String)
contributing

There are several ways to contribute to IPyCells while also contributing to the greater lot of chifi software.

  • simply using IPyCells
  • starring this project
  • forking this project contributing guidelines
  • participating in the community 🔴🟢🟣
  • supporting chifi creators
  • helping with other chifi projects

guidelines

When submitting issues or pull-requests, it is important to make sure of a few things. We are not super strict, but making sure of these few things will be helpful for maintainers!

  1. You have replicated the issue on Unstable
  2. The issue does not currently exist... or does not have a planned implementation different to your own. In these cases, please collaborate on the issue, express your idea and we will select the best choice.
  3. Pull Request TO UNSTABLE
  4. If you have a new issue, open a new issue. It is not best to comment your issue under an unrelated issue; even a case where you are experiencing that issue, if you want to mention another issue, open a new issue.
  5. Questions are fine, but not questions answered inside of this README.