Skip to content

Commit dbc5e3a

Browse files
authored
Merge pull request #1437 from PyThaiNLP/copilot/add-module-th-pron
Add Wiktionary th-pron transliterator to pythainlp.transliterate
2 parents 3705800 + 52c5f01 commit dbc5e3a

41 files changed

Lines changed: 875 additions & 100 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/bandit.yml

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
# SPDX-FileCopyrightText: 2026-present PyThaiNLP Project
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
# Bandit is a tool designed to find common security issues in Python code.
5+
# https://github.com/pycqa/bandit
6+
7+
name: Bandit
8+
9+
on:
10+
push:
11+
branches:
12+
- dev
13+
- main
14+
paths-ignore:
15+
- '**.cff'
16+
- '**.json'
17+
- '**.md'
18+
- '**.rst'
19+
- '**.txt'
20+
- 'docs/**'
21+
pull_request:
22+
branches:
23+
- dev
24+
- main
25+
paths-ignore:
26+
- '**.cff'
27+
- '**.json'
28+
- '**.md'
29+
- '**.rst'
30+
- '**.txt'
31+
- 'docs/**'
32+
33+
# Avoid duplicate runs for the same source branch and repository.
34+
# For pull_request events, uses the source repo name from
35+
# github.event.pull_request.head.repo.full_name; otherwise uses github.repository.
36+
# For push events, uses the branch name from github.ref_name.
37+
# For pull_request events, uses the source branch name from github.head_ref.
38+
# This ensures events for the same repo and branch share the same group,
39+
# and avoids cross-fork collisions when branch names are reused.
40+
concurrency:
41+
group: >-
42+
${{ github.workflow }}-${{
43+
github.event.pull_request.head.repo.full_name || github.repository
44+
}}-${{ github.head_ref || github.ref_name }}
45+
cancel-in-progress: true
46+
47+
jobs:
48+
bandit:
49+
runs-on: ubuntu-latest
50+
permissions:
51+
contents: read
52+
steps:
53+
- name: Checkout
54+
uses: actions/checkout@v6.0.2
55+
56+
- name: Set up Python
57+
uses: actions/setup-python@v6
58+
with:
59+
python-version: "3.x"
60+
cache: "pip"
61+
62+
- name: Install bandit
63+
run: pip install "bandit>=1.9.4"
64+
65+
- name: Run bandit
66+
run: bandit -r pythainlp -c pyproject.toml

.github/workflows/codemeta2cff.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
contents: write
2626
steps:
2727
- name: Checkout
28-
uses: actions/checkout@v6
28+
uses: actions/checkout@v6.0.3
2929

3030
- name: Generate CITATION.cff from codemeta.json
3131
uses: caltechlibrary/codemeta2cff@99ce10831c3037a067c3d9551d455638e0b438ac #v0.3.3
@@ -37,7 +37,7 @@ jobs:
3737
printf '\n```' >> $GITHUB_STEP_SUMMARY
3838
3939
- name: Validate CITATION.cff
40-
uses: dieghernan/cff-validator@114aae53e1850c3757733beb60036941900e3dc3 #v4
40+
uses: dieghernan/cff-validator@54c8e737314b948f25c0e5524a9d8ae3f39b207b #v5.0.1
4141

4242
- name: Commit and push updated CITATION.cff
4343
uses: EndBug/add-and-commit@290ea2c423ad77ca9c62ae0f5b224379612c0321 #v10.0.0

.github/workflows/codeql-analysis.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,11 +62,11 @@ jobs:
6262

6363
steps:
6464
- name: Checkout repository
65-
uses: actions/checkout@v6
65+
uses: actions/checkout@v6.0.3
6666

6767
# Initializes the CodeQL tools for scanning.
6868
- name: Initialize CodeQL
69-
uses: github/codeql-action/init@v4
69+
uses: github/codeql-action/init@v4.36.2
7070
with:
7171
languages: ${{ matrix.language }}
7272
# If you wish to specify custom queries, you can do so here or in a config file.
@@ -77,7 +77,7 @@ jobs:
7777
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
7878
# If this step fails, then you should remove it and run the build manually (see below)
7979
- name: Autobuild
80-
uses: github/codeql-action/autobuild@v4
80+
uses: github/codeql-action/autobuild@v4.36.2
8181

8282
# ℹ️ Command-line programs to run using the OS shell.
8383
# 📚 https://git.io/JvXDl
@@ -91,4 +91,4 @@ jobs:
9191
# make release
9292

9393
- name: Perform CodeQL Analysis
94-
uses: github/codeql-action/analyze@v4
94+
uses: github/codeql-action/analyze@v4.36.2

.github/workflows/corpus.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ jobs:
3636

3737
steps:
3838
- name: Checkout
39-
uses: actions/checkout@v6
39+
uses: actions/checkout@v6.0.3
4040

4141
- name: Set up Python
4242
uses: actions/setup-python@v6

.github/workflows/deploy-docs.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
runs-on: ubuntu-latest
2525
steps:
2626
- name: Checkout
27-
uses: actions/checkout@v6
27+
uses: actions/checkout@v6.0.3
2828
- name: Set up Python
2929
uses: actions/setup-python@v6
3030
with:
@@ -38,7 +38,7 @@ jobs:
3838
cd docs && make html
3939
cd ..
4040
- name: Deploy documentation
41-
uses: peaceiris/actions-gh-pages@v4
41+
uses: peaceiris/actions-gh-pages@v4.1.0
4242
with:
4343
personal_token: ${{ secrets.PERSONAL_TOKEN }}
4444
publish_dir: ./docs/_build/html

.github/workflows/lint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ jobs:
4343
runs-on: ubuntu-latest
4444
steps:
4545
- name: Checkout
46-
uses: actions/checkout@v6
46+
uses: actions/checkout@v6.0.3
4747
- name: Ruff
4848
uses: astral-sh/ruff-action@v3
4949
with:

.github/workflows/markdownlint.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,11 @@ jobs:
2424
runs-on: ubuntu-latest
2525

2626
steps:
27-
- uses: actions/checkout@v6
27+
- uses: actions/checkout@v6.0.3
2828
with:
2929
fetch-depth: 0
3030

31-
- uses: DavidAnson/markdownlint-cli2-action@v23.1.0
31+
- uses: DavidAnson/markdownlint-cli2-action@v23.2.0
3232
with:
3333
globs: |
3434
**/*.md

.github/workflows/mypy.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ jobs:
4646
contents: read
4747
steps:
4848
- name: Checkout
49-
uses: actions/checkout@v6
49+
uses: actions/checkout@v6.0.3
5050

5151
- name: Set up Python
5252
uses: actions/setup-python@v6

.github/workflows/publish-versioned-docs.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,19 +31,19 @@ jobs:
3131
run: echo "version=${GITHUB_REF_NAME#v}" >> "$GITHUB_OUTPUT"
3232

3333
- name: Checkout pythainlp (for scripts)
34-
uses: actions/checkout@v6
34+
uses: actions/checkout@v6.0.3
3535
with:
3636
path: pythainlp
3737

3838
- name: Checkout dev-docs repository
39-
uses: actions/checkout@v6
39+
uses: actions/checkout@v6.0.3
4040
with:
4141
repository: PyThaiNLP/dev-docs
4242
token: ${{ secrets.PERSONAL_TOKEN }}
4343
path: dev-docs
4444

4545
- name: Checkout docs repository
46-
uses: actions/checkout@v6
46+
uses: actions/checkout@v6.0.3
4747
with:
4848
repository: PyThaiNLP/docs
4949
token: ${{ secrets.PERSONAL_TOKEN }}

.github/workflows/pypi-publish.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ jobs:
5252
build: ${{ steps.check_build_trigger.outputs.build }}
5353
steps:
5454
- name: Checkout source code
55-
uses: actions/checkout@v6
55+
uses: actions/checkout@v6.0.3
5656
with:
5757
ref: ${{ github.event.pull_request.head.sha }}
5858
- id: check_build_trigger
@@ -71,7 +71,7 @@ jobs:
7171

7272
steps:
7373
- name: Checkout
74-
uses: actions/checkout@v6
74+
uses: actions/checkout@v6.0.3
7575

7676
- name: Set up Python ${{ matrix.python-version }}
7777
uses: actions/setup-python@v6

0 commit comments

Comments
 (0)