Giter VIP home page Giter VIP logo

xadupre / pyquickhelper Goto Github PK

View Code? Open in Web Editor NEW

This project forked from sdpython/pyquickhelper

0.0 0.0 0.0 13.88 MB

Automation to publish materials for teaching, notebook rendering, sphinx extensions, Jenkins helpers...

Home Page: http://www.xavierdupre.fr/app/pyquickhelper/helpsphinx/

License: MIT License

CSS 2.89% Python 33.89% JavaScript 3.14% HTML 0.81% Shell 0.01% Batchfile 0.02% Jupyter Notebook 58.70% TeX 0.26% Smarty 0.29%

pyquickhelper's Introduction

image

pyquickhelper: automation of many things

Build status

Build Status Windows

image

image

MIT License

Requirements Status

image

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

Binder

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.