DataExport#
Class which provides access to all data needed by an export script.
Example#
Prints out the amount of tests used for the data export:
def export_data(data_export):
print(len(data_export.tests))
property last_measurement_index#
Gets the index of the last measurement run performed.
Returns#
| Type | Description |
|---|---|
| int | The index of the last measurement run performed. |
property measurement_description#
Gets an object with meta data of the measurement.
Returns#
| Type | Description |
|---|---|
| MeasurementDescription | An object with measurement meta data |
property project_settings#
Gets an object containing the project settings.
Returns#
| Type | Description |
|---|---|
| ProjectSettings | An object with the project settings |
property sorting_statistic#
Gets an object containing information about sorting statistics.
Returns#
| Type | Description |
|---|---|
| SortingStatistic | An object with the sorting statistics |
property tests#
Gets the list of all tests selected for this data export.
Returns#
| Type | Description |
|---|---|
| Test | An object with the project settings |
method get_file_path(test: [Test](../Test/index.md))#
Determines the path to the output file and returns it.
Parameters#
| Name | Description |
|---|---|
| test | The test for which the output file path shall be determined. |
Returns#
| Type | Description |
|---|---|
| str | The path to the output file. |
Example#
Determines the output path for the first test within the test list and prints it out:
test = data_export.tests[0]
output_path = data_export.get_file_path(test)
print(output_path)
method get_setting(settingId: str)#
Returns the value of the export setting with the given ID.
Parameters#
| Name | Description |
|---|---|
| settingId | The setting's ID |
Returns#
| Type | Description |
|---|---|
| Any | The setting's value |
Example#
Prints out the value of the export script setting directory:
directory = data_export.get_setting("directory")
print(directory)