-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use jsonld.js to compact generated documents
Closes GH-25
- Loading branch information
Showing
14 changed files
with
336 additions
and
98 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
.idea | ||
cypress/screenshots | ||
node_modules | ||
package-lock.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -88,14 +88,13 @@ To run them, first install Cypress: | |
|
||
``` | ||
sudo apt install npm # or the equivalent on your system | ||
npm install cypress | ||
$(npm bin)/cypress install | ||
npx [email protected] install | ||
``` | ||
|
||
Then, run the tests: | ||
|
||
``` | ||
$(npm bin)/cypress run | ||
npx cypress@9.7.0 run | ||
``` | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,7 +20,7 @@ describe('Zero author', function() { | |
cy.get('#codemetaText').then((elem) => JSON.parse(elem.text())) | ||
.should('deep.equal', { | ||
"@context": "https://doi.org/10.5063/schema/codemeta-2.0", | ||
"@type": "SoftwareSourceCode", | ||
"type": "SoftwareSourceCode", | ||
"name": "My Test Software", | ||
}); | ||
}); | ||
|
@@ -90,18 +90,18 @@ describe('One full author', function() { | |
cy.get('#codemetaText').then((elem) => JSON.parse(elem.text())) | ||
.should('deep.equal', { | ||
"@context": "https://doi.org/10.5063/schema/codemeta-2.0", | ||
"@type": "SoftwareSourceCode", | ||
"type": "SoftwareSourceCode", | ||
"name": "My Test Software", | ||
"author": [ | ||
{ | ||
"@type": "Person", | ||
"@id": "http://example.org/~jdoe", | ||
"type": "Person", | ||
"id": "http://example.org/~jdoe", | ||
"givenName": "Jane", | ||
"familyName": "Doe", | ||
"email": "[email protected]", | ||
"affiliation": { | ||
"@type": "Organization", | ||
"@id": "http://example.org/", | ||
"type": "Organization", | ||
"id": "http://example.org/", | ||
} | ||
} | ||
], | ||
|
@@ -157,15 +157,15 @@ describe('Affiliation id', function() { | |
cy.get('#codemetaText').then((elem) => JSON.parse(elem.text())) | ||
.should('deep.equal', { | ||
"@context": "https://doi.org/10.5063/schema/codemeta-2.0", | ||
"@type": "SoftwareSourceCode", | ||
"type": "SoftwareSourceCode", | ||
"name": "My Test Software", | ||
"author": [ | ||
{ | ||
"@type": "Person", | ||
"type": "Person", | ||
"givenName": "Jane", | ||
"affiliation": { | ||
"@type": "Organization", | ||
"@id": "http://example.org/", | ||
"type": "Organization", | ||
"id": "http://example.org/", | ||
} | ||
} | ||
], | ||
|
@@ -217,14 +217,14 @@ describe('Affiliation name', function() { | |
cy.get('#codemetaText').then((elem) => JSON.parse(elem.text())) | ||
.should('deep.equal', { | ||
"@context": "https://doi.org/10.5063/schema/codemeta-2.0", | ||
"@type": "SoftwareSourceCode", | ||
"type": "SoftwareSourceCode", | ||
"name": "My Test Software", | ||
"author": [ | ||
{ | ||
"@type": "Person", | ||
"type": "Person", | ||
"givenName": "Jane", | ||
"affiliation": { | ||
"@type": "Organization", | ||
"type": "Organization", | ||
"name": "Example Org", | ||
} | ||
} | ||
|
@@ -271,12 +271,12 @@ describe('Author order change', function() { | |
cy.get('#author_1_givenName').type('Jane'); | ||
cy.get('#author_1_affiliation').type('Example Org'); | ||
|
||
cy.get('#author_1_moveToRight').click() | ||
cy.get('#author_1_moveToRight').click(); | ||
|
||
cy.get('#author_1_givenName').should('have.value', 'Jane'); | ||
cy.get('#author_1_affiliation').should('have.value', 'Example Org'); | ||
|
||
cy.get('#author_1_moveToLeft').click() | ||
cy.get('#author_1_moveToLeft').click(); | ||
|
||
cy.get('#author_1_givenName').should('have.value', 'Jane'); | ||
cy.get('#author_1_affiliation').should('have.value', 'Example Org'); | ||
|
@@ -294,7 +294,7 @@ describe('Author order change', function() { | |
cy.get('#author_2_familyName').type('Doe'); | ||
cy.get('#author_3_givenName').type('Alex'); | ||
|
||
cy.get('#author_1_moveToRight').click() | ||
cy.get('#author_1_moveToRight').click(); | ||
|
||
cy.get('#author_1_givenName').should('have.value', 'John'); | ||
cy.get('#author_1_familyName').should('have.value', 'Doe'); | ||
|
@@ -324,19 +324,19 @@ describe('Author order change', function() { | |
cy.get('#codemetaText').then((elem) => JSON.parse(elem.text())) | ||
.should('deep.equal', { | ||
"@context": "https://doi.org/10.5063/schema/codemeta-2.0", | ||
"@type": "SoftwareSourceCode", | ||
"type": "SoftwareSourceCode", | ||
"name": "My Test Software", | ||
"author": [ | ||
{ | ||
"@type": "Person", | ||
"type": "Person", | ||
"givenName": "Jane", | ||
"affiliation": { | ||
"@type": "Organization", | ||
"type": "Organization", | ||
"name": "Example Org", | ||
} | ||
}, | ||
{ | ||
"@type": "Person", | ||
"type": "Person", | ||
"givenName": "John", | ||
"familyName": "Doe", | ||
}, | ||
|
@@ -348,19 +348,19 @@ describe('Author order change', function() { | |
cy.get('#codemetaText').then((elem) => JSON.parse(elem.text())) | ||
.should('deep.equal', { | ||
"@context": "https://doi.org/10.5063/schema/codemeta-2.0", | ||
"@type": "SoftwareSourceCode", | ||
"type": "SoftwareSourceCode", | ||
"name": "My Test Software", | ||
"author": [ | ||
{ | ||
"@type": "Person", | ||
"type": "Person", | ||
"givenName": "John", | ||
"familyName": "Doe", | ||
}, | ||
{ | ||
"@type": "Person", | ||
"type": "Person", | ||
"givenName": "Jane", | ||
"affiliation": { | ||
"@type": "Organization", | ||
"type": "Organization", | ||
"name": "Example Org", | ||
} | ||
}, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
{ | ||
"@context": { | ||
"type": "@type", | ||
"id": "@id", | ||
"schema":"http://schema.org/", | ||
"codemeta": "https://codemeta.github.io/terms/", | ||
"Organization": {"@id": "schema:Organization"}, | ||
"Person": {"@id": "schema:Person"}, | ||
"SoftwareSourceCode": {"@id": "schema:SoftwareSourceCode"}, | ||
"SoftwareApplication": {"@id": "schema:SoftwareApplication"}, | ||
"Text": {"@id": "schema:Text"}, | ||
"URL": {"@id": "schema:URL"}, | ||
"address": { "@id": "schema:address"}, | ||
"affiliation": { "@id": "schema:affiliation"}, | ||
"applicationCategory": { "@id": "schema:applicationCategory", "@type": "@id"}, | ||
"applicationSubCategory": { "@id": "schema:applicationSubCategory", "@type": "@id"}, | ||
"citation": { "@id": "schema:citation"}, | ||
"codeRepository": { "@id": "schema:codeRepository", "@type": "@id"}, | ||
"contributor": { "@id": "schema:contributor"}, | ||
"copyrightHolder": { "@id": "schema:copyrightHolder"}, | ||
"copyrightYear": { "@id": "schema:copyrightYear"}, | ||
"creator": { "@id": "schema:creator"}, | ||
"dateCreated": {"@id": "schema:dateCreated", "@type": "schema:Date" }, | ||
"dateModified": {"@id": "schema:dateModified", "@type": "schema:Date" }, | ||
"datePublished": {"@id": "schema:datePublished", "@type": "schema:Date" }, | ||
"description": { "@id": "schema:description"}, | ||
"downloadUrl": { "@id": "schema:downloadUrl", "@type": "@id"}, | ||
"email": { "@id": "schema:email"}, | ||
"editor": { "@id": "schema:editor"}, | ||
"encoding": { "@id": "schema:encoding"}, | ||
"familyName": { "@id": "schema:familyName"}, | ||
"fileFormat": { "@id": "schema:fileFormat", "@type": "@id"}, | ||
"fileSize": { "@id": "schema:fileSize"}, | ||
"funder": { "@id": "schema:funder"}, | ||
"givenName": { "@id": "schema:givenName"}, | ||
"hasPart": { "@id": "schema:hasPart" }, | ||
"identifier": { "@id": "schema:identifier", "@type": "@id"}, | ||
"installUrl": { "@id": "schema:installUrl", "@type": "@id"}, | ||
"isAccessibleForFree": { "@id": "schema:isAccessibleForFree"}, | ||
"isPartOf": { "@id": "schema:isPartOf"}, | ||
"keywords": { "@id": "schema:keywords"}, | ||
"license": { "@id": "schema:license", "@type": "@id"}, | ||
"memoryRequirements": { "@id": "schema:memoryRequirements", "@type": "@id"}, | ||
"name": { "@id": "schema:name"}, | ||
"operatingSystem": { "@id": "schema:operatingSystem"}, | ||
"permissions": { "@id": "schema:permissions"}, | ||
"position": { "@id": "schema:position"}, | ||
"processorRequirements": { "@id": "schema:processorRequirements"}, | ||
"producer": { "@id": "schema:producer"}, | ||
"programmingLanguage": { "@id": "schema:programmingLanguage"}, | ||
"provider": { "@id": "schema:provider"}, | ||
"publisher": { "@id": "schema:publisher"}, | ||
"relatedLink": { "@id": "schema:relatedLink", "@type": "@id"}, | ||
"releaseNotes": { "@id": "schema:releaseNotes", "@type": "@id"}, | ||
"runtimePlatform": { "@id": "schema:runtimePlatform"}, | ||
"sameAs": { "@id": "schema:sameAs", "@type": "@id"}, | ||
"softwareHelp": { "@id": "schema:softwareHelp"}, | ||
"softwareRequirements": { "@id": "schema:softwareRequirements", "@type": "@id"}, | ||
"softwareVersion": { "@id": "schema:softwareVersion"}, | ||
"sponsor": { "@id": "schema:sponsor"}, | ||
"storageRequirements": { "@id": "schema:storageRequirements", "@type": "@id"}, | ||
"supportingData": { "@id": "schema:supportingData"}, | ||
"targetProduct": { "@id": "schema:targetProduct"}, | ||
"url": { "@id": "schema:url", "@type": "@id"}, | ||
"version": { "@id": "schema:version"}, | ||
|
||
"author": { "@id": "schema:author", "@container": "@list" }, | ||
|
||
"softwareSuggestions": { "@id": "codemeta:softwareSuggestions", "@type": "@id"}, | ||
"contIntegration": { "@id": "codemeta:contIntegration", "@type": "@id"}, | ||
"buildInstructions": { "@id": "codemeta:buildInstructions", "@type": "@id"}, | ||
"developmentStatus": { "@id": "codemeta:developmentStatus", "@type": "@id"}, | ||
"embargoDate": { "@id":"codemeta:embargoDate", "@type": "schema:Date" }, | ||
"funding": { "@id": "codemeta:funding" }, | ||
"readme": { "@id":"codemeta:readme", "@type": "@id" }, | ||
"issueTracker": { "@id":"codemeta:issueTracker", "@type": "@id" }, | ||
"referencePublication": { "@id": "codemeta:referencePublication", "@type": "@id"}, | ||
"maintainer": { "@id": "codemeta:maintainer" } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
Matthew B. Jones, Carl Boettiger, Abby Cabunoc Mayes, Arfon Smith, Peter Slaughter, Kyle Niemeyer, Yolanda Gil, Martin Fenner, Krzysztof Nowak, Mark Hahnel, Luke Coy, Alice Allen, Mercè Crosas, Ashley Sands, Neil Chue Hong, Patricia Cruse, Daniel S. Katz, Carole Goble. 2017. CodeMeta: an exchange schema for software metadata. Version 2.0. KNB Data Repository. doi:10.5063/schema/codemeta-2.0 | ||
https://archive.softwareheritage.org/swh:1:cnt:ecba88bee7bac07a81a6f45414f4f57ce5eb2d29;origin=https://github.com/codemeta/codemeta;visit=swh:1:snp:a35573dd8a59795b7d81055234352efd8b08a603;anchor=swh:1:rev:dbc58ffa8b088ae1b09ad335852d9767c402983d;path=/codemeta.jsonld |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.