Skip to content

petab1to2 writes an empty condition table if there are no condition-specific changes #552

Closed

Description

@dweindl

If the v1 condition table doesn't set anything (e.g. only a conditionId column, or all values NaN), petab1to2 / petab_files_1to2 still writes a v2 conditions.tsv that contains only the header (conditionId targetId targetValue) and lists it in condition_files in the generated problem.yaml.

Since condition_files is optional in PEtab v2, the file and the YAML entry should be omitted in this case.

v1v2_condition_df already returns an empty data frame for this case (petab/v2/petab1to2.py). petab_files_1to2 writes it regardless and keeps condition_files from the converted YAML. Skipping the write and removing the file from new_yaml_config.condition_files when the converted table is empty should be sufficient. Since #547, ProblemConfig.to_yaml then also drops the empty condition_files entry.

🤖 Drafted with AI assistance (Claude Code)

Activity

  1. self-assigned this
    on Oct 15, 2026
  2. added 2 commits that reference this issue on Oct 15, 2026
    3c80c2e
    731cc42
  3. added a commit that references this issue on Oct 15, 2026
    22c4136
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions