Skip to content

Skip avatar-fallback initials in codespell check#308

Merged
glenn-jocher merged 1 commit into
mainfrom
codespell-skip-avatar-fallback
May 11, 2026
Merged

Skip avatar-fallback initials in codespell check#308
glenn-jocher merged 1 commit into
mainfrom
codespell-skip-avatar-fallback

Conversation

@glenn-jocher
Copy link
Copy Markdown
Member

@glenn-jocher glenn-jocher commented May 11, 2026

Summary

The daily Website links and spellcheck workflow has been failing because codespell flags contributor initials rendered inside avatar fallbacks (e.g. BU for Burhan-Q, TE) as misspellings on every docs page that has a Contributors section.

These initials are auto-generated presentational text, not prose. Extends the existing <script>/<style> strip pass to also remove <*data-slot=\"avatar-fallback\">…</*> elements before running codespell. Same pattern, same line.

This is a permanent fix — any future contributor with an unfortunate two-letter initial pair is handled automatically, so we don't keep growing --ignore-words-list every time a new contributor lands. (The existing list already has a number of suspicious 2–3 letter entries like nd, ned, ane, nam, nin, fo, ore that look like prior patches around this same issue and can probably be cleaned up in a follow-up once this run goes green.)

Test plan

  • Trigger the workflow via `workflow_dispatch` against `docs.ultralytics.com`
  • Confirm the spellcheck step no longer reports `BU` / `TE` on every page
  • Confirm no new false positives are introduced

🛠️ PR Summary

Made with ❤️ by Ultralytics Actions

🌟 Summary

🧹 Improves the docs link-check workflow by removing auto-generated avatar fallback text from HTML before spellchecking, reducing false-positive typo reports.

📊 Key Changes

  • Updated .github/workflows/links.yml in the docs CI workflow.
  • Expanded the HTML cleanup step used before running codespell.
  • Continued stripping <script> and <style> content, and now also removes elements with data-slot="avatar-fallback".
  • Added a comment explaining why this new filter is needed: contributor avatar fallback initials like "BU" can be incorrectly flagged as spelling mistakes.

🎯 Purpose & Impact

  • ✅ Reduces noisy spellcheck failures caused by auto-generated contributor initials rather than real documentation issues.
  • 🔍 Helps CI focus on genuine spelling problems, making checks more reliable.
  • ⚡ Saves maintainer time by avoiding repeated false alarms in PRs and site builds.
  • 🛠️ Improves the overall docs maintenance workflow with a small but practical automation fix.

@UltralyticsAssistant UltralyticsAssistant added devops GitHub Devops or MLops documentation Improvements or additions to documentation fixed Bug has been resolved labels May 11, 2026
@UltralyticsAssistant
Copy link
Copy Markdown
Member

👋 Hello @glenn-jocher, thank you for submitting a ultralytics/docs 🚀 PR! This is an automated message to help streamline review, and an engineer will assist you shortly. Please review the checklist below to help ensure smooth integration:

  • Define a Purpose: Clearly explain the purpose of your fix or feature in your PR description, and link to any relevant issues. Ensure your commit messages are clear, concise, and adhere to the project's conventions.
  • Synchronize with Source: Confirm your PR is synchronized with the ultralytics/docs main branch. If it's behind, update it by clicking the 'Update branch' button or by running git pull and git merge main locally.
  • Ensure CI Checks Pass: Verify all Ultralytics Continuous Integration (CI) checks are passing. If any checks fail, please address the issues.
  • Update Documentation: Update the relevant documentation for any new or modified features.
  • Add Tests: If applicable, include or update tests to cover your changes, and confirm that all tests are passing.
  • Sign the CLA: Please ensure you have signed our Contributor License Agreement if this is your first Ultralytics PR by writing "I have read the CLA Document and I sign the CLA" in a new message.
  • Minimize Changes: Limit your changes to the minimum necessary for your bug fix or feature addition. "It is not daily increase but daily decrease, hack away the unessential. The closer to the source, the less wastage there is." — Bruce Lee

For more guidance, please refer to our Contributing Guide. Don’t hesitate to leave a comment if you have any questions. Thank you for contributing to Ultralytics! 🚀

Copy link
Copy Markdown
Member

@UltralyticsAssistant UltralyticsAssistant left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔍 PR Review

Made with ❤️ by Ultralytics Actions

The change looks clean. Extending the existing HTML preprocessing step to remove data-slot="avatar-fallback" content is consistent with the current approach and should reduce codespell false positives without introducing any obvious workflow or logic issues in the diff shown.

@glenn-jocher glenn-jocher merged commit 0a69d23 into main May 11, 2026
5 checks passed
@glenn-jocher glenn-jocher deleted the codespell-skip-avatar-fallback branch May 11, 2026 20:04
@UltralyticsAssistant
Copy link
Copy Markdown
Member

Merged! 🎉 Thanks, @glenn-jocher, for this thoughtful docs CI improvement.

As Thomas Edison said, “There’s a way to do it better—find it.” This update is a great example of that mindset: a small, targeted fix that removes noisy false positives, keeps spellcheck focused on real issues, and makes docs maintenance smoother for everyone.

Really appreciate the practical attention to detail here—changes like this quietly improve the contributor experience in a big way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

devops GitHub Devops or MLops documentation Improvements or additions to documentation fixed Bug has been resolved

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants