A CLI tool to resolve git conflicts and remove metadata in notebooks.
Project description
databooks
is a package to ease the collaboration between data scientists using
Jupyter notebooks, by reducing the number of git conflicts between
different notebooks and resolution of git conflicts when encountered.
The key features include:
- CLI tool
- Clear notebook metadata
- Resolve git conflicts
- Simple to use
- Simple API for using modelling and comparing notebooks using Pydantic
Requirements
databooks
is built on top of:
Installation
pip install databooks
Usage
Clear metadata
Simply specify the paths for notebook files to remove metadata. By doing so, we can already avoid many of the conflicts.
$ databooks meta [OPTIONS] PATHS...
Fix git conflicts for notebooks
Specify the paths for notebook files with conflicts to be fixed. Then, databooks
finds
the source notebooks that caused the conflicts and compares them (so no JSON manipulation!)
$ databooks fix [OPTIONS] PATHS...
Assert notebook metadata
Specify paths of notebooks to be checked, an expression or recipe of what you'd like to
enforce. databooks
will run your checks and raise errors if any notebook does not
comply with the desired metadata values. This advanced feature allows users to enforce
cell tags, sequential cell execution, maximum number of cells, among many other things!
Check out our docs for more!
$ databooks assert [OPTIONS] PATHS...
Show rich notebook
Instead of launching Jupyter and opening the browser to inspect notebooks, have a quick look at them in the terminal. All you need is to specify the path(s) of the notebook(s).
$ databooks show [OPTIONS] PATHS...
Show rich notebook diffs
Similar to git diff, but for notebooks! Show a rich diff of the notebooks in the terminal. Works for comparing git index with the current working directory, comparing branches or blobs.
$ databooks diff [OPTIONS] [REF_BASE] [REF_REMOTE] [PATHS]...
License
This project is licensed under the terms of the MIT license.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file databooks-1.3.10.tar.gz
.
File metadata
- Download URL: databooks-1.3.10.tar.gz
- Upload date:
- Size: 26.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.2.2 CPython/3.8.18 Linux/6.2.0-1012-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 325f709cbcc55c43607bdfa0489fb832406c094547f959aaa649a2dae42d7351 |
|
MD5 | 649c969ed4c18a90386e3da7d45f0fe5 |
|
BLAKE2b-256 | f6103371b9f4e8f07f9fbaf87a30cf1eec8ccf66a1cd14f1fffe5fc0d7ef2b6b |
File details
Details for the file databooks-1.3.10-py3-none-any.whl
.
File metadata
- Download URL: databooks-1.3.10-py3-none-any.whl
- Upload date:
- Size: 31.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.2.2 CPython/3.8.18 Linux/6.2.0-1012-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 24533a82039bac3f987fe4d22a2cc3056f62f734c16b33b2b32be5dcd575b9ae |
|
MD5 | adafc4409b164e388286f3b5d09d2bfc |
|
BLAKE2b-256 | 5b5788a3a87734eb9e9515afc686d0cf78509d17a55ab87d55304aab7b7121d3 |