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!).
lib2nbdev2
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 lib2nbdev2
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
File details
Details for the file lib2nbdev2-0.0.3.tar.gz
.
File metadata
- Download URL: lib2nbdev2-0.0.3.tar.gz
- Upload date:
- Size: 15.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1f1c9bcabd3455817736827527639f3b80d00ccd0198af4baf075eda22663cbe |
|
MD5 | 53e7c8c2814d800ffab3156a63208e2c |
|
BLAKE2b-256 | be1d2710c882fc3b71ca67727724ec6233b466f9c7f0ed2c3cfaa9bf794b14e3 |
File details
Details for the file lib2nbdev2-0.0.3-py3-none-any.whl
.
File metadata
- Download URL: lib2nbdev2-0.0.3-py3-none-any.whl
- Upload date:
- Size: 13.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | fc3c3b28d1f304e71cfc44dcc2919fe951174e46643b296eae6009a84c247f73 |
|
MD5 | 65a756f9b5bdd7f8d894acc59bb350b2 |
|
BLAKE2b-256 | b42a6f01d3ed32bb85305e12ff0a72c05a9710c4ba81c6f1894d9a912b8a563a |