Skip to main content

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

https://github.com/sdpython/pyquickhelper/blob/master/_doc/sphinxdoc/source/phdoc_static/project_ico.png?raw=true

pyquickhelper: automation of many things

Build status Build Status Windows https://circleci.com/gh/sdpython/pyquickhelper/tree/master.svg?style=svg https://dev.azure.com/xavierdupre3/pyquickhelper/_apis/build/status/sdpython.pyquickhelper https://badge.fury.io/py/pyquickhelper.svg MIT License https://codecov.io/github/sdpython/pyquickhelper/coverage.svg?branch=master GitHub Issues Codacy Badge Notebook Coverage Downloads Forks Stars size

pyquickhelper is used to automate the release of the documentation such as automating Jenkins, converting notebooks into many formats, extending Sphinx with custom extensions… It assumes the project is organized on the same template as this one.

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))

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

pyquickhelper-1.11.3697.tar.gz (2.3 MB view details)

Uploaded Source

Built Distribution

pyquickhelper-1.11.3697-py3-none-any.whl (2.2 MB view details)

Uploaded Python 3

File details

Details for the file pyquickhelper-1.11.3697.tar.gz.

File metadata

  • Download URL: pyquickhelper-1.11.3697.tar.gz
  • Upload date:
  • Size: 2.3 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.5

File hashes

Hashes for pyquickhelper-1.11.3697.tar.gz
Algorithm Hash digest
SHA256 b0a2ff448c1feedbff820fffdb05129ad890c89f4aef787b133944d1cc175326
MD5 5440bcd0ef10b93f4327f21a305929b9
BLAKE2b-256 cd0db7e665231e357c0753cbb72f4299a43d194d4ddfd7d08573d55d075054bb

See more details on using hashes here.

File details

Details for the file pyquickhelper-1.11.3697-py3-none-any.whl.

File metadata

  • Download URL: pyquickhelper-1.11.3697-py3-none-any.whl
  • Upload date:
  • Size: 2.2 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.5

File hashes

Hashes for pyquickhelper-1.11.3697-py3-none-any.whl
Algorithm Hash digest
SHA256 51aecb6eccd8f20db41aaf0bf9db03e78cb04b97dcb20dd3b63c39d1ec93258b
MD5 5b4c7f490e4bfa04980c2b2559a9e6e0
BLAKE2b-256 f7401f33345c56fc9e10573ee6eee61e24940b2049e558911076f71560e04e45

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