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

FlexMeasures / flexmeasures / 30104917682
83%

Build:
DEFAULT BRANCH: main
Ran 24 Jul 2026 03:31PM UTC
Jobs 1
Files 171
Run time 1min
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

24 Jul 2026 03:21PM UTC coverage: 82.869% (+0.01%) from 82.858%
30104917682

push

github

web-flow
Accept legacy request field names alongside new canonical ones (fixes asset-level force_new_job_creation gap) (#2352)

* Accept legacy request field names alongside new canonical ones

Adds a shared `SupportsLegacyFieldAliases` pre_load mixin
(flexmeasures/data/schemas/utils.py) and applies it so several request
fields now accept both spellings without breaking existing clients:

- `force_new_job_creation` / `force-new-job-creation` on the asset-level
  scheduling trigger (previously only the sensor-level endpoint accepted
  both; this is what flexmeasures-client#218 had to work around
  client-side with server-version sniffing).
- `per_page`/`per-page`, `sort_by`/`sort-by`, `sort_dir`/`sort-dir` on all
  paginated list endpoints.
- `account_id`/`account` and `asset_id`/`asset` on GET /sensors,
  GET /assets, GET /users query filters.

Response fields still need explicit dual-field output for backward
compatibility (can't "accept either" on the way out), but request fields
don't -- this generalizes the one-off alias hook that already existed for
source-account/source-type filtering, so future field renames on the
request side can ship immediately, without waiting for a new API version.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>

* Fix: don't strip MultiDict semantics when no legacy field is present

_apply_legacy_field_aliases unconditionally rebuilt the incoming request
data into a plain dict, even when none of its declared legacy aliases
were present. That silently broke AssetTriggerSchema.normalize_flex_context_format,
which detects a multi-commodity flex-context list via MultiDict.getlist() --
CI caught this via test_asset_trigger_with_multi_commodity_flex_context
failing (the scheduling job never finished, since flex-context normalization
saw a single dict instead of the intended commodities list).

Now the hook only rebuilds `data` when one of its own legacy keys is
actually present, leaving MultiDict-like inputs untouched otherwis... (continued)

31 of 32 new or added lines in 7 files covered. (96.88%)

15867 of 19147 relevant lines covered (82.87%)

0.83 hits per line

Uncovered Changes

Lines Coverage ∆ File
1
88.89
0.65% flexmeasures/data/schemas/utils.py
Jobs
ID Job ID Ran Files Coverage
1 30104917682.1 24 Jul 2026 03:31PM UTC 171
82.87
GitHub Action Run
Source Files on build 30104917682
  • Tree
  • List 171
  • Changed 10
  • Source Changed 10
  • Coverage Changed 8
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #30104917682
  • de7807e1 on github
  • Prev Build on main (#30095297031)
  • Next Build on main (#30108710689)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc