Skip to content

Conversation

@louispt1
Copy link
Contributor

@louispt1 louispt1 commented Nov 5, 2025

Description

This change adds step-value validation to the scenario updater. These changes were separated from the scenario updater PR because they may require more discussion.

Users' workflows could certainly be affected. For example now if I try:

curl -X PUT http://localhost:3000/api/v3/scenarios/2729350 \
    -H "Content-Type: application/json" \
    -d '{
      "scenario": {
        "user_values": {
          "climate_relevant_co2_biomass_liquid_present": "50.05"
        }
      }
    }'

I will get a response:

{
  "errors": [
    "Input climate_relevant_co2_biomass_liquid_present value 50.05 must align with step size 0.1. Nearest valid values: 50.0 or 50.1"
  ]
}
  • We ought to update the documentation for the API regarding step values, after we decide exactly how to manage them

closes #1606

@louispt1 louispt1 linked an issue Nov 5, 2025 that may be closed by this pull request
Base automatically changed from scenario-updater to master November 7, 2025 15:23
@louispt1 louispt1 force-pushed the step-value-validation branch from 1be1503 to ba493d2 Compare November 10, 2025 14:02
@mabijkerk
Copy link
Member

@noracato you marked me as a reviewer, I'm not to sure how to review this? Do you want me to test this new functionality?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Validation on step values when setting inputs via the API

3 participants