Pweave-Teaching

From Research Computing Center Wiki
Revision as of 13:10, 19 August 2019 by Shtsai (talk | contribs) (→‎Documentation)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search


Category

Other

Program On

Teaching

Version

0.30.3

Author / Distributor

Please see http://mpastell.com/pweave/

Description

From http://mpastell.com/pweave/: "Pweave is a scientific report generator and a literate programming tool for Python. Pweave can capture the results and plots from data analysis and works well with NumPy, SciPy and matplotlib. "

Running Program

Also refer to Running Jobs on the teaching cluster


  • Version 0.30.3, for Python 3.6.4, installed in /usr/local/apps/gb/pweave/0.30.3-Python-3.6.4-foss-2018a

To use this version of pweave, please first load the module with

ml pweave/0.30.3-Python-3.6.4-foss-2018a

This module will automatically load Python/3.6.4-foss-2018a and the foss/2018a toolchain.


Sample job submission script (sub.sh) to run this pweave:


#!/bin/bash
#SBATCH --job-name=pweavejob
#SBATCH --partition=batch
#SBATCH --mail-type=ALL
#SBATCH --mail-user=username@uga.edu
#SBATCH --ntasks=1
#SBATCH --mem=1gb
#SBATCH --time=08:00:00
#SBATCH --output=pweavejob.%j.out
#SBATCH --error=pweavejob.%j.err

cd $SLURM_SUBMIT_DIR
ml pweave/0.30.3-Python-3.6.4-foss-2018a
pweave [options]

where [options] need to be replaced by the options you want to use.

In the real submission script, at least all the above underlined values need to be reviewed or to be replaced by the proper values.


Sample job submission command:

sbatch sub.sh


Documentation

[shtsai@c2-11 ~]$ ml pweave/0.30.3-Python-3.6.4-foss-2018a 

[shtsai@c2-11 ~]$ pweave --version
Pweave 0.30.3

[shtsai@c2-11 ~]$ pweave -help
Usage: pweave [options] sourcefile

Options:
  --version             show program's version number and exit
  -h, --help            show this help message and exit
  -f DOCTYPE, --format=DOCTYPE
                        The output format. Available formats:  tex, texminted,
                        texpweave, texpygments, rst, pandoc, markdown,
                        leanpub, sphinx, html, md2html, softcover,
                        pandoc2latex, pandoc2html, notebook Use Pweave -l to
                        list descriptions or see
                        http://mpastell.com/pweave/formats.html
  -i INFORMAT, --input-format=INFORMAT
                        Input format: noweb, markdown, notebook or script
  -k KERNEL, --kernel=KERNEL
                        Jupyter kernel used to run code: default is python3
  -o OUTPUT, --output=OUTPUT
                        Name of the output file
  -l, --list-formats    List output formats
  -m, --matplotlib      Disable matplotlib
  -d, --documentation-mode
                        Use documentation mode, chunk code and results will be
                        loaded from cache and inline code will be hidden
  -c, --cache-results   Cache results to disk for documentation mode
  -F FIGDIR, --figure-directory=FIGDIR
                        Directory path for matplolib graphics: Default
                        'figures'
  --cache-directory=CACHEDIR
                        Directory path for cached results used in
                        documentation mode: Default 'cache'
  -g FIGFORMAT, --figure-format=FIGFORMAT
                        Figure format for matplotlib graphics: Defaults to
                        'png' for rst and Sphinx html documents and 'pdf' for
                        tex
  -t MIMETYPE, --mimetype=MIMETYPE
                        Source document's text mimetype. This is used to set
                        cell type in Jupyter notebooks


[shtsai@c2-11 ~]$ ptangle
This is ptangle 0.30.3, enter ptangle -h for help

[shtsai@c2-11 ~]$ ptangle -h
Usage: ptangle sourcefile

Options:
  --version             show program's version number and exit
  -h, --help            show this help message and exit
  -i INFORMAT, --input-format=INFORMAT
                        Input format: noweb, markdown, notebook or script

Installation

Version 0.30.3 installed with pip install Pweave using Python/3.6.4-foss-2018a on August 19, 2019.

System

64-bit Linux