PyThaiNLP / PyThaiNLP/pythainlp

Use pyicu-wheels for tests

Open
#1,336 0 comments 1 reaction 2 assignees View on GitHub

@bact is already working on this.

Since Mar 14, 2026.

tests
Dominant language
Python
Stars
1.2k
Forks
304
Avg merge
2d 14h
Merged PRs (30d)
14

Description

Consider to use https://pypi.org/project/pyicu-wheels/ (source code https://github.com/Init7/pyicu) instead of https://pypi.org/project/pyicu/ (source code https://gitlab.pyicu.org/main/pyicu), for testing purpose.

  • This will allow easier test on Windows / macOS locally (currently, it is quite complicated to install pyicu on macOS as it involves compiling and link with icu4c / for Windows user, it require a download from separated source)
  • Maybe quicker in CI as it doesn't require build the lib from scratch

For distribution, the declared project dependency in pyproject.toml should still stick to https://pypi.org/project/pyicu/.

Each test suite dependencies could be declared by using the PEP 735 dependency groups https://packaging.python.org/en/latest/specifications/dependency-groups/#dependency-groups. Modify pyproject.toml for that. Modify test workflow accordingly (for example, use pip install --group)

Make sure that dependency groups for test suites are covering what are actually needed by the test suites (core, compact, extra, noauto, corpus) See https://github.com/PyThaiNLP/pythainlp/blob/dev/tests/README.md

The main goal is to allow developers to install pythainlp dependency for testing purpose easily -- without the need to compile pyicu themselves.

The second goal is, once the first goal is achieved, it will simplify the CI in .github/workflows/unittest.yml

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.