Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions docs/reference/ni-data-store.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ Each step belongs to a TestResult and can contain multiple measurements and cond
A **PublishedMeasurement** represents actual measurement data captured during a test step. This is the core data entity that stores the measured values, whether they are simple scalars, complex waveforms, or other data types.

**Fields:**
- `moniker` (Moniker) - Data location identifier for retrieving the actual measurement values
- `published_conditions` (list) - Environmental conditions present during measurement
- `id` (string) - Unique identifier for this measurement
- `test_result_id` (string) - ID of the associated TestResult
Expand Down Expand Up @@ -98,7 +97,6 @@ A **PublishedMeasurement** represents actual measurement data captured during a
A **PublishedCondition** represents environmental or contextual information that was present during test execution. Conditions capture the state of the test environment, input parameters, or other contextual data that might affect measurement results.

**Fields:**
- `moniker` (Moniker) - Data location identifier for retrieving the condition value
- `id` (string) - Unique identifier for this condition
- `name` (string) - Name of the condition (e.g., "Temperature", "Supply Voltage")
- `condition_type` (string) - Type/category of the condition (e.g., "Environment", "Input Parameter")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@
"published_measurements = data_store_client.query_measurements(\"$filter=name eq 'scope reading'\")\n",
"found_measurement = next(iter(published_measurements), None)\n",
"if found_measurement is not None:\n",
" waveform = data_store_client.read_data(found_measurement, expected_type=AnalogWaveform)\n",
" waveform = data_store_client.read_measurement_value(found_measurement, expected_type=AnalogWaveform)\n",
" print(f\"published data is: {waveform.raw_data}\")"
]
},
Expand Down
6 changes: 3 additions & 3 deletions examples/notebooks/overview/publish_measurement.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@
" badge_number = operator.extension[\"badge_number\"]\n",
" print(f\"operator {operator.name}'s badge number is: {badge_number}\")\n",
"\n",
" waveform = data_store_client.read_data(found_measurement, expected_type=AnalogWaveform)\n",
" waveform = data_store_client.read_measurement_value(found_measurement, expected_type=AnalogWaveform)\n",
" print(f\"published data is: {waveform.raw_data}\")"
]
},
Expand Down Expand Up @@ -295,7 +295,7 @@
],
"metadata": {
"kernelspec": {
"display_name": "ni-datastore-py3.10",
"display_name": ".venv",
"language": "python",
"name": "python3"
},
Expand All @@ -309,7 +309,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.11"
"version": "3.11.7"
}
},
"nbformat": 4,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -240,14 +240,14 @@
"condition = next(iter(conditions), None)\n",
"condition_values = []\n",
"if condition is not None:\n",
" condition_data = data_store_client.read_data(condition, expected_type=Vector)\n",
" condition_data = data_store_client.read_condition_value(condition, expected_type=Vector)\n",
" units = condition_data.units\n",
" for val in condition_data:\n",
" condition_values.append(str(val) + units)\n",
"measurements = data_store_client.query_measurements(odata_query=f\"$filter=stepid eq {step_id}\")\n",
"sorted_measurements = sorted(measurements, key=lambda m: m.parametric_index)\n",
"for measurement in sorted_measurements:\n",
" waveform = data_store_client.read_data(measurement, expected_type=AnalogWaveform)\n",
" waveform = data_store_client.read_measurement_value(measurement, expected_type=AnalogWaveform)\n",
" color = colors[measurement.parametric_index]\n",
" timing = waveform.timing\n",
" fig.add_trace(go.Scatter(\n",
Expand Down
91 changes: 38 additions & 53 deletions examples/overview/poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion examples/overview/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ grpcio-tools = [
types-grpcio = ">=1.0"
types-protobuf = ">=4.21"
# Uncomment to use local ni-datastore code
# ni-datastore = {path = "../..", develop = true}
ni-datastore = {path = "../..", develop = true}
datastore-utilities = { path = "../../utilities", develop = true }

[tool.poetry.group.lint.dependencies]
Expand Down
4 changes: 3 additions & 1 deletion examples/overview/src/overview.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,9 @@ def query_data(published_measurement_id: str) -> None:
operator = metadata_store_client.get_operator(test_result.operator_id)
print(f"operator: {operator}")

waveform = data_store_client.read_data(found_measurement, expected_type=AnalogWaveform)
waveform = data_store_client.read_measurement_value(
found_measurement, expected_type=AnalogWaveform
)
print(f"published data is: {waveform.raw_data}")


Expand Down
Loading
Loading