All Projects → Valassis-Digital-Media → Nbconflux

Valassis-Digital-Media / Nbconflux

Licence: bsd-3-clause
nbconflux converts Jupyter Notebooks to Atlassian Confluence pages

Projects that are alternatives of or similar to Nbconflux

Best Of Jupyter
🏆 A ranked list of awesome Jupyter Notebook, Hub and Lab projects (extensions, kernels, tools). Updated weekly.
Stars: ✭ 200 (+143.9%)
Mutual labels:  jupyter-notebook, jupyter, notebook
Quantitative Notebooks
Educational notebooks on quantitative finance, algorithmic trading, financial modelling and investment strategy
Stars: ✭ 356 (+334.15%)
Mutual labels:  jupyter-notebook, jupyter, notebook
Paperboy
A web frontend for scheduling Jupyter notebook reports
Stars: ✭ 221 (+169.51%)
Mutual labels:  jupyter-notebook, jupyter, notebook
Practical Machine Learning With Python
Master the essential skills needed to recognize and solve complex real-world problems with Machine Learning and Deep Learning by leveraging the highly popular Python Machine Learning Eco-system.
Stars: ✭ 1,868 (+2178.05%)
Mutual labels:  jupyter-notebook, jupyter, notebook
Digital Signal Processing Lecture
Digital Signal Processing - Theory and Computational Examples
Stars: ✭ 532 (+548.78%)
Mutual labels:  jupyter-notebook, jupyter, notebook
Ipystata
Enables the use of Stata together with Python via Jupyter (IPython) notebooks.
Stars: ✭ 154 (+87.8%)
Mutual labels:  jupyter-notebook, jupyter, notebook
Beakerx
Beaker Extensions for Jupyter Notebook
Stars: ✭ 2,594 (+3063.41%)
Mutual labels:  jupyter-notebook, jupyter, notebook
Prml
PRML algorithms implemented in Python
Stars: ✭ 10,206 (+12346.34%)
Mutual labels:  jupyter-notebook, jupyter, notebook
Data Science Your Way
Ways of doing Data Science Engineering and Machine Learning in R and Python
Stars: ✭ 530 (+546.34%)
Mutual labels:  jupyter-notebook, jupyter, notebook
Sklearn Classification
Data Science Notebook on a Classification Task, using sklearn and Tensorflow.
Stars: ✭ 518 (+531.71%)
Mutual labels:  jupyter-notebook, jupyter, notebook
Fastdoc
Create publication-quality books from Jupyter notebooks
Stars: ✭ 134 (+63.41%)
Mutual labels:  jupyter-notebook, jupyter, notebook
Jupyterlab Lsp
Coding assistance for JupyterLab (code navigation + hover suggestions + linters + autocompletion + rename) using Language Server Protocol
Stars: ✭ 796 (+870.73%)
Mutual labels:  jupyter-notebook, jupyter, notebook
Ipyexperiments
jupyter/ipython experiment containers for GPU and general RAM re-use
Stars: ✭ 128 (+56.1%)
Mutual labels:  jupyter-notebook, jupyter, notebook
Signals And Systems Lecture
Continuous- and Discrete-Time Signals and Systems - Theory and Computational Examples
Stars: ✭ 166 (+102.44%)
Mutual labels:  jupyter-notebook, jupyter, notebook
Spark R Notebooks
R on Apache Spark (SparkR) tutorials for Big Data analysis and Machine Learning as IPython / Jupyter notebooks
Stars: ✭ 109 (+32.93%)
Mutual labels:  jupyter-notebook, jupyter, notebook
Applied Reinforcement Learning
Reinforcement Learning and Decision Making tutorials explained at an intuitive level and with Jupyter Notebooks
Stars: ✭ 229 (+179.27%)
Mutual labels:  jupyter-notebook, jupyter, notebook
Jupytemplate
Templates for jupyter notebooks
Stars: ✭ 85 (+3.66%)
Mutual labels:  jupyter-notebook, jupyter, notebook
Hands On Nltk Tutorial
The hands-on NLTK tutorial for NLP in Python
Stars: ✭ 419 (+410.98%)
Mutual labels:  jupyter-notebook, jupyter, notebook
Nteract
📘 The interactive computing suite for you! ✨
Stars: ✭ 5,713 (+6867.07%)
Mutual labels:  jupyter-notebook, jupyter, notebook
Sparkmagic
Jupyter magics and kernels for working with remote Spark clusters
Stars: ✭ 954 (+1063.41%)
Mutual labels:  jupyter-notebook, jupyter, notebook

Project Status: Active – The project has reached a stable, usable state and is being actively developed.

nbconflux

nbconflux converts Jupyter Notebooks to Atlassian Confluence pages using nbconvert.

Screenshot of a notebook converted to a Confluence page

Why?

nbconflux is useful when:

  • You use Jupyter notebooks to author computational narratives
  • Your organization uses Confluence to store institutional knowledge
  • You want an easy way to publish your work in that knowledge base

Features

  • Converts most cell inputs and outputs to valid Confluence storage format
  • Attaches image outputs (e.g., matplotlib PNGs) to a page, shows them inline, and maintains the page-image association in the version history
  • Attaches the source notebook to a page, links to it from the page footer, and maintains the page-notebook association in the version history
  • Supports sweep-select Confluence comments over most input and output content
  • Excludes input, output, or entire cells based on notebook cell tags noinput, nooutput, or nocell
  • Labels pages with nbconflux to identify content that originated as notebooks
  • Inserts a table of contents macro at the top of the page based on notebook headings
  • Applies the NBViewer stylesheet to pages to blend Confluence styling with Jupyter notebook styling (requires the CSS macro)
  • Enables MathJax rendering (requires the HTML macro)
  • Supports raw-cell passthrough of Confluence storage format markup (e.g., to include Confluence macros)
  • Compatible with Confluence Cloud and Confluence Server

Installation

The nbconflux library requires Python 3 to run and pip to install. Once you've satisfied these prerequisites, run:

pip install nbconflux

(A conda package is coming soon.)

Usage

  1. Create or visit a page on your Confluence site.
  2. Copy the URL for the page.
  3. Run one of the following:
    • In a shell:
      nbconflux /path/to/a.ipynb https://your/page/url
      
    • In a Python script, Jupyter Notebook, etc.:
      import nbconflux
      html, resources = nbconflux.notebook_to_page(nb_path, url)
      
  4. Enter your Confluence username and password when prompted.
  5. Visit the page to see your updates.

If you receive an error, see the project issues for known limitations on what you can post.

Run nbconflux -h at the command line for additional options and help.

usage: nbconflux [-h] [--exclude-toc] [--exclude-ipynb] [--exclude-style]
                 [--include-mathjax]
                 notebook url

Converts Jupyter Notebooks to Atlassian Confluence pages using nbconvert

positional arguments:
  notebook           Path to local notebook (ipynb)
  url                URL of Confluence page to update

optional arguments:
  -h, --help         show this help message and exit
  --exclude-toc      Do not generate a table of contents
  --exclude-ipynb    Do not attach the notebook to the page
  --exclude-style    Do not include the Jupyter base stylesheet
  --include-mathjax  Enable MathJax on the page
  --extra-labels EXTRA_LABELS [EXTRA_LABELS ...]
                     Additional labels to add to the page

Collects credentials from the following locations:
1. CONFLUENCE_USERNAME and CONFLUENCE_PASSWORD environment variables
2. ~/.nbconflux file in the format username:password
3. User prompts

Contributing

We welcome issues and pull requests that help improve the variety of notebook content and Confluence installations nbconflux supports, its usability for humans, and its reusability within other tools.

We recommend creating a Python development environment using conda or virtualenv, running make dev-env to install the runtime and development requirements, and running make test to execute the unit test suite on your local machine.

FAQ

Q: Why not call it nbconfluence?

A: https://atlassian.com/legal/trademark

Q: Why do I have to create a page on the site first?

A: To avoid introducing the complexity of specifying a space, parent page, and title into the package.

Q: How do I use nbconflux if my organization has enabled two-factor authentication (2FA) for our Confluence Cloud instance?

A: You can login with an Atlassian API Token in place of your password as described in the API tokens documentation.

  1. Sign into https://id.atlassian.com.
  2. Under Security go to API Tokens then Create API Token.
  3. Give the token a meaningful label so that access can be revoked later.
  4. The token will be copied to the clipboard.
  5. Use the token in place of your account password with any of the nbconflux supported auth methods (e.g., environment variable, password prompt).

License

Copyright (c) 2018 Valassis Digital under the terms of the BSD 3-Clause license

Development

To run the tests:

make dev-env
make test

Maintenance

To make a release:

  1. Meet all the requirements described in https://dustingram.com/articles/2018/03/16/markdown-descriptions-on-pypi to support pushing the Markdown README as the long description on PyPI.
  2. git commit -m 'REL: 0.6.0' --allow-empty
  3. git tag -a 0.6.0 -m 'REL: 0.6.0'
  4. git push origin master and git push origin master --tags or use a PR
  5. Run make release.
  6. Enter your PyPI creds when prompted.
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].