Skip to content
Open
Show file tree
Hide file tree
Changes from all 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
2 changes: 1 addition & 1 deletion src/incatools/odk/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -967,7 +967,7 @@ class OntologyProject(JsonSchemaMixin):
annotation in the seeded ontology.
"""

description: str = "None"
description: Optional[str] = None
"""A short description of the ontology."""

use_dosdps: bool = False
Expand Down
144 changes: 116 additions & 28 deletions src/incatools/odk/templates/_dynamic_files.jinja2
Original file line number Diff line number Diff line change
Expand Up @@ -316,42 +316,72 @@ For more background see:
---
layout: ontology_detail
id: {{ project.id }}
title: {{ project.title }}
jobs:
- id: https://travis-ci.org/{{ project.github_org }}/{{ project.repo }}
type: travis-ci
Comment thread
gouttegd marked this conversation as resolved.
title: "{{ project.title }}"
build:
{%- if project.github_org %}
checkout: git clone https://github.com/{{ project.github_org }}/{{ project.repo }}.git
{%- elif project.repo_url %}
{#- The repo_url is primarily intended to point to a browsable version of
of the repo, but most Git hosting services also serve a repository
compatible with the use of `git clone` at the main repo URL. #}
checkout: git clone {{ project.repo_url }}
{%- else %}
checkout: git clone <URL TO CLONEABLE REPO>
{%- endif %}
system: git
path: "."
contact:
email: {{ project.contact.email }}
label: {{ project.contact.name }}
github: {{ project.contact.github }}
description: {{ project.title }} is an ontology...
domain: stuff
email: <CONTACT PERSON EMAIL>
label: <CONTACT PERSON NAME>
{%- if project.github_org %}
github: <CONTACT PERSON GITHUB HANDLE>
{%- endif %}
{%- if project.description %}
description: "{{ project.description }}"
{%- else %}
description: <SHORT DESCRIPTION OF THE ONTOLOGY>
{%- endif %}
domain: <ONTOLOGY DOMAIN>
{%- if project.github_org %}
homepage: https://github.com/{{ project.github_org }}/{{ project.repo }}
{%- elif project.repo_url %}
homepage: {{ project.repo_url }}
{%- endif %}
products:
- id: {{ project.id }}.owl
name: "{{ project.title }} main release in OWL format"
- id: {{ project.id }}.obo
name: "{{ project.title }} additional release in OBO format"
- id: {{ project.id }}.json
name: "{{ project.title }} additional release in OBOJSon format"
- id: {{ project.id }}/{{ project.id }}-base.owl
name: "{{ project.title }} main release in OWL format"
- id: {{ project.id }}/{{ project.id }}-base.obo
name: "{{ project.title }} additional release in OBO format"
- id: {{ project.id }}/{{ project.id }}-base.json
name: "{{ project.title }} additional release in OBOJSon format"
{%- for format in project.export_formats %}
{%- if format != "owl" %}
- id: {{ project.id }}.{{ format }}
name: "{{ project.title }} main release in {{ format|upper }} format"
{%- endif %}
{%- endfor %}
{%- for artefact in project.release_artefacts %}
{%- if artefact != project.primary_release %}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

drops <id>/<id>-base.owl from products when someone sets primary_release: base, so PURL resolves only through fall thru?

@gouttegd gouttegd Aug 30, 2026

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so PURL resolves only through fall thru?

Err, what are you talking about? Those lines are not in the PURL config template, they are in the OBO Foundry metadata template. This is the list of available products, as in:

products:
  - id: myont.owl
    name: "My Ontology main release in OWL format"
  - id: myont-base.owl
    name "My Ontology BASE release in OWL format"

So yes, we drop myont/myont-X.owl when X is the ”primary release” product, to avoid needlessly listing what is in effect the same product twice (once under the name of the primary release, and once under the qualified name).

This seems to be the norm on the OBO FOundry website: For most ontologies, the “primary release” is -full, and the -full product is not listed among the available products (see for example Uberon, CL, …).

- id: {{ project.id }}/{{ project.id }}-{{ artefact }}.owl
name: "{{ project.title }} {{ artefact|upper }} release in OWL format"
{%- for format in project.export_formats %}
{%- if format != "owl" %}
- id: {{ project.id }}/{{ project.id }}-{{ artefact }}.{{ format }}
name: "{{ project.title }} {{ artefact|upper }} release in {{ format|upper}} format"
{%- endif %}
{%- endfor %}
{%- endif %}
{%- endfor %}
{%- if project.import_group is not none %}
dependencies:
{% for imp in project.import_group.products -%}
{%- for imp in project.import_group.products %}
- id: {{ imp.id }}
{% endfor -%}
{%- endfor %}
{%- endif %}
{%- if project.github_org %}
tracker: https://github.com/{{ project.github_org }}/{{ project.repo }}/issues
{%- else %}
tracker: <URL TO ISSUE TRACKER>
{%- endif %}
license:
url: http://creativecommons.org/licenses/by/3.0/
label: CC-BY
url: {{ project.license }}
label: <HUMAN READABLE LABEL OF THE LICENSE>
activity_status: active
---

Expand All @@ -365,8 +395,16 @@ idspace: {{ project.id|upper }}
base_url: /obo/{{ project.id }}

products:
- {{ project.id }}.owl: https://raw.githubusercontent.com/{{ project.github_org }}/{{ project.repo }}/{{ project.git_main_branch }}/{{ project.id }}.owl
- {{ project.id }}.obo: https://raw.githubusercontent.com/{{ project.github_org }}/{{ project.repo }}/{{ project.git_main_branch }}/{{ project.id }}.obo
{%- if project.github_org %}
- {{ project.id }}.owl: https://github.com/{{ project.github_org }}/{{ project.repo }}/releases/latest/download/{{ project.id }}.owl
{%- for format in project.export_formats %}
{%- if format != "owl" %}
- {{ project.id }}.{{ format }}: https://github.com/{{ project.github_org }}/{{ project.repo }}/releases/latest/download/{{ project.id }}.{{ format }}
{%- endif %}
{%- endfor %}
{%- else %}
- {{ project.id }}.owl: <URL TO LATEST RELEASE>
{%- endif %}

term_browser: ontobee
example_terms:
Expand All @@ -375,17 +413,67 @@ example_terms:
entries:

- prefix: /releases/
replacement: https://raw.githubusercontent.com/{{ project.github_org }}/{{ project.repo }}/v
{%- if project.github_org %}
replacement: https://github.com/{{ project.github_org }}/{{ project.repo }}/releases/download/v
{%- else %}
replacement: <URL TO ALL RELEASES>
{%- endif %}

- prefix: /tracker/
{%- if project.github_org %}
replacement: https://github.com/{{ project.github_org }}/{{ project.repo }}/issues
{%- else %}
replacement: <URL TO ISSUE TRACKER>
{%- endif %}

- prefix: /about/
replacement: http://www.ontobee.org/ontology/{{ project.id|upper }}?iri=http://purl.obolibrary.org/obo/

## generic fall-through, serve direct from github by default
{%- if project.import_group is not none or project.components is not none or project.use_dosdps %}

# For files that are imported from the -edit file, we cannot point to
# the latest release download folder as we do below in the "generic"
# fall-through, because those files are _not_ release artefacts and are
# absent from that folder. Instead, we point to the current {{ project.git_main_branch }} branch.
{%- if project.import_group is not none %}

- prefix: /imports/
{%- if project.github_org %}
replacement: https://github.com/{{ project.github_org }}/{{ project.repo }}/raw/refs/heads/{{ project.git_main_branch }}/src/ontology/imports/
{%- else %}
replacement: <URL TO MAIN BRANCH'S SRC/ONTOLOGY/IMPORTS DIRECTORY>
{%- endif %}

{%- endif %}
{%- if project.components is not none %}

- prefix: /components/
{%- if project.github_org %}
replacement: https://github.com/{{ project.github_org }}/{{ project.repo }}/raw/refs/heads/{{ project.git_main_branch }}/src/ontology/components/
{%- else %}
replacement: <URL TO MAIN BRANCH'S SRC/ONTOLOGY/COMPONENTS DIRECTORY>
{%- endif %}

{%- endif %}
{%- if project.use_dosdps %}

- prefix: /patterns/
{%- if project.github_org %}
replacement: https://github.com/{{ project.github_org }}/{{ project.repo }}/raw/refs/heads/{{ project.git_main_branch }}/src/patterns/
{%- else %}
replacement: <URL TO MAIN BRANCH'S SRC/PATTERNS DIRECTORY>
{%- endif %}

{%- endif %}
{%- endif %}

# Generic fall-through, serve from the latest release artefacts
- prefix: /
replacement: https://raw.githubusercontent.com/{{ project.github_org }}/{{ project.repo }}/{{ project.git_main_branch }}/
{%- if project.github_org %}
replacement: https://github.com/{{ project.github_org }}/{{ project.repo }}/releases/latest/download/
{%- else %}
replacement: <URL TO RELEASES DIRECTORY>
{%- endif %}
{% endif %}{# ! project.create_obo_metadata -#}
{% if project.use_templates -%}
^^^ src/templates/README.md
Expand Down
Loading