Skip to content

Config file parsing breaks for scientific notation #484

@agitter

Description

@agitter

egfr.yaml contains

  - name: omicsintegrator1
    include: true
    runs:
      run1:
        b:
          - 0.55
          - 2
          - 10
        d: 10
        g: 1e-3
        r: 0.01
        w: 0.1
        mu: 0.008
        dummy_mode: ["file"]

The 1e-3 no longer works and gives the error

ValidationError in file "spras\Snakefile", line 22:
1 validation error for RawConfig
algorithms.1.omicsintegrator1.runs.run1.g
  Value error, This argument "1e-3" was interpreted as a non-function-calling string: it should be a function call (e.g. range(100, 201, 50)), or an int or a float. [type=value_error, input_value='1e-3', input_type=str]
    For further information visit https://errors.pydantic.dev/2.11/v/value_error
  File "spras\Snakefile", line 22, in <module>
  File "spras\spras\config\config.py", line 36, in init_global
  File "spras\spras\config\config.py", line 50, in __init__
  File "miniforge3\envs\spras\Lib\site-packages\pydantic\main.py", line 705, in model_validate

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions