Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extend conditional #7851

Conversation

khalidadil
Copy link
Contributor

Closes

Describe your changes:

All Submissions:

  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same update/change?
  • Is this a notable change that will require a special callout in the release notes? For example, will this break compatibility with existing APIs or projects that consume these plugins?

Author Checklist

  • Changes address original issue?
  • Tests included and/or updated with changes?
  • Has this been smoke tested?
  • Have you associated this PR with a type: label? Note: this is not necessarily the same as the original issue.
  • Have you associated a milestone with this PR? Note: leave blank if unsure.
  • Testing instructions included in associated issue OR is this a dependency/testcase change?

Reviewer Checklist

  • Changes appear to address issue?
  • Reviewer has tested changes by following the provided instructions?
  • Changes appear not to be breaking changes?
  • Appropriate automated tests included?
  • Code style and in-line documentation are appropriate?

… for historical conditional telemetry queries to allow for plotting
@khalidadil khalidadil changed the base branch from master to conditional-style-performance September 19, 2024 20:06
@@ -243,6 +243,7 @@ export default {
domainObject: {
...this.childObject,
configuration: {
...this.childObject.configuration,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixes a bug with stacked plots

@@ -94,7 +94,7 @@ export function ticks(start, stop, count) {
}

export function commonPrefix(a, b) {
const maxLen = Math.min(a.length, b.length);
const maxLen = Math.min(a.length, b?.length);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixes an issue with undefined telemetry in plots

@@ -110,7 +110,7 @@ export function commonPrefix(a, b) {
}

export function commonSuffix(a, b) {
const maxLen = Math.min(a.length, b.length);
const maxLen = Math.min(a.length, b?.length);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above

const conditionDetails = conditionCollectionMap.get(id);
const { isDefault } = conditionDetails;
const conditionConfiguration = conditionDetails?.configuration;
const { outputTelemetry, outputMetadata, output } = conditionConfiguration;

Check notice

Code scanning / CodeQL

Unused variable, import, function or class Note

Unused variable outputTelemetry.
const conditionDetails = conditionCollectionMap.get(id);
const { isDefault } = conditionDetails;
const conditionConfiguration = conditionDetails?.configuration;
const { outputTelemetry, outputMetadata, output } = conditionConfiguration;

Check notice

Code scanning / CodeQL

Unused variable, import, function or class Note

Unused variable outputMetadata.
const outputTelemetryList = [];
const domainObject = this.conditionSetDomainObject;
outputTelemetryMap.forEach((outputMetadata, timestamp) => {
const { condition, telemetry, value } = outputMetadata;

Check notice

Code scanning / CodeQL

Unused variable, import, function or class Note

Unused variable telemetry.
Copy link

codecov bot commented Sep 19, 2024

Codecov Report

Attention: Patch coverage is 2.24215% with 218 lines in your changes missing coverage. Please review.

Project coverage is 50.14%. Comparing base (73489cd) to head (7896f36).
Report is 9 commits behind head on conditional-style-performance.

Files with missing lines Patch % Lines
...c/plugins/condition/historicalTelemetryProvider.js 0.00% 157 Missing ⚠️
src/plugins/condition/ConditionManager.js 0.00% 49 Missing ⚠️
...lugins/condition/ConditionInspectorViewProvider.js 18.18% 9 Missing ⚠️
...plugins/condition/ConditionSetTelemetryProvider.js 0.00% 2 Missing ⚠️
.../plugins/condition/ConditionSetMetadataProvider.js 0.00% 1 Missing ⚠️

❗ There is a different number of reports uploaded between BASE (73489cd) and HEAD (7896f36). Click for more details.

HEAD has 5 uploads less than BASE
Flag BASE (73489cd) HEAD (7896f36)
unit 1 0
e2e-ci 7 3
Additional details and impacted files
@@                        Coverage Diff                        @@
##           conditional-style-performance    #7851      +/-   ##
=================================================================
- Coverage                          58.78%   50.14%   -8.65%     
=================================================================
  Files                                675      435     -240     
  Lines                              27277    13767   -13510     
  Branches                            2671        0    -2671     
=================================================================
- Hits                               16034     6903    -9131     
+ Misses                             11195     6864    -4331     
+ Partials                              48        0      -48     
Flag Coverage Δ
e2e-ci 50.05% <2.24%> (-11.72%) ⬇️
e2e-full 23.17% <1.34%> (-0.36%) ⬇️
unit ?
Files with missing lines Coverage Δ
src/plugins/condition/plugin.js 100.00% <100.00%> (ø)
src/plugins/plot/tickUtils.js 74.64% <100.00%> (-22.54%) ⬇️
.../plugins/condition/ConditionSetMetadataProvider.js 25.00% <0.00%> (-75.00%) ⬇️
...plugins/condition/ConditionSetTelemetryProvider.js 9.52% <0.00%> (-85.48%) ⬇️
...lugins/condition/ConditionInspectorViewProvider.js 18.18% <18.18%> (ø)
src/plugins/condition/ConditionManager.js 0.00% <0.00%> (-87.76%) ⬇️
...c/plugins/condition/historicalTelemetryProvider.js 0.00% <0.00%> (ø)

... and 439 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 73489cd...7896f36. Read the comment docs.

@davetsay
Copy link
Contributor

Just want to say its great to see a PR by @khalidadil again, 🥲

@khalidadil
Copy link
Contributor Author

Just want to say its great to see a PR by @khalidadil again, 🥲

Thanks Dave! Still got some bugs to iron out and it needs tests, but it's getting there!

export default class HistoricalTelemetryProvider {
constructor(openmct, telemetryObjects, conditions, conditionSetDomainObject) {
this.openmct = openmct;
this.telemetryObjects = telemetryObjects;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should consider using TelemetryCollections in here to manage the input telemetry

Copy link
Contributor

@scottbell scottbell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@khalidadil good stuff! some weirdness about leaving the plot and coming back:

Screen.Recording.2024-09-25.at.13.35.49.mov

it looks like it works on new data coming in, but not on historical data per se. Note "Enable Historical" is turned on in the clip.

@ozyx ozyx deleted the branch nasa:conditional-style-performance October 2, 2024 21:14
@ozyx ozyx closed this Oct 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants