bmi_tester.main module

class bmi_tester.main.Stage(stage_dir: str, config_file: str, manifest: str | Iterator[str] | None = None)[source]

Bases: object

property config_file: str
property dir: str
classmethod from_entry_point(entry_point: str) Stage[source]
property manifest: tuple[str, ...]
class bmi_tester.main.ValidateEntryPoint(option_strings, dest, nargs=None, const=None, default=None, type=None, choices=None, required=False, help=None, metavar=None)[source]

Bases: Action

class bmi_tester.main.ValidatePathExists(option_strings, dest, nargs=None, const=None, default=None, type=None, choices=None, required=False, help=None, metavar=None)[source]

Bases: Action

bmi_tester.main.main(argv: tuple[str, ...] | None = None) int[source]

Validate a BMI implementation.

 Examples:

Test a BMI for the class Hydrotrend in module pymt_hydrotrend,

$ bmi-test pymt_hydrotrend:Hydrotrend

This will test the BMI with a default set of input files as obtained through the model metadata associated with the component.

If the component you would like to test does not have model metadata that bmi-tester recognizes, or you would like to test with a non-default set of input files, use the –root-dir and –config-file options.

$ bmi-tests pymt_hydrotrend:Hydrotrend –root-dir=my_files/ –config-file=config.txt

where my_files is a folder that contains the input files to test with and config.txt is the configuration file, which will be passed to the initialize method.

bmi_tester.main.run_the_tests(entry_point: str, config_file: str, manifest: tuple[str, ...], bmi_version: str = '2.0', pytest_help: bool = False) int[source]