Skip to content

Refactor SQL saving#442

Merged
Grufoony merged 1 commit into
mainfrom
refactor
Apr 21, 2026
Merged

Refactor SQL saving#442
Grufoony merged 1 commit into
mainfrom
refactor

Conversation

@Grufoony
Copy link
Copy Markdown
Owner

No description provided.

Copilot AI review requested due to automatic review settings April 21, 2026 12:46
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 21, 2026

Codecov Report

❌ Patch coverage is 97.72727% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 87.31%. Comparing base (5a9a0d0) to head (714e021).
⚠️ Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
src/dsf/mobility/FirstOrderDynamics.cpp 97.72% 2 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main     #442   +/-   ##
=======================================
  Coverage   87.31%   87.31%           
=======================================
  Files          52       52           
  Lines        6628     6646   +18     
  Branches      765      768    +3     
=======================================
+ Hits         5787     5803   +16     
- Misses        817      819    +2     
  Partials       24       24           
Flag Coverage Δ
unittests 87.31% <97.72%> (+<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.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Refactors the SQLite persistence logic in FirstOrderDynamics by extracting repeated insert code into dedicated helper methods and introducing a shared StreetDataRecord type for batching street writes.

Changes:

  • Introduces StreetDataRecord and new m_save*SQL helper methods to centralize batch inserts.
  • Replaces inline SQL insert blocks inside FirstOrderDynamics::evolve() with calls to the new helpers.
  • Adjusts average-stats calculation flow prior to persisting avg_stats.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 6 comments.

File Description
src/dsf/mobility/FirstOrderDynamics.hpp Adds StreetDataRecord and declares new SQL save helper APIs (with some doc updates needed).
src/dsf/mobility/FirstOrderDynamics.cpp Implements the SQL save helpers and wires them into evolve() in place of inline insert logic.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/dsf/mobility/FirstOrderDynamics.cpp Outdated
Comment thread src/dsf/mobility/FirstOrderDynamics.cpp Outdated
Comment thread src/dsf/mobility/FirstOrderDynamics.hpp
Comment thread src/dsf/mobility/FirstOrderDynamics.hpp Outdated
Comment thread src/dsf/mobility/FirstOrderDynamics.hpp Outdated
Comment thread src/dsf/mobility/FirstOrderDynamics.hpp Outdated
@Grufoony Grufoony merged commit 6a5a445 into main Apr 21, 2026
35 of 40 checks passed
@Grufoony Grufoony deleted the refactor branch April 21, 2026 13:13
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.

2 participants