From 7b0f99145ddb03ddd955e52812d8bf29669e2d87 Mon Sep 17 00:00:00 2001 From: Adam Meily Date: Sun, 23 Apr 2023 10:26:03 -0400 Subject: [PATCH] add cspell CI job (#58) --- .cspell.json | 3 +++ .github/workflows/ci.yml | 13 +++++++++++++ cincoconfig/support.py | 2 +- pyproject.toml | 3 +++ 4 files changed, 20 insertions(+), 1 deletion(-) diff --git a/.cspell.json b/.cspell.json index 8c6b1c2..a195730 100644 --- a/.cspell.json +++ b/.cspell.json @@ -33,6 +33,9 @@ "autogenerate", "autogenerated", "asdict", + "noqa", + "rpartition", + "pyright", // spinx docs "autofunction", diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5e98530..1b618f1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -34,3 +34,16 @@ jobs: poetry run poe tests poetry run coverage xml curl -sL https://coveralls.io/coveralls-linux.tar.gz | tar -xz && ./coveralls -f coverage.xml + + spelling: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + - uses: streetsidesoftware/cspell-action@v2 + with: + config: ".cspell.json" + files: | + cincoconfig/**/*.py + docs/*.rst + CHANGELOG.md diff --git a/cincoconfig/support.py b/cincoconfig/support.py index b93835d..74ab652 100644 --- a/cincoconfig/support.py +++ b/cincoconfig/support.py @@ -324,7 +324,7 @@ def asdict(config: Config, virtual: bool = False) -> dict: the configuration, and all nested configuration objects, to a dict, preserving each value as-is. - :param config: the configuration to conver to a dict + :param config: the configuration to convert to a dict :param virtual: include virtual field values in the dict :returns: the converted configuration dict """ diff --git a/pyproject.toml b/pyproject.toml index f09723e..75efdcd 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -101,3 +101,6 @@ tests = [ { cmd = "coverage run --source cincoconfig -m pytest" }, { cmd = "coverage report -m" } ] +# The check-spelling task is currently disabled until poe fixes CMD resolution on Windows: +# https://github.com/nat-n/poethepoet/pull/142 +# "check-spelling" = "npx cspell \"cincoconfig/**/*.py\" \"docs/*.rst\" CHANGELOG.md"