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

Filter calibrations out of constraints summary table #4557

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

toddburnside
Copy link
Contributor

No description provided.

.setEnableSorting(false)
)
// Memo rows
rows <- useMemo((props.constraintList, props.calibrationObservations)): (cl, calibs) =>
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The only real change is the calculation of the rows.

@mergify mergify bot added the explore label Feb 13, 2025
Copy link

bundlemon bot commented Feb 13, 2025

BundleMon

Unchanged files (8)
Status Path Size Limits
index-(hash).js
1.74MB -
exploreworkers-(hash).js
597.86KB -
index-(hash).css
66.23KB -
workbox-window.prod.es5-(hash).js
2.07KB -
agsworker-(hash).js
83B -
plotworker-(hash).js
83B -
catalogworker-(hash).js
81B -
itcworker-(hash).js
81B -

Total files change -6B 0%

Final result: ✅

View report in BundleMon website ➡️


Current branch size history | Target branch size history

ScalaFnComponent[Body]: props =>
for {
ctx <- useContext(AppContext.ctx)
cols <- useMemo(()): // Cols never changes, but needs access to props
Copy link
Contributor

Choose a reason for hiding this comment

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

Unrelated to the PR: in other places where we have stable columns definitions, we have moved them to a val with .reuseAlways, which declutters the hook section.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah. I was just lazy here. :( I'll move it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I can't really move it to a val since it needs the props, but I can have the memo call a function.

Copy link
Contributor

Choose a reason for hiding this comment

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

Oh right, it needs the programId.

Comment on lines 267 to 271
cl
.map: (obsIdSet, cs) =>
(obsIdSet -- calibs)
.map: filtered =>
ConstraintGroup(cs, filtered)
Copy link
Contributor

Choose a reason for hiding this comment

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

Why not filter in the caller rather than passing the filtered observations list all the way up to here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I guess I was lazy again and just followed existing precedent. We do this for all the kinds of groups we have. I wonder if there should just be a lazy val in programSummaries that does this?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

filtered observations list

Do you mean the calibration observations list?

Copy link
Contributor

Choose a reason for hiding this comment

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

Yeah, I should have said "list of observations to be filtered out".

Copy link
Contributor

Choose a reason for hiding this comment

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

I wonder if there should just be a lazy val in programSummaries that does this?

Sounds good to me

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This was a good call because it turns out that we don't want the calibration observations in any of the groupings that we calculate in the ProgramSummaries. We were filtering them out way down the chain and not always completely. Which messed up, for example, selections in some of the trees because the calibration obs ids were not being filtered out of the tree representation.

@toddburnside toddburnside force-pushed the sc-4733-constraints-summary-should-not-list-calibration branch from 8731ccc to 520e1e0 Compare February 14, 2025 17:02
@mergify mergify bot added the model label Feb 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants