Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: refactor validate xml in preparation for extension #814

Conversation

Nora-Olivia-Ammann
Copy link
Collaborator

No description provided.

@Nora-Olivia-Ammann Nora-Olivia-Ammann self-assigned this Feb 16, 2024
@Nora-Olivia-Ammann
Copy link
Collaborator Author

The diff looks quite horrible, but at this point I made one little change in logic. Now all the checks will be done before stopping.
I created a new file to store the validation. Split up the function so that the new function can be easily added.
Made the error message formatting more conform with our others (list separation etc.)
Split up the tests into smaller functions.
I chose not to turn them into pytests, so that we don't have even more changes here. I am planning on doing that in the next PR when I build in the new validation (checking that no mixed encodings exist).

Copy link
Collaborator

@BalduinLandolt BalduinLandolt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't compare the test code that's been moved around, but I trust this has not functionally changed. So looks good, thanks!

src/dsp_tools/utils/validate_data_xml.py Show resolved Hide resolved
src/dsp_tools/utils/xml_utils.py Show resolved Hide resolved
@Nora-Olivia-Ammann Nora-Olivia-Ammann merged commit 652aa9f into main Feb 16, 2024
10 checks passed
@Nora-Olivia-Ammann Nora-Olivia-Ammann deleted the wip/chore-refactor-validate-xml-in-preparation-for-extension branch February 16, 2024 11:13
@daschbot daschbot mentioned this pull request Feb 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants