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

FlexMeasures / flexmeasures / 36099158907
85%

Build:
DEFAULT BRANCH: main
Ran 25 Sep 2026 05:48AM UTC
Jobs 1
Files 186
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

25 Sep 2026 05:34AM UTC coverage: 85.924% (+0.01%) from 85.91%
36099158907

push

github

web-flow
Fix: validate automation config keys (#2563)

* data/services/automations: name the part of a refused automation that is at fault

Context:
- Issue #2498: a mistake in a data generator's config was reported against
  "parameters", sending the caller looking in a part of the request that was fine.
- A scheduling automation accepted a config and a data-generator with 201 Created,
  and silently ignored both.
- A report automation without a reporter raised a bare string, naming no field at all.

Change:
- Added an `errors_reported_for(section)` context manager, which re-raises a
  ValidationError keyed by the section it came from.
- Wrapped each raise site with the section it belongs to: the window check, the
  forecast and report parameter loads, the schedule trigger load and the schedule
  sensor resolution report against "parameters"; the forecaster and reporter setups
  report against "config".
- A scheduling automation now refuses a non-empty config or data-generator by name,
  in `refuse_fields_a_schedule_automation_cannot_use`: its scheduler and flex config
  follow from the asset.
- A missing reporter is reported against "data-generator", and an unsupported
  automation type against "type".
- The create endpoint returns the service's messages as they are, rather than
  re-wrapping every one of them as {"parameters": ...}.
- The CLI reads "Invalid <noun> automation:", since the fault is not always in the
  parameters, and the keyed messages now say where it is.

Signed-off-by: Mohamed Belhsan Hmida <mohamedbelhsanhmida@gmail.com>

* api/v3_0, cli: cover which part of a refused automation the error names

Context:
- The create endpoint and `flexmeasures add automation` now key each validation
  error by the part of the request it came from (issue #2498).
- Seven CLI tests asserted the old wording, "Invalid <noun> parameters", which
  contradicts itself once the messages can name the config instead.

Change:
- Added API tests: a config error is keye... (continued)

34 of 34 new or added lines in 2 files covered. (100.0%)

19638 of 22855 relevant lines covered (85.92%)

0.86 hits per line

Jobs
ID Job ID Ran Files Coverage
1 36099158907.1 25 Sep 2026 05:48AM UTC 186
85.92
GitHub Action Run
Source Files on build 36099158907
  • Tree
  • List 186
  • Changed 3
  • Source Changed 3
  • Coverage Changed 3
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #36099158907
  • 6dd04600 on github
  • Prev Build on main (#36098976244)
  • Next Build on main (#36115652205)
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