GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Tests and setup for 1.1 development by fsteeg · Pull Request #283 · jsonld-java/jsonld-java

Conversation

@fsteeg

@fsteeg fsteeg commented Apr 28, 2020

Copy link
Copy Markdown
Member

As announced in #277 (comment), this PR contains only the changes in the test setup for 1.1:

  • Run all original 1.0/master tests in test/resources/json-ld-1.0-tests
  • Additionally run the lson-ld-api tests in test/resources/json-ld-api-tests
  • Additionally run the lson-ld-framing tests in test/resources/json-ld-framing-tests

See README for updating, running, and report generation:

https://github.com/jsonld-java/jsonld-java/blob/1.1-tests/README.md#update-local-spec-tests

This is the report summary for 1.1 compliance w/o any 1.1 specific code (see 2318376):

tests pass
Compaction 86/238 (36.1%)
Expansion 84/366 (23.0%)
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 152/442 (34.4%)
Transform RDF to JSON-LD 30/51 (58.8%)

I will open a second pull request with our current 1.1 implementation changes from #277.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
RinkeHoekstra and others added 21 commits June 27, 2019 10:02
@RinkeHoekstra
This fixes issue #262:
24a56c3
* 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.
@ansell @fsteeg
Test with openjdk8 and openjdk11
c0e0b85
@fsteeg
Support jld:PositiveSyntaxTest
8b7fedc
@fsteeg
Set up option to run the 1.0 test suite
16f8916
@fsteeg
Improve test outputs
7783fc7
@fsteeg
Set up option to run the json-ld-framing test suite
aaaf6d2
@fsteeg
Set up tests for multiple test suites and 1.1 development
7043ae1
- 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)
@fsteeg
Add setup for skipping tests
40e3e8e
- 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
Update json-ld-api and json-ld-framing tests, document in README
5b82307
@fsteeg
Fix test setup to use correct base for 1.0 and 1.1 tests
620053a
@fsteeg
Tweak test IDs for creating reports
c4793a7
Run tests with `-Dreport.format=jsonld`, convert to ttl, then:
https://github.com/w3c/json-ld-api/blob/master/reports/README.md
@fsteeg
Update spec tests and report setup
2318376
For integration in https://w3c.github.io/json-ld-api/reports/
convert api and framing jsonld reports to single ttl file and then:
https://github.com/w3c/json-ld-api/blob/master/reports/README.md
@fsteeg
Rerun tests without functional 1.1 commits from #277
cfc5d5e
@fsteeg
Merge remote-tracking branch 'origin/master' into 1.1-tests
53470d6
@fsteeg
Handle @version context entries
3a63d91
@fsteeg
Include new keywords when skipping createTermDefinition
5623b28
@fsteeg
Support @container array syntax
d953a4f
@fsteeg
Support JSON literals
e316b1c
@fsteeg
Some 1.1 tweaks
036d7db
@dr0i @fsteeg
Minor additions
a22f97e
- 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
@gkellogg @fsteeg
Some inline comments on areas that can use improvement for 1.1
b6ba9e8
Focusing on expansion and context/term processing
@fsteeg
fsteeg requested a review from dr0i April 28, 2020 08:50
@fsteeg fsteeg assigned dr0i Apr 28, 2020
@coveralls

coveralls commented Apr 28, 2020 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Coverage Status

Coverage increased (+1.1%) to 90.397% when pulling a1d62e1 on 1.1-tests into e94efdf on develop.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

This was referenced Apr 28, 2020
Current state of 1.1 development #284
Merged
This should fix issue #262 #265
Closed
Tests and setup for 1.1 development #277
Closed
dr0i
dr0i reviewed Apr 28, 2020
View reviewed changes
Comment thread core/src/test/java/com/github/jsonldjava/specs/JsonLdApiTests.java
@@ -0,0 +1,66 @@
package com.github.jsonldjava.specs;

@dr0i dr0i Apr 28, 2020 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

This class is almost identical to the JsonLd1Tests. Can the code be reused ?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@fsteeg fsteeg Jul 3, 2020

Copy link
Copy Markdown
Member Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

I took a look at this, but I think avoiding the redundancy here would lead to too much complexity. First, the actual code is already extracted in static methods of SuiteUtils. The redundant part is only the JUnit Parameters/BeforeClass/AfterClass setup. These are static methods, so simply extracting them to a superclass won't work. An option would be a custom JUnit Rule (see https://www.baeldung.com/junit-4-rules#defining-a-custom-junit-rule), but I'm not sure if/how that would work with Parameterized, and I think it might actually make the code less readable.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
dr0i
dr0i reviewed Apr 28, 2020
View reviewed changes
Comment thread core/src/test/java/com/github/jsonldjava/specs/JsonLdFramingTests.java
@@ -0,0 +1,66 @@
package com.github.jsonldjava.specs;

@dr0i dr0i Apr 28, 2020

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Same here.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
dr0i
dr0i reviewed Apr 28, 2020
View reviewed changes
Comment thread core/src/test/resources/json-ld-api-tests/README.md
@@ -0,0 +1,106 @@
# Introduction

@dr0i dr0i Apr 28, 2020

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

I see, this is a copy of https://github.com/w3c/json-ld-api/blob/master/tests/README.md.
Will add a remark in a commit - I think it is helpful to know the source?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@fsteeg fsteeg Jul 3, 2020

Copy link
Copy Markdown
Member Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

It is indeed helpful to know the source. However, the workflow for updating the tests (as documented in the README, 'Update local spec tests') involves copying json-ld-api/tests/* to json-ld-api-tests/, which replaces the README. Maybe we could add a separate README to src/test/resources, describing the origins of the spec tests?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@dr0i
Add source of README into the README
6faa828
@dr0i dr0i assigned fsteeg and unassigned dr0i Apr 28, 2020
@ansell

ansell commented May 3, 2020

Copy link
Copy Markdown
Member

Rather than pulling in partially implemented code to master, I will retarget this at a new develop branch, which can contain all of the 1.1 development without worrying about whether it is currently passing all tests. That way we can still use master for releases of bug fixes if necessary while the 1.1 development occurs.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@ansell
ansell changed the base branch from master to develop May 3, 2020 02:53
elahrvivaz and others added 20 commits July 8, 2020 11:12
@elahrvivaz
Fix jarcache guava loading
d310e59
* Don't minimize guava shading, causes NoClassDefFoundError
@ansell
Merge pull request #291 from elahrvivaz/guava_maximize
c867a0a
Fix jarcache guava loading
@ansell
Merge pull request #284 from jsonld-java/1.1
3c8039f
Current state of 1.1 development
@dr0i
Follow alternate document location
2e1135d
Implements https://www.w3.org/TR/json-ld11/#alternate-document-location.

Resolves #289.
@dr0i
Remove unused imports
a2e6f8a
Complements the last commit.
@dr0i
Remove ignored test
2ef090b
The ignored test would test an expected behaviour of java.net.URL.HttpURLConnection,
i.e. not to automatically follow redirects when this involves a protocol switching
(e.g. from HTTP to HTTPS).

See #289.
@dr0i
Reorganize imports
a2f3c9f
- remove unused imports
- sorted alphabetically
@dr0i
Try-with on response in the submethod
776e77d
As proposed in #292 (comment)
@fsteeg @dr0i
Avoid reading from closed stream
818b118
@dr0i
Abort if to many alternate links are followed.
1d675d7
This avoids a possible endless loop.

See #292 (comment).
@dr0i
Fix missing trim(); simplify value parsing
1229f73
See #292 (comment) and
#292 (comment).
@dr0i
Fix testing if object not null
faddb48
It should be checked if an Entity has a contentType, not if an Entity has
content.

See #292 (comment) and
#292 (comment).
@dr0i
Throw IOException instead of returning null
9100b13
- remove superfluous check (was always false)
- remove superfluous IOException
- remove logger as it is no more needed

See #292 (comment).
@dr0i
Close InputStream within finally block
d5e2761
See #292 (comment).
@ansell
Merge branch '289-followLinkHeaderToContextFile' into master
9b05185
Signed-off-by: Peter Ansell <[email protected]>
@ansell
Bump dependencies
1356922
Signed-off-by: Peter Ansell <[email protected]>
@ansell
Release 0.13.1
71006f5
Signed-off-by: Peter Ansell <[email protected]>
@ansell
Bump to next development version
9d000fe
Signed-off-by: Peter Ansell <[email protected]>
@fsteeg
Merge remote-tracking branch 'origin/master' into 1.1-tests
44137ec
@fsteeg
Merge branch 'develop' into 1.1-tests
a1d62e1
@fsteeg

fsteeg commented Sep 10, 2020

Copy link
Copy Markdown
Member Author

I've updated this with the current master, making the tests pass. There is some confusion here however, as this now contains what is described in #284 (current state of 1.1 implementation) plus what is described here (just the test setup). I shouldn't have opened #284 with a base branch that I didn't intend to be merged into, sorry. But this might be obsolete anyways (see #284 (comment)).

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@ansell ansell mentioned this pull request Oct 13, 2020
Maintainers #299
Closed
@fsteeg fsteeg mentioned this pull request Feb 2, 2021
@reverse with framing does not work #286
Closed
@dr0i dr0i mentioned this pull request Mar 1, 2021
Added support for JSON-LD 1.1 @json @type #307
Closed
@dr0i
dr0i merged commit 6030f25 into develop Mar 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@dr0i dr0i dr0i left review comments

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@fsteeg fsteeg

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

7 participants

@fsteeg @coveralls @ansell @dr0i @RinkeHoekstra @gkellogg @elahrvivaz
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.