|
5 | 5 | ## Discussion on this check can be [found here](https://github.com/OBOFoundry/OBOFoundry.github.io/issues/1019).
|
6 | 6 | ##
|
7 | 7 | ##### Requirements
|
| 8 | +## |
8 | 9 | ## 1. The ontology **must** have a license both in the registry data and in the ontology file.
|
9 |
| -## 2. The licenese **must** be the same in both files. |
10 |
| -## 3. The license *should* be one of the CC0 or CC-BY licenses. |
| 10 | +## 2. The license **must** be the same in both files. |
| 11 | +## 3. The license _should_ be one of the CC0 or CC-BY licenses. |
11 | 12 | ##
|
12 | 13 | ## ### Fixes
|
13 | 14 | ##
|
14 | 15 | ## #### Choosing a license
|
| 16 | +## |
15 | 17 | ## See [Open Recommendations](http://obofoundry.org/principles/fp-001-open.html#recommendations) for appropriate licenses.
|
16 | 18 | ##
|
17 | 19 | ## #### Adding a license to the registry data
|
| 20 | +## |
18 | 21 | ## First, read the [FAQ](http://obofoundry.github.io/faq/how-do-i-edit-metadata.html) on how to edit the metadata for your ontology. Then, add the following to your [metadata file](https://github.com/OBOFoundry/OBOFoundry.github.io/tree/master/ontology) (replacing with the correct license and license label):
|
| 22 | +## |
19 | 23 | ## ```
|
20 | 24 | ## license:
|
21 | 25 | ## url: http://creativecommons.org/licenses/by/4.0/
|
22 | 26 | ## label: CC-BY 4.0
|
23 | 27 | ## ```
|
24 | 28 | ##
|
25 | 29 | ## #### Adding a license to the ontology file
|
| 30 | +## |
26 | 31 | ## See [Open Implementation](http://obofoundry.org/principles/fp-001-open.html#implementation) for details on adding license to OWL and OBO files.
|
27 | 32 | ##
|
28 | 33 | ## ### Implementation
|
| 34 | +## |
29 | 35 | ## The registry data entry is validated with JSON schema using the [license schema](https://raw.githubusercontent.com/OBOFoundry/OBOFoundry.github.io/master/util/schema/license.json). The license schema ensures that a license entry is present and that the entry has a `url` and `label`. The license schema also checks that the license is one of the CC0 or CC-BY licenses. OWL API is then used to check the ontology as an `OWLOntology` object. Annotations on the ontology are retrieved and the `dcterms:license` property is found. The python script ensures that the correct `dcterms:license` property is used. The script compares this license to the registry license to ensure that they are the same.
|
30 | 36 |
|
31 |
| -import jsonschema |
32 | 37 | import dash_utils
|
| 38 | +import jsonschema |
33 | 39 |
|
34 | 40 |
|
35 | 41 | def is_open(ontology, data, schema):
|
@@ -293,7 +299,7 @@ def compare_licenses(registry_license, ontology_license):
|
293 | 299 | ontology_license (str): license URL from the ontology
|
294 | 300 |
|
295 | 301 | Return:
|
296 |
| - True if registry license matches ontology licences; |
| 302 | + True if registry license matches ontology license; |
297 | 303 | False if the licenses do not match;
|
298 | 304 | None if one or both licenses are missing.
|
299 | 305 | """
|
@@ -369,7 +375,7 @@ def process_results(registry_license,
|
369 | 375 | level = 'ERROR'
|
370 | 376 | issues.append(missing_ontology_license)
|
371 | 377 |
|
372 |
| - # matches_ontology = None if missing ontology licenese |
| 378 | + # matches_ontology = None if missing ontology license |
373 | 379 | if matches_ontology is False:
|
374 | 380 | level = 'ERROR'
|
375 | 381 | issues.append(no_match.format(ontology_license, registry_license))
|
|
0 commit comments