diff --git a/.github/workflows/codespell.yml b/.github/workflows/codespell.yml new file mode 100644 index 000000000..b23166743 --- /dev/null +++ b/.github/workflows/codespell.yml @@ -0,0 +1,25 @@ +# Codespell configuration is within pyproject.toml +--- +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 diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index a7c487b51..8dfae80d9 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -27,3 +27,11 @@ repos: language: system types: [python] exclude: ^docs/cookbooks/ # Ignore files under docs/cookbooks + + - repo: https://github.com/codespell-project/codespell + # Configuration for codespell is in pyproject.toml + rev: v2.4.1 + hooks: + - id: codespell + additional_dependencies: + - tomli # for python_version < '3.11' diff --git a/community_usecase/virtual_fitting_room/readme.md b/community_usecase/virtual_fitting_room/readme.md index 03a69ac9d..b1435e5cb 100644 --- a/community_usecase/virtual_fitting_room/readme.md +++ b/community_usecase/virtual_fitting_room/readme.md @@ -7,7 +7,7 @@ All with one prompt 🪄 ## Dependencies: - 1. I made some modificaitons to the camel repo so please first run "git clone -b feature/virtual-try-on-toolkit-and-partial-screenshot --single-branch https://github.com/camel-ai/camel.git" + 1. I made some modifications to the camel repo so please first run "git clone -b feature/virtual-try-on-toolkit-and-partial-screenshot --single-branch https://github.com/camel-ai/camel.git" 2. fill in your klingai api keys for virtual try-on in camel/toolkits/virtual_try_on_toolkit.py (you can get it from https://klingai.kuaishou.com/dev-center) 3. pip install the above cloned repo diff --git a/pyproject.toml b/pyproject.toml index 9b984d625..bf0347c79 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -59,3 +59,10 @@ follow_imports = "skip" [[tool.mypy.overrides]] module = "utils" ignore_missing_imports = true + +[tool.codespell] +# Ref: https://github.com/codespell-project/codespell#using-a-config-file +skip = '.git*,*.pdf,*.lock' +check-hidden = true +ignore-regex = '\bBrin\b' +ignore-words-list = 'datas'