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

Update complexity controls. #79

Merged
merged 15 commits into from
Sep 19, 2023
Merged

Conversation

davidlehn
Copy link
Member

  • Add maxWorkFactor parameter.
  • Update tests and docs.
  • Other misc fixes.

**BREAKING**: Check output `format` parameter. Must be omitted, falsey,
or "application/n-quads".
- Remove advanced "useNative" example.
- Add common N-Quads input example.
- Add `maxWorkFactor` to calculate `maxDeepIterations` based on
  non-unique blank nodes. Default to `1`.
- If `maxDeepIterations` is >= 0 then use it explicitly.
- Remove default timeout signal.
- Add docs.
- Add tests.
- Update async and sync versions.
- Update tests to handle `computationalComplexity` test paramter and map
  it to `maxWorkFactor` adjustments.
- Improve negative test handling.
@codecov-commenter
Copy link

codecov-commenter commented Sep 15, 2023

Codecov Report

Merging #79 (f3ade06) into add-signal-support (a39634d) will increase coverage by 1.38%.
The diff coverage is 93.33%.

@@                  Coverage Diff                   @@
##           add-signal-support      #79      +/-   ##
======================================================
+ Coverage               93.59%   94.97%   +1.38%     
======================================================
  Files                      10       10              
  Lines                     609      637      +28     
======================================================
+ Hits                      570      605      +35     
+ Misses                     39       32       -7     
Files Changed Coverage Δ
lib/URDNA2015Sync.js 97.63% <81.25%> (-1.74%) ⬇️
lib/NQuads.js 98.19% <100.00%> (+4.90%) ⬆️
lib/URDNA2015.js 98.85% <100.00%> (+0.06%) ⬆️
lib/index.js 63.79% <100.00%> (+6.93%) ⬆️

... and 1 file with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a39634d...f3ade06. Read the comment docs.

Add support for generalized RDF `BlankNode` predicate during N-Quads
serialization.
Copy link
Member

@dlongley dlongley left a comment

Choose a reason for hiding this comment

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

LGTM modulo a couple of comments. Thanks!

CHANGELOG.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
lib/URDNA2015.js Outdated Show resolved Hide resolved
davidlehn and others added 5 commits September 19, 2023 14:03
Co-authored-by: Dave Longley <dlongley@digitalbazaar.com>
- Fix maxWorkFactor === 0 use case.
- Improve error if N-Quads input not a string.
- Fix calls without options.
- Test error messages to ensure correct errors are thrown.
- Remove default options not needed for testing.
- Add various tests for complexity controls, edge cases, and coverage.
- Add simple duplicate quads test.
- Rename `URDNA2015.js` to `RDFC10.js`.
- Rename 'URDNA2015` class to `RDFC10`.
- Rename `URDNA2015Sync.js` to `RDFC10Sync.js`.
- Rename 'URDNA2015Sync` class to `RDFC10Sync`.
@davidlehn davidlehn merged commit 7882db1 into add-signal-support Sep 19, 2023
7 checks passed
@davidlehn davidlehn deleted the refactor-complexity-limit branch September 19, 2023 20:33
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

3 participants