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

feat: parsing rules #185

Merged
merged 2 commits into from
Nov 29, 2024
Merged

feat: parsing rules #185

merged 2 commits into from
Nov 29, 2024

Conversation

tpluscode
Copy link
Collaborator

No description provided.

Copy link

changeset-bot bot commented Nov 29, 2024

🦋 Changeset detected

Latest commit: 8ef3c69

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
@rdfjs-elements/formats-pretty Patch
@rdfjs-elements/rdf-editor Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link

codecov bot commented Nov 29, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.72%. Comparing base (99b5e2d) to head (8ef3c69).
Report is 4 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #185      +/-   ##
==========================================
+ Coverage   96.69%   96.72%   +0.02%     
==========================================
  Files          22       23       +1     
  Lines        1573     1587      +14     
==========================================
+ Hits         1521     1535      +14     
  Misses         52       52              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Comment on lines 101 to 108
.pipe(
new Transform({
objectMode: true,
transform({ subject, predicate, object, graph }, _, callback) {
callback(null, $rdf.quad(subject, predicate, object, graph))
},
})
)
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Annoyingly, it turns out that the Quads produced by n3 are not working well with rdf-canonize. Feels like this will bite us at some point. Maybe the terms should be repackaged using @rdfjs/data-model in the n3 parser stream?

@tpluscode
Copy link
Collaborator Author

@giacomociti you should not have removed your comment. It forced me to investigate and I found that we do not need that transform!

n3 quad defines properties as getters

rdf-canonize had a bug in how it created shallow copy of quads. Newer version does not have this problem any more :)

@tpluscode tpluscode merged commit 96d9ece into master Nov 29, 2024
8 checks passed
@tpluscode tpluscode deleted the n3-rules branch November 29, 2024 11:59
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