Skip to content

Improve template_structure.json path handling in convert_beaver_to_reforce.py #6

Description

@Samar-Khalid

Description

The template_structure.json path is hardcoded as a relative path in convert_beaver_to_reforce.py:262:

templates_path = '../../data/template_structure.json'
with open(templates_path, 'r') as f:

This path is relative to the working directory at runtime, which means the function fails when called from a different directory than expected.

Suggestion

  • Make the templates path an optional parameter in convert_beaver_to_reforce() with a sensible default.
  • Or derive the path relative to the script location using __file__.

Affected File

eval/reforce/convert_beaver_to_reforce.py (line 260-262)

Metadata

Metadata

Assignees

No one assigned

    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