• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

FlexMeasures / flexmeasures / 24279786346 / 1
81%
main: 81%

Build:
DEFAULT BRANCH: main
Ran 11 Apr 2026 09:51AM UTC
Files 163
Run time 3s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

11 Apr 2026 09:40AM UTC coverage: 77.867% (+0.008%) from 77.859%
24279786346.1

push

github

web-flow
Fix drop_unchanged prior-belief selection regression (#2086)

* Fix drop_unchanged prior-belief selection regression.

When prior beliefs are ordered descending by belief_time, _drop_unchanged_beliefs_compared_to_db could compare against an older prior belief and incorrectly drop a changed candidate belief. Select the latest prior belief strictly earlier than the candidate and add regression tests covering helper-level and save_to_db behavior.

* fix: missing imports

Signed-off-by: F.N. Claessen <claessen@seita.nl>

* docs: add extra annotations

Signed-off-by: F.N. Claessen <claessen@seita.nl>

* refactor: merge the two tests and add assert messages

Signed-off-by: F.N. Claessen <claessen@seita.nl>

* time_series: simplify _drop_unchanged_beliefs_compared_to_db
Context:
- PR #2086 fixed a sort-order regression by replacing searchsorted with a
  boolean filter + .max(); introduces an unnecessary intermediate variable,
  a len()==0 check instead of the idiomatic pd.isna(), and a dead-code guard
  (previous_most_recent_beliefs can never be empty once most_recent_bt is known).
Change:
- Inline the earlier_belief_times variable into a single .max() call
- Replace len(...)==0 with pd.isna(most_recent_bt) (idiomatic for datetime max)
- Remove the unreachable 'if previous_most_recent_beliefs.empty' branch
- Add comment explaining why .max() is used over searchsorted

* changelog: document save_to_db belief-drop bug fix (PR #2086)

* fix: move test to before tests that use db.session.rollback()

Signed-off-by: F.N. Claessen <claessen@seita.nl>

---------

Signed-off-by: F.N. Claessen <claessen@seita.nl>
Co-authored-by: F.N. Claessen <claessen@seita.nl>

11779 of 15127 relevant lines covered (77.87%)

0.78 hits per line

Source Files on job 24279786346.1
  • Tree
  • List 163
  • Changed 1
  • Source Changed 1
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 24279786346
  • 1b9caff1 on github
  • Prev Job for on main (#24238400989.1)
  • Next Job for on main (#24282300690.1)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc