Skip to content

Commit 35039a1

Browse files
authored
Merge pull request #138 from eScienceLab/typo-fixes
Fix typos; add `typos` package to CI
2 parents d194ab0 + 15e4f20 commit 35039a1

File tree

19 files changed

+1164
-1239
lines changed

19 files changed

+1164
-1239
lines changed

.github/workflows/testing.yaml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@ env:
2525
FORCE_COLOR: "1" # Force color output in CI
2626

2727
jobs:
28-
# Verifies pep8, pyflakes and circular complexity
29-
flake8:
30-
name: 🚨 Lint Python Code
28+
# Verifies pep8, pyflakes, circular complexity, and spelling
29+
lint:
30+
name: 🚨 Lint and spellcheck
3131
runs-on: ubuntu-latest
3232
steps:
3333
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
@@ -39,14 +39,16 @@ jobs:
3939
python-version: ${{ env.PYTHON_VERSION }}
4040
- name: 🔽 Install flake8
4141
run: pip install flake8
42-
- name: Run checks
42+
- name: Lint Python code
4343
run: flake8 -v rocrate_validator tests
44+
- name: ⌛ Spell check code and profiles (covers Python and SHACL)
45+
uses: crate-ci/[email protected]
4446

4547
# Runs the tests
4648
test:
4749
name: ⌛ Run tests
4850
runs-on: ubuntu-latest
49-
needs: [flake8]
51+
needs: [lint]
5052
steps:
5153
- name: ⬇️ Checkout
5254
uses: actions/checkout@v4

poetry.lock

Lines changed: 1125 additions & 1204 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ requests = ">=2.32,<3.0"
7070
requests-cache = ">=1.2,<2.0"
7171
inquirerpy = ">=0.3.4,<0.4.0"
7272
enum-tools = ">=0.12,<0.13"
73+
typos = "^1.41.0"
7374

7475
[tool.poetry.group.dev.dependencies]
7576
pyproject-flake8 = "^6.1.0"
@@ -105,3 +106,6 @@ skip_dirs = [".git", ".github", ".vscode"]
105106

106107
[tool.pytest.ini_options]
107108
testpaths = ["tests"]
109+
110+
[tool.typos.files]
111+
extend-exclude = ["tests/data","docs/diagrams","*.json","*.html","*__init__.py"]

rocrate_validator/profiles/process-run-crate/profile.ttl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
# it's in JSON-LD format
4545
dct:format <https://w3id.org/mediatype/application/ld+json> ;
4646

47-
# it conforms to JSON-LD, here refered to by its namespace URI as a Profile
47+
# it conforms to JSON-LD, here referred to by its namespace URI as a Profile
4848
dct:conformsTo <https://www.w3.org/TR/json-ld11/> ;
4949

5050
# this profile resource plays the role of "Vocabulary"
@@ -62,7 +62,7 @@
6262
# it's in HTML format
6363
dct:format <https://w3id.org/mediatype/text/html> ;
6464

65-
# it conforms to HTML, here refered to by its namespace URI as a Profile
65+
# it conforms to HTML, here referred to by its namespace URI as a Profile
6666
dct:conformsTo <https://www.w3.org/TR/html/> ;
6767

6868
# this profile resource plays the role of "Specification"

rocrate_validator/profiles/provenance-run-crate/profile.ttl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
# it's in JSON-LD format
4646
dct:format <https://w3id.org/mediatype/application/ld+json> ;
4747

48-
# it conforms to JSON-LD, here refered to by its namespace URI as a Profile
48+
# it conforms to JSON-LD, here referred to by its namespace URI as a Profile
4949
dct:conformsTo <https://www.w3.org/TR/json-ld11/> ;
5050

5151
# this profile resource plays the role of "Vocabulary"
@@ -63,7 +63,7 @@
6363
# it's in HTML format
6464
dct:format <https://w3id.org/mediatype/text/html> ;
6565

66-
# it conforms to HTML, here refered to by its namespace URI as a Profile
66+
# it conforms to HTML, here referred to by its namespace URI as a Profile
6767
dct:conformsTo <https://www.w3.org/TR/html/> ;
6868

6969
# this profile resource plays the role of "Specification"

rocrate_validator/profiles/provenance-run-crate/should/5_parameterconnection.ttl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ provenance-run-crate:ProvRCParameterConnectionReferencesRecommended a sh:NodeSha
2929
sh:description "Recommended references for ParameterConnection entities" ;
3030
sh:targetClass wfrun:ParameterConnection ;
3131
sh:property [
32-
sh:name "ParamenterConnection references" ;
32+
sh:name "ParameterConnection references" ;
3333
sh:description """References to `ParameterConnection` instances
3434
SHOULD follow the CWL convention,
3535
where connections to workflow output parameters are referenced by the workflow

rocrate_validator/profiles/ro-crate/may/4_data_entity_metadata.ttl

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ ro-crate:FileDataEntityWebOptionalProperties a sh:NodeShape ;
2727
for instance a landing page that describes the file, including persistence identifiers (e.g. DOI),
2828
resolving to an intermediate HTML page instead of the downloadable file directly.
2929
These can included for File Data Entities as additional metadata by using the properties:
30-
`ìdentifier`, `url`, `subjectOf`and `mainEntityOfPage`""" ;
30+
`identifier`, `url`, `subjectOf`and `mainEntityOfPage`""" ;
3131
sh:targetClass ro-crate:File ;
3232
# Check if the Web-based Data Entity has a contentSize property
3333
sh:property [
@@ -87,4 +87,3 @@ ro-crate:DirectoryDataEntityWebOptionalDistribution a sh:NodeShape ;
8787
sh:severity sh:Info ;
8888
sh:message """The Directory Data Entity MAY have a `distribution` property to denote the distribution of the files within the directory""" ;
8989
] .
90-

rocrate_validator/profiles/ro-crate/must/2_root_data_entity_metadata.ttl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ ro-crate:RootDataEntityRequiredProperties
129129
] ;
130130
sh:property [
131131
a sh:PropertyShape ;
132-
sh:name "Root Data Entity: `licence` property" ;
132+
sh:name "Root Data Entity: `license` property" ;
133133
sh:description """Check if the Root Data Entity includes a `license` property (as specified by schema.org)
134134
to provide information about the license of the dataset.""" ;
135135
sh:path schema_org:license;

rocrate_validator/profiles/ro-crate/must/4_data_entity_metadata.ttl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
ro-crate:DataEntityRequiredProperties a sh:NodeShape ;
2424
sh:name "Data Entity: REQUIRED properties" ;
2525
sh:description """A Data Entity MUST be a `URI Path` relative to the ROCrate root,
26-
or an sbsolute URI""" ;
26+
or an absolute URI""" ;
2727
sh:targetClass ro-crate:DataEntity ;
2828

2929
sh:property [
@@ -130,9 +130,9 @@ ro-crate:DirectoryDataEntity a sh:NodeShape ;
130130
sh:severity sh:Violation ;
131131
] .
132132

133-
ro-crate:DataEntityRquiredPropertiesShape a sh:NodeShape ;
133+
ro-crate:DataEntityRequiredPropertiesShape a sh:NodeShape ;
134134
sh:name "Data Entity: REQUIRED properties" ;
135-
sh:description """A `DataEntity` MUST be linked, either directly or inderectly, from the Root Data Entity""" ;
135+
sh:description """A `DataEntity` MUST be linked, either directly or indirectly, from the Root Data Entity""" ;
136136
sh:targetClass ro-crate:DataEntity ;
137137
sh:property
138138
[
@@ -141,7 +141,7 @@ ro-crate:DataEntityRquiredPropertiesShape a sh:NodeShape ;
141141
sh:node schema_org:Dataset ;
142142
sh:minCount 1 ;
143143
sh:name "Data Entity MUST be directly referenced" ;
144-
sh:description """Check if the Data Entity is linked, either directly of inderectly, to the `Root Data Entity` using the `hasPart` (as defined in `schema.org`) property" """ ;
144+
sh:description """Check if the Data Entity is linked, either directly or indirectly, to the `Root Data Entity` using the `hasPart` (as defined in `schema.org`) property" """ ;
145145
# sh:message "A Data Entity MUST be directly or indirectly linked to the `Root Data Entity` through the `hasPart` property" ;
146146
] .
147147

rocrate_validator/profiles/ro-crate/must/6_contextual_entity.ttl

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424

2525
ro-crate:FindLicenseEntity a sh:NodeShape, validator:HiddenShape ;
2626
sh:name "Identify License Entity" ;
27-
sh:description """Mark a license entity any Data Entity referenced by the `schema:licence` property.""" ;
27+
sh:description """Mark a license entity any Data Entity referenced by the `schema:license` property.""" ;
2828
sh:target [
2929
a sh:SPARQLTarget ;
3030
sh:prefixes ro-crate:sparqlPrefixes ;
@@ -68,7 +68,7 @@ ro-crate:WebSiteRecommendedProperties a sh:NodeShape ;
6868

6969
ro-crate:CreativeWorkAuthorDefinition a sh:NodeShape, validator:HiddenShape ;
7070
sh:name "CreativeWork Author Definition" ;
71-
sh:description """Define the `CretiveWorkAuthor` as the `Person` object of the `schema:author` predicate.""" ;
71+
sh:description """Define the `CreativeWorkAuthor` as the `Person` object of the `schema:author` predicate.""" ;
7272
sh:targetObjectsOf schema:author ;
7373
sh:rule [
7474
a sh:TripleRule ;
@@ -79,4 +79,3 @@ ro-crate:CreativeWorkAuthorDefinition a sh:NodeShape, validator:HiddenShape ;
7979
sh:property [ sh:path rdf:type ; sh:hasValue schema:Person ; sh:minCount 1 ] ;
8080
] ;
8181
] .
82-

0 commit comments

Comments
 (0)