diff --git a/.github/workflows/linting.yml b/.github/workflows/linting.yml index 3c9ac9c1..2f59f697 100644 --- a/.github/workflows/linting.yml +++ b/.github/workflows/linting.yml @@ -59,3 +59,17 @@ jobs: git add . pre-commit run --all-files --color always --verbose working-directory: cookie-template/python-template + + lint-prose: + runs-on: ubuntu-latest + steps: + - name: Checkout source + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 + + - name: Run Vale + uses: errata-ai/vale-action@d89dee975228ae261d22c15adcd03578634d429c # v2 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + filter_mode: nofilter + reporter: github-check diff --git a/.gitignore b/.gitignore index c037985d..1f9bd3bf 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,11 @@ python-template *.DS_Store + +# https://vale.sh/docs/keys/packages#vcs +.github/styles/* +!.github/styles/config/ +.github/styles/config/* +!.github/styles/config/vocabularies/ +.github/styles/config/vocabularies/* +!.github/styles/config/vocabularies/Base diff --git a/.vale.ini b/.vale.ini new file mode 100644 index 00000000..f10a4e56 --- /dev/null +++ b/.vale.ini @@ -0,0 +1,27 @@ +StylesPath = .github/styles + +# https://github.com/errata-ai/packages +Packages = proselint,\ + write-good + +[*.md] +BasedOnStyles = proselint,\ + Vale,\ + write-good + +# Disable +Vale.Spelling = NO +write-good.E-Prime = NO +write-good.Passive = NO +write-good.TooWordy = NO + +# Ignore lines starting with GitHub alerts syntax +BlockIgnores = (?s)> \[!(CAUTION|IMPORTANT|NOTE|TIP|WARNING)\](\n|$) + +# `vale sync` in CI means the packages are then linted, so turn them off +[.github/styles/**] +BasedOnStyles = + +# Don't modify generated files +[**/{CODE_OF_CONDUCT,LICENSE}*] +BasedOnStyles = diff --git a/tutorial.md b/tutorial.md index 89a5bb89..0a45d554 100644 --- a/tutorial.md +++ b/tutorial.md @@ -270,7 +270,7 @@ Once you have activated the environment you should make sure the version of the python -m pip install --upgrade pip ``` -Similar to `uv`, once the the environment is active, you can install the package in editable mode, along with both its required dependencies and optional sets of dependencies by running +Similar to `uv`, once the environment is active, you can install the package in editable mode, along with both its required dependencies and optional sets of dependencies by running ```sh python -m pip install --editable ".[dev,docs,test]"