All Projects → fastai → Nbdev

fastai / Nbdev

Licence: apache-2.0
Create delightful python projects using Jupyter Notebooks

Programming Languages

python
139335 projects - #7 most used programming language
Jupyter Notebook
11667 projects

Projects that are alternatives of or similar to Nbdev

Fastpages
An easy to use blogging platform, with enhanced support for Jupyter Notebooks.
Stars: ✭ 2,888 (-5.65%)
Mutual labels:  jupyter-notebook, jupyter, jupyter-notebooks, fastai, nbdev
Nbdev template
Template for nbdev projects
Stars: ✭ 161 (-94.74%)
Mutual labels:  documentation-tool, documentation-generator, jupyter-notebook, jupyter
Fastcore
Python supercharged for the fastai library
Stars: ✭ 565 (-81.54%)
Mutual labels:  documentation-generator, jupyter-notebook, developer-tools
Doc Browser
A documentation browser with support for DevDocs, Dash and Hoogle, written in Haskell and QML
Stars: ✭ 93 (-96.96%)
Mutual labels:  documentation-tool, jupyter-notebook, developer-tools
Wowchemy Hugo Modules
🔥 Hugo website builder, Hugo themes & Hugo CMS. No code, build with widgets! 创建在线课程,学术简历或初创网站。
Stars: ✭ 6,093 (+99.05%)
Mutual labels:  documentation-generator, jupyter, documentation-tool
Py
Repository to store sample python programs for python learning
Stars: ✭ 4,154 (+35.71%)
Mutual labels:  jupyter-notebook, jupyter, jupyter-notebooks
Python For Data Science
A collection of Jupyter Notebooks for learning Python for Data Science.
Stars: ✭ 205 (-93.3%)
Mutual labels:  jupyter-notebook, jupyter
Screenshot To Code
A neural network that transforms a design mock-up into a static website.
Stars: ✭ 13,561 (+343.03%)
Mutual labels:  jupyter-notebook, jupyter
Dart
DART is a test documentation tool created by the Lockheed Martin Red Team to document and report on penetration tests, especially in isolated network environments.
Stars: ✭ 207 (-93.24%)
Mutual labels:  documentation-tool, documentation-generator
Paperboy
A web frontend for scheduling Jupyter notebook reports
Stars: ✭ 221 (-92.78%)
Mutual labels:  jupyter-notebook, jupyter
Jupyterhub Deploy Teaching
Reference deployment of JupyterHub and nbgrader on a single server
Stars: ✭ 194 (-93.66%)
Mutual labels:  jupyter-notebook, jupyter
Best Of Jupyter
🏆 A ranked list of awesome Jupyter Notebook, Hub and Lab projects (extensions, kernels, tools). Updated weekly.
Stars: ✭ 200 (-93.47%)
Mutual labels:  jupyter-notebook, jupyter
Lfortran
Official mirror of https://gitlab.com/lfortran/lfortran. Please submit pull requests (PR) there. Any PR sent here will be closed automatically.
Stars: ✭ 220 (-92.81%)
Mutual labels:  jupyter-notebook, jupyter
Ten Rules Jupyter
Ten Simple Rules for Writing and Sharing Computational Analyses in Jupyter Notebooks
Stars: ✭ 204 (-93.34%)
Mutual labels:  jupyter-notebook, jupyter
Redoc
📘 OpenAPI/Swagger-generated API Reference Documentation
Stars: ✭ 15,935 (+420.58%)
Mutual labels:  documentation-tool, documentation-generator
Graph Notebook
Library extending Jupyter notebooks to integrate with Apache TinkerPop and RDF SPARQL.
Stars: ✭ 199 (-93.5%)
Mutual labels:  jupyter-notebook, jupyter
Notebooker
Productionise your Jupyter Notebooks as easily as you wrote them.
Stars: ✭ 215 (-92.98%)
Mutual labels:  jupyter-notebook, jupyter
Jupyterwith
declarative and reproducible Jupyter environments - powered by Nix
Stars: ✭ 235 (-92.32%)
Mutual labels:  jupyter-notebook, jupyter
Beakerx
Beaker Extensions for Jupyter Notebook
Stars: ✭ 2,594 (-15.26%)
Mutual labels:  jupyter-notebook, jupyter
See
Python's dir() for humans. (GitHub mirror)
Stars: ✭ 240 (-92.16%)
Mutual labels:  pypi, developer-tools

Welcome to nbdev

Create delightful python projects using Jupyter Notebooks

nbdev is a library that allows you to develop a python library in Jupyter Notebooks, putting all your code, tests and documentation in one place. That is: you now have a true literate programming environment, as envisioned by Donald Knuth back in 1983!

nbdev makes debugging and refactoring your code much easier relative to traditional programming environments. Furthermore, using nbdev promotes software engineering best practices because tests and documentation are first class citizens.

The developers use this regularly on macOS and Linux. We have not tested it on Windows and not all features may work correctly.

Features of Nbdev

nbdev provides the following tools for developers:

  • Automatically generate docs from Jupyter notebooks. These docs are searchable and automatically hyperlinked to appropriate documentation pages by introspecting keywords you surround in backticks.
  • Utilities to automate the publishing of pypi and conda packages including version number management.
  • A robust, two-way sync between notebooks and source code, which allow you to use your IDE for code navigation or quick edits if desired.
  • Fine-grained control on hiding/showing cells: you can choose to hide entire cells, just the output, or just the input. Furthermore, you can embed cells in collapsible elements that are open or closed by default.
  • Ability to write tests directly in notebooks without having to learn special APIs. These tests get executed in parallel with a single CLI command. You can even define certain groups of tests such that you don't have to always run long-running tests.
  • Tools for merge/conflict resolution with notebooks in a human readable format.
  • Continuous integration (CI) comes setup for you with GitHub Actions out of the box, that will run tests automatically for you. Even if you are not familiar with CI or GitHub Actions, this starts working right away for you without any manual intervention.
  • Integration With GitHub Pages for docs hosting: nbdev allows you to easily host your documentation for free, using GitHub pages.
  • Create Python modules, following best practices such as automatically defining __all__ (more details) with your exported functions, classes, and variables.
  • Math equation support with LaTeX.
  • ... and much more! See the Getting Started section below for more information.

A Motivating Example

For example, lets define a class that represents a playing card, with associated docs and tests in a Jupyter Notebook:

image.png

In the above screenshot, we have code, tests and documentation in one context! nbdev renders this into searchable docs (which are optionally hosted for free on GitHub Pages). Below is an annotated screenshot of the generated docs for further explanation:

image.png

The above illustration is a subset of this nbdev tutorial with a minimal example, which uses code from Think Python 2 by Allen Downey.

Explanation of annotations:

  1. The heading Card corresponds to the first H1 heading in a notebook with a note block API Details as the summary.
  2. nbdev automatically renders a Table of Contents for you.
  3. nbdev automatically renders the signature of your class or function as a heading.
  4. The cells where your code is defined will be hidden and replaced by standardized documentation of your function, showing its name, arguments, docstring, and link to the source code on github.
  5. This part of docs is rendered automatically from the docstring.
  6. The rest of the notebook is rendered as usual. You can hide entire cells, hide only cell input or hide only output by using the flags described on this page.
  7. nbdev supports special block quotes that render as colored boxes in the documentation. You can read more about them here. In this specific example, we are using the Note block quote.
  8. Words you surround in backticks will be automatically hyperlinked to the associated documentation where appropriate. This is a trivial case where Card class is defined immediately above, however this works across pages and modules. We will see another example of this in later steps.

Installing

nbdev is on PyPI and conda so you can just run pip install nbdev or conda install -c fastai nbdev. Microsoft Windows users should use pip instead of conda to install nbdev.

For an editable install, use the following:

git clone https://github.com/fastai/nbdev
pip install -e nbdev

nbdev is tested to work on Ubuntu, Macos and Windows, for the versions tagged with the -latest suffix in these docs.

Note that nbdev must be installed into the same python environment that you use for both your Jupyter Server and your workspace.

Getting Started

The following are helpful resources for getting started with nbdev:

If Someone Tells You Should Not Use Notebooks For Software Development

Watch this video.

Contributing

If you want to contribute to nbdev, be sure to review the contributions guidelines. This project adheres to fastai`s code of conduct. By participating, you are expected to uphold this code. In general, the fastai project strives to abide by generally accepted best practices in open-source software development.

Make sure you have the git hooks we use installed by running

nbdev_install_git_hooks

in the cloned repository folder.

Copyright

Copyright 2019 onwards, fast.ai, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this project's files except in compliance with the License. A copy of the License is provided in the LICENSE file in this repository.

Appendix

nbdev and fastai

nbdev has been used to build innovative software used by many developers, such as fastai, a deep learning library which implements a unique layered api and callback system, and fastcore, an extension to the Python programming language. Furthermore, nbdev allows a very small number of developers to maintain and grow a large ecosystem of software engineering, data science, machine learning and devops tools.

Here, for instance, is how combined_cos is defined and documented in the fastai library:

Exporting from nbdev

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].