From 9ef97e3b6f0bb5a2b55e8d128af8b8a649859340 Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Sun, 14 Jan 2024 10:13:09 -0500 Subject: [PATCH 1/5] Add github action to codespell main on push and PRs --- .github/workflows/codespell.yml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 .github/workflows/codespell.yml diff --git a/.github/workflows/codespell.yml b/.github/workflows/codespell.yml new file mode 100644 index 0000000..0a173a4 --- /dev/null +++ b/.github/workflows/codespell.yml @@ -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@v3 + - name: Codespell + uses: codespell-project/actions-codespell@v2 From 91c81eb92f910d16f01fd6b7b5a3ecd91cc519e2 Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Sun, 14 Jan 2024 10:13:09 -0500 Subject: [PATCH 2/5] Add rudimentary codespell config --- pyproject.toml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index 3d4774f..667915c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -47,3 +47,10 @@ profile = "black" multi_line_output = 3 include_trailing_comma = true reverse_relative = true + +# Ref: https://github.com/codespell-project/codespell#using-a-config-file +[tool.codespell] +skip = '.git,*.pdf,*.svg,go.sum,*.lock' +check-hidden = true +ignore-regex = '^\s*"image/\S+": ".*' +# ignore-words-list = '' From a69a734ad1775757ef9d7344ebfac83d61e93406 Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Sun, 14 Jan 2024 10:17:22 -0500 Subject: [PATCH 3/5] Custom skips for codespell --- pyproject.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 667915c..1da5e61 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -52,5 +52,5 @@ reverse_relative = true [tool.codespell] skip = '.git,*.pdf,*.svg,go.sum,*.lock' check-hidden = true -ignore-regex = '^\s*"image/\S+": ".*' -# ignore-words-list = '' +ignore-regex = '(^\s*"image/\S+": ".*|\b(KEGG.BRITE|mor.nlm.nih.gov)\b)' +ignore-words-list = 'infarction,amination' From c7b8436e76c2fb8016efbc069a2b038168893878 Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Sun, 14 Jan 2024 10:20:46 -0500 Subject: [PATCH 4/5] [DATALAD RUNCMD] run codespell throughout but ignore fail === Do not change lines below === { "chain": [], "cmd": "codespell -w || :", "exit": 0, "extra_inputs": [], "inputs": [], "outputs": [], "pwd": "." } ^^^ Do not change lines above ^^^ --- README.md | 2 +- src/docs/specification/compliance.md | 2 +- tests/input/examples/biolink/source/biolink-model.yaml | 6 +++--- tests/test_compliance/test_compliance_suite.py | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index f853868..f826e33 100644 --- a/README.md +++ b/README.md @@ -123,7 +123,7 @@ The data model for transformations mirrors the data model for schemas: - A top level `TransformationSpecification` class contains: - Zero or more `ClassDerivation` objects, specifying how to map to a class, containing: - Zero or more `SlotDerivation` objects, specifying how to map to a slot, containing: - - Zero or more `EnumDerivation` objects, specifying how to map permissable values. + - Zero or more `EnumDerivation` objects, specifying how to map permissible values. See the [generated docs](https://linkml.github.io/linkml-transformer/) diff --git a/src/docs/specification/compliance.md b/src/docs/specification/compliance.md index 80dbaab..2c28760 100644 --- a/src/docs/specification/compliance.md +++ b/src/docs/specification/compliance.md @@ -30,7 +30,7 @@ Each test is designed to demonstrate: - data mapping (transformation) - derived schemas - inversion (reverse transformation) (in some cases) -- compliation to other frameworks (coming soon) +- compilation to other frameworks (coming soon) Feature Set: test\_map\_types ----------------------------- diff --git a/tests/input/examples/biolink/source/biolink-model.yaml b/tests/input/examples/biolink/source/biolink-model.yaml index fd31e41..442dc04 100644 --- a/tests/input/examples/biolink/source/biolink-model.yaml +++ b/tests/input/examples/biolink/source/biolink-model.yaml @@ -3287,7 +3287,7 @@ slots: process or chemical entity that is used to treat the condition domain: disease or phenotypic feature range: chemical or drug or treatment - # range: chemical or drug or treatement + # range: chemical or drug or treatment in_subset: - translator_minimal inverse: treats @@ -5020,7 +5020,7 @@ slots: The most upstream source of the knowledge expressed in an Association that an implementer can identify. Performing a rigorous analysis of upstream data providers is expected; every effort is made to catalog the most upstream source of data in this property. Only one data source should be declared - primary in any association. "aggregator knowledge source" can be used to caputre non-primary sources. + primary in any association. "aggregator knowledge source" can be used to capture non-primary sources. range: information resource notes: >- For example: a single ChemicalToGene Edge originally curated by ClinicalTrials.org, is aggregated by ChEMBL, then @@ -5199,7 +5199,7 @@ slots: supporting documents: is_a: association slot description: >- - One or more referencable documents that report the statement expressed in an Association, or provide + One or more referenceable documents that report the statement expressed in an Association, or provide information used as evidence supporting this statement. range: uriorcurie multivalued: true diff --git a/tests/test_compliance/test_compliance_suite.py b/tests/test_compliance/test_compliance_suite.py index 26dfc36..bad8e4f 100644 --- a/tests/test_compliance/test_compliance_suite.py +++ b/tests/test_compliance/test_compliance_suite.py @@ -60,7 +60,7 @@ - data mapping (transformation) - derived schemas - inversion (reverse transformation) (in some cases) -- compliation to other frameworks (coming soon) +- compilation to other frameworks (coming soon) """ ) From f3aa2d43c3435016819840bab9762648555636b4 Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Sun, 14 Jan 2024 10:20:59 -0500 Subject: [PATCH 5/5] [DATALAD RUNCMD] Do interactive fixing of some ambigous typos === Do not change lines below === { "chain": [], "cmd": "codespell -w -i 3 -C 2", "exit": 0, "extra_inputs": [], "inputs": [], "outputs": [], "pwd": "." } ^^^ Do not change lines above ^^^ --- tests/input/examples/biolink/source/biolink-model.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/input/examples/biolink/source/biolink-model.yaml b/tests/input/examples/biolink/source/biolink-model.yaml index 442dc04..1819b89 100644 --- a/tests/input/examples/biolink/source/biolink-model.yaml +++ b/tests/input/examples/biolink/source/biolink-model.yaml @@ -1420,7 +1420,7 @@ slots: to express the statement that “Chemical X causes increased expression of Gene Y”, the core triple is read using the fields subject:ChemX, predicate:affects, object:GeneY . . . and the full statement is read using the fields subject:ChemX, qualified_predicate:causes, object:GeneY, object_aspect: expression, - object_direction:increased. The predicate ‘affects’ is needed for the core triple reading, but doesnt make + object_direction:increased. The predicate ‘affects’ is needed for the core triple reading, but doesn't make sense in the full statement reading (because “Chemical X affects increased expression of Gene Y'' is not what we mean to say here: it causes increased expression of Gene Y) @@ -3194,7 +3194,7 @@ slots: and a condition (a phenotype or disease), where the presence of the entity reduces or eliminates some or all aspects of the condition. - # 'biological entity' currently includes 'exposure event' which covers alot of related ground + # 'biological entity' currently includes 'exposure event' which covers a lot of related ground domain: named thing range: disease or phenotypic feature annotations: @@ -3216,7 +3216,7 @@ slots: environmental exposure, or some form of genetic variation) and a condition (a phenotype or disease), where the presence of the entity worsens some or all aspects of the condition. - # 'biological entity' currently includes 'exposure event' which covers alot of related ground + # 'biological entity' currently includes 'exposure event' which covers a lot of related ground domain: biological entity range: disease or phenotypic feature annotations: @@ -7501,7 +7501,7 @@ classes: in_subset: - model_organism_database narrow_mappings: - - SO:0000104 # polypeptide definde in SO conflates protein and polypeptide + - SO:0000104 # polypeptide defined in SO conflates protein and polypeptide # Amino Acid, Peptide, or Protein - STY:T116 # Amino Acid Sequence