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

Add namespaces to PREMIS plugin to prevent ValueError: Invalid tag name on serialization #96

Merged
merged 1 commit into from
Nov 16, 2022

Conversation

tw4l
Copy link
Contributor

@tw4l tw4l commented Sep 6, 2022

Connected to #94

This PR adds characterization tool namespaces to the PREMIS plugin's namespaces dictionaries to prevent serialization errors when serializing PREMISObjects that contain characterization tool output to XML.

This will enable adding raw PREMIS Object XML to the AIPscan database for files with characterization tool output.

Note that linting is currently failing because of the version of Black we are using. See: https://stackoverflow.com/questions/71673404/importerror-cannot-import-name-unicodefun-from-click. Upgrading Black to 22.3.0 also causes linting failures, as the newer version of Black wants us to drop explicit unicode strings (e.g. u"something"). I think that might be better handled in a separate PR.

@tw4l tw4l force-pushed the dev/handle-characterization-tool-namespaces branch from 90d73ff to a3c1a9d Compare September 7, 2022 18:40
@tw4l tw4l changed the title WIP: Add fallback for namespaces not in map WIP: Add namespaces to PREMIS plugin to prevent ValueError: Invalid tag name on serialization Sep 7, 2022
@tw4l tw4l force-pushed the dev/handle-characterization-tool-namespaces branch from a3c1a9d to f79fbf9 Compare September 7, 2022 18:42
@tw4l tw4l force-pushed the dev/handle-characterization-tool-namespaces branch from 6d0223a to 2bb376e Compare September 7, 2022 18:57
@tw4l tw4l changed the title WIP: Add namespaces to PREMIS plugin to prevent ValueError: Invalid tag name on serialization Add namespaces to PREMIS plugin to prevent ValueError: Invalid tag name on serialization Sep 7, 2022
@tw4l tw4l marked this pull request as ready for review September 7, 2022 19:13
@tw4l tw4l requested a review from a team September 7, 2022 21:45
@sevein sevein merged commit 9039834 into master Nov 16, 2022
@sevein sevein deleted the dev/handle-characterization-tool-namespaces branch November 16, 2022 16:46
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.

2 participants