Skip to content

Commit

Permalink
chore: fix spellcheck errors and enable cspell (#217)
Browse files Browse the repository at this point in the history
* Misc Typo fixes

Signed-off-by: Abhijeet Kasurde <[email protected]>

* Enable cspell

* Ignore requirements.txt

Signed-off-by: Abhijeet Kasurde <[email protected]>

---------

Signed-off-by: Abhijeet Kasurde <[email protected]>
Co-authored-by: Sorin Sbarnea <[email protected]>
  • Loading branch information
Akasurde and ssbarnea authored Aug 3, 2024
1 parent 14306fa commit 519a3d2
Show file tree
Hide file tree
Showing 16 changed files with 84 additions and 16 deletions.
41 changes: 41 additions & 0 deletions .config/dictionary.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
-CAcreateserial
-Djava
GSSAPI
OAUTHBEARER
alertmanager
basepython
benthomasosn
cafile
capath
caroot
confluentinc
conninfo
darglint
digestmod
dynatrace
envlist
extfile
finito
healthcheck
jaas
keypass
keytool
libsystemd
mydb
myqueue
nada
noprompt
parseable
posargs
pythonmain
realworld
rulebook
rulebooks
ruleset
servicebus
snakeoil
storepass
testenv
toxinidir
trustore
truststore
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ body:
id: expected-results
attributes:
label: Expected results
description: What did you expect to happpen when running the steps above?
description: What did you expect to happen when running the steps above?
validations:
required: true

Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ contact_links:

- name: 📝 Ansible Code of Conduct
url: https://docs.ansible.com/ansible/latest/community/code_of_conduct.html?utm_medium=github&utm_source=issue_template_chooser
about: EDA-Controlles uses the Ansible Code of Conduct; ❤ Be nice to other members of the community. ☮ Behave.
about: EDA-Controller uses the Ansible Code of Conduct; ❤ Be nice to other members of the community. ☮ Behave.

- name: 💼 For Enterprise
url: https://www.ansible.com/use-cases/event-driven-automation
Expand Down
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,9 @@ body:
required: true

- type: textarea
id: sugested-results
id: suggested-results
attributes:
label: Sugested feature result
label: Suggested feature result
description: What is the result this new feature will bring?
validations:
required: true
Expand Down
5 changes: 4 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@ repos:
- id: trailing-whitespace
- id: end-of-file-fixer
language_version: python3

- repo: https://github.com/streetsidesoftware/cspell-cli
rev: v8.13.0
hooks:
- id: cspell
- repo: local
hooks:
- id: ansible-test-sanity
Expand Down
23 changes: 23 additions & 0 deletions cspell.config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
dictionaryDefinitions:
- name: words
path: .config/dictionary.txt
addWords: true
dictionaries:
# Use `cspell-cli trace word` to check where a work is defined
- en_US
- bash
- words
- python
ignorePaths:
- cspell.config.yaml
# The requirements file
- requirements.txt
- .config/constraints.txt
- docs/requirements.txt
- docs/requirements.in
# Test fixtures generated from outside
- test/**/*.result
- src/ansiblelint/schemas/*.json
# Other
- "*.svg"
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
host_path: The json path inside the event data to find hosts.
Do nothing if the key is not present or does exist in event
path_separator: The separator to interpret host_path. Default to "."
host_separator: The separator to interpet host string.
host_separator: The separator to interpret host string.
host_path can point to a string or a list. If it is a single
string but contains multiple hosts, use this parameter to
delimits the hosts. Treat the vale as a single host if the
Expand Down
2 changes: 1 addition & 1 deletion extensions/eda/plugins/event_filter/normalize_keys.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""normalize_keys.py.
An event filter that changes keys that contain non alpha numeric or
underscore to undersocres.
underscore to underscores.
For instance, the key server-name becomes the new key server_name
If there are consecutive non alpa numeric or under score, they would
be coalesced into a single underscore
Expand Down
2 changes: 1 addition & 1 deletion extensions/eda/plugins/event_source/aws_cloudtrail.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
delay_seconds: The number of seconds to wait between polling (default 10sec)
lookup_attributes: The optional list of lookup attributes.
lookup attribute are dictionnary with an AttributeKey (string),
lookup attribute are dictionary with an AttributeKey (string),
which specifies an attribute on which to filter the events
returned and an AttributeValue (string) which specifies
a value for the specified AttributeKey
Expand Down
2 changes: 1 addition & 1 deletion extensions/eda/plugins/event_source/aws_sqs_queue.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ async def main(queue: asyncio.Queue, args: dict[str, Any]) -> None:
queue_url = response["QueueUrl"]

while True:
# This loop wont spin really fast as there is
# This loop won't spin really fast as there is
# essentially a sleep in the receive_message call
response = await client.receive_message(
QueueUrl=queue_url,
Expand Down
6 changes: 3 additions & 3 deletions extensions/eda/plugins/event_source/generic.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@
next set of events. Default 0
shutdown_after float Number of seconds to wait before shutting down the
plugin. Default 0
loop_count int Number of times the set of events in the playload
loop_count int Number of times the set of events in the payload
should be repeated. Default 0
repeat_count int Number of times each individual event in the playload
repeat_count int Number of times each individual event in the payload
should be repeated. Default 1
blob_size int An arbitray blob of blob_size bytes to be inserted
blob_size int An arbitrary blob of blob_size bytes to be inserted
into every event payload. Default is 0 don't create
a blob
final_payload dict After all the events have been sent we send the optional
Expand Down
2 changes: 1 addition & 1 deletion extensions/eda/plugins/event_source/pg_listener.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
Chunking:
---------
This is just informational a user doesn't have to do anything
special to enablo chunking. The sender which is the pg_notify
special to enable chunking. The sender which is the pg_notify
action from ansible rulebook will decide if chunking needs to
happen based on the size of the payload.
If the messages are over 7KB the sender will chunk the messages
Expand Down
2 changes: 1 addition & 1 deletion plugins/modules/upcase.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
version_added: "1.0.0"
description: Upper cases a passed in string, if the passed in string is already uppercased changed is set to false.
description: Upper cases a passed in string, if the passed in string is already uppercase, changed is set to false.
To have the module generate an error send the string fail
options:
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ aiokafka
azure-servicebus
dpath
kafka-python
psycopg
pyyaml
systemd-python; sys_platform != 'darwin'
watchdog
psycopg
xxhash
1 change: 1 addition & 0 deletions tests/integration/event_source_kafka/certs-create.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/usr/bin/env bash
# Generate self-signed certificate for Kafka broker
# Greatly inspired by https://github.com/ansibleinc/cp-demo/blob/master/scripts/security/certs-create-per-user.sh
# cspell: ignore keyout passin passout genkey keyalg trustore storetype pkcs certreq srand
set -e

CA_PATH=$(dirname "${BASH_SOURCE[0]}")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def init_webserver():
"endpoint, expected_resp_data",
[
pytest.param("", "Endpoint available", id="valid_endpoint"),
pytest.param("nonexistant", "Endpoint unavailable", id="invalid_endpoint"),
pytest.param("nonexistent", "Endpoint unavailable", id="invalid_endpoint"),
],
)
def test_url_check_source_sanity(
Expand Down

0 comments on commit 519a3d2

Please sign in to comment.