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
23 changes: 23 additions & 0 deletions .github/workflows/codespell.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Codespell configuration is within pyproject.toml
---
name: Codespell

on:
push:
branches: [main]
pull_request:
branches: [main]

permissions:
contents: read

jobs:
codespell:
name: Check for spelling errors
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v6
- name: Codespell
uses: codespell-project/actions-codespell@8f01853be192eb0f849a5c7d721450e7a467c579 # v2.2
8 changes: 8 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -84,3 +84,11 @@ workflows = [
"sssom",
"tsvalid",
]

[tool.codespell]
# Ref: https://github.com/codespell-project/codespell#using-a-config-file
skip = '.git,.git-meta,.gitignore,.gitattributes,*.pdf,*.svg'
check-hidden = true
# ignore-regex = ''
# eto: ontology id used in tests/configs/test-edit-obo.yaml
ignore-words-list = 'eto'
2 changes: 1 addition & 1 deletion src/incatools/odk/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ def update(templatedir):
help="""The ODK configuration file.
This is optional, configuration options can also be passed
on the command line, but an explicit configuration file is
prefered.""",
preferred.""",
)
@click.option(
"-c",
Expand Down
2 changes: 1 addition & 1 deletion src/incatools/odk/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ def update_config_dict(obj: Dict[str, Any]) -> None:
replace keys that have been renamed or moved.

The onus is on whoever introduces a change to the project model to
update this function so that it can accomodates the change.
update this function so that it can accommodate the change.

:param obj: The dictionary to update.
"""
Expand Down
8 changes: 4 additions & 4 deletions src/incatools/odk/download.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,9 @@ class DownloadError(Exception):

@dataclass
class RemoteFileInfo:
"""Informations about a downloaded file.
"""Information about a downloaded file.

This class is a simple structure holding the informations we need in
This class is a simple structure holding the information we need in
order to decide whether to update a file that has already been
downloaded previously.
"""
Expand Down Expand Up @@ -132,11 +132,11 @@ def download_file(

:param url: The URL to download the file from.
:param output: Where the downloaded file should be written.
:param info: Informations about the last time the file was
:param info: Information about the last time the file was
downloaded. If the fields of that structure are set to None,
this means there is no local version of the file, and the
remote file should always be downloaded. If the download is
successful, the structure will be updated with informations from
successful, the structure will be updated with information from
the newly downloaded file.
:param max_retry: Number of download attempts to perform.
:param compression: How the remote file is compressed (if at all).
Expand Down
4 changes: 2 additions & 2 deletions src/incatools/odk/helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,10 +125,10 @@ def check_rdfxml(file, lightrdf, rdflib, jena) -> None:

@main.command()
@click.option(
"--tools/--no-tools", default=True, help="Print informations about available tools."
"--tools/--no-tools", default=True, help="Print information about available tools."
)
def info(tools) -> None:
"""Print informations about the Ontology Development Kit backend."""
"""Print information about the Ontology Development Kit backend."""
print(f"ODK Core {__version__}")
backend_info = shutil.which("odk-info")
if backend_info is not None:
Expand Down
6 changes: 3 additions & 3 deletions src/incatools/odk/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,7 @@ class ProductGroup(JsonSchemaMixin):
def derive_fields(self, project: OntologyProject) -> None:
"""Derive field values wherever needed.

This method may be overriden by any product group subclass that
This method may be overridden by any product group subclass that
needs to automatically set some values (either in the group
itself, or in any of its product). Notably, this can be used to
propagate default values set at the level of the group down to
Expand Down Expand Up @@ -520,7 +520,7 @@ def derive_fields(self, project: OntologyProject) -> None:
# compatibility
p.module_type = "slme"
if p.module_type == "slme":
# Use group-level SLME parameters unless overriden
# Use group-level SLME parameters unless overridden
if p.module_type_slme is None:
p.module_type_slme = self.module_type_slme
if p.slme_individuals is None:
Expand Down Expand Up @@ -923,7 +923,7 @@ class OntologyProject(JsonSchemaMixin):
"""Amount of memory to allocate to OWLTools.

Note that OWLTools is no longer used by any standard ODK workflow,
but the option may still impact any remaning use of OWLTools in a
but the option may still impact any remaining use of OWLTools in a
custom workflow.
"""

Expand Down
2 changes: 1 addition & 1 deletion src/incatools/odk/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def is_available(self, target: ODKEnvironment) -> bool:
def get_final_location(self, target: ODKEnvironment) -> Path:
"""Gets the location of the file once installed.

This should be overriden in subclasses so that each different
This should be overridden in subclasses so that each different
type of files gets its own location right.

:param target: The environment in which to install the file.
Expand Down
4 changes: 2 additions & 2 deletions src/incatools/odk/template.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ def _must_install_file(

:param templatefile: The name of the template, relative to the root
template directory.
:param targetfile: Where the template should be instanciated, as
:param targetfile: Where the template should be instantiated, as
either an absolute pathname or a pathname relative to the
current working directory.
:param policies: The list of per-file policies as explained above.
Expand Down Expand Up @@ -104,7 +104,7 @@ def __init__(self, project: OntologyProject, templatedir: Optional[str] = None):
def generate(self, input: Path | str) -> str:
"""Renders one template file.

:param input: The path to the template to instanciate.
:param input: The path to the template to instantiate.

:returns: The text of the instantiated template.
"""
Expand Down
4 changes: 2 additions & 2 deletions src/incatools/odk/templates/CONTRIBUTING.md.jinja2
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,11 @@ For how to write a good term request, please read the [best practices carefully]

### How to add a new term

If you have never editted this ontology before, first follow a [general tutorial](https://oboacademy.github.io/obook/lesson/contributing-to-obo-ontologies)
If you have never edited this ontology before, first follow a [general tutorial](https://oboacademy.github.io/obook/lesson/contributing-to-obo-ontologies)

**Process**:

1. Clone the repository (In case you are not an offical team member, create a fork first)
1. Clone the repository (In case you are not an official team member, create a fork first)
1. Create new branch in git, for example `git checkout -b issue123`
1. Open src/ontology/{{project.id}}-edit.{{ project.edit_format|default('owl') }} in your favourite editor, i.e. [Protege](https://protege.stanford.edu/). **Careful:** double check you are editing the correct file. There are many ontology files in this repository, but only one _editors file_!
1. Perform your edit and save your changes
Expand Down
8 changes: 4 additions & 4 deletions src/incatools/odk/templates/_dynamic_documentation.jinja2
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ ci:
- github_actions
```

When [updateing your repo](RepoManagement.md), you will notice a new file being added: `.github/workflows/qc.yml`.
When [updating your repo](RepoManagement.md), you will notice a new file being added: `.github/workflows/qc.yml`.

This file contains your CI logic, so if you need to change, or add anything, this is the place!

Expand Down Expand Up @@ -406,7 +406,7 @@ A component is an import which _belongs_ to your ontology, e.g. is managed by
you and your team.

1. Open `src/ontology/{{ project.id }}-odk.yaml`
1. If you dont have it yet, add a new top level section `components`
1. If you don't have it yet, add a new top level section `components`
1. Under the `components` section, add a new section called `products`.
This is where all your components are specified
1. Under the `products` section, add a new component, e.g. `- filename: mycomp.owl`
Expand Down Expand Up @@ -468,7 +468,7 @@ The main kinds of files in the repository:
Release file are the file that are considered part of the official ontology release and to be used by the community. A detailed description of the release artefacts can be found [here](https://github.com/INCATools/ontology-development-kit/blob/master/docs/ReleaseArtefacts.md).

## Imports
Imports are subsets of external ontologies that contain terms and axioms you would like to re-use in your ontology. These are considered "external", like dependencies in software development, and are not included in your "base" product, which is the [release artefact](https://github.com/INCATools/ontology-development-kit/blob/master/docs/ReleaseArtefacts.md) which contains only those axioms that you personally maintain.
Imports are subsets of external ontologies that contain terms and axioms you would like to reuse in your ontology. These are considered "external", like dependencies in software development, and are not included in your "base" product, which is the [release artefact](https://github.com/INCATools/ontology-development-kit/blob/master/docs/ReleaseArtefacts.md) which contains only those axioms that you personally maintain.

These are the current imports in {{ project.id.upper() }}

Expand Down Expand Up @@ -713,7 +713,7 @@ $(COMPONENTSDIR)/your-component-name.owl: $(SRC)
<Insert here the code to produce the component>
```

If the component is to be generated from a ROBOT template, the ODK can generate the appropriate code for you. For that, when adding the component fo the ODK configuration file (step 2 above), explicitly indicate that the component should be derived from template(s) and list the source templates:
If the component is to be generated from a ROBOT template, the ODK can generate the appropriate code for you. For that, when adding the component to the ODK configuration file (step 2 above), explicitly indicate that the component should be derived from template(s) and list the source templates:

```
components:
Expand Down
2 changes: 1 addition & 1 deletion src/incatools/odk/templates/_dynamic_files.jinja2
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{#-

Jinja2 Template for multile dynamic files
Jinja2 Template for multiple dynamic files

See odk.py for how this is processed.

Expand Down
6 changes: 3 additions & 3 deletions src/incatools/odk/templates/src/ontology/Makefile.jinja2
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ CONFIG_HASH = {{ project.config_hash }}
# ----------------------------------------
# These variables are intended to be used throughout the Makefile (and
# the custom {{ project.id }}.Makefile, if needed). They _may_ be
# overriden either on the command line or in the custom Makefile, but in
# overridden either on the command line or in the custom Makefile, but in
# most cases this is not recommended.

# Project settings
Expand Down Expand Up @@ -1895,7 +1895,7 @@ ASSETS = $(MAIN_FILES){# -#}
because those are stored in src/mappings, and the fact that this is
one directory _above_ the directory where this Makefile is would
cause problems down the road (notably, it would prevent the use of a
single rsync commmand to copy all release assets except mappings to
single rsync command to copy all release assets except mappings to
the release directory). Basically, this is "all release assets that
are in this src/ontology directory". -#}
RELEASE_ASSETS = $(MAIN_FILES){# -#}
Expand Down Expand Up @@ -1998,7 +1998,7 @@ public_release:
# ----------------------------------------

# This is an experimental target people that want to use ODK Extended Prefix Map (EPM)
# can use to pull the (currently inofficial) OBO EPM into the workspace.
# can use to pull the (currently unofficial) OBO EPM into the workspace.
# Users are instructed to refer to the EPM only through the variable $(EXTENDED_PREFIX_MAP) as
# its location might change in a feature version of ODK.
$(EXTENDED_PREFIX_MAP): $(ODK_RESOURCES_DIR)/obo.epm.json
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ For more details on ontology management, please see the
[OBO Academy Tutorials](https://oboacademy.github.io/obook/), the
[OBO tutorial](https://github.com/jamesaoverton/obo-tutorial) or the [Gene Ontology Editors Tutorial](https://go-protege-tutorial.readthedocs.io/en/latest/)

This documentation has been superceded by the ODK automatic documentation, which you can
This documentation has been superseded by the ODK automatic documentation, which you can
activate by adding:

```
Expand Down
2 changes: 1 addition & 1 deletion src/incatools/odk/templates/src/sparql/README.md.jinja2
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

[SPARQL](https://www.w3.org/TR/rdf-sparql-query/) is a W3C standard
query language for RDF. This directory contains useful SPARQL queries
for perfoming over the ontology.
for performing over the ontology.

SPARQL can be executed on a triplestore or directly on any OWL
file. The queries here are all executed on either {{ project.id }}-edit.obo or
Expand Down