Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/chifisource/ipycells.jl

cells, pluto, ipython, and olive readers and writers
https://github.com/chifisource/ipycells.jl

data-science ipython-notebook julia jupyter-notebook odd-data olive pluto pluto-notebooks

Last synced: 7 days ago
JSON representation

cells, pluto, ipython, and olive readers and writers

Awesome Lists containing this project

README

        






[![version](https://juliahub.com/docs/General/IPyCells/stable/version.svg)](https://juliahub.com/ui/Packages/General/IPyCells)
[![deps](https://juliahub.com/docs/General/IPyCells/stable/deps.svg)](https://juliahub.com/ui/Packages/General/IPyCells?t=2)


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](#adding)
- [usage](#usage)
- [contributing](#contributing)
- [guidelines](#guidelines)
### Adding
```julia
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](https://github.com/fonsp/Pluto.jl) cells, [Olive](https://github.com/ChifiSource/Olive.jl) cells, or just plain julia.
```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:
```julia
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.
```julia
read_pluto(uri::String)
read_olive(uri::String)
```
Cells can be saved with `save` for julia files and `save_ipynb` for ipynb files.
```julia
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.
```julia
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](https://github.com/ChifiSource) software.
- simply using `IPyCells`
- starring this project
- forking this project [contributing guidelines](#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`.