Skip to content

Commit 287ad56

Browse files
authored
Merge pull request #946 from bact/arrange-workflow-files
Tidy up workflow files
2 parents aa4a5a7 + 10abf2a commit 287ad56

File tree

13 files changed

+67
-55
lines changed

13 files changed

+67
-55
lines changed

.github/workflows/deploy_docs.yml renamed to .github/workflows/deploy-docs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Deploy Docs dev
1+
name: Deploy development documentation
22
on:
33
push:
44
branches:

.github/workflows/lint.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,13 @@ on:
1717
- 'docs/**'
1818

1919
jobs:
20-
ruff:
21-
runs-on: ubuntu-24.04
22-
steps:
23-
- name: Checkout
24-
uses: actions/checkout@v4
25-
- name: Ruff
26-
uses: astral-sh/ruff-action@v1
27-
with:
28-
src: "./pythainlp"
29-
args: check --verbose --line-length 79 --select C901
20+
ruff:
21+
runs-on: ubuntu-24.04
22+
steps:
23+
- name: Checkout
24+
uses: actions/checkout@v4
25+
- name: Ruff
26+
uses: astral-sh/ruff-action@v1
27+
with:
28+
src: "./pythainlp"
29+
args: check --verbose --line-length 79 --select C901

.github/workflows/pypi-publish.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,16 @@ jobs:
1313
python-version: [3.8]
1414

1515
steps:
16-
- uses: actions/checkout@v4
16+
- name: Checkout
17+
uses: actions/checkout@v4
1718
- name: Set up Python ${{ matrix.python-version }}
1819
uses: actions/setup-python@v5
1920
with:
2021
python-version: ${{ matrix.python-version }}
2122
- name: Install dependencies
2223
run: |
2324
python -m pip install --upgrade pip
24-
pip install setuptools wheel twine
25+
python -m pip install setuptools twine wheel
2526
python setup.py sdist bdist_wheel
2627
- name: Publish a Python distribution to PyPI
2728
uses: pypa/gh-action-pypi-publish@release/v1

.github/workflows/pypi-test.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@ jobs:
2323
SKLEARN_ALLOW_DEPRECATED_SKLEARN_PACKAGE_INSTALL: True
2424
run: |
2525
python -m pip install --upgrade pip
26-
pip install deepcut tltk
27-
SKLEARN_ALLOW_DEPRECATED_SKLEARN_PACKAGE_INSTALL=True pip install -r https://raw.githubusercontent.com/PyThaiNLP/pythainlp/dev/docker_requirements.txt
28-
pip install pythainlp[full]
26+
python -m pip install deepcut tltk
27+
SKLEARN_ALLOW_DEPRECATED_SKLEARN_PACKAGE_INSTALL=True python -m pip install -r https://raw.githubusercontent.com/PyThaiNLP/pythainlp/dev/docker_requirements.txt
28+
python -m pip install pythainlp[full]
2929
python -m nltk.downloader omw-1.4
3030
- name: Test
3131
run: |

.github/workflows/macos-test.yml renamed to .github/workflows/unittest-macos.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: macOS Unit test and code coverage
1+
name: Unit test and code coverage (MacOS)
22

33
on:
44
push:
@@ -25,8 +25,10 @@ jobs:
2525
python-version: [3.8]
2626

2727
steps:
28-
- uses: actions/checkout@v4
29-
- uses: conda-incubator/setup-miniconda@v3
28+
- name: Checkout
29+
uses: actions/checkout@v4
30+
- name: Set up Python ${{ matrix.python-version }}
31+
uses: conda-incubator/setup-miniconda@v3
3032
with:
3133
python-version: ${{ matrix.python-version }}
3234
auto-activate-base: false
@@ -64,7 +66,8 @@ jobs:
6466
python -m pip cache purge
6567
python -m unittest discover
6668
if: matrix.os == 'self-hosted'
67-
- shell: bash -l {0}
69+
- name: Show environment
70+
shell: bash -l {0}
6871
run: |
6972
conda info
7073
conda list

.github/workflows/windows-test.yml renamed to .github/workflows/unittest-windows.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Windows Unit test and code coverage
1+
name: Unit test and code coverage (Windows)
22

33
on:
44
push:
@@ -25,13 +25,16 @@ jobs:
2525
python-version: [3.8]
2626

2727
steps:
28-
- uses: actions/checkout@v4
29-
- uses: conda-incubator/setup-miniconda@v3
28+
- name: Checkout
29+
uses: actions/checkout@v4
30+
- name: Set up Python ${{ matrix.python-version }}
31+
uses: conda-incubator/setup-miniconda@v3
3032
with:
3133
python-version: ${{ matrix.python-version }}
3234
auto-activate-base: true
3335
auto-update-conda: true
34-
- shell: powershell
36+
- name: Show environment
37+
shell: powershell
3538
run: |
3639
conda info
3740
conda list

.github/workflows/test.yml renamed to .github/workflows/unitttest-ubuntu.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Unit test and code coverage
1+
name: Unit test and code coverage (Ubuntu)
22

33
on:
44
push:
@@ -21,7 +21,8 @@ jobs:
2121
python-version: [3.9]
2222

2323
steps:
24-
- uses: actions/checkout@v4
24+
- name: Checkout
25+
uses: actions/checkout@v4
2526
- name: Set up Python ${{ matrix.python-version }}
2627
uses: actions/setup-python@v5
2728
with:

.pep8speaks.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
scanner:
2-
diff_only: True # If False, the entire file touched by the Pull Request is scanned for errors. If True, only the diff is scanned.
3-
linter: pycodestyle # Other option is flake8
2+
diff_only: True # If False, the entire file touched by the Pull Request is scanned for errors. If True, only the diff is scanned.
3+
linter: pycodestyle # Other option is flake8
44

55
pycodestyle: # Same as scanner.linter value. Other option is flake8
6-
max-line-length: 100 # Default is 79 in PEP 8
7-
ignore: # Errors and warnings to ignore
8-
- W504 # line break after binary operator
9-
- E402 # module level import not at top of file
10-
- E731 # do not assign a lambda expression, use a def
6+
max-line-length: 100 # Default is 79 in PEP 8
7+
ignore: # Errors and warnings to ignore
8+
- W504 # line break after binary operator
9+
- E402 # module level import not at top of file
10+
- E731 # do not assign a lambda expression, use a def
1111
no_blank_comment: True # If True, no comment is made on PR without any errors.

CONTRIBUTING.md

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,9 @@ Please refer to our [Contributor Covenant Code of Conduct](https://github.com/Py
66

77
## Issue Report and Discussion
88

9-
- Discussion: https://github.com/PyThaiNLP/pythainlp/discussions
10-
- GitHub issues (for problems and suggestions): https://github.com/PyThaiNLP/pythainlp/issues
11-
- Facebook group (not specific to PyThaiNLP, for Thai NLP discussion in general): https://www.facebook.com/groups/thainlp
12-
9+
- Discussion: <https://github.com/PyThaiNLP/pythainlp/discussions>
10+
- GitHub issues (for problems and suggestions): <https://github.com/PyThaiNLP/pythainlp/issues>
11+
- Facebook group (not specific to PyThaiNLP, for Thai NLP discussion in general): <https://www.facebook.com/groups/thainlp>
1312

1413
## Code
1514

@@ -49,16 +48,14 @@ to manage our branches.
4948
and several checks automatically. Click the "Details" link at the end of
5049
each check to see what needs to be fixed.
5150

52-
5351
## Documentation
5452

5553
- We use [Sphinx](https://www.sphinx-doc.org/en/master/) to generate API document
5654
automatically from "docstring" comments in source codes. This means the comment
5755
section in the source codes is important for the quality of documentation.
5856
- A docstring should start with one summary line, end with one line with a full stop (period),
5957
then be followed by a blank line before starting a new paragraph.
60-
- A commit to release branches (e.g. `2.2`, `2.1`) with a title **"(build and deploy docs)"** (without quotes) will trigger the system to rebuild the documentation files and upload them to the website https://pythainlp.org/docs.
61-
58+
- A commit to release branches (e.g. `2.2`, `2.1`) with a title **"(build and deploy docs)"** (without quotes) will trigger the system to rebuild the documentation files and upload them to the website <https://pythainlp.org/docs>.
6259

6360
## Testing
6461

@@ -67,29 +64,33 @@ We use standard Python `unittest`. The test suite is in `tests/` directory.
6764
To run unit tests locally together with code coverage test:
6865

6966
(from main `pythainlp/` directory)
67+
7068
```sh
7169
coverage run -m unittest discover
7270
```
7371

7472
See code coverage test:
73+
7574
```sh
7675
coverage report
7776
```
7877

7978
Generate code coverage test in HTML (files will be available in `htmlcov/` directory):
79+
8080
```sh
8181
coverage html
8282
```
8383

8484
Make sure the tests pass on both Github Actions and AppVeyor.
8585

86-
8786
## Releasing
87+
8888
- We use [semantic versioning](https://semver.org/): MAJOR.MINOR.PATCH, with development build suffix: MAJOR.MINOR.PATCH-devBUILD
8989
- We use [`bumpversion`](https://github.com/c4urself/bump2version/#installation) to manage versioning.
9090
- `bumpversion [major|minor|patch|release|build]`
9191
- Example:
92-
```
92+
93+
```sh
9394
#current_version = 2.3.3-dev0
9495

9596
bumpversion build
@@ -132,29 +133,31 @@ Make sure the tests pass on both Github Actions and AppVeyor.
132133
Thanks to all [contributors](https://github.com/PyThaiNLP/pythainlp/graphs/contributors). (Image made with [contributors-img](https://contributors-img.firebaseapp.com))
133134

134135
### Development Leads
136+
135137
- Wannaphong Phatthiyaphaibun <[email protected]> - foundation, distribution and maintenance
136138
- Korakot Chaovavanich - initial tokenization and soundex codes
137139
- Charin Polpanumas - classification and benchmarking
138-
- Arthit Suriyawongkul - refactoring, packaging, distribution, and maintenance
140+
- Arthit Suriyawongkul - documentation, refactoring, packaging, distribution, and maintenance
139141
- Lalita Lowphansirikul - documentation
140142
- Pattarawat Chormai - benchmarking
141143
- Peerat Limkonchotiwat
142144
- Thanathip Suntorntip - nlpO3 maintenance, Rust Developer
143145
- Can Udomcharoenchaikit - documentation and codes
144146

145147
### Maintainers
148+
146149
- Arthit Suriyawongkul
147150
- Wannaphong Phatthiyaphaibun
148151

149-
150152
### Past
153+
151154
- Peeradej Tanruangporn - documentation
152155

153156
## References
154157

155-
- **[Maximum Matching]** -- Manabu Sassano. Deterministic Word Segmentation Using Maximum Matching with Fully Lexicalized Rules. Retrieved from http://www.aclweb.org/anthology/E14-4016
156-
- **[MetaSound]** -- Snae & Brückner. (2009). Novel Phonetic Name Matching Algorithm with a Statistical Ontology for Analysing Names Given in Accordance with Thai Astrology. Retrieved from https://pdfs.semanticscholar.org/3983/963e87ddc6dfdbb291099aa3927a0e3e4ea6.pdf
158+
- **[Maximum Matching]** -- Manabu Sassano. Deterministic Word Segmentation Using Maximum Matching with Fully Lexicalized Rules. Retrieved from <http://www.aclweb.org/anthology/E14-4016>
159+
- **[MetaSound]** -- Snae & Brückner. (2009). Novel Phonetic Name Matching Algorithm with a Statistical Ontology for Analysing Names Given in Accordance with Thai Astrology. Retrieved from <https://pdfs.semanticscholar.org/3983/963e87ddc6dfdbb291099aa3927a0e3e4ea6.pdf>
157160
- **[Thai Character Cluster]** -- T. Teeramunkong, V. Sornlertlamvanich, T. Tanhermhong and W. Chinnan, “Character cluster based Thai information retrieval,” in IRAL '00 Proceedings of the fifth international workshop on on Information retrieval with Asian languages, 2000.
158161
- **[Enhanced Thai Character Cluster]** -- Jeeragone Inrut, Patiroop Yuanghirun, Sarayut Paludkong, Supot Nitsuwat, and Para Limmaneepraserth. “Thai word segmentation using combination of forward and backward longest matching techniques.” In International Symposium on Communications and Information Technology (ISCIT), pp. 37-40. 2001.
159162
- เพ็ญศิริ ลี้ตระกูล. การเลือกประโยคสำคัญในการสรุปความภาษาไทย โดยใช้แบบจำลองแบบลำดับชั้น (Selection of Important Sentences in Thai Text Summarization Using a Hierarchical Model). Retrieved from [http://digi.library.tu.ac.th/thesis/st/0192/](https://digital.library.tu.ac.th/tu_dc/frontend/Info/item/dc:124897)
160-
- **[Thai Discourse Treebank]** -- Ponrawee Prasertsom, Apiwat Jaroonpol, Attapol T. Rutherford; The Thai Discourse Treebank: Annotating and Classifying Thai Discourse Connectives. Transactions of the Association for Computational Linguistics 2024; 12 613–629. doi: https://doi.org/10.1162/tacl_a_00650
163+
- **[Thai Discourse Treebank]** -- Ponrawee Prasertsom, Apiwat Jaroonpol, Attapol T. Rutherford; The Thai Discourse Treebank: Annotating and Classifying Thai Discourse Connectives. Transactions of the Association for Computational Linguistics 2024; 12 613–629. doi: <https://doi.org/10.1162/tacl_a_00650>

pythainlp/soundex/__init__.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,17 @@
88
"""
99

1010
__all__ = [
11-
"soundex",
1211
"lk82",
1312
"metasound",
14-
"udom83",
1513
"prayut_and_somchaip",
14+
"soundex",
15+
"udom83",
1616
]
1717

1818
from pythainlp.soundex.lk82 import lk82
1919
from pythainlp.soundex.metasound import metasound
20-
from pythainlp.soundex.udom83 import udom83
2120
from pythainlp.soundex.prayut_and_somchaip import prayut_and_somchaip
21+
from pythainlp.soundex.udom83 import udom83
2222

2323
DEFAULT_SOUNDEX_ENGINE = "udom83"
2424

0 commit comments

Comments
 (0)