A small library for converting existing libraries and projects to nbdev
Project description
lib2nbdev2
nbdev is a fantastic workflow aimed at centralizing documentation, testing, and source code generation all out of one place: Jupyter Notebooks. However, what if you already have an existing project? As it stands the only way to convert your library over is through manual tasks (which can take > 30 hrs!).
lib2nbdev
is the solution!
Instead, we can perform a one-time conversion on any existing library.
During the conversion process the library will help you generate a
proper settings.ini
configuration file for your project. However you
can also generate your own settings.ini
and put it in your project’s
core directory, such as:
lib2nbdev
settings.ini
lib2nbdev
convert.py
For generating a valid settings.ini
, see an example
here
and the related nbdev
documentation
Install
pip install lib2nbdev
How to use
From your project directory (in bash), simply run:
convert_lib
And it will automatically generate the notebooks needed, as well as
privatizing any functions that may need it (anything preceding with a
_
in the name) where they shouldn’t show in the generated
documentation.
Afterwards you have a fully-functional nbdev
library, and can make use
of all its goodies!
Note for Windows Users:
Not tested on windows
Important Notice:
This is a one-time conversion, this does not allow for repeated python -> notebook conversions.
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
Hashes for lib2nbdev2-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bf1431e3a1006a5bf514b6f694cc4b4c18e9c10c2ecdc566fe7c19e3c7b615fa |
|
MD5 | 2201b5b0dca92ea2edd792a4ac39bb5c |
|
BLAKE2b-256 | 96b614f5799417c3490461404a8e4887e754eed77841af7533423ed326f3f230 |