Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document and enforce spelling policy #173

Merged
merged 2 commits into from
Jan 12, 2024
Merged
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
11 changes: 10 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
VALIDATE_MARKDOWN: true

jsonschema:
name: Validate examples
name: Validate Examples
runs-on: ubuntu-latest

steps:
Expand All @@ -47,3 +47,12 @@ jobs:

- name: Validate Examples
run: ./tools/verify-examples.sh

spellcheck:
name: Spellcheck (en_US)
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v3
- name: Spellcheck
uses: rojopolis/spellcheck-github-actions@0.35.0
98 changes: 98 additions & 0 deletions .spellcheck-en-custom.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
Auth
BD
CDF
CVE
Gerrit
Github
Gitlab
JSON
KH
KyjITcZXHotdMB
MEYCIQCBT
NGua
NIST
Notational
README
SCM
SIG
SRE
Tekton
TestRepo
URI
UUID
XiQlc
american
br
cardpane
cdevent
cdevents
ce
charset
cloudevents
contenttype
customdata
customdatacontenttype
datacontenttype
dataschema
deterministically
dev
emmitted
english
enum
eventdata
fas
fc
geo
href
http
iaas
img
interoperable
jenkins
json
lifecycle
markdownlint
md
modelled
mydata
myvalue
namespace
namespaceB
nnnn
notational
observability
param
pdf
pipelinerun
png
pre
quicktime
rfc
rolledback
runtime
somewherelse
specversion
src
subjectid
taskrun
tekton
testEnv
testcase
testcaserun
testkube
testoutput
testrunreport
testsuite
testsuiterun
ticketURI
toc
typesystem
uri
url
utf
viewUrl
wpaper
xml
ypDXWCjlNKfzTV
yshmiPmp
znnSMNkQIhAJ
37 changes: 37 additions & 0 deletions .spellcheck.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
matrix:
- name: json
aspell:
lang: en
d: en_US
camel-case: true
mode: url
sources:
- "**/*.json|!.github"
dictionary:
wordlists:
- .spellcheck-en-custom.txt
- name: markdown
aspell:
lang: en
d: en_US
camel-case: true
mode: url
sources:
- "**/*.md"
dictionary:
wordlists:
- .spellcheck-en-custom.txt
pipeline:
- pyspelling.filters.context:
context_visible_first: true
escapes: '\\[\\`~]'
delimiters:
# Ignore multiline content between fences (fences can have 3 or more back ticks)
# ```
# content
# ```
- open: '(?s)^(?P<open> *`{3,})$'
close: '^(?P=open)$'
# Ignore text between inline back ticks
- open: '(?P<open>`+)'
close: '(?P=open)'
8 changes: 4 additions & 4 deletions core.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ track the build and release progress on a particular software artifact.
| pipelineName | `String` | The name of the pipeline | `MyPipeline`, `Unit tests for my repo` |
| outcome | `String` | outcome of a finished `pipelineRun` | `success`, `error` or `failure`|
| url | `URI` | url to the `pipelineRun` | `https://dashboard.org/namespace/pipelinerun-1234`, `https://api.cdsystem.com/namespace/pipelinerun-1234` |
| errors | `String` | In case of error or failed pipeline, provides details about the failure | `Invalid input param 123`, `Timeout during execution`, `pipelineRun cancelled by user`, `Unit tests failed`|
| errors | `String` | In case of error or failed pipeline, provides details about the failure | `Invalid input param 123`, `Timeout during execution`, `pipelineRun canceled by user`, `Unit tests failed`|

### `taskRun`

Expand All @@ -58,7 +58,7 @@ associated, in which case it is acceptable to generate only taskRun events.
| pipelineRun | `Object` ([`pipelineRun`](#pipelinerun)) | The `pipelineRun` that this `taskRun` belongs to. | `{"id": "namespace/pipelinerun-1234"}`|
| outcome | `String` | outcome of a finished `taskRun` | `success`, `error` or `failure`|
| url | `URI` | url to the `taskRun` | `https://dashboard.org/namespace/taskrun-1234`, `https://api.cdsystem.com/namespace/taskrun-1234` |
| errors | `String` | In case of error or failed pipeline, provides details about the failure | `Invalid input param 123`, `Timeout during execution`, `taskRun cancelled by user`, `Unit tests failed`|
| errors | `String` | In case of error or failed pipeline, provides details about the failure | `Invalid input param 123`, `Timeout during execution`, `taskRun canceled by user`, `Unit tests failed`|

## Events

Expand Down Expand Up @@ -112,7 +112,7 @@ A pipelineRun has finished, successfully or not.
| pipelineName | `String` | The name of the pipeline | `MyPipeline`, `Unit tests for my repo` | |
| url | `URI` | url to the `pipelineRun` | `https://dashboard.org/namespace/pipelinerun-1234`, `https://api.cdsystem.com/namespace/pipelinerun-1234` | |
| outcome | `String (enum)` | outcome of a finished `pipelineRun` | `success`, `error` or `failure`| |
| errors | `String` | In case of error or failed pipeline, provides details about the failure | `Invalid input param 123`, `Timeout during execution`, `pipelineRun cancelled by user`, `Unit tests failed`| |
| errors | `String` | In case of error or failed pipeline, provides details about the failure | `Invalid input param 123`, `Timeout during execution`, `pipelineRun canceled by user`, `Unit tests failed`| |

### [`taskRun Started`](examples/taskrun_started.json)

Expand Down Expand Up @@ -148,4 +148,4 @@ A taskRun has finished, successfully or not.
| pipelineRun | `Object` ([`pipelineRun`](#pipelinerun)) | The `pipelineRun` that this `taskRun` belongs to. | `{"id": "namespace/pipelinerun-1234"}`| |
| url | `URI` | url to the `taskRun` | `https://dashboard.org/namespace/taskrun-1234`, `https://api.cdsystem.com/namespace/taskrun-1234` | |
| outcome | `String (enum)` | outcome of a finished `taskRun` | `success`, `error` or `failure`| |
| errors | `String` | In case of error or failed pipeline, provides details about the failure | `Invalid input param 123`, `Timeout during execution`, `taskRun cancelled by user`, `Unit tests failed`| |
| errors | `String` | In case of error or failed pipeline, provides details about the failure | `Invalid input param 123`, `Timeout during execution`, `taskRun canceled by user`, `Unit tests failed`| |
5 changes: 5 additions & 0 deletions spec.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,11 @@ The specification is structured in two main parts:
For an introduction see the [CDEvents README](README.md) and for more background
information please see our [CDEvents primer](https://cdevents.dev/docs/primer/).

## Spelling

CDEvents adopt american english ("en_US") as dictionary for spelling both in the
specification as well as in the documentation.

## Notations and Terminology

### Notational Conventions
Expand Down
4 changes: 2 additions & 2 deletions testing-events.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ This event represents a finished testCase execution. The event will contain the
| testSuiteRun | `Object` [`testSuiteRun`](#testsuiterun) | A testSuiteRun to associate this testCaseRun with a containing testSuiteRun | `{"id":"Auth-TestSuite-execution-12334", "source": "staging/testkube"}` | |
| outcome | `String (enum)` | The outcome of the testSuite execution, one of `pass`, `fail`, `cancel`, `error` | `pass` | ✅ |
| severity | `String (enum)` | Severity if the test failed, one of `low`, `medium`, `high`, `critical` | `critical` |
| reason | `String` | A reason related to the outcome of the execution | `Cancelled by user`, `Failed assertion`, `Timed out` | |
| reason | `String` | A reason related to the outcome of the execution | `Canceled by user`, `Failed assertion`, `Timed out` | |

### [`testSuiteRun queued`](examples/testsuiterun_queued.json)

Expand Down Expand Up @@ -165,7 +165,7 @@ This event represents a finished testSuite execution. The event will contain the
| environment | `Object` [`environment`](continuous-deployment.md/#environment) | The environment in which this testSuiteRun was running | `{"id": "1234"}`, `{"id": "dev", "source": "testkube-dev-123"}` | ✅ |
| outcome | `String (enum)` | The outcome of the testSuite execution, one of `pass`, `fail`, `cancel`, `error` | `fail` | ✅ |
| severity | `String (enum)` | Severity if the test failed, one of `low`, `medium`, `high`, `critical` | `critical`, `low`, `medium`, `high` |
| reason | `String` | A reason related to the outcome of the execution | `Cancelled by user`, `Failed testCase` | |
| reason | `String` | A reason related to the outcome of the execution | `Canceled by user`, `Failed testCase` | |
| testSuite | `Object` [`testSuite`](#testsuite) | Definition of the testSuite being executed | `{"id": "92834723894", "name": "Auth TestSuite"}` | |

### [`testOutput published`](examples/testoutput_published.json)
Expand Down