Metadata-Version: 2.4
Name: nbdevAuto
Version: 0.3.60
Summary: automating nbdev
Author-email: Benedict Thekkel <bthekkel1@gmail.com>
License: Apache-2.0
Project-URL: Repository, https://github.com/bthek1/nbdevAuto
Project-URL: Documentation, https://bthek1.github.io/nbdevAuto
Keywords: nbdev,jupyter,notebook,python
Classifier: Natural Language :: English
Classifier: Intended Audience :: Developers
Classifier: Development Status :: 3 - Alpha
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Requires-Python: >=3.7
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: graphviz
Requires-Dist: fastcore
Provides-Extra: gh
Requires-Dist: githubkit>=0.12; extra == "gh"
Dynamic: license-file

# nbdevAuto


<!-- WARNING: THIS FILE WAS AUTOGENERATED! DO NOT EDIT! -->

Unlike most sites in this collection, this one documents an
**installable library** rather than a topic. `nbdevAuto` exists because
the nbdev release cycle is a fixed sequence of commands typed in the
same order every time: export the notebooks, run the tests, clean them,
bump the version, commit, push, build the docs. Each step is one nbdev
call, and forgetting one produces a confusing failure two steps later.

The library collapses that sequence into single-word shell commands. It
is what `just upload` and `just full_upload` invoke under the hood for
every submodule in the parent Knowledge repo.

------------------------------------------------------------------------

## Install

``` sh
pip install nbdevAuto
```

## Use

Every exported function is also a console script, so the common case is
a bare word in the terminal at the root of an nbdev project:

``` sh
upload -m "commit message"    # export, test, clean, then add/commit/push
```

Or import the helpers into a notebook:

``` python
from nbdevAuto.functions import download_search_images, classify_images
from nbdevAuto.pdf import PDFreader
```

------------------------------------------------------------------------

## Contents

| Page | Covers |
|----|----|
| [Functions](00_Functions.ipynb) | Dataset and image helpers: reading a list out of a text file, downloading single images or whole search-driven datasets, verifying and resizing what came back, building the folder layout a classifier expects, running a fastai learner over one image, Kaggle competition and dataset shortcuts, and [`graph`](https://bthek1.github.io/nbdevAuto/functions.html#graph), a `graphviz.Digraph` subclass preloaded with a rounded, filled style |
| [Automate](01_Automate.ipynb) | The command line surface: the prep/commit/push pipeline, GitHub and PyPI releases, reinstall and update, conda environment creation, and the help output that lists them all |
| [PDF Reader](02_PDF_reader.ipynb) | [`PDFreader`](https://bthek1.github.io/nbdevAuto/pdf_reader.html#pdfreader), a class that converts a PDF through `pdf2image` and renders page ranges inline when you slice it (`pdf[0:5]`) |

------------------------------------------------------------------------

## The Command Line Surface

Installing the package puts these on your `PATH`. They are ordinary
functions in [Automate](01_Automate.ipynb), exposed as scripts through
`[project.scripts]`.

| Command | Does |
|----|----|
| [`prep`](https://bthek1.github.io/nbdevAuto/automate.html#prep) | Export, test, and clean the notebooks, rendering the README if it needs it |
| [`gacp`](https://bthek1.github.io/nbdevAuto/automate.html#gacp) | git add, commit, and push, with `-m` for the message |
| [`status`](https://bthek1.github.io/nbdevAuto/automate.html#status) | Show the working tree state |
| [`upload`](https://bthek1.github.io/nbdevAuto/automate.html#upload) | [`prep`](https://bthek1.github.io/nbdevAuto/automate.html#prep) then [`gacp`](https://bthek1.github.io/nbdevAuto/automate.html#gacp), the one you actually type |
| [`release`](https://bthek1.github.io/nbdevAuto/automate.html#release) | Bump the version, then release to both GitHub and PyPI |
| `gitrelease` / `piprelease` | The two halves of [`release`](https://bthek1.github.io/nbdevAuto/automate.html#release), separately |
| [`reinstall`](https://bthek1.github.io/nbdevAuto/automate.html#reinstall) / [`update`](https://bthek1.github.io/nbdevAuto/automate.html#update) | Reinstall or update the package locally |
| [`everything`](https://bthek1.github.io/nbdevAuto/automate.html#everything) | [`upload`](https://bthek1.github.io/nbdevAuto/automate.html#upload), [`update`](https://bthek1.github.io/nbdevAuto/automate.html#update), [`release`](https://bthek1.github.io/nbdevAuto/automate.html#release), [`reinstall`](https://bthek1.github.io/nbdevAuto/automate.html#reinstall), in that order |
| [`create_env`](https://bthek1.github.io/nbdevAuto/automate.html#create_env) | Create a conda environment for AI work, named `fast` by default |
| `h` | Print the list of available commands |

Both [`prep`](https://bthek1.github.io/nbdevAuto/automate.html#prep) and
[`upload`](https://bthek1.github.io/nbdevAuto/automate.html#upload) take
`-p` to choose which version part to increment.

------------------------------------------------------------------------

## Where It Is Used

The parent Knowledge repo’s `justfile` calls
[`upload`](https://bthek1.github.io/nbdevAuto/automate.html#upload) once
per submodule. `just upload` runs it only where the working tree is
dirty, `just full_upload` runs it everywhere. That is the main consumer,
so a change to `automate.py` affects the publish path for every site in
the collection.

------------------------------------------------------------------------

## Not Covered Yet

- **No test notebook.** The functions are exercised only by being used,
  so a broken helper surfaces in a downstream repo rather than here.
- **Undeclared dependencies.** `pyproject.toml` lists only `graphviz`,
  but the image helpers import `fastai`, the Kaggle shortcuts need the
  Kaggle CLI and its credentials, and
  [`PDFreader`](https://bthek1.github.io/nbdevAuto/pdf_reader.html#pdfreader)
  needs `pdf2image` with poppler behind it, plus matplotlib. Install
  those yourself.
- **`core.py` is an empty nbdev stub** (a single
  [`foo`](https://bthek1.github.io/nbdevAuto/core.html#foo)), with no
  notebook behind it.
- The docstrings are one-liners, so the rendered API pages are thin. The
  notebooks carry the real explanation.

------------------------------------------------------------------------
