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

Can we provide a custom spell list and ignore list? #62

Open
kalenmike opened this issue Jan 19, 2024 · 2 comments
Open

Can we provide a custom spell list and ignore list? #62

kalenmike opened this issue Jan 19, 2024 · 2 comments
Labels
question Further information is requested

Comments

@kalenmike
Copy link
Member

kalenmike commented Jan 19, 2024

We don't want to run spellcheck on package file names, can we ignore package and requirement files? Also can we provide a custom word list to ignore exceptions for strange spellings?

@kalenmike kalenmike added the question Further information is requested label Jan 19, 2024
@glenn-jocher
Copy link
Member

glenn-jocher commented Jan 19, 2024

@kalenmike yes, I've been thinking the same thing. As the actions grow there are a few options here, but they each have their drawbacks:

Single Repo - Single Branch (current approach, comingling arguments)

jobs:
  ultralytics-actions:
    runs-on: ubuntu-latest
    steps:
      - name: Run Ultralytics Formatting
        uses: ultralytics/actions@main
        with:
          token: ${{ secrets.GITHUB_TOKEN }} # automatically generated, do not modify
          actions-arg1:
          actions-arg2:
          ...

Single Repo - Multi Branch (non-conventional, more complicated to maintain)

Here a single repo supports multiple branches that are named for their step, i.e. format branch and summary branches, etc.

jobs:
  ultralytics-actions:
    runs-on: ubuntu-latest
    steps:
      - name: Run Ultralytics Formatting
        uses: ultralytics/actions@format
        with:
          token: ${{ secrets.GITHUB_TOKEN }} # automatically generated, do not modify
          format-arg1:
          format-arg2:
          ...

      - name: Run Ultralytics Summary
        uses: ultralytics/actions@summary
        with:
          token: ${{ secrets.GITHUB_TOKEN }} # automatically generated, do not modify
          summary-arg1:
          summary-arg2:
          ...

Multi Repo (higher maintenance, duplication of effort, etc.)

Here a single repo supports a single step in it's main branch. The downside here is we would have to maintain multiple repos in parallel (i.e. https://github.com/ultralytics/actions-format and https://github.com/ultralytics/actions-summary and future repos), multiplying maintenance and having to repeat actions across repos (like approving dependabot updates etc.)

Main advantage is capability to publish multiple actions to the Marketplace.

jobs:
  ultralytics-actions:
    runs-on: ubuntu-latest
    steps:
      - name: Run Ultralytics Formatting
        uses: ultralytics/actions-format@main
        with:
          token: ${{ secrets.GITHUB_TOKEN }} # automatically generated, do not modify
          format-arg1:
          format-arg2:
          ...

      - name: Run Ultralytics Summary
        uses: ultralytics/actions-summary@main
        with:
          token: ${{ secrets.GITHUB_TOKEN }} # automatically generated, do not modify
          summary-arg1:
          summary-arg2:
          ...

@glenn-jocher
Copy link
Member

@kalenmike another faster option is just to update the default spellchecker ignore lists here:

actions/action.yml

Lines 121 to 127 in 6e36e15

- name: Run Codespell
if: inputs.spelling == 'true' && github.event.action != 'closed'
run: |
codespell \
-w \
--ignore-words-list "crate,nd,ned,strack,dota,ane,segway,fo,gool,winn,commend,bloc,nam,afterall" \
--skip "*.pt,*.pth,*.torchscript,*.onnx,*.tflite,*.pb,*.bin,*.param,*.mlmodel,*.engine,*.npy,*.data*,*.csv,*pnnx*,*venv*,*translat*,__pycache__*,*.ico,*.jpg,*.png,*.mp4,*.mov,/runs,/.git,./docs/??/*.md,./docs/mkdocs_??.yml"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants