Skip to content

Commit b5c2e94

Browse files
authored
Merge pull request #275 from PyThaiNLP/revise-dependency-files
Include only direct dependency in setup.py
2 parents b9025aa + 00d68ea commit b5c2e94

File tree

10 files changed

+63
-190
lines changed

10 files changed

+63
-190
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,4 @@ deploy:
2020
password:
2121
secure: Tj3VA05qopp0mkzWu6EFTlvijAoisd0BN/gD2c/vaaDCUy6fTXBkYk+dTkjbmYkEBl/WrsrW1T/QxCt2uc6bv7QTz+qL243Edv4FFQbBKvMSNlUO+hh1jI9zv3/QzwOaNHXOsI4JGeUaN5cULfxBjsBEFN+v6E0mkgBwJ0Qdb0/yuMybLWZ9dJI8iUKiaWNIr+NQoa9a+Sxw6Ltl/mdCKPppgOYPpVMCsDDdLqZdjkgXmzsjH9+Nfe6R+mYbdmeigy3ePNsIKbPkzZrY+E/I0lPZOVUgrs6gvZwlD3gESJgTROrUH6E2lBP9yYvFUE3KB0O+rdT5GyFq3MH1uD2ocrPCTQku6577wK31FzGoex6vtT4y2b39fLbhRmZDOJW8IFO7MLybazuRsNhaXn9hQU4HBRM2GQZc41bLkiEhsUX9/b2ujcn4PJKDZy91LnBw/93bgZJ7KweDzKywmcZSNeuBsGWgXdPqYiizzcf8DdvJAYytydhf8RxqdemTiS7GE7XBoXhj1/9Vfrt3lZXZbfYpTjNZeyxu7FrUJpm/I23wCw46qaRWzKXv2sRRUleNqQ1jIKEVupIa9sruHvG7DZecErhO9rMkGdsf4CIjolZ0A2BE+eAPEEY6/H1WFUWHxzxuELbUJwxnl1By677hBkLJaVs1YMGc2enGWzOnUYI=
2222
on:
23-
tags: true
23+
tags: true

CONTRIBUTING.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ We use the famous [gitflow](http://nvie.com/posts/a-successful-git-branching-mod
2525
code](http://www.codinghorror.com/blog/2008/07/coding-without-comments.html);
2626
- Name identifiers (variables, classes, functions, module names) with meaningful
2727
and pronounceable names (`x` is always wrong);
28-
- When manipulating strings, use [f-String](https://www.python.org/dev/peps/pep-0498/)
29-
(use `"{a} = {b}"`, instead of `"{} = {}".format(a, b)` and `"%s = %s' % (a, b)"`);
28+
- When appropriate, use [f-String](https://www.python.org/dev/peps/pep-0498/)
29+
(use `f"{a} = {b}"`, instead of `"{} = {}".format(a, b)` and `"%s = %s' % (a, b)"`);
3030
- All `#TODO` comments should be turned into issues (use our
3131
[GitHub issue system](https://github.com/PyThaiNLP/pythainlp/));
3232
- Run all tests before pushing (just execute `tox`) so you will know if your
@@ -36,8 +36,8 @@ We use the famous [gitflow](http://nvie.com/posts/a-successful-git-branching-mod
3636

3737
# Discussion
3838

39-
- Facebook group (for Thai NLP Discussion only): https://www.facebook.com/groups/thainlp
40-
- GitHub issues (Problems and suggestions): https://github.com/PyThaiNLP/pythainlp/issues
39+
- GitHub issues (PyThaiNLP problems and suggestions): https://github.com/PyThaiNLP/pythainlp/issues
40+
- Facebook group (Thai NLP discussion in general, not specific to PyThaiNLP): https://www.facebook.com/groups/thainlp
4141

4242
Happy hacking! (;
4343

README-pypi.md

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

conda.recipe/bld.bat

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

conda.recipe/build.shno

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

conda.recipe/meta.yaml

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

meta.yaml

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

requirements.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@ marisa-trie==0.7.*
33
nltk==3.4.*
44
pytz==2019.2
55
requests==2.22.*
6-
tinydb==3.13.*
7-
tqdm==4.35.*
6+
tinydb==3.14.*
7+
tqdm==4.36.*

setup.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[bumpversion]
2-
current_version = 2.0.5
2+
current_version = 2.1
33
commit = True
44
tag = True
55

setup.py

Lines changed: 55 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -2,39 +2,65 @@
22

33
from setuptools import find_packages, setup
44

5-
with open("README-pypi.md", "r", encoding="utf-8") as readme_file:
6-
readme = readme_file.read()
5+
readme = """
6+
![PyThaiNLP Logo](https://avatars0.githubusercontent.com/u/32934255?s=200&v=4)
77
8-
with open("requirements.txt", "r", encoding="utf-8") as f:
9-
requirements = f.read().splitlines()
8+
PyThaiNLP is a Python library for Thai natural language processing.
9+
The library provides functions like word tokenization, part-of-speech tagging,
10+
transliteration, soundex generation, and spell checking.
11+
12+
## Install
13+
14+
For stable version:
15+
16+
```sh
17+
pip install pythainlp
18+
```
19+
20+
Some functionalities, like word vector, required extra packages.
21+
See https://github.com/PyThaiNLP/pythainlp for installation options.
22+
23+
**Note for Windows**: `marisa-trie` wheels can be obtained from
24+
https://www.lfd.uci.edu/~gohlke/pythonlibs/#marisa-trie
25+
Install it with pip, for example: `pip install marisa_trie‑xxx.whl`
26+
"""
27+
28+
requirements = [
29+
"dill>=0.3.0,<1",
30+
"marisa-trie>=0.7.5,<1",
31+
"nltk>=3.4.5,<4",
32+
"requests>=2.22.0,<3",
33+
"tinydb>=3.13.0,<4",
34+
"tqdm>=4.35.0,<5",
35+
]
1036

1137
extras = {
12-
"artagger": ["artagger"],
13-
"attacut": ["attacut"],
14-
"deepcut": ["deepcut", "keras", "tensorflow"],
15-
"icu": ["pyicu"],
16-
"ipa": ["epitran"],
17-
"ssg": ["ssg"],
18-
"ml": ["keras", "numpy", "torch"],
19-
"ner": ["sklearn-crfsuite"],
20-
"thai2fit": ["emoji", "gensim", "numpy"],
21-
"thai2rom": ["torch", "numpy"],
22-
"benchmarks": ["numpy", "pandas"],
38+
"artagger": ["artagger>=0.1.0.3"],
39+
"attacut": ["attacut>=1.0.2"],
40+
"benchmarks": ["numpy>=1.17.2", "pandas>=0.25.1"],
41+
"deepcut": ["deepcut>=0.6.1.0", "keras>=2.3.0", "tensorflow>=1.14.0"],
42+
"icu": ["pyicu>=2.3.1"],
43+
"ipa": ["epitran>=1.1"],
44+
"ml": ["keras>=2.3.0", "numpy>=1.17.2", "torch>=1.2.0"],
45+
"ner": ["sklearn-crfsuite>=0.3.6"],
46+
"ssg": ["ssg>=0.0.4"],
47+
"thai2fit": ["emoji>0.5.4", "gensim>=3.8.0", "numpy>=1.17.2"],
48+
"thai2rom": ["torch>=1.2.0", "numpy>=1.17.2"],
2349
"full": [
24-
"artagger",
25-
"attacut",
26-
"deepcut",
27-
"epitran",
28-
"gensim",
29-
"keras",
30-
"numpy",
31-
"pyicu",
32-
"sklearn-crfsuite",
33-
"tensorflow",
34-
"torch",
35-
"ssg",
36-
"emoji",
37-
"pandas",
50+
"artagger>=0.1.0.3",
51+
"attacut>=1.0.2",
52+
"deepcut>=0.6.1.0",
53+
"epitran>=1.1",
54+
"gensim>=3.8.0",
55+
"keras>=2.3.0",
56+
"numpy>=1.17.2",
57+
"pyicu>=2.3.1",
58+
"sklearn-crfsuite>=0.3.6",
59+
"tensorflow>=1.14.0",
60+
"torch>=1.2.0",
61+
"ssg>=0.0.4",
62+
"emoji>=0.5.4",
63+
"pandas>=0.25.1",
3864
],
3965
}
4066

0 commit comments

Comments
 (0)