Flow 1-to-1

Defines the Flow11_AT class.

class admit.at.Flow11_AT.Flow11_AT(**keyval)

Flow11_AT will change one File_BDP into another File_BDP, purely to test or emulate a flow. It will also implement an example how parameters are added back from the AT to ADMIT using the summary feature.

See also Flow_AT for the design document that describes the Flow family.

Together with Flow1N_AT and FlowN1_AT these are AT’s that take File_BDP’s as input (1 or N), and produce File_BDP’s as output (1 or N).

Input files pointed to in the BDP’s do not have to exist, but the AT can be forced to check for those (exist=True).

Output files listed in the BDP’s can be ignored, but can also be created as 0-length files (touch=True).

The use of “exist” and “touch” thus symmetrizes the way how the Flow*_AT’s can be used to emulate the dependancy of a flow on file existence and/or creation.


file: output filename created, from which the BDP is named as well
as “<file>.bdp”. The BDP is always created. The file itself will depend on the touch= keyword. If the filename is blank, it will generate an output filename by appending _11 to the input filename

touch: Create a 0-length file that the output BDP will point to [True]

exist: input file that belongs to a BDP must exist to pass [True]


addinput(item[, slot]) Add a BDP input to an AT.
addinputbdp(item[, slot, insert]) Add a BDP to the _bdp_in list
addoutput(item[, slot]) Add a BDP output product to an AT.
addoutputbdp(item[, slot, insert]) Add a BDP to the _bdp_out list
checkfiles() check if the files from all the BDP_out’s in an AT exist,
checktype(item) Check the type of an object to see if ti is a BDP
clearinput() Clear the input BDP list
clearoutput() Clear the output BDP list
copy() Creates an independent duplicate of the task.
delete([delfiles]) Method to delete the AT and underlying BDPs.
delinput(slot) Delete a specific BDP in the _bdp_in list
deloutput(slot) Delete a specific BDP in the _bdp_out list
dir([filename]) Return the absolution directory of this ADMIT project or a derefenced filename address.
execute([args]) Executes the task.
getVersion() Return the version string
getdtd(fl) Method to write out the dtd data
getkey(key) Retrieval value for a key.
haskey(key) Query if a key exists for an AT.
isequal(at) Method to determine if two ATs are the same.
isstale() Return True/False if an AT is up to date
len2() Return the length of _bdp_in and _bdp_out in a tuple
markChanged() Mark an AT that it’s state was changed, so it would need to be rerun.
markUpToDate() Sets the _stale state to indicate that the AT does not need to be run
mkdir(dirname) Make a directory in the ADMIT hierarchy if it doesn’t exist yet It also allows an absolute path, in the classical unix sense.
run() run Flow11_AT
set_bdp_in([bin]) Validate the _valid_bdp_in list and digest it into the appropriate attributes
set_bdp_out([bout]) Validate the _valid_bdp_out list and digest it into the appropriate attributes
setkey([name, value, isinit]) set keys, two styles are possible:
show() Return the type of the AT
summary() adds following to ADMIT summary: alpha, beta, file, test1
touch2(fname) a native python “touch” barely adds overhead
uptodate() Returns the current state of the _stale flag
validateinput([describe]) Method to validate the _bdp_in’s against a dictionary of expected types.
write(node) Method to write the AT to disk

run Flow11_AT


adds following to ADMIT summary: alpha, beta, file, test1

Summary will add the following parameters to ADMIT.

alpha : real
The alpha parameter of foobar.
beta : real
The beta parameter of fumbar.
file : string
The output filename used in Flow11_AT
test1 : dictionary
A small dictionary

a native python “touch” barely adds overhead (maybe 0.2” on 10000 operations) This is a helper member function of the class, compare this with touch1, which is a local helper function to run().

This Page