Skip to content

Improve ParaFrame Debugging #3

@rndsrc

Description

@rndsrc

When the data set is large and the data structure is complicated, it becomes non-trivial to write the correct python format-string for hallmark.ParaFrame to parse parameter dataframe. In some cases, a single typo can cause python to create very long list of error messages that are difficult to debug.

The only debugging tool we have now is the debug keyword in hallmark.ParaFrame. By setting it to True, i.e.,

pf = ParaFrame("data/a_{a:d}/b_{b:d}.txt", debug=True)

ParaFrame would print out its parsing logic and the number of matches. See In [11] in hallmark/demos/ParaFrame.ipynb as an example.

However, this feature is very limited. I hope to have at least the following improvements:

  1. Better description of what is printed and how can they be used to construct correct format-strings.
  2. Number of files that are not matched by the format-string in a directory, and/or an option to print out these files.
  3. An command line tool that help doing format-string debugging interactively.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions