earthcubearchitecture-project418 / p418Docs

Documentation on Project 418. Includes publishing guideline, example JSON-LD, and presentations about the project.
7 stars 2 forks source link

Add license information for repository #6

Open smrgeoinfo opened 6 years ago

smrgeoinfo commented 6 years ago

Looks like we don't have any license informaion. I'd suggest CC0.

ashepherd commented 6 years ago

Hi @smrgeoinfo, most of the vocabulary docs are in the vocabulary repo. We'll link to those form here, but we have dataset license in the example here: https://github.com/earthcubearchitecture-project418/p418Vocabulary/blob/9ac19c0e68f9ce1379ecc5eea94a3a26f14e5062/html/voc/static/schema/examples/resource/dataset-full.jsonld#L105

mbjones commented 6 years ago

@ashepherd That's excellent. How do you deal with licenses that don't have well-known URLs? Only the CC licenses really do. But many more licenses are in use. We've discussed this issue in our creation of the JSON-LD context for CodeMeta as well: https://github.com/codemeta/codemeta/issues/67 Could you enable using a license URL or a SPDX license key? Or would you allow use of the SPDX URL (which isn't guaranteed to be a purl, but probably better than some random unmaintained web url for the license).

ashepherd commented 6 years ago

Hey @mbjones that's good question! schema:license let's you also point to a CreativeWork, so we could draft a "pattern" for publishing Licenses without well-known URIs. And, in fact, we should probably do this for the CC licenses anyway so that they are legit resources instead of literals.

{
  "@context": { "@vocab": "https://schema.org" },
  "@type": "Dataset",
  ...
  "license": {
    "@type": "DigitalDocument", (or some other CreativeWork for those without URLs)
    "url": "http://creativecommons.org/licenses/by/4.0/",
    "name": "CC-BY 4.0",
    "identifier": {
       ...
    }
  }
}

But, even using the URL literal, we could use the SPDX urls since URL is a literal for schema.org. @mdjones, do you think a CreativeWork like Digital Document would be good for the SPDX urls? I think i'd prefer the pattern to recommend the CreativeWork over a URL literal. Thoughts?

mbjones commented 6 years ago

I didn't realize schema:license could be a creative work. Your proposal is nice way to handle it, as we could then include the SPDX key in the identifier field, so really get the benefits of both worlds. So, for a non-CC license, we might use:

{
  "@context": { "@vocab": "https://schema.org" },
  "@type": "Dataset",
  ...
  "license": {
    "@type": "DigitalDocument",
    "url": "https://spdx.org/licenses/Apache-2.0.html",
    "name": "Apache License 2.0",
    "identifier": "Apache-2.0"
  }
}

Note that identifier is the SPDX key. Which could have also been represented as a PropertyValue if we want to be more explicit about that, but I'm not sure if the string "SPDX" makes the PropertyValue any more machine readable without being drawn from a controlled namespace itself. Either way, consumers must know that the identifier comes from the SPDX namespace.

"identifier": {
 "@type": "PropertyValue",
   "propertyID": "SPDX",
   "value":  "Apache-2.0"
   }
ashepherd commented 6 years ago

Oh I like the PropertyValue! Thanks for linking this to the code meta issue. I’m working up the Dataset publishing documentation this week and I’ll be sure to include this example. Thanks!