Skip to main content

Utility functions for the Pineapple IPython/Jupyter front-end

Project description

This project is a Python module that defines some utility functions for the Pineapple IPython/Jupyter front-end.

The goal is to standardize notebooks so that notebook authors can have a consistent and easy way for readers to reproduce their exact results with the least amount of hassle.

Usage

After importing the module, within IPython notebooks you get magic functions %pip, %require, and %runtest.

The %pip command lets you easily use the pip command directly to manage installed packages.

The %require command shows all installed packages with versions if called with no arguments. If called with arguments, it will attempt to install the requested packages. Arguments are version specifiers, separated by spaces.

The %runtest command takes any number of test case or test suite classes descended from unittest.TestCase or unittest.TestSuite and runs them in the cell. It should also be compatible with unittest2.

import pineapple

%pip install numpy

%pip list

%require numpy==1.9.2

%require numpy==1.9.2 ipython==4.0.0

%require

%runtest MyTesterClass

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

pineapple-0.3.tar.gz (4.6 kB view details)

Uploaded Source

File details

Details for the file pineapple-0.3.tar.gz.

File metadata

  • Download URL: pineapple-0.3.tar.gz
  • Upload date:
  • Size: 4.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for pineapple-0.3.tar.gz
Algorithm Hash digest
SHA256 d0a9a32c7bb991ff66e7d8d080793f2bb067fd343054179c91ffbce9ff5b9297
MD5 a73fb2ad3379f6b59c8bcd1fc4456a2b
BLAKE2b-256 d85206bcee80a78f60a4dcfb23b477c792ddb9f8dd645a3556dedf23496c5e41

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