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

FlexMeasures / flexmeasures / 29184777448

12 Jul 2026 07:47AM UTC coverage: 81.346% (-0.009%) from 81.355%
29184777448

push

github

web-flow
Fix three long-standing failures on main (regressor splits on pandas 2.2+, swallowed CLI validation messages, task page 500) (#2303)

* fix: three long-standing failures on main

- Forecasting with past/future regressors raised a TypeError on pandas 2.2+:
  _slice_closed used the deprecated Series.view("int64") detour and then
  set values into an existing column with .loc[:, col], which validates
  against that column's dtype. Search the datetime64 values directly, and
  replace the column instead of setting into it.
- CLI validation messages were swallowed for every marshmallow-typed option:
  since the click 8.2 upgrade (#2219) removed the click.ParamType base,
  click wraps these fields in FuncParamType, whose convert() reports the
  offending *value* and discards the reason. Raise a click error carrying the
  validation message instead (the ParamType base stays off, to keep the
  Python 3.10 MRO fix intact).
- The task detail page returned a 500 for jobs whose meta data is not
  JSON-serializable, because rq-dashboard serializes meta with a bare
  json.dumps(). Give it a tolerant default (see rq-dashboard#510).

Fixes #2302

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Rbix8k1JfeUWNXEmHEZVpX

* fix: three more long-standing failures on main

- [GET] /api/ops/getLatestTaskRun turned any database error into an opaque
  500: the retry in get_task_run() ran on the still-aborted transaction,
  so it was rejected with InFailedSqlTransaction and the original error was
  never surfaced. Roll back before retrying.
- test_api_task_run_get_recent_entry did not declare the fixture seeding its
  data, so it queried a database without the latest_task_run table at all
  (which is what aborted the transaction above).
- test_build_asset_jobs_data and test_get_job_status_requires_read_access
  asserted on job counts and job identity without flushing the Redis job
  cache, so leftover jobs from earlier test... (continued)

25 of 29 new or added lines in 4 files covered. (86.21%)

2 existing lines in 1 file now uncovered.

14369 of 17664 relevant lines covered (81.35%)

0.81 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

82.69
/flexmeasures/api/common/implementations.py


Source Not Available

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