From d139e99fe7faa109e0b71840e20140852a8267d9 Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Fri, 19 Jan 2024 22:48:37 -0500 Subject: [PATCH] Add codespell support: config, action (to detect new) + get some typos fixed (#671) * Add github action to codespell main on push and PRs * Add rudimentary codespell config * codespell ignore some words etc * ignore infarctions * Ignore all input files * [DATALAD RUNCMD] run codespell throughout fixing typo automagically === Do not change lines below === { "chain": [], "cmd": "codespell -w", "exit": 0, "extra_inputs": [], "inputs": [], "outputs": [], "pwd": "." } ^^^ Do not change lines above ^^^ --------- Co-authored-by: Chris Mungall --- .github/workflows/codespell.yml | 22 +++++++++++++++++++ .../cross-ontology-diff/Objectidentifier.md | 2 +- .../lexical-index/Objectidentifier.md | 2 +- .../mapping-rules/Objectidentifier.md | 2 +- docs/datamodels/obograph/Graph.md | 2 +- docs/datamodels/obograph/Objectidentifier.md | 2 +- docs/datamodels/obograph/nodes.md | 4 ++-- .../ontology-metadata/Objectidentifier.md | 2 +- docs/datamodels/search/Objectidentifier.md | 2 +- .../search/SearchBaseConfiguration.md | 4 ++-- docs/datamodels/search/search_terms.md | 4 ++-- .../summary-statistics/Objectidentifier.md | 2 +- .../text-annotator/Objectidentifier.md | 2 +- .../datamodels/validation/Objectidentifier.md | 2 +- docs/faq/architecture.rst | 2 +- docs/glossary.rst | 2 +- docs/guide/curies-and-uris.rst | 2 +- docs/howtos/fhir-conversions.rst | 2 +- docs/intro/tutorial07.rst | 2 +- notebooks/Commands/DiffViaMappings.ipynb | 2 +- notebooks/Commands/Enrichment.ipynb | 2 +- notebooks/Commands/TaxonConstraints.ipynb | 2 +- notebooks/Developers-Tutorial.ipynb | 6 ++--- notebooks/Lessons/PrefixMaps.ipynb | 2 +- .../Why-predicates-are-important.ipynb | 2 +- notebooks/Monarch/PhenIO-Tutorial.ipynb | 2 +- notebooks/Neuro/CL-Neuro-Tutorial.ipynb | 2 +- pyproject.toml | 5 +++++ src/oaklib/cli.py | 4 ++-- .../converters/obo_graph_to_fhir_converter.py | 2 +- src/oaklib/datamodels/obograph.yaml | 2 +- src/oaklib/datamodels/search_datamodel.yaml | 2 +- src/oaklib/datamodels/taxon_constraints.yaml | 2 +- .../association_provider_interface.py | 2 +- .../interfaces/basic_ontology_interface.py | 2 +- .../interfaces/mapping_provider_interface.py | 2 +- .../interfaces/taxon_constraint_interface.py | 2 +- src/oaklib/utilities/ner_utilities.py | 2 +- .../utilities/subsets/value_set_expander.py | 2 +- tests/__init__.py | 2 +- .../test_semsimian_implementation.py | 2 +- .../test_utilities/test_association_index.py | 2 +- 42 files changed, 73 insertions(+), 46 deletions(-) create mode 100644 .github/workflows/codespell.yml diff --git a/.github/workflows/codespell.yml b/.github/workflows/codespell.yml new file mode 100644 index 000000000..3ebbf5504 --- /dev/null +++ b/.github/workflows/codespell.yml @@ -0,0 +1,22 @@ +--- +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@v3 + - name: Codespell + uses: codespell-project/actions-codespell@v2 diff --git a/docs/datamodels/cross-ontology-diff/Objectidentifier.md b/docs/datamodels/cross-ontology-diff/Objectidentifier.md index 7570ddc7a..fce13650a 100644 --- a/docs/datamodels/cross-ontology-diff/Objectidentifier.md +++ b/docs/datamodels/cross-ontology-diff/Objectidentifier.md @@ -21,7 +21,7 @@ URI: [shex:iri](http://www.w3.org/ns/shex#iri) ## Comments -* Used for inheritence and type checking +* Used for inheritance and type checking ## Identifier and Mapping Information diff --git a/docs/datamodels/lexical-index/Objectidentifier.md b/docs/datamodels/lexical-index/Objectidentifier.md index a16760edf..c2d4642b9 100644 --- a/docs/datamodels/lexical-index/Objectidentifier.md +++ b/docs/datamodels/lexical-index/Objectidentifier.md @@ -21,7 +21,7 @@ URI: [shex:iri](http://www.w3.org/ns/shex#iri) ## Comments -* Used for inheritence and type checking +* Used for inheritance and type checking ## Identifier and Mapping Information diff --git a/docs/datamodels/mapping-rules/Objectidentifier.md b/docs/datamodels/mapping-rules/Objectidentifier.md index 376bc0b62..b44911649 100644 --- a/docs/datamodels/mapping-rules/Objectidentifier.md +++ b/docs/datamodels/mapping-rules/Objectidentifier.md @@ -21,7 +21,7 @@ URI: [shex:iri](http://www.w3.org/ns/shex#iri) ## Comments -* Used for inheritence and type checking +* Used for inheritance and type checking ## Identifier and Mapping Information diff --git a/docs/datamodels/obograph/Graph.md b/docs/datamodels/obograph/Graph.md index 500c8710a..2011649b0 100644 --- a/docs/datamodels/obograph/Graph.md +++ b/docs/datamodels/obograph/Graph.md @@ -266,7 +266,7 @@ attributes: name: nodes description: All nodes present in a graph. This includes class nodes as well as supporting nodes, including nodes representing relationship types, subsets, - annotation proeprties, etc + annotation properties, etc from_schema: https://github.com/geneontology/obographs rank: 1000 multivalued: true diff --git a/docs/datamodels/obograph/Objectidentifier.md b/docs/datamodels/obograph/Objectidentifier.md index 69cb2b849..c425263c6 100644 --- a/docs/datamodels/obograph/Objectidentifier.md +++ b/docs/datamodels/obograph/Objectidentifier.md @@ -21,7 +21,7 @@ URI: [shex:iri](http://www.w3.org/ns/shex#iri) ## Comments -* Used for inheritence and type checking +* Used for inheritance and type checking ## Identifier and Mapping Information diff --git a/docs/datamodels/obograph/nodes.md b/docs/datamodels/obograph/nodes.md index c09ddfb38..6d4feab40 100644 --- a/docs/datamodels/obograph/nodes.md +++ b/docs/datamodels/obograph/nodes.md @@ -1,5 +1,5 @@ # Slot: nodes -_All nodes present in a graph. This includes class nodes as well as supporting nodes, including nodes representing relationship types, subsets, annotation proeprties, etc_ +_All nodes present in a graph. This includes class nodes as well as supporting nodes, including nodes representing relationship types, subsets, annotation properties, etc_ URI: [obographs:nodes](https://github.com/geneontology/obographs/nodes) @@ -56,7 +56,7 @@ URI: [obographs:nodes](https://github.com/geneontology/obographs/nodes) ```yaml name: nodes description: All nodes present in a graph. This includes class nodes as well as supporting - nodes, including nodes representing relationship types, subsets, annotation proeprties, + nodes, including nodes representing relationship types, subsets, annotation properties, etc from_schema: https://github.com/geneontology/obographs rank: 1000 diff --git a/docs/datamodels/ontology-metadata/Objectidentifier.md b/docs/datamodels/ontology-metadata/Objectidentifier.md index f1aaa7cc4..b960ef804 100644 --- a/docs/datamodels/ontology-metadata/Objectidentifier.md +++ b/docs/datamodels/ontology-metadata/Objectidentifier.md @@ -21,7 +21,7 @@ URI: [shex:iri](http://www.w3.org/ns/shex#iri) ## Comments -* Used for inheritence and type checking +* Used for inheritance and type checking ## Identifier and Mapping Information diff --git a/docs/datamodels/search/Objectidentifier.md b/docs/datamodels/search/Objectidentifier.md index b40a004e9..72c3773c9 100644 --- a/docs/datamodels/search/Objectidentifier.md +++ b/docs/datamodels/search/Objectidentifier.md @@ -21,7 +21,7 @@ URI: [shex:iri](http://www.w3.org/ns/shex#iri) ## Comments -* Used for inheritence and type checking +* Used for inheritance and type checking ## Identifier and Mapping Information diff --git a/docs/datamodels/search/SearchBaseConfiguration.md b/docs/datamodels/search/SearchBaseConfiguration.md index 47461ec8d..615fd9c58 100644 --- a/docs/datamodels/search/SearchBaseConfiguration.md +++ b/docs/datamodels/search/SearchBaseConfiguration.md @@ -132,7 +132,7 @@ attributes: description: An individual search term. The syntax is determined by the syntax slot comments: - - This slot is optional when the configuration is used to paramterize multiple + - This slot is optional when the configuration is used to parameterize multiple searches - If multiple terms are provided this is treated as a union query from_schema: https://w3id.org/oak/search-datamodel @@ -222,7 +222,7 @@ attributes: description: An individual search term. The syntax is determined by the syntax slot comments: - - This slot is optional when the configuration is used to paramterize multiple + - This slot is optional when the configuration is used to parameterize multiple searches - If multiple terms are provided this is treated as a union query from_schema: https://w3id.org/oak/search-datamodel diff --git a/docs/datamodels/search/search_terms.md b/docs/datamodels/search/search_terms.md index 85c7a8726..b090887b5 100644 --- a/docs/datamodels/search/search_terms.md +++ b/docs/datamodels/search/search_terms.md @@ -36,7 +36,7 @@ URI: [ontosearch:search_terms](https://w3id.org/oak/search-datamodel/search_term ## Comments -* This slot is optional when the configuration is used to paramterize multiple searches +* This slot is optional when the configuration is used to parameterize multiple searches * If multiple terms are provided this is treated as a union query ## Identifier and Mapping Information @@ -62,7 +62,7 @@ URI: [ontosearch:search_terms](https://w3id.org/oak/search-datamodel/search_term name: search_terms description: An individual search term. The syntax is determined by the syntax slot comments: -- This slot is optional when the configuration is used to paramterize multiple searches +- This slot is optional when the configuration is used to parameterize multiple searches - If multiple terms are provided this is treated as a union query from_schema: https://w3id.org/oak/search-datamodel rank: 1000 diff --git a/docs/datamodels/summary-statistics/Objectidentifier.md b/docs/datamodels/summary-statistics/Objectidentifier.md index db861de65..cee14e6b7 100644 --- a/docs/datamodels/summary-statistics/Objectidentifier.md +++ b/docs/datamodels/summary-statistics/Objectidentifier.md @@ -21,7 +21,7 @@ URI: [shex:iri](http://www.w3.org/ns/shex#iri) ## Comments -* Used for inheritence and type checking +* Used for inheritance and type checking ## Identifier and Mapping Information diff --git a/docs/datamodels/text-annotator/Objectidentifier.md b/docs/datamodels/text-annotator/Objectidentifier.md index d74c17b4b..fe1e8e605 100644 --- a/docs/datamodels/text-annotator/Objectidentifier.md +++ b/docs/datamodels/text-annotator/Objectidentifier.md @@ -21,7 +21,7 @@ URI: [shex:iri](http://www.w3.org/ns/shex#iri) ## Comments -* Used for inheritence and type checking +* Used for inheritance and type checking ## Identifier and Mapping Information diff --git a/docs/datamodels/validation/Objectidentifier.md b/docs/datamodels/validation/Objectidentifier.md index 9941e6921..36f06798e 100644 --- a/docs/datamodels/validation/Objectidentifier.md +++ b/docs/datamodels/validation/Objectidentifier.md @@ -21,7 +21,7 @@ URI: [shex:iri](http://www.w3.org/ns/shex#iri) ## Comments -* Used for inheritence and type checking +* Used for inheritance and type checking ## Identifier and Mapping Information diff --git a/docs/faq/architecture.rst b/docs/faq/architecture.rst index d06677d93..965a231a6 100644 --- a/docs/faq/architecture.rst +++ b/docs/faq/architecture.rst @@ -67,7 +67,7 @@ OAK uses a mixture of native an external data models. Native data models have the OAK w3id namespace - for example, ``_. -What is an interator and why does OAK use them so much? +What is an iterator and why does OAK use them so much? --------------------- OAK uses iterators in place of lists in a lot of places, in order to make the diff --git a/docs/glossary.rst b/docs/glossary.rst index a8b20e820..c5266e63b 100644 --- a/docs/glossary.rst +++ b/docs/glossary.rst @@ -195,7 +195,7 @@ For a deeper dive into some of these concepts, see the :ref:`guide`. Ancestor The :term:`Ancestor` of an entity is the set of all entities that are reachable by following all :term:`Relationship`s, from :term:`subject` or :term:`object`. Ancestor traversal is frequently - paramaterized by a set of :term:`Predicates`. The concept of :term:`Ancestor` and + parameterized by a set of :term:`Predicates`. The concept of :term:`Ancestor` and graph traversal is closely related to the concept of :term:`Entailment` in :term:`OWL`. - See also :ref:`relationships_and_graphs` in the Guide. diff --git a/docs/guide/curies-and-uris.rst b/docs/guide/curies-and-uris.rst index 9c39e2947..bff67c1bc 100644 --- a/docs/guide/curies-and-uris.rst +++ b/docs/guide/curies-and-uris.rst @@ -117,7 +117,7 @@ can understand. These can be used in the same way: subject subject_label predicate predicate_label object object_label schema:Person Person rdfs:subClassOf None schema:Thing Thing -Futher reading +Further reading -------------- * `OBO Foundry Identifiers `_ diff --git a/docs/howtos/fhir-conversions.rst b/docs/howtos/fhir-conversions.rst index ec7877262..64c09a332 100644 --- a/docs/howtos/fhir-conversions.rst +++ b/docs/howtos/fhir-conversions.rst @@ -67,7 +67,7 @@ concepts that are not native to that CodeSystem. In cases where they do appear, references, unless this flag is present, in which case the converter will attempt to construct CURIEs. predicate_period_replacement (default=False): _Predicates URIs populated into `CodeSystem. -concept.property.code` and `CodeSystem.concept.property.code`, but the popular FHIR server "HAPI" has a bug in whih +concept.property.code` and `CodeSystem.concept.property.code`, but the popular FHIR server "HAPI" has a bug in which periods '.' cause errors. If this flag is present, periods will be replaced with underscores '_'. Example: diff --git a/docs/intro/tutorial07.rst b/docs/intro/tutorial07.rst index ecb425c2c..3ebdfb6c6 100644 --- a/docs/intro/tutorial07.rst +++ b/docs/intro/tutorial07.rst @@ -14,7 +14,7 @@ The :ref:`sql_implementation` wraps SQLite or any relational database. Download a SQLite file ---------------- -You can download ready made SQLite files for any :term:`OBO` Libray ontology +You can download ready made SQLite files for any :term:`OBO` Library ontology For example: the Cell Ontology (CL) is available from https://s3.amazonaws.com/bbop-sqlite/cl.db.gz diff --git a/notebooks/Commands/DiffViaMappings.ipynb b/notebooks/Commands/DiffViaMappings.ipynb index 8f281883a..0ab114d56 100644 --- a/notebooks/Commands/DiffViaMappings.ipynb +++ b/notebooks/Commands/DiffViaMappings.ipynb @@ -690,7 +690,7 @@ "\n", "### Non-entailed relationships\n", "\n", - "i.e. this is an edge in UBERON that corresonds to a different kind of edge in ZFA (or vice versa), where the former\n", + "i.e. this is an edge in UBERON that corresponds to a different kind of edge in ZFA (or vice versa), where the former\n", "doesn't subsume the latter.\n", "\n", "For example, in UBERON PNS *part_of* NS; in ZFA PNS *is_a* NS" diff --git a/notebooks/Commands/Enrichment.ipynb b/notebooks/Commands/Enrichment.ipynb index 80a1bd2b7..1b2419a99 100644 --- a/notebooks/Commands/Enrichment.ipynb +++ b/notebooks/Commands/Enrichment.ipynb @@ -889,7 +889,7 @@ "id": "b37993c2-f9b3-47a5-bd09-156eab378f49", "metadata": {}, "source": [ - "This is identical to the gene list in the original examle, and can be used in the same way" + "This is identical to the gene list in the original example, and can be used in the same way" ] }, { diff --git a/notebooks/Commands/TaxonConstraints.ipynb b/notebooks/Commands/TaxonConstraints.ipynb index 7c38f1d10..2e26d129d 100644 --- a/notebooks/Commands/TaxonConstraints.ipynb +++ b/notebooks/Commands/TaxonConstraints.ipynb @@ -311,7 +311,7 @@ "source": [ "## Evaluating Candidate taxon constraints\n", "\n", - "The related `apply-taxon-constraints` commmand can be used to test taxon constraints\n", + "The related `apply-taxon-constraints` command can be used to test taxon constraints\n", "\n" ] }, diff --git a/notebooks/Developers-Tutorial.ipynb b/notebooks/Developers-Tutorial.ipynb index 6fd68210c..53b572353 100644 --- a/notebooks/Developers-Tutorial.ipynb +++ b/notebooks/Developers-Tutorial.ipynb @@ -125,7 +125,7 @@ "![images/oak-docs-code.png](images/oak-docs-code.png)\n", "\n", "If you click the \"copy\" button it will copy the code only (no `>>>`s, and no output) such that you\n", - "can paste directly into a Pythin REPL or a notebook (provided the paths are preserved).\n", + "can paste directly into a Python REPL or a notebook (provided the paths are preserved).\n", "\n", "E.g. try copying this section from the docs\n", "\n", @@ -256,7 +256,7 @@ "The [BasicOntologyInterface](https://incatools.github.io/ontology-access-kit/packages/interfaces/basic) provides basic methods that encompass the majority of what most people need to do when\n", "working with ontologies - lookups of various kinds as well as simple graph operations.\n", "\n", - "OAK has the architectural concept of separating interfaces from implementatations. It helps to read about this concept, but for now you don't need to worry about it. We are using the sql adapter which fully *implements* almost all the existing OAK interfaces" + "OAK has the architectural concept of separating interfaces from implementations. It helps to read about this concept, but for now you don't need to worry about it. We are using the sql adapter which fully *implements* almost all the existing OAK interfaces" ] }, { @@ -313,7 +313,7 @@ "\n", "Let's try working with descendants.\n", "\n", - "This time we are going to demonstate how OAK deals with collections.\n", + "This time we are going to demonstrate how OAK deals with collections.\n", "\n", "__note__ _we expect the following code **not** to work_" ] diff --git a/notebooks/Lessons/PrefixMaps.ipynb b/notebooks/Lessons/PrefixMaps.ipynb index b1f9a5952..c7189af8e 100644 --- a/notebooks/Lessons/PrefixMaps.ipynb +++ b/notebooks/Lessons/PrefixMaps.ipynb @@ -869,7 +869,7 @@ "ERROR:root:Multiple labels for OAE:0000352 = ['a pain AE that occurs in shoulder', 'shoulder pain is a pain iin or around the shoulder joint']\n", "WARNING:root:Multiple labels for OAE:0001610 = abdomen crushing AE != blood folate level abnormal AE\n", "\n", - "ERROR:root:Multiple labels for OAE:0001610 = ['a metabolic and nutritional investigation result abnormal AE that is charaterized by an abnormal blood folate level', 'This is an AE which is a symptom associated with both non-serious and serious medical issues.']\n", + "ERROR:root:Multiple labels for OAE:0001610 = ['a metabolic and nutritional investigation result abnormal AE that is characterized by an abnormal blood folate level', 'This is an AE which is a symptom associated with both non-serious and serious medical issues.']\n", "WARNING:root:Multiple labels for OAE:0001628 = blood pH decreased AE\n", " != hernial eventration AE\n", "ERROR:root:Multiple labels for OAE:0001628 = ['This is an AE which is the protrusion of contents of the abdomen through a defect or weakness in the abdominal wall.', 'a blood pH abnormal AE that is characterized by a decreased blood pH']\n", diff --git a/notebooks/Lessons/Why-predicates-are-important.ipynb b/notebooks/Lessons/Why-predicates-are-important.ipynb index 76707bfee..49c70fc5e 100644 --- a/notebooks/Lessons/Why-predicates-are-important.ipynb +++ b/notebooks/Lessons/Why-predicates-are-important.ipynb @@ -563,7 +563,7 @@ "\n", "## So how do we handle these?\n", "\n", - "At this point you might be thinking it makes no sense to use measures like semantic similarity over cyclic graphs. Or that it may be necessary to include ad-hoc measures like maximim distance. _But this isn't the case_\n", + "At this point you might be thinking it makes no sense to use measures like semantic similarity over cyclic graphs. Or that it may be necessary to include ad-hoc measures like maximum distance. _But this isn't the case_\n", "\n", "Because ontology graphs are _existential graphs_ over concepts, where the existence of the subject depends on the existence of the object, you can still use algorithms designed with concepts of \"ancestors\" and \"descendants\". The overall structure of the relation graph will still (in general) follow a pattern of narrowing down to more general concepts.\n", "\n", diff --git a/notebooks/Monarch/PhenIO-Tutorial.ipynb b/notebooks/Monarch/PhenIO-Tutorial.ipynb index 7a7bd1b56..4f956cb3b 100644 --- a/notebooks/Monarch/PhenIO-Tutorial.ipynb +++ b/notebooks/Monarch/PhenIO-Tutorial.ipynb @@ -289,7 +289,7 @@ "\n", "#### siblings\n", "\n", - "Next we will explore siblings. Again, we paramaterize the predicate list to avoid flooding results:" + "Next we will explore siblings. Again, we parameterize the predicate list to avoid flooding results:" ] }, { diff --git a/notebooks/Neuro/CL-Neuro-Tutorial.ipynb b/notebooks/Neuro/CL-Neuro-Tutorial.ipynb index 300ea3478..08440ac6e 100644 --- a/notebooks/Neuro/CL-Neuro-Tutorial.ipynb +++ b/notebooks/Neuro/CL-Neuro-Tutorial.ipynb @@ -1379,7 +1379,7 @@ "source": [ "### Complex queries\n", "\n", - "We can also make use of entailed egdes in complex boolean queries.\n", + "We can also make use of entailed edges in complex boolean queries.\n", "\n", "The following query is an *intersection* (using `and`) syntax of\n", "\n", diff --git a/pyproject.toml b/pyproject.toml index 7122a93f5..ff7161128 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -79,3 +79,8 @@ profile = "black" multi_line_output = 3 include_trailing_comma = true reverse_relative = true + +[tool.codespell] +skip = '.git,*.pdf,*.svg,poetry.lock,*.obo,*.ttl,*.ofn,*.gaf,*.tsv,*.json,input' +ignore-regex = '(^\s*"image/\S+": ".*|[a-z]*\.\.\.)' +ignore-words-list = 'ptd,ot,nd,ser,oger,gard,te,fo,fof,bu,ue,ois,processus,infarction,infarctions' diff --git a/src/oaklib/cli.py b/src/oaklib/cli.py index 092fb44a8..1a0b94305 100644 --- a/src/oaklib/cli.py +++ b/src/oaklib/cli.py @@ -1258,7 +1258,7 @@ def statistics( For bundled ontologies, we recommend some kind of partitioning, such as via defined roots, or via the CURIE prefix, using the ``--group-by-prefix`` option. - Ouput formats: + Output formats: The recommended output types for this command are yaml, json, or csv. The default output type is yaml, following the SummaryStatistics data model. @@ -2027,7 +2027,7 @@ def ancestors( This will show ancestry over the full relationship graph. Like any relational OAK command, this can be filtered by relationship type (predicate), using --predicate (-p). - For exampple, constrained to is-a and part-of: + For example, constrained to is-a and part-of: runoak -i cl.owl ancestors CL:4023094 -p i,BFO:0000050 diff --git a/src/oaklib/converters/obo_graph_to_fhir_converter.py b/src/oaklib/converters/obo_graph_to_fhir_converter.py index da2bf03f9..29049a30d 100644 --- a/src/oaklib/converters/obo_graph_to_fhir_converter.py +++ b/src/oaklib/converters/obo_graph_to_fhir_converter.py @@ -158,7 +158,7 @@ def convert( will attempt to construct CURIEs. (not implemented) :param predicate_period_replacement: Predicates URIs populated into `CodeSystem.concept.property.packages` and `CodeSystem.concept.property.packages`, but the HAPI FHIR server - has a bug in whih periods '.' cause errors. If this flag is present, + has a bug in which periods '.' cause errors. If this flag is present, periods will be replaced with underscores '_'. :return: FHIR CodeSystem object """ diff --git a/src/oaklib/datamodels/obograph.yaml b/src/oaklib/datamodels/obograph.yaml index cd56fd3e1..e62605ecb 100644 --- a/src/oaklib/datamodels/obograph.yaml +++ b/src/oaklib/datamodels/obograph.yaml @@ -228,7 +228,7 @@ slots: inlined_as_list: true description: >- All nodes present in a graph. This includes class nodes as well as supporting nodes, including - nodes representing relationship types, subsets, annotation proeprties, etc + nodes representing relationship types, subsets, annotation properties, etc edges: multivalued: true range: Edge diff --git a/src/oaklib/datamodels/search_datamodel.yaml b/src/oaklib/datamodels/search_datamodel.yaml index a14792f07..9bb8d6017 100644 --- a/src/oaklib/datamodels/search_datamodel.yaml +++ b/src/oaklib/datamodels/search_datamodel.yaml @@ -56,7 +56,7 @@ classes: description: >- An individual search term. The syntax is determined by the syntax slot comments: - - This slot is optional when the configuration is used to paramterize multiple searches + - This slot is optional when the configuration is used to parameterize multiple searches - If multiple terms are provided this is treated as a union query syntax: range: SearchTermSyntax diff --git a/src/oaklib/datamodels/taxon_constraints.yaml b/src/oaklib/datamodels/taxon_constraints.yaml index 0c9be38f4..623526f31 100644 --- a/src/oaklib/datamodels/taxon_constraints.yaml +++ b/src/oaklib/datamodels/taxon_constraints.yaml @@ -113,7 +113,7 @@ classes: predicate: slot_uri: rdf:predicate range: PredicateTerm - description: The relationship type for the contraint (e.g. in_taxon, never_in taxon) + description: The relationship type for the constraint (e.g. in_taxon, never_in taxon) todos: - define a value set of this asserted: diff --git a/src/oaklib/interfaces/association_provider_interface.py b/src/oaklib/interfaces/association_provider_interface.py index e94d681b7..4804afee0 100644 --- a/src/oaklib/interfaces/association_provider_interface.py +++ b/src/oaklib/interfaces/association_provider_interface.py @@ -170,7 +170,7 @@ def associations( PomBase:SPAC1142.02c sgt2 ... - When determinining a match on `objects`, the predicates in ``object_closure_predicates`` is used. + When determining a match on `objects`, the predicates in ``object_closure_predicates`` is used. We recommend you always explicitly provide this. A good choice is typically IS_A and PART_OF for ontologies like GO, Uberon, CL, ENVO. diff --git a/src/oaklib/interfaces/basic_ontology_interface.py b/src/oaklib/interfaces/basic_ontology_interface.py index c52afb43f..1c8c495bb 100644 --- a/src/oaklib/interfaces/basic_ontology_interface.py +++ b/src/oaklib/interfaces/basic_ontology_interface.py @@ -91,7 +91,7 @@ class BasicOntologyInterface(OntologyInterface, ABC): horsetail nucleus nucleus - This omits metdata about the synonym, such as the predicate, source, and type. + This omits metadata about the synonym, such as the predicate, source, and type. For this more granular view, the :ref:`obograph_interface` can be used. Basic concepts: diff --git a/src/oaklib/interfaces/mapping_provider_interface.py b/src/oaklib/interfaces/mapping_provider_interface.py index 6eaa084c3..ad5d30c41 100644 --- a/src/oaklib/interfaces/mapping_provider_interface.py +++ b/src/oaklib/interfaces/mapping_provider_interface.py @@ -223,7 +223,7 @@ def normalize_prefix( """ Normalize a CURIE to a target prefix. - If a prefix alias map is supplied, this is takes precendence: + If a prefix alias map is supplied, this is takes precedence: >>> from oaklib import get_adapter >>> adapter = get_adapter("tests/input/go-nucleus.obo") diff --git a/src/oaklib/interfaces/taxon_constraint_interface.py b/src/oaklib/interfaces/taxon_constraint_interface.py index 847681ae5..30a7e77b7 100644 --- a/src/oaklib/interfaces/taxon_constraint_interface.py +++ b/src/oaklib/interfaces/taxon_constraint_interface.py @@ -321,7 +321,7 @@ def filter_nr_never(self, taxa: Collection[TAXON_CURIE]) -> List[TAXON_CURIE]: return list(include) def _fill_missing(self, st: SubjectTerm): - # fills in trivial inferrable information + # fills in trivial inferable information for tc in st.only_in: if not tc.subject: tc.subject = st.id diff --git a/src/oaklib/utilities/ner_utilities.py b/src/oaklib/utilities/ner_utilities.py index 5ab79d8c0..753ed765d 100644 --- a/src/oaklib/utilities/ner_utilities.py +++ b/src/oaklib/utilities/ner_utilities.py @@ -1,5 +1,5 @@ """ -Utilites used for annotation and lexmatch processes. +Utilities used for annotation and lexmatch processes. """ from pathlib import Path diff --git a/src/oaklib/utilities/subsets/value_set_expander.py b/src/oaklib/utilities/subsets/value_set_expander.py index cebd45663..05cef35d9 100644 --- a/src/oaklib/utilities/subsets/value_set_expander.py +++ b/src/oaklib/utilities/subsets/value_set_expander.py @@ -264,7 +264,7 @@ def expand(config: str, schema: str, value_set_names: List[str], output: str): """ Expand a value set. EXPERIMENTAL. - This will expand an *intensional value set* (aka *dynamic enum*), running a query against + This will expand an *intentional value set* (aka *dynamic enum*), running a query against an ontology backend or backends to materialize the value set (permissible values). Currently the value set must be specified as LinkML, but in future this will be diff --git a/tests/__init__.py b/tests/__init__.py index 9d0d2f791..c0c4f990e 100644 --- a/tests/__init__.py +++ b/tests/__init__.py @@ -140,7 +140,7 @@ def object_is_subsumed_by_member_of(obj: YAMLRoot, obj_list: List[YAMLRoot], **k def filecmp_difflib(left_path: Path, right_path: Path) -> bool: - """Platfom neutral filecmp.cmp(..) function for text files + """Platform neutral filecmp.cmp(..) function for text files Files are read in text mode to ignore newline differences. """ diff --git a/tests/test_implementations/test_semsimian_implementation.py b/tests/test_implementations/test_semsimian_implementation.py index 288082900..0ece4e971 100644 --- a/tests/test_implementations/test_semsimian_implementation.py +++ b/tests/test_implementations/test_semsimian_implementation.py @@ -28,7 +28,7 @@ } -@unittest.skipIf(os.name == "nt", "DB path loading inconsisent on Windows") +@unittest.skipIf(os.name == "nt", "DB path loading inconsistent on Windows") class TestSemSimianImplementation(unittest.TestCase): """Implementation tests for Rust-based semantic similarity.""" diff --git a/tests/test_utilities/test_association_index.py b/tests/test_utilities/test_association_index.py index 15bd4f405..d6c6ede0d 100644 --- a/tests/test_utilities/test_association_index.py +++ b/tests/test_utilities/test_association_index.py @@ -16,7 +16,7 @@ class AssociationIndexTest(unittest.TestCase): """Tests indexing associations in-memory.""" def test_index(self): - """Tests in-memory index by laoding from GAF.""" + """Tests in-memory index by loading from GAF.""" parser = XafAssociationParser( subject_column=ColumnReference(1), object_column=ColumnReference(4) )