Skip to content

Commit

Permalink
Merge pull request #501 from PyThaiNLP/dev (build and deploy docs)
Browse files Browse the repository at this point in the history
PyThaiNLP 2.2.6
  • Loading branch information
wannaphong committed Dec 13, 2020
2 parents 1c5818f + fc10bcd commit 590e24d
Show file tree
Hide file tree
Showing 40 changed files with 365 additions and 317 deletions.
33 changes: 0 additions & 33 deletions .circleci/config.yml

This file was deleted.

30 changes: 0 additions & 30 deletions .github/ISSUE_TEMPLATE/bug_report.md

This file was deleted.

20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: Feature request
about: Propose a change or an addition เสนอความสามารถใหม่
---

## Detailed description
<!--- Provide a detailed description of the change or addition you are proposing -->

## Context
<!--- Why is this change important to you? How would you use it? -->
<!--- How can it benefit other users? -->

## Possible implementation
<!--- Not obligatory, but suggest an idea for implementing addition or change -->

## Your environment
* PyThaiNLP version:
* Python version:
* Operating system and version (distro, 32/64-bit):
* More info (Docker, VM, etc.):
46 changes: 46 additions & 0 deletions .github/ISSUE_TEMPLATE/issue_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
---
name: Issue report
about: Create a report to help us improve รายงานปัญหา
---

<!--- Provide a general summary of the issue in the Title above -->

## Description
<!--- Provide a more detailed introduction to the issue itself. -->
<!-- Why you consider it to be an issue or a bug. -->

## Expected results
<!-- Tell us what should happen. -->

## Current results
<!-- Tell us what happens instead. -->
<!-- You can also put screenshot here. -->

## Steps to reproduce
<!-- Steps to reproduce the behavior. -->
1.
2.
3.

<!-- You can also put a source code here. -->
```python
```

## Context
<!-- How has this issue affected you? -->
<!-- What are you trying to accomplish? -->
<!-- Providing context helps us come up with a solution that is most useful in the real world. -->

## Your environment
* PyThaiNLP version:
* Python version:
* Operating system and version (distro, 32/64-bit):
* More info (Docker, VM, etc.):

## Possible solution
<!-- (Optional) Suggest a fix for the issue,
or ideas how to implement the change. -->

## Files
<!-- (Optional) A list of relevant files for this issue. -->
<!-- This will help people navigate the project and offer some clues of where to start. -->
19 changes: 19 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
### What does this changes

Brief summary of the changes

### What was wrong

Description of what was the root cause of the issue.

### How this fixes it

Description of how the changes fix the issue.

Fixes #...

### Your checklist for this pull request
🚨Please review the [guidelines for contributing](../CONTRIBUTING.md) to this repository.

- [ ] Passed code styles and structures
- [ ] Passed code linting checks and unit test
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: Lint

name: PyThaiNLP Test

on: [push,pull_request]
on: [push, pull_request]

jobs:
build:

runs-on: ubuntu-latest
runs-on: ubuntu-20.04
strategy:
matrix:
python-version: [3.6]
Expand All @@ -21,18 +18,16 @@ jobs:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip pytest wheel flake8
python -m pip install --upgrade pip
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
pip install torch==1.5.0 torchvision==0.6.0 -f https://download.pytorch.org/whl/torch_stable.html
pip install "h5py>=2.10.0,<3" "tensorflow>=2.3.1,<3"
pip install torch==1.7.0+cpu -f https://download.pytorch.org/whl/torch_stable.html
pip install deepcut
pip install .[full]
pip install deepcut coverage coveralls
pip install flake8 flake8-commas flake8-comprehensions flake8-tidy-imports
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Test
run: |
coverage run -m unittest discover
CI_BRANCH=${GITHUB_REF#"ref/heads"} COVERALLS_REPO_TOKEN=${{ secrets.COVERALLS_REPO_TOKEN }} coveralls
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
# This workflows will upload a Python Package using Twine when a release is created
# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries

name: Upload Python Package
name: Upload package to PyPI

on:
release:
Expand All @@ -11,13 +8,16 @@ jobs:
deploy:

runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.6, 3.7, 3.8, 3.9, pypy3]

steps:
- uses: actions/checkout@v2
- name: Set up Python
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: '3.x'
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
Expand Down
33 changes: 33 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Unit test and code coverage

on: [push, pull_request]

jobs:
build:

runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.6, 3.7]

steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pytest coverage coveralls
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
pip install "h5py>=2.10.0,<3" "tensorflow>=2.3.1,<3"
pip install torch==1.7.0+cpu -f https://download.pytorch.org/whl/torch_stable.html
pip install deepcut
pip install .[full]
- name: Test
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
coverage run -m unittest discover
CI_BRANCH=${GITHUB_REF#"ref/heads"} COVERALLS_REPO_TOKEN=${{ secrets.COVERALLS_REPO_TOKEN }} coveralls
31 changes: 0 additions & 31 deletions .travis.yml.old

This file was deleted.

3 changes: 2 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ Hi! Thanks for your interest in contributing to [PyThaiNLP](https://github.com/P

## Issue Report and Discussion

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

Expand Down Expand Up @@ -103,7 +104,7 @@ Make sure the same tests pass on Travis CI and AppVeyor.
#current_version = 2.2.3
bumpversion patch
#current_version = 2.2.4-dev0
#current_version = 2.2.6-dev0
bumpversion minor
#current_version = 2.3.0-dev0
Expand Down
1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
include CONTRIBUTING.md
include LICENSE
include README.md
include README_TH.md

recursive-include tests *
recursive-exclude * __pycache__
Expand Down
9 changes: 7 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ PyThaiNLP เป็นไลบารีภาษาไพทอนสำหร
| Version | Description | Status |
|:------:|:--:|:------:|
| [2.2.4](https://github.com/PyThaiNLP/pythainlp/releases) | Stable | [Change Log](https://github.com/PyThaiNLP/pythainlp/issues/330) |
| [2.2.6](https://github.com/PyThaiNLP/pythainlp/releases) | Stable | [Change Log](https://github.com/PyThaiNLP/pythainlp/issues/330) |
| [`dev`](https://github.com/PyThaiNLP/pythainlp/tree/dev) | Release Candidate for 2.3 | [Change Log](https://github.com/PyThaiNLP/pythainlp/issues/445) |

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


## Model Cards

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).


## Sponsors

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

<div align="center">
<strong>We have only one official repository at https://github.com/PyThaiNLP/pythainlp and another mirror at https://gitlab.com/pythainlp/pythainlp </strong>
<strong>We have only one official repository at https://github.com/PyThaiNLP/pythainlp and another mirror at https://gitlab.com/pythainlp/pythainlp</strong>
</div>

<div align="center">
Expand Down

0 comments on commit 590e24d

Please sign in to comment.