python-holidays icon indicating copy to clipboard operation
python-holidays copied to clipboard

Implement comprehensive spell checking support

Open arkid15r opened this issue 10 months ago • 12 comments

Implement Comprehensive Spell Checking Support

Summary

To ensure high-quality localization for the Open World Holidays Framework, we need to implement comprehensive spell-checking support. This should work both locally and within CI/CD pipelines, covering as many holidays l10n languages as possible while integrating seamlessly with existing IDE tools. Ideally, this functionality should be part of pre-commit to enforce consistency before changes are committed.

Requirements

  • Support for multiple languages to cover holidays localizations.
  • Integration with pre-commit for automated spell checking.
  • Compatibility with CI/CD pipelines (GitHub Actions, etc.).
  • Support for popular IDEs (VS Code, PyCharm, etc.).
  • Open-source and actively maintained tooling.

Recommended Tools

Feature cspell typos hunspell
Multi-language support ✅ Yes (many dictionaries) ⚠️ Limited but configurable ✅ Yes (widest coverage)
Pre-commit support ✅ Yes ✅ Yes ❌ Needs extra setup
CI/CD friendly ✅ Yes ✅ Yes ✅ Yes
IDE Integration ✅ VS Code, JetBrains ❌ No ⚠️ Limited (CLI-based)
Custom Dictionaries ✅ Yes ✅ Yes ✅ Yes
Performance ⚡ Fast ⚡ Very Fast 🐢 Slower
Grammar Checking ❌ No ❌ No ❌ No

Tool Overviews

  1. cspell

    • Supports multiple languages with configurable dictionaries.
    • Works with pre-commit, CI/CD, and integrates with VS Code, JetBrains IDEs, and more.
    • Fast and actively maintained.
  2. typos

    • Lightweight, fast typo checker with good multi-language support.
    • Works well in pre-commit and CI/CD with minimal configuration.
    • No IDE integration, but great for automation.
  3. hunspell

    • Most extensive language support (90+ dictionaries available).
    • Used in LibreOffice, Firefox, and Google Chrome.
    • Requires more setup for pre-commit but is highly customizable.

Next Steps

  • Evaluate which tool best supports the localization needs of holidays.
  • Integrate the chosen tool into pre-commit and CI/CD workflows.
  • Define a custom dictionary for common terms and names.

arkid15r avatar Feb 22 '25 00:02 arkid15r

Hello, Does Vacanza is participate in GSOC 2025. I wanted to Contribute in GSOC 2025. If yes, let me know so i can understand the code base.

sumedhx avatar Feb 25 '25 20:02 sumedhx

Hello, Does Vacanza is participate in GSOC 2025. I wanted to Contribute in GSOC 2025. If yes, let me know so i can understand the code base.

Hi @sumedhx we applied for participation in GSoC 2025. You can start from https://github.com/vacanza/holidays/blob/dev/CONTRIBUTING.rst

arkid15r avatar Feb 26 '25 18:02 arkid15r

I would love to work on this. Please assign me this issue @arkid15r

SammanSarkar avatar Mar 27 '25 12:03 SammanSarkar

You already have this one https://github.com/vacanza/holidays/issues/2352 assigned.

arkid15r avatar Mar 28 '25 16:03 arkid15r

Hi @arkid15r ,

I’m excited about the opportunity to contribute to this issue for GSoC 2025. I have experience with Python,Git,DSA and am eager to learn and implement spell-checking solutions within CI/CD workflows.

Could you assign this to me and share any key pointers for starting? I’d love to collaborate and contribute effectively.

Looking forward to your response!

Best, Raj Kiran Acharyya

RajKiranAcharyya avatar Mar 29 '25 21:03 RajKiranAcharyya

Hi @RajKiranAcharyya take a look at an example of implementation here

arkid15r avatar Mar 30 '25 17:03 arkid15r

Hi @arkid15r, Thanks for sharing the example implementation! I'll review it and continue.

Best, Raj Kiran Acharyya

RajKiranAcharyya avatar Mar 30 '25 17:03 RajKiranAcharyya

Subject: Spell Checking Implementation Update

Hi @arkid15r ,

I’ve added cspell.json, linked it with customwords.txt for unknown words, and am refining the custom dictionary. Next, I’ll integrate it with pre-commit and CI/CD. Let me know if any changes are needed!

Best, Raj Kiran Acharyya

RajKiranAcharyya avatar Apr 01 '25 21:04 RajKiranAcharyya

Hi @arkid15r ,

I've been making updates for custom dictionaries in the Dockerized spell checker. I've configured cspell.json, mounted /custom-dicts/, and ensured dictionary files like .avi and .dif are recognized. I've also opened a PR addressing this—let me know if any adjustments are needed!

Thanks, Raj Kiran Acharyya

RajKiranAcharyya avatar Apr 03 '25 21:04 RajKiranAcharyya

Hey @arkid15r ,

I am very sorry for my wrong PR submission. I’ve now made the necessary updates, including security fixes in the Dockerfile (non-root user & --ignore-scripts). Let me know if anything else needs adjustment. I’ll be marking this PR as Ready for Review.

Thanks again!

RajKiranAcharyya avatar Apr 05 '25 08:04 RajKiranAcharyya

I’m interested in taking on the task of implementing comprehensive spell-checking support. This would involve integrating a spell-checking tool (likely cspell) into the CI/CD pipelines and pre-commit hooks, supporting multiple languages for holiday localization, and ensuring compatibility with popular IDEs. I’m excited about the opportunity and would appreciate it if you could assign the task to me.

Please let me know if there are any specific details or resources I should review before getting started.

Looking forward to your response!

prateekshit-v avatar Sep 03 '25 05:09 prateekshit-v

@prateekshit-v this is quite complex issue and is different from entity holidays contributions you've made previously. I suggest building it similar to this but include support of as many existing cspell language dictionaries as possible. We need to avoid adding exceptions to custom-dict unless there is no other way.

arkid15r avatar Sep 03 '25 16:09 arkid15r