-
Notifications
You must be signed in to change notification settings - Fork 577
notation3.py: don't normalize float representation #3020
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
Conversation
also add test case for no metadata to ensure we handle that correctly, which includes being able to retrieve a graph by ser ident directly, still need gclc e.g. to test sync which has no ser ident had to merge dangling and conn cases together when appending to sord so that they match the order in the source file ingest test_nasty needs RDFLib/rdflib#3020 in order to succeed due to current rdflib normalizing float string representation before it gets passed to Literal where normalization control usually resides
@tgbugs can you please just put in a test to show it working as opposed to failing previously? |
6dc9a4e
to
3cbfcf2
Compare
made as a separate commit to illustrate the old broken behavior priro to the fix in the next commit
fix behavior of the n3 parser family to avoid normalizing raw float string representation which makes it impossible to roundtrip the exact original string representation of e.g. 1e10
3cbfcf2
to
66f626c
Compare
@nicholascar I added a test to illustrate the issue. If there is going to be another 7.x release it should probably be backported as well. |
pre-commit.ci autofix |
Thanks for this @tgbugs. I've refactored your test to use pytest parametrization for better maintainability and clarity on what the test is doing. I'll merge this soon after I cherry-pick the relevant commits to a new PR for 7.x. |
fix behavior of the n3 parser family to avoid normalizing raw float string representation which makes it impossible to roundtrip the exact original string representation of e.g.
1e10