Skip to content

get_sim() returns incomplete Plant entries when usms_file is provided #257

@sbuis

Description

@sbuis

Description

When using get_sim() with a usms_file argument, the returned simulation object does not contain the expected crop information in the Plant component.

Reproducible example

workspace_v10.zip

sim <- SticsRFiles::get_sim(
  workspace = workspace,
  usms_file = file.path(workspace, "usms.xml"),
  usm = "ICS_Bergamo-Aviron_IC_2021-2022"
)

sim$`ICS_Bergamo-Aviron_IC_2021-2022`$Plant

Observed behavior

sim$ICS_Bergamo-Aviron_IC_2021-2022$Plant contains only "ble".

Expected behavior

The Plant element should reflect the actual crop simulated in the USM and therefore contain "ble" or "poi" depending on the crop.

Additional information

  • The issue appears only when usms_file is explicitly provided.
  • The workspace contains multiple USMs (it's working when there is only one USM ...)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions