Metadata-Version: 2.1
Name: nb_helpers
Version: 0.1.3
Summary: A set of tools for nb handling
Home-page: https://github.com/wandb/nb_helpers/tree/main/
Author: Thomas Capelle
Author-email: tcapelle@wandb.com
License: MIT License
Keywords: jupyter notebook
Platform: UNKNOWN
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Natural Language :: English
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Requires-Python: >=3.7
Description-Content-Type: text/markdown
Provides-Extra: dev
License-File: LICENSE

![CI](https://github.com/wandb/nb_helpers/workflows/CI/badge.svg)

# nb_helpers

A simple tool to clean up notebooks from your repo

## Install
Clone and then install using git:
```bash
pip install .
```

## Usage

This little library gives you command line tools to clean, test and check your jupyter notebooks.

- Clean: When you call `clean_nbs` it will strip notebooks from the metadata, this helps prevent git conflicts. You can also pass the flag `--clear_outs` and also remove cell outputs.

```bash
clean_nbs
> 
┏━━━━━━━━━━━━━━━┳━━━━━━━━┓
┃ Notebook Path ┃ Status ┃
┡━━━━━━━━━━━━━━━╇━━━━━━━━┩
│ test_nb.ipynb │ Ok     │
└───────────────┴────────┘
```

## Usage on CI/CD of other projects

The main idea of this repo, is to strip out notebooks from `wandb/examples`. 

- TODO: test notebooks, as this cannot be done on github runners.

```bash
test_nbs --path examples/colabs --timeout 600
```
will run all notebooks inside `examples/colabs` for at most 600 seconds each.

