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

FlexMeasures / flexmeasures / 35185895728
86%

Build:
DEFAULT BRANCH: main
Ran 17 Sep 2026 05:41AM UTC
Jobs 1
Files 183
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

17 Sep 2026 05:28AM UTC coverage: 85.604% (+0.002%) from 85.602%
35185895728

push

github

web-flow
Log one line when the CLI rejects an option value (#2544)

* Log one line when the CLI rejects an option value

A reporting cron job stopped producing data, and the log file the wrapper
script writes held no trace of why. The command had a stray --start, which
swallowed the option that followed it as its value, and Click rejected that
as a datetime. Click reports such errors on stderr alone, while the script
redirected only stdout, so nothing was recorded.

FlexMeasures configures a rotating file handler of its own, but an
invocation that fails while parsing its options never reaches any code that
logs, so that file stays silent too. The same goes for latest_task_runs,
which is filled by a decorator around the command body.

Add LoggedClickExceptionCommand, which logs one ERROR line naming the
command and the message Click would print, and re-raises so that Click's
own output and its exit code are unchanged. One line, rather than the usage
block, keeps a repeatedly failing cron job from filling the log.

Applied to `flexmeasures add report` for now, which is the command this was
found on.

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

* Add changelog entry for the CLI option-error log line

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

* Log a Click error from every CLI group, not just from `add report`

`add forecasts`, `add schedule` and `jobs run-automations` are run from cron
just as `add report` is, and a per-command `cls` would leave each new command
to remember to opt in.

Put the logging on the group instead. A command's error passes through its
group on the way out, so one class on each of the seven groups covers every
command in them, including the ones that pass a `cls` of their own, and it
picks up the group's own errors too, such as an unknown subcommand.

The context Click attaches to the error names the command that failed, which
is what the line reports, so a command's error is still repo... (continued)

30 of 33 new or added lines in 8 files covered. (90.91%)

19272 of 22513 relevant lines covered (85.6%)

0.86 hits per line

Uncovered Changes

Lines Coverage ∆ File
3
83.63
0.38% flexmeasures/cli/utils.py
Jobs
ID Job ID Ran Files Coverage
1 35185895728.1 17 Sep 2026 05:41AM UTC 183
85.6
GitHub Action Run
Source Files on build 35185895728
  • Tree
  • List 183
  • Changed 8
  • Source Changed 8
  • Coverage Changed 5
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #35185895728
  • 5c428ac3 on github
  • Prev Build on main (#35155157209)
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