Skip to content

Commit 590e24d

Browse files
authored
Merge pull request #501 from PyThaiNLP/dev (build and deploy docs)
PyThaiNLP 2.2.6
2 parents 1c5818f + fc10bcd commit 590e24d

40 files changed

+365
-317
lines changed

.circleci/config.yml

Lines changed: 0 additions & 33 deletions
This file was deleted.

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 0 additions & 30 deletions
This file was deleted.
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
name: Feature request
3+
about: Propose a change or an addition เสนอความสามารถใหม่
4+
---
5+
6+
## Detailed description
7+
<!--- Provide a detailed description of the change or addition you are proposing -->
8+
9+
## Context
10+
<!--- Why is this change important to you? How would you use it? -->
11+
<!--- How can it benefit other users? -->
12+
13+
## Possible implementation
14+
<!--- Not obligatory, but suggest an idea for implementing addition or change -->
15+
16+
## Your environment
17+
* PyThaiNLP version:
18+
* Python version:
19+
* Operating system and version (distro, 32/64-bit):
20+
* More info (Docker, VM, etc.):
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
---
2+
name: Issue report
3+
about: Create a report to help us improve รายงานปัญหา
4+
---
5+
6+
<!--- Provide a general summary of the issue in the Title above -->
7+
8+
## Description
9+
<!--- Provide a more detailed introduction to the issue itself. -->
10+
<!-- Why you consider it to be an issue or a bug. -->
11+
12+
## Expected results
13+
<!-- Tell us what should happen. -->
14+
15+
## Current results
16+
<!-- Tell us what happens instead. -->
17+
<!-- You can also put screenshot here. -->
18+
19+
## Steps to reproduce
20+
<!-- Steps to reproduce the behavior. -->
21+
1.
22+
2.
23+
3.
24+
25+
<!-- You can also put a source code here. -->
26+
```python
27+
```
28+
29+
## Context
30+
<!-- How has this issue affected you? -->
31+
<!-- What are you trying to accomplish? -->
32+
<!-- Providing context helps us come up with a solution that is most useful in the real world. -->
33+
34+
## Your environment
35+
* PyThaiNLP version:
36+
* Python version:
37+
* Operating system and version (distro, 32/64-bit):
38+
* More info (Docker, VM, etc.):
39+
40+
## Possible solution
41+
<!-- (Optional) Suggest a fix for the issue,
42+
or ideas how to implement the change. -->
43+
44+
## Files
45+
<!-- (Optional) A list of relevant files for this issue. -->
46+
<!-- This will help people navigate the project and offer some clues of where to start. -->

.github/pull_request_template.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
### What does this changes
2+
3+
Brief summary of the changes
4+
5+
### What was wrong
6+
7+
Description of what was the root cause of the issue.
8+
9+
### How this fixes it
10+
11+
Description of how the changes fix the issue.
12+
13+
Fixes #...
14+
15+
### Your checklist for this pull request
16+
🚨Please review the [guidelines for contributing](../CONTRIBUTING.md) to this repository.
17+
18+
- [ ] Passed code styles and structures
19+
- [ ] Passed code linting checks and unit test
Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,11 @@
1-
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
2-
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
1+
name: Lint
32

4-
name: PyThaiNLP Test
5-
6-
on: [push,pull_request]
3+
on: [push, pull_request]
74

85
jobs:
96
build:
107

11-
runs-on: ubuntu-latest
8+
runs-on: ubuntu-20.04
129
strategy:
1310
matrix:
1411
python-version: [3.6]
@@ -21,18 +18,16 @@ jobs:
2118
python-version: ${{ matrix.python-version }}
2219
- name: Install dependencies
2320
run: |
24-
python -m pip install --upgrade pip pytest wheel flake8
21+
python -m pip install --upgrade pip
2522
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
26-
pip install torch==1.5.0 torchvision==0.6.0 -f https://download.pytorch.org/whl/torch_stable.html
23+
pip install "h5py>=2.10.0,<3" "tensorflow>=2.3.1,<3"
24+
pip install torch==1.7.0+cpu -f https://download.pytorch.org/whl/torch_stable.html
25+
pip install deepcut
2726
pip install .[full]
28-
pip install deepcut coverage coveralls
27+
pip install flake8 flake8-commas flake8-comprehensions flake8-tidy-imports
2928
- name: Lint with flake8
3029
run: |
3130
# stop the build if there are Python syntax errors or undefined names
3231
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
3332
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
3433
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
35-
- name: Test
36-
run: |
37-
coverage run -m unittest discover
38-
CI_BRANCH=${GITHUB_REF#"ref/heads"} COVERALLS_REPO_TOKEN=${{ secrets.COVERALLS_REPO_TOKEN }} coveralls

.github/workflows/pythonpublish.yml renamed to .github/workflows/pypi-publish.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
1-
# This workflows will upload a Python Package using Twine when a release is created
2-
# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries
3-
4-
name: Upload Python Package
1+
name: Upload package to PyPI
52

63
on:
74
release:
@@ -11,13 +8,16 @@ jobs:
118
deploy:
129

1310
runs-on: ubuntu-latest
11+
strategy:
12+
matrix:
13+
python-version: [3.6, 3.7, 3.8, 3.9, pypy3]
1414

1515
steps:
1616
- uses: actions/checkout@v2
17-
- name: Set up Python
17+
- name: Set up Python ${{ matrix.python-version }}
1818
uses: actions/setup-python@v1
1919
with:
20-
python-version: '3.x'
20+
python-version: ${{ matrix.python-version }}
2121
- name: Install dependencies
2222
run: |
2323
python -m pip install --upgrade pip

.github/workflows/test.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Unit test and code coverage
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
build:
7+
8+
runs-on: ubuntu-latest
9+
strategy:
10+
matrix:
11+
python-version: [3.6, 3.7]
12+
13+
steps:
14+
- uses: actions/checkout@v2
15+
- name: Set up Python ${{ matrix.python-version }}
16+
uses: actions/setup-python@v1
17+
with:
18+
python-version: ${{ matrix.python-version }}
19+
- name: Install dependencies
20+
run: |
21+
python -m pip install --upgrade pip
22+
pip install pytest coverage coveralls
23+
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
24+
pip install "h5py>=2.10.0,<3" "tensorflow>=2.3.1,<3"
25+
pip install torch==1.7.0+cpu -f https://download.pytorch.org/whl/torch_stable.html
26+
pip install deepcut
27+
pip install .[full]
28+
- name: Test
29+
env:
30+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
31+
run: |
32+
coverage run -m unittest discover
33+
CI_BRANCH=${GITHUB_REF#"ref/heads"} COVERALLS_REPO_TOKEN=${{ secrets.COVERALLS_REPO_TOKEN }} coveralls

.travis.yml.old

Lines changed: 0 additions & 31 deletions
This file was deleted.

CONTRIBUTING.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ Hi! Thanks for your interest in contributing to [PyThaiNLP](https://github.com/P
55

66
## Issue Report and Discussion
77

8+
- Discussion: https://github.com/PyThaiNLP/pythainlp/discussions
89
- GitHub issues (problems and suggestions): https://github.com/PyThaiNLP/pythainlp/issues
910
- Facebook group (not specific to PyThaiNLP, can be Thai NLP discussion in general): https://www.facebook.com/groups/thainlp
1011

@@ -103,7 +104,7 @@ Make sure the same tests pass on Travis CI and AppVeyor.
103104
#current_version = 2.2.3
104105
105106
bumpversion patch
106-
#current_version = 2.2.4-dev0
107+
#current_version = 2.2.6-dev0
107108
108109
bumpversion minor
109110
#current_version = 2.3.0-dev0

MANIFEST.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
include CONTRIBUTING.md
22
include LICENSE
33
include README.md
4+
include README_TH.md
45

56
recursive-include tests *
67
recursive-exclude * __pycache__

README.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ PyThaiNLP เป็นไลบารีภาษาไพทอนสำหร
2323
2424
| Version | Description | Status |
2525
|:------:|:--:|:------:|
26-
| [2.2.4](https://github.com/PyThaiNLP/pythainlp/releases) | Stable | [Change Log](https://github.com/PyThaiNLP/pythainlp/issues/330) |
26+
| [2.2.6](https://github.com/PyThaiNLP/pythainlp/releases) | Stable | [Change Log](https://github.com/PyThaiNLP/pythainlp/issues/330) |
2727
| [`dev`](https://github.com/PyThaiNLP/pythainlp/tree/dev) | Release Candidate for 2.3 | [Change Log](https://github.com/PyThaiNLP/pythainlp/issues/445) |
2828

2929
Please follow our [PyThaiNLP Facebook page](https://www.facebook.com/pythainlp/) for more updates.
@@ -162,6 +162,11 @@ or BibTeX entry:
162162
| Other corpora and models that may included with PyThaiNLP | See [Corpus License](https://github.com/PyThaiNLP/pythainlp/blob/dev/pythainlp/corpus/corpus_license.md) |
163163

164164

165+
## Model Cards
166+
167+
For technical details, caveats, and ethical considerations of the models developed and used in PyThaiNLP, see [Model cards](https://github.com/PyThaiNLP/pythainlp/wiki/Model-Cards).
168+
169+
165170
## Sponsors
166171

167172
[![VISTEC-depa Thailand Artificial Intelligence Research Institute](https://airesearch.in.th/assets/img/logo/airesearch-logo.svg)](https://airesearch.in.th/)
@@ -177,7 +182,7 @@ Since 2019, our contributors Korakot Chaovavanich and Lalita Lowphansirikul have
177182
------
178183

179184
<div align="center">
180-
<strong>We have only one official repository at https://github.com/PyThaiNLP/pythainlp and another mirror at https://gitlab.com/pythainlp/pythainlp </strong>
185+
<strong>We have only one official repository at https://github.com/PyThaiNLP/pythainlp and another mirror at https://gitlab.com/pythainlp/pythainlp</strong>
181186
</div>
182187

183188
<div align="center">

0 commit comments

Comments
 (0)