Fixes #2443 Restore simulation association on PI snapshot import#2444
Conversation
Parameter identifications were mapped before simulations were added to the project, so simulation lookups failed and the PI lost its simulation (and threw an NRE resolving linked parameters). Map PIs after simulations are loaded, matching PK-Sim. Also include simulations in MoBiProject.All<T>() (they live in a separate list from building blocks) so the Core PI mapper's project.All<ISimulation>() lookup resolves them.
|
Warning Review limit reached
Next review available in: 41 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthrough
ChangesProject loading behavior
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related issues
Poem
🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Link the existing parameter identification in the test fixture to its simulation (additive change, preserving the existing charts/curves) and add an integration spec asserting the simulation and identification parameter survive a snapshot load.
|
@coderabbitai when you cannot review a PR due to rate limit that should not mean the PR has a failing check. We have other reviewers. |
|
Tip For best results, initiate chat on the files or code changes.
🐇💭 ✏️ Learnings added
|
Fixes #2443
Loading a project snapshot containing a parameter identification dropped the PI's simulation association (and threw a
NullReferenceException).Two causes, both fixed here:
ProjectMappermapped parameter identifications before simulations were added to the project, so name lookups failed. PIs are now mapped after simulations load, matching PK-Sim.MoBiProject.All<T>()only enumerated building blocks, but simulations live in a separate list. The Core PI mapper resolves the PI'sSimulationsviaproject.All<ISimulation>(), which was always empty in MoBi.All<T>()now includes simulations.Summary by CodeRabbit