@@ -74,16 +74,88 @@ The CI/CD test workflow is at
7474
7575## Noauto tests (testn_ * .py)
7676
77- - These dependencies might include huge libraries like ` tensorflow ` .
78- - Due to dependency complexities, these functionalities may not be tested
79- in the CI/CD pipeline.
80- - In the future, we might create a separate
81- step or workflow to run this test suite.
82- It will be triggered manually.
83- We may also need to group test cases by
84- a non-conflicting set of dependencies.
77+ The noauto (no-automated) test suite contains tests for functionalities
78+ that require heavy dependencies which are not feasible to run in automated
79+ CI/CD pipelines. These tests are organized into specialized suites based
80+ on their dependency requirements.
81+
82+ ### Why separate noauto test suites?
83+
84+ Different ML/AI frameworks often have conflicting version requirements for
85+ their dependencies. For example:
86+ - PyTorch and TensorFlow may require different versions of numpy or protobuf
87+ - Large frameworks take significant time to install (~ 1-3 GB each)
88+ - Some packages require Cython compilation or system libraries
89+
90+ By separating tests by dependency group, we can:
91+ - Test each framework independently without conflicts
92+ - Optimize CI/CD resources by running only relevant test groups
93+ - Make it easier for developers to test specific functionality
94+
95+ ### Noauto test suites
96+
97+ #### Umbrella suite: tests.noauto
98+
99+ - Run ` unittest tests.noauto `
100+ - Includes all modular noauto test suites
101+ - Use this for comprehensive testing when all dependencies are available
85102- Test case class suffix: ` TestCaseN `
86103
104+ #### Modular suites by dependency:
105+
106+ ** PyTorch-based: tests.noauto_torch**
107+
108+ - Run ` unittest tests.noauto_torch `
109+ - Need dependencies from ` pip install "pythainlp[noauto-torch]" `
110+ - Tests requiring PyTorch and its ecosystem:
111+ - torch, transformers (PyTorch backend)
112+ - attacut, thai-nner, wtpsplit, tltk
113+ - Tests: spell correction (wanchanberta), NER/POS tagging (transformers-based),
114+ tokenization (attacut), subword tokenization (phayathai, wangchanberta),
115+ sentence tokenization (wtp)
116+ - Dependencies: ~ 2-3 GB
117+ - Test case class suffix: ` TestCaseN `
118+
119+ ** TensorFlow-based: tests.noauto_tensorflow**
120+
121+ - Run ` unittest tests.noauto_tensorflow `
122+ - Need dependencies from ` pip install "pythainlp[noauto-tensorflow]" `
123+ - Tests requiring TensorFlow:
124+ - deepcut tokenizer
125+ - Dependencies: ~ 1-2 GB
126+ - Note: May conflict with PyTorch dependencies
127+ - Test case class suffix: ` TestCaseN `
128+
129+ ** ONNX Runtime-based: tests.noauto_onnx**
130+
131+ - Run ` unittest tests.noauto_onnx `
132+ - Need dependencies from ` pip install "pythainlp[noauto-onnx]" `
133+ - Tests requiring ONNX Runtime:
134+ - oskut, sefr_cut tokenizers
135+ - Dependencies: ~ 200-500 MB
136+ - Test case class suffix: ` TestCaseN `
137+
138+ ** Cython-compiled: tests.noauto_cython**
139+
140+ - Run ` unittest tests.noauto_cython `
141+ - Need dependencies from ` pip install "pythainlp[noauto-cython]" `
142+ - Tests requiring Cython-compiled packages:
143+ - phunspell spell checker
144+ - Requires: Cython, C compiler, system libraries (hunspell)
145+ - Platform-specific build requirements
146+ - Test case class suffix: ` TestCaseN `
147+
148+ ** Network-dependent: tests.noauto_network**
149+
150+ - Run ` unittest tests.noauto_network `
151+ - Need dependencies from ` pip install "pythainlp[noauto-network]" `
152+ - Tests requiring network access:
153+ - HuggingFace Hub model downloads
154+ - External API calls
155+ - Requires: Internet connection, may involve large downloads
156+ - Test case class suffix: ` TestCaseN `
157+
158+
87159## Robustness tests (test_robustness.py)
88160
89161A comprehensive test suite within core tests that tests edge cases important
0 commit comments