Skip to main content
Help us improve Python packaging – donate today!

Various functionalities: folder synchronization, simple logging function, helpers to generate documentation with sphinx, sphinx extension, to run a command line, to run a notebook...

Project Description

README

Build status Build Status Windows https://circleci.com/gh/sdpython/pyquickhelper/tree/master.svg?style=svg MIT License Requirements Status https://codecov.io/github/sdpython/pyquickhelper/coverage.svg?branch=master GitHub Issues Waffle Codacy Badge Notebook Coverage

Links:

Functionalities

  • simple forms in notebooks
  • help generation including notebook conversion
  • folder synchronization
  • logging
  • help running unit tests
  • simple server to server sphinx documentation
  • file compression, zip, gzip, 7z
  • helpers for ipython notebooks (upgrade, offline run)
  • parser to quickly add a magic command in a notebook
  • Sphinx directives to integrate a blogpost in the documentation
  • mechanism to add forms in notebooks

Design

This project contains the following folders:

  • a source folder: src
  • a unit test folder: _unittests, go to this folder and run run_unittests.py
  • a folder: _doc, it will contain the documentation, a subfolder _doc/sphinxdox/source/blog contains blog post to communicate on the module
  • a file setup.py to build and to install the module, if the source were retrieve from GitHub, the script can also be called with the following extra options (python setup.py <option>): * clean_space: remove extra spaces in the code * build_sphinx: builds the documentation * unittests: run the unit tests, compute the code coverage
  • a script build_script.bat which produces many script on Windows to easily run the setup, generate the documentation, run the unit tests.

Examples

Convert a notebook into slides:

from pyquickhelper.helpgen import nb2slides
nb2slides("nb.ipynb", "convert.slides.html")

Merge two notebooks:

from pyquickhelper.ipythonhelper import read_nb
nb1 = read_nb("<file1>", kernel=False)
nb2 = read_nb("<file2>", kernel=False)
nb1.merge_notebook(nb2)
nb1.to_json(outfile)

Run a notebook:

from pyquickhelper.ipythonhelper import run_notebook
run_notebook("source.ipynb", working_dir="temp",
            outfilename="modified.ipynb",
            additional_path = [ "c:/temp/mymodule/src" ] )

Run a command line program:

from pyquickhelper.loghelper import run_cmd
out,err = run_cmd("python setup.py install", wait=True)

A sphinx extension to generate python documentation from a script:

.. runpython::
    :showcode:

    import sys
    print("sys.version_info=", str(sys.version_info))

History

current - 2018-04-18 - 0.00Mb

  • 128: fix issue in enumerate_pypi_versions_date (2018-04-14)

1.7.2539 - 2018-04-14 - 1.99Mb

  • 127: update to pip 10 (many API changes) (2018-04-14)

1.7.2536 - 2018-04-14 - 1.99Mb

  • 126: remove dependency on flake8, use pycodestyle (2018-04-13)
  • 122: fix notebook name when converting into rst (collision with html) (2018-04-05)
  • 123: fix style for blogpostagg, remove inserted admonition (2018-04-05)
  • 125: fix sharenet for rst format (2018-04-05)
  • 124: add CodeNode in rst builder (2018-04-05)

1.7.2522 - 2018-04-04 - 1.99Mb

  • 121: extend list of functions in ExtTestCase (NotEqual, Greater(strict=True), NotEmpty (2018-04-01)

1.7.2514 - 2018-04-01 - 1.99Mb

  • 120: add _fieldlist_row_index if missing in HTMLTranslatorWithCustomDirectives (2018-04-01)
  • 119: collision with image names in notebooks converted into rst (2018-03-29)

1.7.2508 - 2018-03-26 - 1.99Mb

  • 116: add tag .. raw:: html in notebook converted into rst (2018-03-26)
  • 117: bug with nbneg_pattern, check unit test failing due to that (2018-03-26)
  • 114: automatically builds history with release and issues + add command history in setup (2018-03-24)

1.7.2482 - 2018-03-22 - 1.99Mb

  • 111: enable manual snippet for notebook, repace add_notebook_menu by toctree in sphinx (2018-03-20)

1.7.2468 - 2018-03-19 - 1.99Mb

  • 113: propose a fix for a bug introduced by pip 9.0.2 (2018-03-19)
  • 112: allow to set custom snippets for notebooks (2018-03-15)
  • 109: run javascript producing svg and convert it into png (2018-03-15)
  • 107: convert svg into png for notebook snippets (2018-03-12)
  • 108: add command lab, creates a script to start jupyter lab on notebook folder (2018-03-10)

1.7.2448 - 2018-03-03 - 1.98Mb

  • 106: replace pdflatex by xelatex to handle utf-8 (2018-03-03)
  • 104: implement visit, depart for pending_xref and rst translator (2018-03-01)
  • 103: fix import issue for Sphinx 1.7.1 (2018-03-01)
  • 102: fix sphinx command line (2018-02-24)

1.7.2438 - 2018-02-23 - 1.98Mb

  • 101: migrate to sphinx 1.7 (2018-02-13)

1.6.2413 - 2018-02-13 - 1.98Mb

  • 100: fix indentation when copying the sources in documentation repository (2018-02-04)
  • 98: deal .. only:: html for readme.rst when copying it to the source repository (2018-01-31)
  • 96: remove some automated part from the produced latex (2018-01-30)
  • 99: bug with galleries of examples with multiple subfolders (2018-01-30)
  • 95: fix ? replacing accents in latex output (2018-01-29)
  • 94: add text fixture for continuous integration (2018-01-28)

1.5.2275 - 2017-11-28 - 0.50Mb

1.4.1533 - 2016-09-10 - 0.36Mb

Release history Release notifications

This version
History Node

1.7.2546

History Node

1.7.2539

History Node

1.7.2536

History Node

1.7.2522

History Node

1.7.2514

History Node

1.7.2508

History Node

1.7.2482

History Node

1.7.2468

History Node

1.7.2448

History Node

1.7.2438

History Node

1.6.2413

History Node

1.5.2275

History Node

1.4.1533

History Node

1.3.1110

Download files

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

Filename, size & hash SHA256 hash help File type Python version Upload date
pyquickhelper-1.7.2546-py3-none-any.whl (2.1 MB) Copy SHA256 hash SHA256 Wheel 3.6 Apr 18, 2018

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging CloudAMQP CloudAMQP RabbitMQ AWS AWS Cloud computing Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page