cape.cfdx.archive.Archive: Case archiving options

This module provides a class to access options relating to archiving folders that were used to run CFD simulations.

The class provided in this module, ArchiveOpts, is loaded into the "RunControl" section of the main options interface.

class cape.cfdx.options.archiveopts.ArchiveOpts(*args, **kw)

Archive mamangement options interface

Call:
>>> opts = ArchiveOpts(**kw)
Inputs:
kw: dict

Dictionary of archive options

Outputs:
opts: ArchiveOpts

Archive options interface

Versions:
  • 2016-30-02 @ddalle: Version 1.0 (Archive)

  • 2022-10-14 @ddalle: Version 2.0; OptionsDict

add_ArchiveArchiveFiles(val, **kw)

Get files to copy to archive

Call:
>>> opts.add_ArchiveArchiveFiles(ArchiveFiles, **kw)
Inputs:
opts: ArchiveOpts

options interface

ArchiveFiles: {[]} | object

files to copy to archive

mode: {None} | 0 | 1 | 2 | 3

Warning mode code

0:

no checks

1:

validate silently

2:

validate and show warnings

3:

raise an exception if invalid

add_ArchivePostDeleteDirs(val, **kw)

Get list of folders to delete after archiving

Call:
>>> opts.add_ArchivePostDeleteDirs(PostDeleteDirs, **kw)
Inputs:
opts: ArchiveOpts

options interface

PostDeleteDirs: {[]} | object

list of folders to delete after archiving

mode: {None} | 0 | 1 | 2 | 3

Warning mode code

0:

no checks

1:

validate silently

2:

validate and show warnings

3:

raise an exception if invalid

add_ArchivePostDeleteFiles(val, **kw)

Get list of files to delete after archiving

Call:
>>> opts.add_ArchivePostDeleteFiles(PostDeleteFiles, **kw)
Inputs:
opts: ArchiveOpts

options interface

PostDeleteFiles: {[]} | object

list of files to delete after archiving

mode: {None} | 0 | 1 | 2 | 3

Warning mode code

0:

no checks

1:

validate silently

2:

validate and show warnings

3:

raise an exception if invalid

add_ArchivePostTarDirs(val, **kw)

Get folders to tar after archiving

Call:
>>> opts.add_ArchivePostTarDirs(PostTarDirs, **kw)
Inputs:
opts: ArchiveOpts

options interface

PostTarDirs: {[]} | object

folders to tar after archiving

mode: {None} | 0 | 1 | 2 | 3

Warning mode code

0:

no checks

1:

validate silently

2:

validate and show warnings

3:

raise an exception if invalid

add_ArchivePostTarGroups(val, **kw)

Get groups of files to tar after archiving

Call:
>>> opts.add_ArchivePostTarGroups(PostTarGroups, **kw)
Inputs:
opts: ArchiveOpts

options interface

PostTarGroups: {[]} | object

groups of files to tar after archiving

mode: {None} | 0 | 1 | 2 | 3

Warning mode code

0:

no checks

1:

validate silently

2:

validate and show warnings

3:

raise an exception if invalid

add_ArchivePostUpdateFiles(val, **kw)

Get globs: keep n and rm older, after archiving

Call:
>>> opts.add_ArchivePostUpdateFiles(PostUpdateFiles, **kw)
Inputs:
opts: ArchiveOpts

options interface

PostUpdateFiles: {[]} | object

globs: keep n and rm older, after archiving

mode: {None} | 0 | 1 | 2 | 3

Warning mode code

0:

no checks

1:

validate silently

2:

validate and show warnings

3:

raise an exception if invalid

add_ArchivePreDeleteDirs(val, **kw)

Get folders to delete before archiving

Call:
>>> opts.add_ArchivePreDeleteDirs(PreDeleteDirs, **kw)
Inputs:
opts: ArchiveOpts

options interface

PreDeleteDirs: {[]} | object

folders to delete before archiving

mode: {None} | 0 | 1 | 2 | 3

Warning mode code

0:

no checks

1:

validate silently

2:

validate and show warnings

3:

raise an exception if invalid

add_ArchivePreDeleteFiles(val, **kw)

Get files to delete before archiving

Call:
>>> opts.add_ArchivePreDeleteFiles(PreDeleteFiles, **kw)
Inputs:
opts: ArchiveOpts

options interface

PreDeleteFiles: {[]} | object

files to delete before archiving

mode: {None} | 0 | 1 | 2 | 3

Warning mode code

0:

no checks

1:

validate silently

2:

validate and show warnings

3:

raise an exception if invalid

add_ArchivePreTarDirs(val, **kw)

Get folders to tar before archiving

Call:
>>> opts.add_ArchivePreTarDirs(PreTarDirs, **kw)
Inputs:
opts: ArchiveOpts

options interface

PreTarDirs: {[]} | object

folders to tar before archiving

mode: {None} | 0 | 1 | 2 | 3

Warning mode code

0:

no checks

1:

validate silently

2:

validate and show warnings

3:

raise an exception if invalid

add_ArchivePreTarGroups(val, **kw)

Get file groups to tar before archiving

Call:
>>> opts.add_ArchivePreTarGroups(PreTarGroups, **kw)
Inputs:
opts: ArchiveOpts

options interface

PreTarGroups: {[]} | object

file groups to tar before archiving

mode: {None} | 0 | 1 | 2 | 3

Warning mode code

0:

no checks

1:

validate silently

2:

validate and show warnings

3:

raise an exception if invalid

add_ArchivePreUpdateFiles(val, **kw)

Get files to keep n and delete older, b4 archiving

Call:
>>> opts.add_ArchivePreUpdateFiles(PreUpdateFiles, **kw)
Inputs:
opts: ArchiveOpts

options interface

PreUpdateFiles: {[]} | object

files to keep n and delete older, b4 archiving

mode: {None} | 0 | 1 | 2 | 3

Warning mode code

0:

no checks

1:

validate silently

2:

validate and show warnings

3:

raise an exception if invalid

add_ArchiveProgressArchiveFiles(val, **kw)

Get files to archive at any time

Call:
>>> opts.add_ArchiveProgressArchiveFiles(ProgressArchiveFiles, **kw)
Inputs:
opts: ArchiveOpts

options interface

ProgressArchiveFiles: {[]} | object

files to archive at any time

mode: {None} | 0 | 1 | 2 | 3

Warning mode code

0:

no checks

1:

validate silently

2:

validate and show warnings

3:

raise an exception if invalid

add_ArchiveProgressDeleteDirs(val, **kw)

Get folders to delete while still running

Call:
>>> opts.add_ArchiveProgressDeleteDirs(ProgressDeleteDirs, **kw)
Inputs:
opts: ArchiveOpts

options interface

ProgressDeleteDirs: {[]} | object

folders to delete while still running

mode: {None} | 0 | 1 | 2 | 3

Warning mode code

0:

no checks

1:

validate silently

2:

validate and show warnings

3:

raise an exception if invalid

add_ArchiveProgressDeleteFiles(val, **kw)

Get files to delete while still running

Call:
>>> opts.add_ArchiveProgressDeleteFiles(ProgressDeleteFiles, **kw)
Inputs:
opts: ArchiveOpts

options interface

ProgressDeleteFiles: {[]} | object

files to delete while still running

mode: {None} | 0 | 1 | 2 | 3

Warning mode code

0:

no checks

1:

validate silently

2:

validate and show warnings

3:

raise an exception if invalid

add_ArchiveProgressTarDirs(val, **kw)

Get folders to tar while running

Call:
>>> opts.add_ArchiveProgressTarDirs(ProgressTarDirs, **kw)
Inputs:
opts: ArchiveOpts

options interface

ProgressTarDirs: {[]} | object

folders to tar while running

mode: {None} | 0 | 1 | 2 | 3

Warning mode code

0:

no checks

1:

validate silently

2:

validate and show warnings

3:

raise an exception if invalid

add_ArchiveProgressTarGroups(val, **kw)

Get list of file groups to tar while running

Call:
>>> opts.add_ArchiveProgressTarGroups(ProgressTarGroups, **kw)
Inputs:
opts: ArchiveOpts

options interface

ProgressTarGroups: {[]} | object

list of file groups to tar while running

mode: {None} | 0 | 1 | 2 | 3

Warning mode code

0:

no checks

1:

validate silently

2:

validate and show warnings

3:

raise an exception if invalid

add_ArchiveProgressUpdateFiles(val, **kw)

Get files to delete old versions while running

Call:
>>> opts.add_ArchiveProgressUpdateFiles(ProgressUpdateFiles, **kw)
Inputs:
opts: ArchiveOpts

options interface

ProgressUpdateFiles: {[]} | object

files to delete old versions while running

mode: {None} | 0 | 1 | 2 | 3

Warning mode code

0:

no checks

1:

validate silently

2:

validate and show warnings

3:

raise an exception if invalid

add_ArchiveSkeletonDirs(val, **kw)

Get folders to keep during skeleton action

Call:
>>> opts.add_ArchiveSkeletonDirs(SkeletonDirs, **kw)
Inputs:
opts: ArchiveOpts

options interface

SkeletonDirs: {None} | object

folders to keep during skeleton action

mode: {None} | 0 | 1 | 2 | 3

Warning mode code

0:

no checks

1:

validate silently

2:

validate and show warnings

3:

raise an exception if invalid

add_ArchiveSkeletonFiles(val, **kw)

Get files to keep during skeleton action

Call:
>>> opts.add_ArchiveSkeletonFiles(SkeletonFiles, **kw)
Inputs:
opts: ArchiveOpts

options interface

SkeletonFiles: {'case.json'} | object

files to keep during skeleton action

mode: {None} | 0 | 1 | 2 | 3

Warning mode code

0:

no checks

1:

validate silently

2:

validate and show warnings

3:

raise an exception if invalid

add_ArchiveSkeletonTailFiles(val, **kw)

Get files to tail before deletion during skeleton

Call:
>>> opts.add_ArchiveSkeletonTailFiles(SkeletonTailFiles, **kw)
Inputs:
opts: ArchiveOpts

options interface

SkeletonTailFiles: {[]} | object

files to tail before deletion during skeleton

mode: {None} | 0 | 1 | 2 | 3

Warning mode code

0:

no checks

1:

validate silently

2:

validate and show warnings

3:

raise an exception if invalid

add_ArchiveSkeletonTarDirs(val, **kw)

Get folders to tar before deletion during skeleton

Call:
>>> opts.add_ArchiveSkeletonTarDirs(SkeletonTarDirs, **kw)
Inputs:
opts: ArchiveOpts

options interface

SkeletonTarDirs: {[]} | object

folders to tar before deletion during skeleton

mode: {None} | 0 | 1 | 2 | 3

Warning mode code

0:

no checks

1:

validate silently

2:

validate and show warnings

3:

raise an exception if invalid

get_ArchiveAction(j=None, i=None, **kw)

Get action to take after finishing a case

Call:
>>> ArchiveAction = opts.get_ArchiveAction(j=None, i=None, **kw)
Inputs:
opts: ArchiveOpts

options interface

j: {None} | int

Phase index; use None to just return v

i: {None} | int | np.ndarray

opts.x index(es) to use with @expr, @map, etc.

vdef: {None} | object

Manual default

mode: {None} | 0 | 1 | 2 | 3

Warning mode code

0:

no checks

1:

validate silently

2:

validate and show warnings

3:

raise an exception if invalid

ring: {opts._optring[key]} | True | False

Override option to loop through phase inputs

listdepth: {0} | int > 0

Depth of list to treat as a scalar

x: {None} | dict

Ref conditions to use with @expr, @map, etc.; often a run matrix; used in combination with i

sample: {True} | False

Apply j, i, and other settings recursively if output is a list or dict

Outputs:
ArchiveAction: '' | {'archive'} | 'rm' | 'skeleton'

action to take after finishing a case

get_ArchiveArchiveFiles(j=None, i=None, **kw)

Get files to copy to archive

Call:
>>> ArchiveFiles = opts.get_ArchiveArchiveFiles(j=None, i=None, **kw)
Inputs:
opts: ArchiveOpts

options interface

j: {None} | int

Phase index; use None to just return v

i: {None} | int | np.ndarray

opts.x index(es) to use with @expr, @map, etc.

vdef: {None} | object

Manual default

mode: {None} | 0 | 1 | 2 | 3

Warning mode code

0:

no checks

1:

validate silently

2:

validate and show warnings

3:

raise an exception if invalid

ring: {opts._optring[key]} | True | False

Override option to loop through phase inputs

listdepth: {0} | int > 0

Depth of list to treat as a scalar

x: {None} | dict

Ref conditions to use with @expr, @map, etc.; often a run matrix; used in combination with i

sample: {True} | False

Apply j, i, and other settings recursively if output is a list or dict

Outputs:
ArchiveFiles: {[]} | object

files to copy to archive

get_ArchiveCmd()

Get archiving command

Call:
>>> cmd = opts.get_ArchiveCmd()
Inputs:
opts: cape.options.Options

Options interface

Outputs:
cmd: list[str]

Tar command and appropriate flags

Versions:
  • 2016-03-01 @ddalle: Version 1.0

get_ArchiveExtension(j=None, i=None, **kw)

Get archive file extension

Call:
>>> ArchiveExtension = opts.get_ArchiveExtension(j=None, i=None, **kw)
Inputs:
opts: ArchiveOpts

options interface

j: {None} | int

Phase index; use None to just return v

i: {None} | int | np.ndarray

opts.x index(es) to use with @expr, @map, etc.

vdef: {None} | object

Manual default

mode: {None} | 0 | 1 | 2 | 3

Warning mode code

0:

no checks

1:

validate silently

2:

validate and show warnings

3:

raise an exception if invalid

ring: {opts._optring[key]} | True | False

Override option to loop through phase inputs

listdepth: {0} | int > 0

Depth of list to treat as a scalar

x: {None} | dict

Ref conditions to use with @expr, @map, etc.; often a run matrix; used in combination with i

sample: {True} | False

Apply j, i, and other settings recursively if output is a list or dict

Outputs:
ArchiveExtension: 'bz2' | {'tar'} | 'tgz' | 'zip'

archive file extension

get_ArchiveFolder(j=None, i=None, **kw)

Get path to the archive root

Call:
>>> ArchiveFolder = opts.get_ArchiveFolder(j=None, i=None, **kw)
Inputs:
opts: ArchiveOpts

options interface

j: {None} | int

Phase index; use None to just return v

i: {None} | int | np.ndarray

opts.x index(es) to use with @expr, @map, etc.

vdef: {None} | object

Manual default

mode: {None} | 0 | 1 | 2 | 3

Warning mode code

0:

no checks

1:

validate silently

2:

validate and show warnings

3:

raise an exception if invalid

ring: {opts._optring[key]} | True | False

Override option to loop through phase inputs

listdepth: {0} | int > 0

Depth of list to treat as a scalar

x: {None} | dict

Ref conditions to use with @expr, @map, etc.; often a run matrix; used in combination with i

sample: {True} | False

Apply j, i, and other settings recursively if output is a list or dict

Outputs:
ArchiveFolder: {''} | str

path to the archive root

get_ArchiveFormat(j=None, i=None, **kw)

Get format for case archives

Call:
>>> ArchiveFormat = opts.get_ArchiveFormat(j=None, i=None, **kw)
Inputs:
opts: ArchiveOpts

options interface

j: {None} | int

Phase index; use None to just return v

i: {None} | int | np.ndarray

opts.x index(es) to use with @expr, @map, etc.

vdef: {None} | object

Manual default

mode: {None} | 0 | 1 | 2 | 3

Warning mode code

0:

no checks

1:

validate silently

2:

validate and show warnings

3:

raise an exception if invalid

ring: {opts._optring[key]} | True | False

Override option to loop through phase inputs

listdepth: {0} | int > 0

Depth of list to treat as a scalar

x: {None} | dict

Ref conditions to use with @expr, @map, etc.; often a run matrix; used in combination with i

sample: {True} | False

Apply j, i, and other settings recursively if output is a list or dict

Outputs:
ArchiveFormat: '' | 'bz2' | {'tar'} | 'tgz' | 'zip'

format for case archives

get_ArchivePostDeleteDirs(j=None, i=None, **kw)

Get list of folders to delete after archiving

Call:
>>> PostDeleteDirs = opts.get_ArchivePostDeleteDirs(j=None, i=None, **kw)
Inputs:
opts: ArchiveOpts

options interface

j: {None} | int

Phase index; use None to just return v

i: {None} | int | np.ndarray

opts.x index(es) to use with @expr, @map, etc.

vdef: {None} | object

Manual default

mode: {None} | 0 | 1 | 2 | 3

Warning mode code

0:

no checks

1:

validate silently

2:

validate and show warnings

3:

raise an exception if invalid

ring: {opts._optring[key]} | True | False

Override option to loop through phase inputs

listdepth: {0} | int > 0

Depth of list to treat as a scalar

x: {None} | dict

Ref conditions to use with @expr, @map, etc.; often a run matrix; used in combination with i

sample: {True} | False

Apply j, i, and other settings recursively if output is a list or dict

Outputs:
PostDeleteDirs: {[]} | object

list of folders to delete after archiving

get_ArchivePostDeleteFiles(j=None, i=None, **kw)

Get list of files to delete after archiving

Call:
>>> PostDeleteFiles = opts.get_ArchivePostDeleteFiles(j=None, i=None, **kw)
Inputs:
opts: ArchiveOpts

options interface

j: {None} | int

Phase index; use None to just return v

i: {None} | int | np.ndarray

opts.x index(es) to use with @expr, @map, etc.

vdef: {None} | object

Manual default

mode: {None} | 0 | 1 | 2 | 3

Warning mode code

0:

no checks

1:

validate silently

2:

validate and show warnings

3:

raise an exception if invalid

ring: {opts._optring[key]} | True | False

Override option to loop through phase inputs

listdepth: {0} | int > 0

Depth of list to treat as a scalar

x: {None} | dict

Ref conditions to use with @expr, @map, etc.; often a run matrix; used in combination with i

sample: {True} | False

Apply j, i, and other settings recursively if output is a list or dict

Outputs:
PostDeleteFiles: {[]} | object

list of files to delete after archiving

get_ArchivePostTarDirs(j=None, i=None, **kw)

Get folders to tar after archiving

Call:
>>> PostTarDirs = opts.get_ArchivePostTarDirs(j=None, i=None, **kw)
Inputs:
opts: ArchiveOpts

options interface

j: {None} | int

Phase index; use None to just return v

i: {None} | int | np.ndarray

opts.x index(es) to use with @expr, @map, etc.

vdef: {None} | object

Manual default

mode: {None} | 0 | 1 | 2 | 3

Warning mode code

0:

no checks

1:

validate silently

2:

validate and show warnings

3:

raise an exception if invalid

ring: {opts._optring[key]} | True | False

Override option to loop through phase inputs

listdepth: {0} | int > 0

Depth of list to treat as a scalar

x: {None} | dict

Ref conditions to use with @expr, @map, etc.; often a run matrix; used in combination with i

sample: {True} | False

Apply j, i, and other settings recursively if output is a list or dict

Outputs:
PostTarDirs: {[]} | object

folders to tar after archiving

get_ArchivePostTarGroups(j=None, i=None, **kw)

Get groups of files to tar after archiving

Call:
>>> PostTarGroups = opts.get_ArchivePostTarGroups(j=None, i=None, **kw)
Inputs:
opts: ArchiveOpts

options interface

j: {None} | int

Phase index; use None to just return v

i: {None} | int | np.ndarray

opts.x index(es) to use with @expr, @map, etc.

vdef: {None} | object

Manual default

mode: {None} | 0 | 1 | 2 | 3

Warning mode code

0:

no checks

1:

validate silently

2:

validate and show warnings

3:

raise an exception if invalid

ring: {opts._optring[key]} | True | False

Override option to loop through phase inputs

listdepth: {0} | int > 0

Depth of list to treat as a scalar

x: {None} | dict

Ref conditions to use with @expr, @map, etc.; often a run matrix; used in combination with i

sample: {True} | False

Apply j, i, and other settings recursively if output is a list or dict

Outputs:
PostTarGroups: {[]} | object

groups of files to tar after archiving

get_ArchivePostUpdateFiles(j=None, i=None, **kw)

Get globs: keep n and rm older, after archiving

Call:
>>> PostUpdateFiles = opts.get_ArchivePostUpdateFiles(j=None, i=None, **kw)
Inputs:
opts: ArchiveOpts

options interface

j: {None} | int

Phase index; use None to just return v

i: {None} | int | np.ndarray

opts.x index(es) to use with @expr, @map, etc.

vdef: {None} | object

Manual default

mode: {None} | 0 | 1 | 2 | 3

Warning mode code

0:

no checks

1:

validate silently

2:

validate and show warnings

3:

raise an exception if invalid

ring: {opts._optring[key]} | True | False

Override option to loop through phase inputs

listdepth: {0} | int > 0

Depth of list to treat as a scalar

x: {None} | dict

Ref conditions to use with @expr, @map, etc.; often a run matrix; used in combination with i

sample: {True} | False

Apply j, i, and other settings recursively if output is a list or dict

Outputs:
PostUpdateFiles: {[]} | object

globs: keep n and rm older, after archiving

get_ArchivePreDeleteDirs(j=None, i=None, **kw)

Get folders to delete before archiving

Call:
>>> PreDeleteDirs = opts.get_ArchivePreDeleteDirs(j=None, i=None, **kw)
Inputs:
opts: ArchiveOpts

options interface

j: {None} | int

Phase index; use None to just return v

i: {None} | int | np.ndarray

opts.x index(es) to use with @expr, @map, etc.

vdef: {None} | object

Manual default

mode: {None} | 0 | 1 | 2 | 3

Warning mode code

0:

no checks

1:

validate silently

2:

validate and show warnings

3:

raise an exception if invalid

ring: {opts._optring[key]} | True | False

Override option to loop through phase inputs

listdepth: {0} | int > 0

Depth of list to treat as a scalar

x: {None} | dict

Ref conditions to use with @expr, @map, etc.; often a run matrix; used in combination with i

sample: {True} | False

Apply j, i, and other settings recursively if output is a list or dict

Outputs:
PreDeleteDirs: {[]} | object

folders to delete before archiving

get_ArchivePreDeleteFiles(j=None, i=None, **kw)

Get files to delete before archiving

Call:
>>> PreDeleteFiles = opts.get_ArchivePreDeleteFiles(j=None, i=None, **kw)
Inputs:
opts: ArchiveOpts

options interface

j: {None} | int

Phase index; use None to just return v

i: {None} | int | np.ndarray

opts.x index(es) to use with @expr, @map, etc.

vdef: {None} | object

Manual default

mode: {None} | 0 | 1 | 2 | 3

Warning mode code

0:

no checks

1:

validate silently

2:

validate and show warnings

3:

raise an exception if invalid

ring: {opts._optring[key]} | True | False

Override option to loop through phase inputs

listdepth: {0} | int > 0

Depth of list to treat as a scalar

x: {None} | dict

Ref conditions to use with @expr, @map, etc.; often a run matrix; used in combination with i

sample: {True} | False

Apply j, i, and other settings recursively if output is a list or dict

Outputs:
PreDeleteFiles: {[]} | object

files to delete before archiving

get_ArchivePreTarDirs(j=None, i=None, **kw)

Get folders to tar before archiving

Call:
>>> PreTarDirs = opts.get_ArchivePreTarDirs(j=None, i=None, **kw)
Inputs:
opts: ArchiveOpts

options interface

j: {None} | int

Phase index; use None to just return v

i: {None} | int | np.ndarray

opts.x index(es) to use with @expr, @map, etc.

vdef: {None} | object

Manual default

mode: {None} | 0 | 1 | 2 | 3

Warning mode code

0:

no checks

1:

validate silently

2:

validate and show warnings

3:

raise an exception if invalid

ring: {opts._optring[key]} | True | False

Override option to loop through phase inputs

listdepth: {0} | int > 0

Depth of list to treat as a scalar

x: {None} | dict

Ref conditions to use with @expr, @map, etc.; often a run matrix; used in combination with i

sample: {True} | False

Apply j, i, and other settings recursively if output is a list or dict

Outputs:
PreTarDirs: {[]} | object

folders to tar before archiving

get_ArchivePreTarGroups(j=None, i=None, **kw)

Get file groups to tar before archiving

Call:
>>> PreTarGroups = opts.get_ArchivePreTarGroups(j=None, i=None, **kw)
Inputs:
opts: ArchiveOpts

options interface

j: {None} | int

Phase index; use None to just return v

i: {None} | int | np.ndarray

opts.x index(es) to use with @expr, @map, etc.

vdef: {None} | object

Manual default

mode: {None} | 0 | 1 | 2 | 3

Warning mode code

0:

no checks

1:

validate silently

2:

validate and show warnings

3:

raise an exception if invalid

ring: {opts._optring[key]} | True | False

Override option to loop through phase inputs

listdepth: {0} | int > 0

Depth of list to treat as a scalar

x: {None} | dict

Ref conditions to use with @expr, @map, etc.; often a run matrix; used in combination with i

sample: {True} | False

Apply j, i, and other settings recursively if output is a list or dict

Outputs:
PreTarGroups: {[]} | object

file groups to tar before archiving

get_ArchivePreUpdateFiles(j=None, i=None, **kw)

Get files to keep n and delete older, b4 archiving

Call:
>>> PreUpdateFiles = opts.get_ArchivePreUpdateFiles(j=None, i=None, **kw)
Inputs:
opts: ArchiveOpts

options interface

j: {None} | int

Phase index; use None to just return v

i: {None} | int | np.ndarray

opts.x index(es) to use with @expr, @map, etc.

vdef: {None} | object

Manual default

mode: {None} | 0 | 1 | 2 | 3

Warning mode code

0:

no checks

1:

validate silently

2:

validate and show warnings

3:

raise an exception if invalid

ring: {opts._optring[key]} | True | False

Override option to loop through phase inputs

listdepth: {0} | int > 0

Depth of list to treat as a scalar

x: {None} | dict

Ref conditions to use with @expr, @map, etc.; often a run matrix; used in combination with i

sample: {True} | False

Apply j, i, and other settings recursively if output is a list or dict

Outputs:
PreUpdateFiles: {[]} | object

files to keep n and delete older, b4 archiving

get_ArchiveProgressArchiveFiles(j=None, i=None, **kw)

Get files to archive at any time

Call:
>>> ProgressArchiveFiles = opts.get_ArchiveProgressArchiveFiles(j=None, i=None, **kw)
Inputs:
opts: ArchiveOpts

options interface

j: {None} | int

Phase index; use None to just return v

i: {None} | int | np.ndarray

opts.x index(es) to use with @expr, @map, etc.

vdef: {None} | object

Manual default

mode: {None} | 0 | 1 | 2 | 3

Warning mode code

0:

no checks

1:

validate silently

2:

validate and show warnings

3:

raise an exception if invalid

ring: {opts._optring[key]} | True | False

Override option to loop through phase inputs

listdepth: {0} | int > 0

Depth of list to treat as a scalar

x: {None} | dict

Ref conditions to use with @expr, @map, etc.; often a run matrix; used in combination with i

sample: {True} | False

Apply j, i, and other settings recursively if output is a list or dict

Outputs:
ProgressArchiveFiles: {[]} | object

files to archive at any time

get_ArchiveProgressDeleteDirs(j=None, i=None, **kw)

Get folders to delete while still running

Call:
>>> ProgressDeleteDirs = opts.get_ArchiveProgressDeleteDirs(j=None, i=None, **kw)
Inputs:
opts: ArchiveOpts

options interface

j: {None} | int

Phase index; use None to just return v

i: {None} | int | np.ndarray

opts.x index(es) to use with @expr, @map, etc.

vdef: {None} | object

Manual default

mode: {None} | 0 | 1 | 2 | 3

Warning mode code

0:

no checks

1:

validate silently

2:

validate and show warnings

3:

raise an exception if invalid

ring: {opts._optring[key]} | True | False

Override option to loop through phase inputs

listdepth: {0} | int > 0

Depth of list to treat as a scalar

x: {None} | dict

Ref conditions to use with @expr, @map, etc.; often a run matrix; used in combination with i

sample: {True} | False

Apply j, i, and other settings recursively if output is a list or dict

Outputs:
ProgressDeleteDirs: {[]} | object

folders to delete while still running

get_ArchiveProgressDeleteFiles(j=None, i=None, **kw)

Get files to delete while still running

Call:
>>> ProgressDeleteFiles = opts.get_ArchiveProgressDeleteFiles(j=None, i=None, **kw)
Inputs:
opts: ArchiveOpts

options interface

j: {None} | int

Phase index; use None to just return v

i: {None} | int | np.ndarray

opts.x index(es) to use with @expr, @map, etc.

vdef: {None} | object

Manual default

mode: {None} | 0 | 1 | 2 | 3

Warning mode code

0:

no checks

1:

validate silently

2:

validate and show warnings

3:

raise an exception if invalid

ring: {opts._optring[key]} | True | False

Override option to loop through phase inputs

listdepth: {0} | int > 0

Depth of list to treat as a scalar

x: {None} | dict

Ref conditions to use with @expr, @map, etc.; often a run matrix; used in combination with i

sample: {True} | False

Apply j, i, and other settings recursively if output is a list or dict

Outputs:
ProgressDeleteFiles: {[]} | object

files to delete while still running

get_ArchiveProgressTarDirs(j=None, i=None, **kw)

Get folders to tar while running

Call:
>>> ProgressTarDirs = opts.get_ArchiveProgressTarDirs(j=None, i=None, **kw)
Inputs:
opts: ArchiveOpts

options interface

j: {None} | int

Phase index; use None to just return v

i: {None} | int | np.ndarray

opts.x index(es) to use with @expr, @map, etc.

vdef: {None} | object

Manual default

mode: {None} | 0 | 1 | 2 | 3

Warning mode code

0:

no checks

1:

validate silently

2:

validate and show warnings

3:

raise an exception if invalid

ring: {opts._optring[key]} | True | False

Override option to loop through phase inputs

listdepth: {0} | int > 0

Depth of list to treat as a scalar

x: {None} | dict

Ref conditions to use with @expr, @map, etc.; often a run matrix; used in combination with i

sample: {True} | False

Apply j, i, and other settings recursively if output is a list or dict

Outputs:
ProgressTarDirs: {[]} | object

folders to tar while running

get_ArchiveProgressTarGroups(j=None, i=None, **kw)

Get list of file groups to tar while running

Call:
>>> ProgressTarGroups = opts.get_ArchiveProgressTarGroups(j=None, i=None, **kw)
Inputs:
opts: ArchiveOpts

options interface

j: {None} | int

Phase index; use None to just return v

i: {None} | int | np.ndarray

opts.x index(es) to use with @expr, @map, etc.

vdef: {None} | object

Manual default

mode: {None} | 0 | 1 | 2 | 3

Warning mode code

0:

no checks

1:

validate silently

2:

validate and show warnings

3:

raise an exception if invalid

ring: {opts._optring[key]} | True | False

Override option to loop through phase inputs

listdepth: {0} | int > 0

Depth of list to treat as a scalar

x: {None} | dict

Ref conditions to use with @expr, @map, etc.; often a run matrix; used in combination with i

sample: {True} | False

Apply j, i, and other settings recursively if output is a list or dict

Outputs:
ProgressTarGroups: {[]} | object

list of file groups to tar while running

get_ArchiveProgressUpdateFiles(j=None, i=None, **kw)

Get files to delete old versions while running

Call:
>>> ProgressUpdateFiles = opts.get_ArchiveProgressUpdateFiles(j=None, i=None, **kw)
Inputs:
opts: ArchiveOpts

options interface

j: {None} | int

Phase index; use None to just return v

i: {None} | int | np.ndarray

opts.x index(es) to use with @expr, @map, etc.

vdef: {None} | object

Manual default

mode: {None} | 0 | 1 | 2 | 3

Warning mode code

0:

no checks

1:

validate silently

2:

validate and show warnings

3:

raise an exception if invalid

ring: {opts._optring[key]} | True | False

Override option to loop through phase inputs

listdepth: {0} | int > 0

Depth of list to treat as a scalar

x: {None} | dict

Ref conditions to use with @expr, @map, etc.; often a run matrix; used in combination with i

sample: {True} | False

Apply j, i, and other settings recursively if output is a list or dict

Outputs:
ProgressUpdateFiles: {[]} | object

files to delete old versions while running

get_ArchiveSkeletonDirs(j=None, i=None, **kw)

Get folders to keep during skeleton action

Call:
>>> SkeletonDirs = opts.get_ArchiveSkeletonDirs(j=None, i=None, **kw)
Inputs:
opts: ArchiveOpts

options interface

j: {None} | int

Phase index; use None to just return v

i: {None} | int | np.ndarray

opts.x index(es) to use with @expr, @map, etc.

vdef: {None} | object

Manual default

mode: {None} | 0 | 1 | 2 | 3

Warning mode code

0:

no checks

1:

validate silently

2:

validate and show warnings

3:

raise an exception if invalid

ring: {opts._optring[key]} | True | False

Override option to loop through phase inputs

listdepth: {0} | int > 0

Depth of list to treat as a scalar

x: {None} | dict

Ref conditions to use with @expr, @map, etc.; often a run matrix; used in combination with i

sample: {True} | False

Apply j, i, and other settings recursively if output is a list or dict

Outputs:
SkeletonDirs: {None} | object

folders to keep during skeleton action

get_ArchiveSkeletonFiles(j=None, i=None, **kw)

Get files to keep during skeleton action

Call:
>>> SkeletonFiles = opts.get_ArchiveSkeletonFiles(j=None, i=None, **kw)
Inputs:
opts: ArchiveOpts

options interface

j: {None} | int

Phase index; use None to just return v

i: {None} | int | np.ndarray

opts.x index(es) to use with @expr, @map, etc.

vdef: {None} | object

Manual default

mode: {None} | 0 | 1 | 2 | 3

Warning mode code

0:

no checks

1:

validate silently

2:

validate and show warnings

3:

raise an exception if invalid

ring: {opts._optring[key]} | True | False

Override option to loop through phase inputs

listdepth: {0} | int > 0

Depth of list to treat as a scalar

x: {None} | dict

Ref conditions to use with @expr, @map, etc.; often a run matrix; used in combination with i

sample: {True} | False

Apply j, i, and other settings recursively if output is a list or dict

Outputs:
SkeletonFiles: {'case.json'} | object

files to keep during skeleton action

get_ArchiveSkeletonTailFiles(j=None, i=None, **kw)

Get files to tail before deletion during skeleton

Call:
>>> SkeletonTailFiles = opts.get_ArchiveSkeletonTailFiles(j=None, i=None, **kw)
Inputs:
opts: ArchiveOpts

options interface

j: {None} | int

Phase index; use None to just return v

i: {None} | int | np.ndarray

opts.x index(es) to use with @expr, @map, etc.

vdef: {None} | object

Manual default

mode: {None} | 0 | 1 | 2 | 3

Warning mode code

0:

no checks

1:

validate silently

2:

validate and show warnings

3:

raise an exception if invalid

ring: {opts._optring[key]} | True | False

Override option to loop through phase inputs

listdepth: {0} | int > 0

Depth of list to treat as a scalar

x: {None} | dict

Ref conditions to use with @expr, @map, etc.; often a run matrix; used in combination with i

sample: {True} | False

Apply j, i, and other settings recursively if output is a list or dict

Outputs:
SkeletonTailFiles: {[]} | object

files to tail before deletion during skeleton

get_ArchiveSkeletonTarDirs(j=None, i=None, **kw)

Get folders to tar before deletion during skeleton

Call:
>>> SkeletonTarDirs = opts.get_ArchiveSkeletonTarDirs(j=None, i=None, **kw)
Inputs:
opts: ArchiveOpts

options interface

j: {None} | int

Phase index; use None to just return v

i: {None} | int | np.ndarray

opts.x index(es) to use with @expr, @map, etc.

vdef: {None} | object

Manual default

mode: {None} | 0 | 1 | 2 | 3

Warning mode code

0:

no checks

1:

validate silently

2:

validate and show warnings

3:

raise an exception if invalid

ring: {opts._optring[key]} | True | False

Override option to loop through phase inputs

listdepth: {0} | int > 0

Depth of list to treat as a scalar

x: {None} | dict

Ref conditions to use with @expr, @map, etc.; often a run matrix; used in combination with i

sample: {True} | False

Apply j, i, and other settings recursively if output is a list or dict

Outputs:
SkeletonTarDirs: {[]} | object

folders to tar before deletion during skeleton

get_ArchiveTemplate(j=None, i=None, **kw)

Get template for default archive settings

Call:
>>> ArchiveTemplate = opts.get_ArchiveTemplate(j=None, i=None, **kw)
Inputs:
opts: ArchiveOpts

options interface

j: {None} | int

Phase index; use None to just return v

i: {None} | int | np.ndarray

opts.x index(es) to use with @expr, @map, etc.

vdef: {None} | object

Manual default

mode: {None} | 0 | 1 | 2 | 3

Warning mode code

0:

no checks

1:

validate silently

2:

validate and show warnings

3:

raise an exception if invalid

ring: {opts._optring[key]} | True | False

Override option to loop through phase inputs

listdepth: {0} | int > 0

Depth of list to treat as a scalar

x: {None} | dict

Ref conditions to use with @expr, @map, etc.; often a run matrix; used in combination with i

sample: {True} | False

Apply j, i, and other settings recursively if output is a list or dict

Outputs:
ArchiveTemplate: {'full'} | str

template for default archive settings

get_ArchiveType(j=None, i=None, **kw)

Get flag for single (full) or multi (sub) archive files

Call:
>>> ArchiveType = opts.get_ArchiveType(j=None, i=None, **kw)
Inputs:
opts: ArchiveOpts

options interface

j: {None} | int

Phase index; use None to just return v

i: {None} | int | np.ndarray

opts.x index(es) to use with @expr, @map, etc.

vdef: {None} | object

Manual default

mode: {None} | 0 | 1 | 2 | 3

Warning mode code

0:

no checks

1:

validate silently

2:

validate and show warnings

3:

raise an exception if invalid

ring: {opts._optring[key]} | True | False

Override option to loop through phase inputs

listdepth: {0} | int > 0

Depth of list to treat as a scalar

x: {None} | dict

Ref conditions to use with @expr, @map, etc.; often a run matrix; used in combination with i

sample: {True} | False

Apply j, i, and other settings recursively if output is a list or dict

Outputs:
ArchiveType: {'full'} | 'partial'

flag for single (full) or multi (sub) archive files

get_RemoteCopy(j=None, i=None, **kw)

Get command for archive remote copies

Call:
>>> RemoteCopy = opts.get_RemoteCopy(j=None, i=None, **kw)
Inputs:
opts: ArchiveOpts

options interface

j: {None} | int

Phase index; use None to just return v

i: {None} | int | np.ndarray

opts.x index(es) to use with @expr, @map, etc.

vdef: {None} | object

Manual default

mode: {None} | 0 | 1 | 2 | 3

Warning mode code

0:

no checks

1:

validate silently

2:

validate and show warnings

3:

raise an exception if invalid

ring: {opts._optring[key]} | True | False

Override option to loop through phase inputs

listdepth: {0} | int > 0

Depth of list to treat as a scalar

x: {None} | dict

Ref conditions to use with @expr, @map, etc.; often a run matrix; used in combination with i

sample: {True} | False

Apply j, i, and other settings recursively if output is a list or dict

Outputs:
RemoteCopy: {'scp'} | str

command for archive remote copies

get_UnarchiveCmd()

Get command to unarchive

Call:
>>> cmd = opts.get_UnarchiveCmd()
Inputs:
opts: cape.options.Options

Options interface

Outputs:
cmd: list[str]

Untar command and appropriate flags

Versions:
  • 2016-03-01 @ddalle: Version 1.0

set_ArchiveAction(v, j=None, mode=None)

Get action to take after finishing a case

Call:
>>> opts.set_ArchiveAction(ArchiveAction, j=None, i=None, **kw)
Inputs:
opts: ArchiveOpts

options interface

ArchiveAction: '' | {'archive'} | 'rm' | 'skeleton'

action to take after finishing a case

j: {None} | int

Phase index; use None to just return v

mode: {None} | 0 | 1 | 2 | 3

Warning mode code

0:

no checks

1:

validate silently

2:

validate and show warnings

3:

raise an exception if invalid

listdepth: {0} | int > 0

Depth of list to treat as a scalar

set_ArchiveExtension(v, j=None, mode=None)

Get archive file extension

Call:
>>> opts.set_ArchiveExtension(ArchiveExtension, j=None, i=None, **kw)
Inputs:
opts: ArchiveOpts

options interface

ArchiveExtension: 'bz2' | {'tar'} | 'tgz' | 'zip'

archive file extension

j: {None} | int

Phase index; use None to just return v

mode: {None} | 0 | 1 | 2 | 3

Warning mode code

0:

no checks

1:

validate silently

2:

validate and show warnings

3:

raise an exception if invalid

listdepth: {0} | int > 0

Depth of list to treat as a scalar

set_ArchiveFolder(v, j=None, mode=None)

Get path to the archive root

Call:
>>> opts.set_ArchiveFolder(ArchiveFolder, j=None, i=None, **kw)
Inputs:
opts: ArchiveOpts

options interface

ArchiveFolder: {''} | str

path to the archive root

j: {None} | int

Phase index; use None to just return v

mode: {None} | 0 | 1 | 2 | 3

Warning mode code

0:

no checks

1:

validate silently

2:

validate and show warnings

3:

raise an exception if invalid

listdepth: {0} | int > 0

Depth of list to treat as a scalar

set_ArchiveFormat(v, j=None, mode=None)

Get format for case archives

Call:
>>> opts.set_ArchiveFormat(ArchiveFormat, j=None, i=None, **kw)
Inputs:
opts: ArchiveOpts

options interface

ArchiveFormat: '' | 'bz2' | {'tar'} | 'tgz' | 'zip'

format for case archives

j: {None} | int

Phase index; use None to just return v

mode: {None} | 0 | 1 | 2 | 3

Warning mode code

0:

no checks

1:

validate silently

2:

validate and show warnings

3:

raise an exception if invalid

listdepth: {0} | int > 0

Depth of list to treat as a scalar

set_ArchiveTemplate(v, j=None, mode=None)

Get template for default archive settings

Call:
>>> opts.set_ArchiveTemplate(ArchiveTemplate, j=None, i=None, **kw)
Inputs:
opts: ArchiveOpts

options interface

ArchiveTemplate: {'full'} | str

template for default archive settings

j: {None} | int

Phase index; use None to just return v

mode: {None} | 0 | 1 | 2 | 3

Warning mode code

0:

no checks

1:

validate silently

2:

validate and show warnings

3:

raise an exception if invalid

listdepth: {0} | int > 0

Depth of list to treat as a scalar

set_ArchiveType(v, j=None, mode=None)

Get flag for single (full) or multi (sub) archive files

Call:
>>> opts.set_ArchiveType(ArchiveType, j=None, i=None, **kw)
Inputs:
opts: ArchiveOpts

options interface

ArchiveType: {'full'} | 'partial'

flag for single (full) or multi (sub) archive files

j: {None} | int

Phase index; use None to just return v

mode: {None} | 0 | 1 | 2 | 3

Warning mode code

0:

no checks

1:

validate silently

2:

validate and show warnings

3:

raise an exception if invalid

listdepth: {0} | int > 0

Depth of list to treat as a scalar

set_RemoteCopy(v, j=None, mode=None)

Get command for archive remote copies

Call:
>>> opts.set_RemoteCopy(RemoteCopy, j=None, i=None, **kw)
Inputs:
opts: ArchiveOpts

options interface

RemoteCopy: {'scp'} | str

command for archive remote copies

j: {None} | int

Phase index; use None to just return v

mode: {None} | 0 | 1 | 2 | 3

Warning mode code

0:

no checks

1:

validate silently

2:

validate and show warnings

3:

raise an exception if invalid

listdepth: {0} | int > 0

Depth of list to treat as a scalar

cape.cfdx.options.archiveopts.auto_Archive(opts, cls=<class 'cape.cfdx.options.archiveopts.ArchiveOpts'>)

Automatically convert dict to ArchiveOpts

Call:
>>> opts = auto_Archive(opts)
Inputs:
opts: dict

Dict of either global, “RunControl” or “Archive” options

Outputs:
opts: ArchiveOpts

Instance of archiving options

Versions:
  • 2016-02-29 @ddalle: Version 1.0

  • 2022-10-21 @ddalle: Version 2.0, add cls input