isofit.data.build_examples
Builds the examples from their template files for a given ISOFIT ini
Attributes
Classes
Template for building scripts that directly call the Isofit object |
|
Template for building scripts that use apply_oe |
Functions
|
Recursively updates string values with .format. This operation occurs in-place. |
|
Updates a given template and writes it out to another file |
|
Creates an executable script file for a given template and arguments |
|
Builds an example directory |
|
Builds the ISOFIT examples |
Module Contents
- class Example(name, requires, validate={})[source]
-
- setPath(path)[source]
Sets the working path for the example
- Parameters:
path (pathlib.Path) – Base path to the directory in which the example is located
- Returns:
Returns False if the example directory is not found
- Return type:
None | False
- class IsofitExample(name, requires, validate={})[source]
Bases:
ExampleTemplate for building scripts that directly call the Isofit object
- build()[source]
Makes a formatted bash script
- Parameters:
example (pathlib.Path) – Path to the example root
path (pathlib.Path) – Path to the subset of scripts to generate scripts for
- class ApplyOEExample(name, requires, validate={})[source]
Bases:
ExampleTemplate for building scripts that use apply_oe
- update(obj, **flags)[source]
Recursively updates string values with .format. This operation occurs in-place.
- updateTemplate(template: str, output: str = None)[source]
Updates a given template and writes it out to another file
- createScript(script: str, template: dict)[source]
Creates an executable script file for a given template and arguments
- build(example, validate=True)[source]
Builds an example directory
- Parameters:
example (pathlib.Path) – Path to the example root
validate (bool, default=True) – Validates the required extra downloads for each example. Disabling this will allow examples to build but does not guarantee they will work