Skip to content

Use pyicu-wheels for tests #1336

Description

@bact

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

Activity

  1. added
    testsUnit test, code coverage, test case
    on Mar 14, 2026
  2. added this to the Future milestone on Mar 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

testsUnit test, code coverage, test case

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions