Sitelet https://web.archive.org/web/20201119230447/https://github.com/jsonld-java/jsonld-java/pull/277
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

Tests and setup for 1.1 development #277

Closed
wants to merge 19 commits into from
Closed

Tests and setup for 1.1 development #277

wants to merge 19 commits into from

Conversation

@fsteeg
Copy link
Member

@fsteeg fsteeg commented Dec 10, 2019

I suggest this to resolve #262.

I've been looking some more into what I mentioned in #265 (comment) and I think this is a good way to avoid both regressions while working on 1.1 features, and a long running 1.1 branch:

  • The original contribution by @RinkeHoekstra in 24a56c3 (#265): switch to json-ld-api test suite
  • Add support for running the json-ld-framing test suite and the original 1.0 test suite (mvn test runs only the original 1.0 suite, mvn -Dtest=AllSuites test runs all 3 suites)
  • Add support for some 1.1 features (see commits for details, 0f439dc & 7aeae88 resolve #263)

I think that with this setup, we can keep releasing from master whenever the build passes, while making available the 1.1 support that we currently have.

RinkeHoekstra and others added 12 commits Jun 27, 2019
* Included new JSON-LD tests in json-ld.org directory (perhaps rename this to something more W3C specific, as these are the latest tests from W3C)
* Starting from `manifest.jsonld` rather than all jsonld files in the test directory; then iterating of the the list of manifest files specified there.
- Set up tests for json-ld-api, json-ld-framing, and json-ld-1.0
- Run only json-ld-1.0 suite in Maven build (by naming convention)
- Run all suites for development of 1.1 features (AllSuites.java)
@coveralls
Copy link

@coveralls coveralls commented Dec 10, 2019 •

Coverage Status

Coverage increased (+1.06%) to 90.343% when pulling 6f1eb6c on fsteeg:1.1 into bbae6c3 on jsonld-java:master.

- Skip only failing tests to make sure we run 1.1 code paths in CI
- Use resolvable URLs in skip files, they can act like TODO lists
- Delete `*-skip` files to re-generate them during next test run

Now `mvn test` runs all tests that are not listed in the files.
@fsteeg
Copy link
Member Author

@fsteeg fsteeg commented Dec 11, 2019

Added setup for skipping tests in 79fdafa (before this, coverage went down, now it's up).

  • Skip only failing tests to make sure we run 1.1 code paths in CI
  • Use resolvable URLs in skip files, they can act like TODO lists
  • Delete *-skip files to re-generate them during next test run

Now mvn test runs all tests that are not listed in the files.

@fsteeg fsteeg requested review from ansell and dr0i Dec 11, 2019
- be more verbose in some error messages
- add some more comments pointing to the specs
- add a blank node condition according to spec 16.4
@dr0i
dr0i approved these changes Dec 16, 2019
@dr0i
Copy link
Member

@dr0i dr0i commented Dec 16, 2019

I think this is could be a good starting point to implement json-ld 1.1 step-by-step. What do you think @ansell ?

@fsteeg
Copy link
Member Author

@fsteeg fsteeg commented Jan 31, 2020

To clarify what this does compared to the current test setup in master:

For all of these:

The propsed workflow towards 1.1 would be:

  • Merge this into master, keep releasing from master, because all current master tests still work
  • When implementing new 1.1 features, pick an entry from a skip file (e.g. https://w3c.github.io/json-ld-api/tests/compact-manifest.html#t0037 from 1.1-api), implement suport for that test case
  • Remove the reports/*-skip file, rerun tests to regenerate a (hopefully) smaller skip file, with less tests to skip, and commit changed skip file together with the implementation
@fsteeg fsteeg force-pushed the fsteeg:1.1 branch from 6096d8e to 6f1eb6c Apr 9, 2020
@fsteeg
Copy link
Member Author

@fsteeg fsteeg commented Apr 9, 2020

A quick status update: I've pushed some tweaks to the tests and report setup, updated the tests and looked into integrating with https://w3c.github.io/json-ld-api/reports/ (see 6f1eb6c). With current spec tests and implementation (master + 1.1) we currently get this test suite compliance summary:

tests pass
Compaction 99/238 (41.6%)
Expansion 124/366 (33.9%)
Flattening 45/55 (81.8%)
Framing 26/89 (29.2%)
HTML 3/49 (6.1%)
Remote document 3/18 (16.7%)
Transform JSON-LD to RDF 178/442 (40.3%)
Transform RDF to JSON-LD 39/51 (76.5%)

I discussed our next steps with @dr0i and we think we should split up this branch/PR into two branches: one for the changes in the test setup only (1.1-tests) and one, branched off from the first, with implementation changes only (1.1). That way, we hope we'll avoid a giant, un-reviewable PR while working towards 1.1 compliance.

@gkellogg
Copy link

@gkellogg gkellogg commented Apr 9, 2020

Any report would be a good start; you can always submit an update and we can regenerate the report.

Time permitting, I'll have a look at your code and offer some suggestions for improving conformance.

fsteeg added a commit that referenced this pull request Apr 27, 2020
@fsteeg
Copy link
Member Author

@fsteeg fsteeg commented Apr 28, 2020

Replaced by / moved to #283 & #284, closing.

@fsteeg fsteeg closed this Apr 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

6 participants
You can’t perform that action at this time.