Conversation
… Also created the encodings.yaml
…ling error. changed e2e debug test to xfail, will update after formatting issue resolved.
…llow custom aspin types
…aframe_e2e.py compatible with the inclusion of the yaml file
…n and removed xfail. added helper function test for load_encodings_yaml().
…into formatting_issue_prototype
…gex to include .h5 for first fmt. added new pytest fixture for spin data with "m"
…rrent filename. Removed _tmp_test from test_paraframe.py file
…and a shorter version in the yaml file. Began working on setting up hallmark to accomodate the temporary paths in the testing.
…aml file, to ensure that duplicate fmts with duplicate sections are not made.
…orary paths for each test function.
…d. Modified the core file to take into account no encodings specified. Updated the tests by adding encoding = True where .parse is called.
…e same location as the data being paraframed. changed yaml name to .hallmark from CK's recommendation.
…the temporary data directory for each testing function. The temporary yaml file now only requires the most fundamental fmt strings as are currently displayed in the .hallmark.yaml file instead of the entire temporary path. All tests pass.
hfoote
requested changes
Mar 2, 2026
Member
hfoote
left a comment
There was a problem hiding this comment.
Let's fix the few things I mentioned in the comments, then get this merged. After we merge this with next, we should be able to use the Repo's functionality to handle the path to the yaml file (look for a .hallmark.yaml file in the data directory by default).
…cal repo_path attribute of paraframe
…n the readme file describing the use of .yaml files for hallmark.
hfoote
approved these changes
Mar 16, 2026
Member
hfoote
left a comment
There was a problem hiding this comment.
Nice work cleaning up the paths, I think we can finalize the path handling when we combine this with the next branch.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
We separated the file acquisition from the original parse function, so the code becomes modular. We added the new YAML file configuration that helps to organize the format strings that the user needs to modify into a document. We added an ‘encoding’ key in the YAML file that allows the user to specify the desired format substitution. We added code to carry out these substitutions in the core file so that the ParaFrame object displays the modifications.
Details
We separated the parse function into glob search, which searches files in the specified directory and returns the pattern used for parsing, and parse, which parses through the files and places it in the ParaFrame object. We add the YAML file, which allows the user to specify the directory to work on, and the directory path that the user wants to modify. In this file, the user can also specify the method to apply the modification, generally through a regex substitution. However, the user also has the option to pass the format string directly into the function if they don’t require a modification of the path. In the core.py file, we added code that carries out the desired regex substitution in the ‘parse’ function so that the ParaFrame object contains the modified characters. We added functions specifically designed to interact with the YAML file and perform the regex substitution, located in the helperfunctions.py file.
Testing
We added several tests to make temporary directories that have special cases in the format string that requires regex substitution. These cases include ‘+’, ‘m’ in the directory path. We also create a temporary yaml file in the temporary directory and manually write it with the path to testing functions so that the testing process is carried out systematically for each test.
Follow-on
Future modifications include adding example use cases for the 'encodings' regex substitution in the demo notebook. The next iteration of hallmark will develop the Command Line Interface to allow users further flexibility and access to this package. We will also further explore the use of one vs multiple YAML files for different user stories.