Merged
Conversation
afd5a5b to
f0188db
Compare
for more information, see https://pre-commit.ci
alexdewar
approved these changes
Mar 14, 2025
Collaborator
alexdewar
left a comment
There was a problem hiding this comment.
I've made one small suggestion. Other than that, how about a docstring at the top of the file just saying what the file is for and why it is the way it is? Doesn't have to be a long one.
| ######### INPUT ######### | ||
|
|
||
| ### A directory containing the path to the XML files to be processed, is a list of str | ||
| all_files = glob.glob("./xml_hackathon/*.xml") |
Collaborator
There was a problem hiding this comment.
I know the plan was to commit this script verbatim for now, but I'm wondering if we could make this script a lot more useful by just allowing the user to pass in paths to one or more XML files as arguments, so people can do:
python -m autocorpus.parse_xml my_file.xml
Collaborator
Author
There was a problem hiding this comment.
I've done this now. Can you merge this if you're happy with it?
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.
Description
This PR adds the XML parsing script as-is into the repo. The only changes made to it have been to keep pre-commit happy and to wrap the script in an
if __name__ == "__main__":block.Fixes #124
Type of change
Key checklist
pytest)mkdocs)pre-commit run --all-files)Further checks