Skip to main content

A small library for converting existing libraries and projects to nbdev

Project description

lib2nbdev

An all-inclusive package for converting your existing libraries and projects into nbdev ones. Developed by Novetta.

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:

If you wish to use this library you should either:

  1. Use Windows Subsystem for Linux (WSL2)
  2. Use the Python3 interpreter in Windows:
    • python3
    • from lib2nbdev.convert import convert_lib; convert_lib()

Important Notice:

This is a one-time conversion, this does not allow for repeated python -> notebook conversions.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

lib2nbdev-0.0.3.tar.gz (13.0 kB view details)

Uploaded Source

Built Distribution

lib2nbdev-0.0.3-py3-none-any.whl (8.1 kB view details)

Uploaded Python 3

File details

Details for the file lib2nbdev-0.0.3.tar.gz.

File metadata

  • Download URL: lib2nbdev-0.0.3.tar.gz
  • Upload date:
  • Size: 13.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.4.2 requests/2.25.1 setuptools/40.2.0 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.7.0

File hashes

Hashes for lib2nbdev-0.0.3.tar.gz
Algorithm Hash digest
SHA256 327c29f4acf3da4cf2e48dd3618c816134119a1b4b7481ba8998b2e510c8d58f
MD5 cc8f6fae5169f7c958c9b102d0cd6088
BLAKE2b-256 6c0dc7f2a3b6e1be036fc0fc3a61d660b8f25ee843133d30c038b855eda4684f

See more details on using hashes here.

File details

Details for the file lib2nbdev-0.0.3-py3-none-any.whl.

File metadata

  • Download URL: lib2nbdev-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 8.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.4.2 requests/2.25.1 setuptools/40.2.0 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.7.0

File hashes

Hashes for lib2nbdev-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 0432eb7a67eb83429d9b1f619394a8bf35cd23b3ee6f7190825a12ec4f98f082
MD5 45e000c023020ad105c21ad9234ae0b6
BLAKE2b-256 4c5dd051810389af1084aa3760ee3ec1e8bd4832b0c27d2f8d961bc485f8cf0c

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page