Skip to content

Commit

Permalink
Merge pull request #80 from yarikoptic/enh-codespell
Browse files Browse the repository at this point in the history
Add codespell support (config, workflow to detect/not fix) and make it fix few typos
  • Loading branch information
jsheunis authored Feb 26, 2025
2 parents 575c348 + 38b333c commit d52103a
Show file tree
Hide file tree
Showing 14 changed files with 44 additions and 13 deletions.
6 changes: 6 additions & 0 deletions .codespellrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[codespell]
# Ref: https://github.com/codespell-project/codespell#using-a-config-file
skip = .git*,*.svg,package-lock.json,*.css,.codespellrc
check-hidden = true
# ignore-regex =
# ignore-words-list =
25 changes: 25 additions & 0 deletions .github/workflows/codespell.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Codespell configuration is within .codespellrc
---
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@v4
- name: Annotate locations with typos
uses: codespell-project/codespell-problem-matcher@v1
- name: Codespell
uses: codespell-project/actions-codespell@v2
2 changes: 1 addition & 1 deletion docs/app-inputs.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ As an example, for `shacl-vue`'s demo instance the SHACL shapes graph at [shacl-

## Creating the class hierarchy

As with the schema and SHACL generation above, LinkML and helper scripts can be used to generate the required `shacl-vue` inut. Here, LinkML's OWL generator is used, and the output is then filtered to only include all triples in the graph where the predicate equals `rdfs:subClassOf`. This is linked-data speak for saying: lets only extract all information about which class is a subclass of which other class, which allows us to put together a hierarchy of classes.
As with the schema and SHACL generation above, LinkML and helper scripts can be used to generate the required `shacl-vue` input. Here, LinkML's OWL generator is used, and the output is then filtered to only include all triples in the graph where the predicate equals `rdfs:subClassOf`. This is linked-data speak for saying: lets only extract all information about which class is a subclass of which other class, which allows us to put together a hierarchy of classes.

A Python script for this process is available at [shacl-vue/tools/gen_owl_minimal.py](https://github.com/psychoinformatics-de/shacl-vue/blob/main/tools/gen_owl_minimal.py) and can be used as follows via the command line:

Expand Down
2 changes: 1 addition & 1 deletion docs/core-concepts.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ Currently, `shacl-vue` does not yet support the full SHACL specification, only t

The application makes extensive use of:

- [Vue Components](https://vuejs.org/guide/essentials/component-basics.html) to create standalone functional units that specify their own look and feel (`<template>`), their logic and state management code (`<scritp setup>`), additional JavaScript code (`<script>`), and any optional local styling (`<style scoped>`). These components are the main driver behind `shacl-vue`'s ability to render different forms and fields based on the specifications in a SHACL schema.
- [Vue Components](https://vuejs.org/guide/essentials/component-basics.html) to create standalone functional units that specify their own look and feel (`<template>`), their logic and state management code (`<script setup>`), additional JavaScript code (`<script>`), and any optional local styling (`<style scoped>`). These components are the main driver behind `shacl-vue`'s ability to render different forms and fields based on the specifications in a SHACL schema.
- [Lifecycle hooks](https://vuejs.org/guide/essentials/lifecycle) to run tasks during a component's life cycle, e.g. after creation or on mounting.
- [Provide / Inject](https://vuejs.org/guide/components/provide-inject.html) to share states between parent and child components
- [Composables](https://vuejs.org/guide/reusability/composables.html) to manage generalizable and reusable code across components.
Expand Down
2 changes: 1 addition & 1 deletion docs/editor-component.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ The custom nature of an editor component is established by adding any number of
}
function valueCombiner(values) {
// Determing internalValue from subvalues/subcomponents
// Determine internalValue from subvalues/subcomponents
return values.hex_text
}
Expand Down
2 changes: 1 addition & 1 deletion src/components/BooleanSelectEditor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
}
function valueCombiner(values) {
// Determing internalValue from subvalues/subcomponents
// Determine internalValue from subvalues/subcomponents
return values.switchVal
}
</script>
Expand Down
2 changes: 1 addition & 1 deletion src/components/DecimalEditor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
}
function valueCombiner(values) {
// Determing internalValue from subvalues/subcomponents
// Determine internalValue from subvalues/subcomponents
return values.decimal
}
Expand Down
2 changes: 1 addition & 1 deletion src/components/HexEditor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
}
function valueCombiner(values) {
// Determing internalValue from subvalues/subcomponents
// Determine internalValue from subvalues/subcomponents
return values.hex_text
}
Expand Down
2 changes: 1 addition & 1 deletion src/components/InstancesSelectEditor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@
}
function valueCombiner(values) {
// Determing internalValue from subvalues/subcomponents
// Determine internalValue from subvalues/subcomponents
return values.selectedInstance ? values.selectedInstance.value : null
}
Expand Down
2 changes: 1 addition & 1 deletion src/components/ShaclInEditor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
}
function valueCombiner(values) {
// Determing internalValue from subvalues/subcomponents
// Determine internalValue from subvalues/subcomponents
return values.selected_item
}
Expand Down
2 changes: 1 addition & 1 deletion src/components/TextAreaEditor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
}
function valueCombiner(values) {
// Determing internalValue from subvalues/subcomponents
// Determine internalValue from subvalues/subcomponents
return values.text
}
</script>
Expand Down
2 changes: 1 addition & 1 deletion src/components/TextFieldEditor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
}
function valueCombiner(values) {
// Determing internalValue from subvalues/subcomponents
// Determine internalValue from subvalues/subcomponents
return values.text
}
Expand Down
2 changes: 1 addition & 1 deletion src/components/UnknownEditor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
}
function valueCombiner(values) {
// Determing internalValue from subvalues/subcomponents
// Determine internalValue from subvalues/subcomponents
return null
}
</script>
4 changes: 2 additions & 2 deletions src/composables/formdata.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
// "https://concepts.datalad.org/s/distribution/unreleased/Person": { // RDF type of a subject
// "https://example.org/ns/dataset/#ahorst": { // A subject: named or blank node
// "https://concepts.datalad.org/s/distribution/unreleased/email": [] // A predicate: named node
// "shaclvue:termType": "NamedNode" // the nodetype of te subject: NamedNode or BlankNode
// "shaclvue:termType": "NamedNode" // the nodetype of the subject: NamedNode or BlankNode
// }
// },
// "https://concepts.datalad.org/s/prov/unreleased/Attribution": { // type
Expand Down Expand Up @@ -491,4 +491,4 @@ export function useFormData() {
quadsToFormData,
submitFormData,
}
}
}

0 comments on commit d52103a

Please sign in to comment.