Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added instructions for base module imports #516

Merged
merged 4 commits into from
Jan 14, 2022
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 34 additions & 1 deletion template/_dynamic_files.jinja2
Original file line number Diff line number Diff line change
Expand Up @@ -932,6 +932,8 @@ This page discusses how to update the contents of your imports, like adding or r

## Importing a new term

Note: some ontologies now use a merged-import to manage dynamic imports, for these please follow instructions in the section title "Using the Base Module approach".

Importing a new term is split into to sub-phases:
shawntanzk marked this conversation as resolved.
Show resolved Hide resolved

1. Declaring the terms to be imported
Expand Down Expand Up @@ -1077,7 +1079,38 @@ When we use the base pipelines, we

The first implementation of this pipeline is PATO, see https://github.com/pato-ontology/pato/blob/master/src/ontology/pato-odk.yaml.

As we will test and roll out this feature more widely, we will also expand the documentation.
To check if your ontology uses this method, check src/ontology/{{ project.id }}-odk.yaml to see if `use_base_merging: TRUE` is declared under `import_group`

If your ontology uses Base Module approach, please use the following steps:

Start by declaring the term to be imported in Protege:

1. Open your ontology (edit file) in Protege (5.5+).
1. Select 'owl:Thing'
1. Add a new class as usual.
1. Paste the _full iri_ in the 'Name:' field, for example, http://purl.obolibrary.org/obo/CHEBI_50906.
1. Click 'OK'

<img src="https://raw.githubusercontent.com/INCATools/ontology-development-kit/master/docs/img/AddingClasses.png" alt="Adding Classes" />

Next, you navigate in your terminal to the ontology directory (underneath src in your hpo root directory).
```
cd src/ontology
```

Then refresh imports by running

```
sh run.sh make imports/merged_import.owl
shawntanzk marked this conversation as resolved.
Show resolved Hide resolved
```
Note: if your mirrors are updated, you can run `sh run.sh make no-mirror-refresh-merged`

This requires quite a bit of memory on your local machine, so if you encounter an error, it might be a lack of memory on your computer. A solution would be to create a ticket in an issue tracker requesting for the term to be imported, and your one of the local devs should pick this up and run the import for you.

Lastly, restart Protege, and the term should be imported in ready to be used.

Warning: Adding declarations on editors file might cause issues if the declared class is not longer used. The declarations should be removed if no longer in use
shawntanzk marked this conversation as resolved.
Show resolved Hide resolved
Warning: If the term is declared, and import is not refreshed, failure of the SPARQL label and def checks might be triggered.
shawntanzk marked this conversation as resolved.
Show resolved Hide resolved

^^^ docs/odk-workflows/ManageDocumentation.md
# Updating the Documentation
Expand Down