The httk package

This page documents the features of the httk package most relevant for regular users. For a complete listing of members and subpackages, please refer to the full API documentation instead, Full httk API documentation.

Introduction

The high-throughput toolkit (httk)

A set of tools and utilities meant to help with:
  • Project management, preparation of large-scale computational project.

  • Execution of large-scale computational projects
    • interface with supercomputer cluster queuing systems, etc.
    • aid with scripting multi-stage runs
    • retrieval of data from supercomputers
  • Storage of data in databases

  • Search, retrieval and ‘processing’ of data in storage

  • Analysis (especially as a helpful interface against 3:rd party software)

Helpful constants

httk.httk_dir

The path to the main httk directory

httk.version

The version of httk (if you make signifcant changes to httk, please update with a personal suffix, e.g., 1.0.7.rickard.2)

Main I/O

httk.load(ioa, ext=None)[source]

A very generic file reader method.

Load a file into a suitable httk object. Try to do the most sane thing possible given the input file. If you know what to expect from the input file, it may be safer to use a targeted method for that file type.

httk.save(obj, ioa, ext=None)[source]

A very generic file writer method.

Load a file into a suitable httk object. Try to do the most sane thing possible given the input file. If you know what to expect from the input file, it may be safer to use a targeted method for that file type.

FracVector

class httk.FracVector(noms, denom=1)[source]

FracVector is a general immutable N-dimensional vector (tensor) class for performing linear algebra with fractional numbers.

A FracVector consists of a multidimensional tuple of integer nominators, and a single shared integer denominator.

Since FracVectors are immutable, every operation on a FracVector returns a new FracVector with the result of the operation. A created FracVector never changes. Hence, they are safe to use as keys in dictionaries, to use in sets, etc.

Note: most methods returns FracVector results that are not simplified (i.e., the FracVector returned does not have the smallest possible integer denominator). To return a FracVector with the smallest possible denominator, just call FracVector.simplify() at the last step.

class httk.FracScalar(nom, denom)[source]

Represents the fractional number nom/denom. This is a subclass of FracVector with the purpose of making it clear when a scalar fracvector is needed/used.

class httk.MutableFracVector(noms, denom)[source]

Same as FracVector, only, this version allow assignment of elements, e.g.,

mfracvec[2,7] = 5

and, e.g.,

mfracvec[:,7] = [1,2,3,4] 

Other than this, the FracVector methods exist and do the same, i.e., they return copies of the fracvector, rather than modifying it.

However, methods have also been added named with set_* prefixes which performs mutating operations, e.g.,

A.set_T()

replaces A with its own transpose, whereas

A.T()

just returns a new MutableFracVector that is the transpose of A, leaving A unmodified.

HttkObject

class httk.HttkObject[source]
httk.httk_typed_property(t)[source]
httk.httk_typed_init(t, **kargs)[source]
httk.httk_typed_property_delayed(t)[source]
httk.httk_typed_init_delayed(t, **kargs)[source]
httk.HttkPluginWrapper(plugin=None)[source]
httk.HttkPlugin(cls, main_instance)[source]
httk.HttkPluginPlaceholder(plugininfo=None)[source]

HttkObject for Projects and Computations

class httk.Code(name, version)[source]

Object for keeping track of httk data about a computer software or script

class httk.Computation(computation_date, description, code, manifest_hash, signatures, keys, relpath, project_counter, added_date=None)[source]

Object for keeping track of httk data about a specific computation run

class httk.Result(computation)[source]

Intended as a base class for results tables for computations

class httk.ComputationRelated(main_computation, other_computation, relation)[source]

Object for keeping track of httk data about a specific computation run

class httk.ComputationProject(computation, project)[source]
class httk.Author(last_name, given_names)[source]

Object for keeping track of tags for other objects

class httk.Reference(ref, authors=None, authorsstr=None, journal=None, volume=None, firstpage=None, lastpage=None, year=None, publisher=None, publisher_extra=None)[source]

A reference citation

class httk.Project(name, description, project_key, keys)[source]
class httk.ProjectRef(project, reference)[source]
class httk.ProjectTag(project, tag, value)[source]

IOAdapters

class httk.IoAdapterFileReader(f, name=None, deletefilename=None, close=False)[source]

Io adapter for easy handling of io.

class httk.IoAdapterFileWriter(f, name=None, close=False)[source]

Io adapter for access to data as a python file object

class httk.IoAdapterFileAppender(f, name=None)[source]

Io adapter for access to data as a python file object

class httk.IoAdapterString(string=None, name=None)[source]

Universal io adapter, helps handling the passing of filenames, files, and strings to functions that deal with io

class httk.IoAdapterStringList(stringlist, name=None)[source]

Universal io adapter, helps handling the passing of filenames, files, and strings to functions that deal with io

class httk.IoAdapterStringList(stringlist, name=None)[source]

Universal io adapter, helps handling the passing of filenames, files, and strings to functions that deal with io

Full documentation

For full documentation, see Full httk API documentation.