owned this note changed 5 years ago
Published Linked with GitHub

CodeMeta export

tags: sprint sofwtare preservation HAL CCSD SWH

CodeMeta -> HAL mapping

See Google sheet

https://codemeta.github.io/user-guide/
An example :

{
  "@context": "https://doi.org/10.5063/schema/codemeta-2.0",
  "@type": "SoftwareSourceCode",
  "identifier": "CodeMeta",
  "description": "CodeMeta is a concept vocabulary that can be used to standardize the exchange of software metadata across repositories and organizations.",
  "name": "CodeMeta: Minimal metadata schemas for science software and code, in JSON-LD",
  "codeRepository": "https://github.com/codemeta/codemeta",
  "issueTracker": "https://github.com/codemeta/codemeta/issues",
  "license": "https://spdx.org/licenses/Apache-2.0",
  "version": "2.0",
  "author": [
    {
      "@type": "Person",
      "givenName": "Carl",
      "familyName": "Boettiger",
      "email": "cboettig@gmail.com",
      "@id": "http://orcid.org/0000-0002-1642-628X"
    },
    {
      "@type": "Person",
      "givenName": "Matthew B.",
      "familyName": "Jones",
      "email": "jones@nceas.ucsb.edu",
      "@id": "http://orcid.org/0000-0003-0077-4738"
    }
  ],
  "contributor": [
    {
      "@type": "Person",
      "givenName": "Abby Cabunoc",
      "familyName": "Mayes",
      "email": "abbycabs@gmail.com"
    },
    {
      "@type": "Person",
      "givenName": "Arfon",
      "familyName": "Smith",
      "email": "arfon.smith@gmail.com",
      "@id": "http://orcid.org/0000-0002-3957-2474"
    },
    {
      "@type": "Person",
      "givenName": "Peter",
      "familyName": "Slaughter",
      "email": "slaughter@nceas.ucsb.edu",
      "@id": "http://orcid.org/0000-0002-2192-403X"
    },
    {
      "@type": "Person",
      "givenName": "Kyle",
      "familyName": "Niemeyer",
      "email": "Kyle.Niemeyer@oregonstate.edu",
      "@id": "http://orcid.org/0000-0003-4425-7097"
    },
    {
      "@type": "Person",
      "givenName": "Yolanda",
      "familyName": "Gil",
      "email": "GIL@ISI.EDU",
      "@id": "http://orcid.org/0000-0001-8465-8341"
    },
    {
      "@type": "Person",
      "givenName": "Krzysztof",
      "familyName": "Nowak"
    },
    {
      "@type": "Person",
      "givenName": "Martin",
      "familyName": "Fenner",
      "@id": "http://orcid.org/0000-0003-1419-2405"
    },
    {
      "@type": "Person",
      "givenName": "Mark",
      "familyName": "Hahnel",
      "@id": "http://orcid.org/0000-0003-4741-0309"
    },
    {
      "@type": "Person",
      "givenName": "Luke",
      "familyName": "Coy",
      "email": "luke.coy@rit.edu"
    },
    {
      "@type": "Person",
      "givenName": "Alice",
      "familyName": "Allen",
      "email": "aallen@ascl.net",
      "@id": "http://orcid.org/0000-0003-3477-2845"
    },
    {
      "@type": "Person",
      "givenName": "Mercè",
      "familyName": "Crosas",
      "@id": "http://orcid.org/0000-0003-1304-1939"
    },
    {
      "@type": "Person",
      "givenName": "Ashley",
      "familyName": "Sands",
      "@id": "http://orcid.org/0000-0001-5636-0433"
    },
    {
      "@type": "Person",
      "givenName": "Neil",
      "familyName": "Chue Hong",
      "email": "n.chuehong@epcc.ed.ac.uk",
      "@id": "http://orcid.org/0000-0002-8876-7606"
    },
    {
      "@type": "Person",
      "givenName": "Patricia",
      "familyName": "Cruse",
      "@id": "http://orcid.org/0000-0002-9300-5278"
    },
    {
      "@type": "Person",
      "givenName": "Dan",
      "familyName": "Katz",
      "email": "dskatz@illinois.edu",
      "@id": "http://orcid.org/0000-0003-2720-0339"
    },
    {
      "@type": "Person",
      "givenName": "Carole",
      "familyName": "Goble",
      "email": "carole.goble@manchester.ac.uk",
      "@id": "http://orcid.org/0000-0003-1219-2137"
    },
    {
      "@type": "Person",
      "givenName": "Carl",
      "familyName": "Boettiger",
      "email": "cboettig@gmail.com",
      "@id": "http://orcid.org/0000-0002-1642-628X"
    },
    {
      "@type": "Person",
      "givenName": "Stephan",
      "familyName": "Druskat",
      "email": "mail@sdruskat.net",
      "@id": "http://orcid.org/0000-0003-4925-7248"
    }
  ],
  "maintainer": {
    "@type": "Person",
    "givenName": "Carl",
    "familyName": "Boettiger",
    "email": "cboettig@gmail.com",
    "@id": "http://orcid.org/0000-0002-1642-628X"
  },
  "contIntegration": "https://travis-ci.org/codemeta/codemeta",
  "developmentStatus": "active",
  "downloadUrl": "https://github.com/codemeta/codemeta/archive/2.0.zip",
  "funder": { 
          "@id": "https://doi.org/10.13039/100000001",
          "@type": "Organization",
          "name": "National Science Foundation"
  },
  "funding":"1549758; Codemeta: A Rosetta Stone for Metadata in Scientific Software",
  "keywords": [
    "metadata",
    "software"
  ],
  "version":"2.0",
  "dateCreated":"2017-06-05",
  "datePublished":"2017-06-05",
  "programmingLanguage": "JSON-LD"
}

A first manuscript example :

https://hal.inria.fr/hal-01727745v1/

{
  "@context": "https://doi.org/10.5063/schema/codemeta-2.0",
  "@type": "SoftwareSourceCode",
  "identifier": "hal-01727745",
  "identifier": "swh:1:dir:42a13fc721c8716ff695d0d62fc851d641f3a12b;origin=https://hal.archives-ouvertes.fr/hal-01727745;visit=swh:1:snp:a76e73d9be951762359b31d143609a0ae8862c16;anchor=swh:1:rev:a27a59f6b14c9fb13a6f998d8316628dafc1f60c;path=/", 
  "description": "This repository contains the source code used to produce the simulation results of the following publication (which is currently in print). R. Bleuse; S. Hunold; S. Kedad-Sidhoum; F. Monna; G. Mounie; D. Trystram, \"Scheduling Independent Moldable Tasks on Multi-Cores with GPUs, in IEEE Transactions on Parallel and Distributed Systems , vol.PP, no.99, pp.1-1 doi: 10.1109/TPDS.2017.2675891",
  "name": "moldableILP ",
  "codeRepository": "https://github.com/hunsa/moldableILP",
  "issueTracker": "",
  "license": "http://www.gnu.org/licenses/gpl-3.0-standalone.html",
  "author": [
    {
      "@type": "Person",
      "givenName": "sasha",
      "familyName": "Hunold",
      "email": "",
      "@id": ""
    },
    {
      "@type": "Person",
      "givenName": "Raphael",
      "familyName": "Bleuse",
      "email": "cs@research.bleuse.net",
      "identifier": "https://aurehal.archives-ouvertes.fr/author/modify/id/69251",
	  "@id": "https://orcid.org/0000-0002-6728-2132"
    },
	{
      "@type": "Person",
      "givenName": "Grégory",
      "familyName": "Mounier",
      "email": "Gregory.Mounie@imag.fr",
    "@id": "https://aurehal.archives-ouvertes.fr/author/modify/id/69251",
	"affiliation": "DATAMOVE "
	}
	],
"contributor":
    {
      "@type": "Person",
      "givenName": "Grégory",
      "familyName": "Mounier",
      "email": "Gregory.Mounie@imag.fr",
    "@id": "https://cv.archives-ouvertes.fr/gregory-mounie"
	},
  "contIntegration": "",
  "developmentStatus": "",
  "downloadUrl": "",
  "funder": { 
          "@id": "",
          "@type": "",
          "name": ""
    },
  "funding":"",
  "keywords": [
      "High Perfomance",
      "Computing", 
      "Scheduling Algorithm",
      "Moldable Tasks"
  ],
  "version":"1.0",
  "dateCreated":"2017",
  "datePublished":"2018",
  "programmingLanguage": [
      "Julia",
      "R",
      "Python"
  ],
  "url": "https://hal.archives-ouvertes.fr/hal-01727745",
  "applicationCategory": "info.info-dc"
}

Example on SWH

{
    "@xmlns": "http://www.w3.org/2005/Atom",
    "@xmlns:codemeta": "https://doi.org/10.5063/SCHEMA/CODEMETA-2.0",
    "author": {
        "email": "hal@ccsd.cnrs.fr",
        "name": "HAL"
    },
    "client": "hal",
    "codemeta:applicationCategory": "info.info-ai",
    "codemeta:author": [
        {
            "codemeta:affiliation": "ENAC",
            "codemeta:name": "Isabelle Santos"
        },
        {
            "codemeta:affiliation": "ENAC",
            "codemeta:name": "St{\\'e}phane Puechmorel"
        }
    ],
    "codemeta:dateCreated": "2019-01-10T16:01:08+01:00",
    "codemeta:description": "This repository contains the source code used to produce the results of the following publication (which is currently in print).Isabelle Santos, St{\\'e}phane Puechmorel, Guillaume Dufour. First Order Hadamard Variation of the Harmonic Navigation Function on a Sphere World. 2018. \\textless{}hal-01855142\\textgreater{}",
    "codemeta:identifier": {
        "#text": "swh:1:dir:67e843c67df9ccc3b733aa9a25aaa5cc4d2b6956",
        "@name": "swh"
    },
    "codemeta:keywords": "Harmonic potential,Hadamard Formula,Navigation function",
    "codemeta:license": {
        "codemeta:name": "Creative Commons Attribution Share Alike 4.0"
    },
    "codemeta:name": "Stochastic Navigation Function Implementation by a Semi-Analytical Algorithm",
    "codemeta:programmingLanguage": "Python",
    "codemeta:url": "https://hal.archives-ouvertes.fr/hal-01869860",
    "codemeta:version": "2",
    "committer": "Isabelle Santos",
    "external_identifier": "hal-01869860",
    "id": "hal-01869860"
}

TODO:

  • vérifier les différences entre CodeMeta et HAL et noter les propriétés manquantes
  • vérifier les différences entre SWH export et la notice sur HAL
  • comment traiter le SWHID:
{
	    ...
	    "identifier": [
	        {
	            "@type": "PropertyValue",
	            "propertyID": "???",
	            "value": "swh:1:dir:9f85c8f51850028a9fbc03463c74de29a2d24c6c"
	        },
	        {
	            "@type": "PropertyValue",
	            "propertyID": "???",
	            "value": "hal-02071874"
	        }
	    ],
	    ...
	}
    
"codemeta:identifier": {
        "#text": "swh:1:dir:67e843c67df9ccc3b733aa9a25aaa5cc4d2b6956",
        "@name": "swh"
    },

Validation possible avec Oxygen !

{
  "@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" }
  }
}

HAL's first export:

{
   "@context":"https:\/\/doi.org\/10.5063\/schema\/codemeta-2.0",
   "@type":"SoftwareSourceCode",
   "name":"PseudoArcLengthContinuation.jl",
   "description":"A Julia package to perform pseudo arclength continuation of solutions of nonlinear equations",
   "dateCreated":"2019-03-18",
   "datePublished":"2019-03-18",
   "license":[
      "MIT License"
   ],
   "url":"https:\/\/hal.halpreprod.archives-ouvertes.fr\/hal-02071874",
   "identifier":{
      "swh":"swh:1:dir:9f85c8f51850028a9fbc03463c74de29a2d24c6c"
   },
   "applicationCategory":[
      "math.math-na",
      "math.math-ap",
      "math.math-ds"
   ],
   "keywords":[
      "Pseudo Arclength Continuation"
   ],
   "codeRepository":"https:\/\/github.com\/rveltz\/PseudoArcLengthContinuation.jl",
   "relatedLink":[
      "https:\/\/github.com\/rveltz\/PseudoArcLengthContinuation.jl"
   ],
   "programmingLanguage":[
      "Julia"
   ],
   "operatingSystem":[
      "Linux",
      "Windows",
      "Mac OS X"
   ],
   "version":"1",
   "dateModified":"2019-06-26",
   "developmentStatus":"Actif",
   "author":[
      {
         "@type":"Person",
         "givenName":"Romain",
         "familyName":"Veltz",
         "affiliation":[
            {
               "@type":"Organization",
               "name":"MATHNEURO"
            }
         ]
      }
   ],
   "contributor":[
      {
         "@type":"Person",
         "givenName":"Romain",
         "familyName":"Veltz"
      }
   ]
}

List of changes

  1. Add schema.org to the context
"@context": ["https://doi.org/doi:10.5063/schema/codemeta-2.0", "http://schema.org"],
  1. Add author's role following (https://github.com/codemeta/codemeta/issues/240)
{
...
"author": [
        {
            "@type": "Role",
            "roleName": "Design",
            "author": {
                "@type Person",
                "@id": "http://example.org/~useIDHAL",
                "givenName": "John",
                "familyName": "Dupont",
                "email": "email@email.org"
                "affiliation": [
                    {
                        "@type": "Organization",
                        "name": "CNRS"
                    },
                    {
                        "@type": "Organization",
                        "name": "Inria"
                    },
                    {
                        "@type": "Organization",
                        "name": "Université de Paris"
                    }
                ]
            }
        },
    ]
    
  1. "identifier" value should not be a dict but a PropertyValue
    • decide which propertyID to use
{ ... "identifier": [ { "@type": "PropertyValue", "propertyID": "https://softwareheritage.org/swhid", "value": "swh:1:dir:9f85c8f51850028a9fbc03463c74de29a2d24c6c" }, { "@type": "PropertyValue", "propertyID": "https://hal.archives-ouvertes.fr/hal_id", "value": "hal-02071874" } ], ... }
  1. dateModified: what date is used here?
    • when the (meta) document (notice) changed, even when a team added the document to a collection
  2. add downloadUrl with the url used for file
    7. add email to author -> no
  3. validate that all properties in export is also in deposit XML:
    A. introduce alternative solution for deposit metadata using the CodeMeta export
Select a repo