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

improve adornment v2 importer typing #1658

Merged
merged 2 commits into from
Dec 2, 2024

Conversation

scytacki
Copy link
Member

@scytacki scytacki commented Nov 27, 2024

This turned up three bugs:

  • yAttributeDescriptions.y doesn't exist
  • if the v2 document had a plottedStDev adornment a stDev and stErr adornment would be added to the imported document
  • the creation of this erroneous stErr adornment did not set to the number of standard errors correctly.

The importer now handles an older format of the multipleMovableValues adornment.

This also fixes other v2 types that didn't match the one random document from cfm-shared. I'll be checking more documents and will an submit a new PR with those changes.

This turned up three bugs:
- `yAttributeDescriptions.y` doesn't exist
- if the v2 document had a plottedStDev adornment a stDev and stErr adornment would be added to the imported document
- the creation of this erroneous stErr adornment did not set to the number of standard errors correctly.

The importer now handles an older format of the multipleMovableValues adornment
Copy link

codecov bot commented Nov 27, 2024

Codecov Report

Attention: Patch coverage is 96.07843% with 2 lines in your changes missing coverage. Please review.

Project coverage is 85.77%. Comparing base (4e85e70) to head (72d1c32).
Report is 14 commits behind head on main.

Files with missing lines Patch % Lines
...mponents/graph/adornments/v2-adornment-importer.ts 93.33% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1658      +/-   ##
==========================================
+ Coverage   85.69%   85.77%   +0.07%     
==========================================
  Files         604      604              
  Lines       30740    30742       +2     
  Branches     7895     7896       +1     
==========================================
+ Hits        26344    26368      +24     
+ Misses       4241     4219      -22     
  Partials      155      155              
Flag Coverage Δ
cypress 75.36% <27.27%> (+0.10%) ⬆️
jest 52.77% <96.07%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link

cypress bot commented Nov 27, 2024

codap-v3    Run #5419

Run Properties:  status check passed Passed #5419  •  git commit acbae5764c: Increment the build number
Project codap-v3
Branch Review main
Run status status check passed Passed #5419
Run duration 02m 09s
Commit git commit acbae5764c: Increment the build number
Committer eireland
View all properties for this run ↗︎

Test results
Tests that failed  Failures 0
Tests that were flaky  Flaky 0
Tests that did not run due to a developer annotating a test with .skip  Pending 0
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 3
View all changes introduced in this branch ↗︎

@kswenson kswenson added the v3 CODAP v3 label Nov 28, 2024
@kswenson kswenson marked this pull request as ready for review November 28, 2024 06:50
Copy link
Member

@kswenson kswenson left a comment

Choose a reason for hiding this comment

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

👍 Looks good -- just one naming suggestion

Comment on lines 120 to 121
// TODO_V2_IMPORT: This used to be yAttributeDescriptions.y, which would have always been undefined
// I'm not sure if yAttributeDescriptions[0] is the right replacement.
Copy link
Member

Choose a reason for hiding this comment

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

I think yAttributeDescriptions[0] is correct.

@@ -128,21 +153,31 @@ const instanceKeysForAdornments = (props: IInstanceKeysForAdornmentsProps) => {
return instanceKeys
}

export type AdornmentAttributeDescriptions = Partial<Record<GraphAttrRole, IAttributeDescriptionSnapshot>>
Copy link
Member

Choose a reason for hiding this comment

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

AdornmentAttributeDescriptions aren't adornment specific, so I'd be inclined to call it something like GraphAttributeDescriptions and move the definition into data-display-types.ts or graphing-types.ts.

@scytacki scytacki merged commit 03d39d7 into main Dec 2, 2024
20 of 21 checks passed
@scytacki scytacki deleted the 188618233-adornments-import-types branch December 2, 2024 13:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants