Archives and Version Control Systems

If you have your programs in a git archive, you can use GitArchive as input parameter and build the software every time from scratch in order to have a clean enviroment for the experiment. Similar you can use a tar achive for this purpose.

class versuchung.archives.GitArchive(clone_url=None, ref='refs/heads/master', shallow=False)[source]

Can be used as: input parameter

The git repository given in clone_url will be cloned to a temporary directory. It will be removed after the experiment is over. If shallow == True Only the files and not the .git is copied (cloned). This is especially useful for large git repositories like the Linux kernel tree.

clone_url can either be a string or any object that has a .path attribute (like e.g. TarArchive). Of course the refenced path must be a directory.

This parameter can be used as argument to the with keyword, to change to the temporary directory:

with self.inputs.git_archive as path:
    # Here we have path == os.path.abspath(os.curdir)
    # Do something in the extracted copy
    print path
checkout_hash()[source]

Return the hash of the HEAD commit hash as string

checkout_ref()[source]

Return git ref which was checked out

checkout_url()[source]

Return git url which was checked out

path[source]

Return the string to the extract directory (same as .value.path)

value[source]

Return a versuchung.files.Directory instance to the cloned git directory

class versuchung.archives.TarArchive(filename=None)[source]

Can be used as: input parameter

The archive will be extracted to a temporary directory. It will be removed after the experiment is over.

clone_url can either be a string or any object that has a .path attribute (like e.g. File). Of course the referenced file must be a single file.

This parameter can be used as argument to the with keyword, to change to the temporary directory:

with self.inputs.tar_archive as path:
    # Here we have path == os.path.abspath(os.curdir)
    # Do something in the extracted copy
    print path
path[source]

Return the string to the extract directory (same as .value.path)

value[source]

Return a versuchung.files.Directory instance to the extracted tar archive. If it contains only one directory the instance will point there. Otherwise it will point to a directory containing the contents of the archive

Previous topic

Database Output

Next topic

Search Result Sets as Input Parameters

This Page