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

FlexMeasures / flexmeasures-client / 31916624345
97%

Build:
DEFAULT BRANCH: main
Ran 16 Aug 2026 12:12AM UTC
Jobs 10
Files 5
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

06 Aug 2026 06:25PM UTC coverage: 96.58% (+0.2%) from 96.394%
31916624345

push

github

web-flow
feat: allow unit param in file upload (#221)

* feat: allow unit param in file upload

Signed-off-by: Nicolas Höning <nicolas@seita.nl>

* fix: require server 0.30.0 when uploading a file with a unit

Servers before v0.30.0 do not read a "unit" form field on the sensor data
upload endpoint. Their webargs location loader copies only the file and the
"belief-time-measured-instantly" field out of the form, so an unknown "unit"
never reaches marshmallow and no validation error is raised. Ingestion then
falls back to `fields.get("unit", sensor.unit)`, which makes the unit
conversion a no-op: the file's values are recorded as if they were already
in the sensor's unit, and the request still returns 200.

The result is silent data corruption (e.g. a 1000x error when uploading W
to a kW sensor) with no signal to the caller. Fail before sending anything
instead, but only when a unit is actually passed, so existing file uploads
are unaffected and incur no extra request.

Base versions are compared via _server_version_at_least so that pre-release
builds such as 0.30.0.dev5, which already expose the field, are accepted.

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

* fix: report the missing params when only a unit or prior is passed

Dropping unit from json_params is right for the mutual-exclusivity check,
since a unit can now accompany a file upload. But that same list also picks
the error message, so a lone unit stopped counting as "something was passed"
and post_sensor_data(sensor_id=1, unit="MW") reported that neither mode was
chosen -- while a unit sat right there in the call. prior was already in
that position.

Keep unit and prior out of the mode decision, but let them select the
message, so the caller is told which parameters are missing instead. The
genuinely empty call is unaffected.

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

* test: cover a server that reports no version on unit file upload

The guard leans on _server_version_at_l... (continued)

15 of 15 new or added lines in 1 file covered. (100.0%)

706 of 731 relevant lines covered (96.58%)

9.66 hits per line

Jobs
ID Job ID Ran Files Coverage
1 ubuntu-latest - py3.12 - 31916624345.1 16 Aug 2026 12:12AM UTC 5
96.58
GitHub Action Run
2 ubuntu-latest - py3.13 - 31916624345.2 16 Aug 2026 12:12AM UTC 5
96.58
GitHub Action Run
3 ubuntu-latest - py3.10 - 31916624345.3 16 Aug 2026 12:12AM UTC 5
96.58
GitHub Action Run
4 macos-latest - py3.13 - 31916624345.4 16 Aug 2026 12:12AM UTC 5
96.58
GitHub Action Run
5 macos-latest - py3.11 - 31916624345.5 16 Aug 2026 12:12AM UTC 5
96.58
GitHub Action Run
6 macos-latest - py3.12 - 31916624345.6 16 Aug 2026 12:12AM UTC 5
96.58
GitHub Action Run
7 macos-latest - py3.10 - 31916624345.7 16 Aug 2026 12:12AM UTC 5
96.58
GitHub Action Run
8 macos-latest - py3.14 - 31916624345.8 16 Aug 2026 12:12AM UTC 5
96.58
GitHub Action Run
9 ubuntu-latest - py3.14 - 31916624345.9 16 Aug 2026 12:12AM UTC 5
96.58
GitHub Action Run
10 ubuntu-latest - py3.11 - 31916624345.10 16 Aug 2026 12:12AM UTC 5
96.58
GitHub Action Run
Source Files on build 31916624345
  • Tree
  • List 5
  • Changed 1
  • Source Changed 1
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #31916624345
  • 73fedf81 on github
  • Prev Build on main (#29997047034)
  • Delete
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