Skip to content

Commit 8ae08c2

Browse files
committed
[cd build] Update contributing guide
Signed-off-by: Arthit Suriyawongkul <[email protected]>
1 parent be76c9e commit 8ae08c2

File tree

1 file changed

+32
-16
lines changed

1 file changed

+32
-16
lines changed

CONTRIBUTING.md

Lines changed: 32 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -7,27 +7,42 @@ Please refer to our [Contributor Covenant Code of Conduct](https://github.com/Py
77
## Issue Report and Discussion
88

99
- 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>
10+
- GitHub issues (for problems and suggestions):
11+
<https://github.com/PyThaiNLP/pythainlp/issues>
12+
- Facebook group (for general Thai NLP discussion, not specific to PyThaiNLP):
13+
<https://www.facebook.com/groups/thainlp>
1214

1315
## Code
1416

1517
## Code Guidelines
1618

17-
- Follow [PEP8](http://www.python.org/dev/peps/pep-0008/), use [black](https://github.com/ambv/black) with `--line-length` = 79;
18-
- Name identifiers (variables, classes, functions, module names) with meaningful
19-
and pronounceable names (`x` is always wrong);
20-
- Please follow this [naming convention](https://namingconvention.org/python/). For example, global constant variables must be in `ALL_CAPS`;
21-
![Naming Convention](https://i.stack.imgur.com/uBr10.png)
22-
- Write tests for your new features. The test suite is in `tests/` directory. (see "Testing" section below);
19+
- Follow [PEP8][pep8], use [black][black] with `--line-length` = 79;
20+
- Name identifiers (variables, classes, functions, module names)
21+
with meaningful and pronounceable names (`x` is always wrong);
22+
- Please follow this [naming convention][naming].
23+
For example, global constant variables must be in `ALL_CAPS`;
24+
![Naming Convention](https://i.stack.imgur.com/uBr10.png)
25+
- Write tests for your new features. The test suite is in `tests/` directory.
26+
(see "Testing" section below);
2327
- Run all tests before pushing (just execute `tox`) so you will know if your
2428
changes broke something;
25-
- Commented out codes are [dead
26-
codes](http://www.codinghorror.com/blog/2008/07/coding-without-comments.html);
27-
- All `#TODO` comments should be turned into [issues](https://github.com/pythainlp/pythainlp/issues) in GitHub;
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)"`);
30-
- All text files, including source codes, must end with one empty line. This is [to please git](https://stackoverflow.com/questions/5813311/no-newline-at-end-of-file#5813359) and [to keep up with POSIX standard](https://stackoverflow.com/questions/729692/why-should-text-files-end-with-a-newline).
29+
- Commented out codes are [dead codes][dead-codes];
30+
- All `#TODO` comments should be turned into [issues][issues] in GitHub;
31+
- When appropriate, use [f-string][pep0498]
32+
(use `f"{a} = {b}"`,
33+
instead of `"{} = {}".format(a, b)` and `"%s = %s' % (a, b)"`);
34+
- All text files, including source codes, must end with one empty line.
35+
This is [to please Git][empty-line] and
36+
[to keep up with POSIX standard][posix].
37+
38+
[pep8]: http://www.python.org/dev/peps/pep-0008/
39+
[black]: https://github.com/ambv/black
40+
[naming]: https://namingconvention.org/python/
41+
[pep0498]: https://www.python.org/dev/peps/pep-0498/
42+
[dead-codes]: http://www.codinghorror.com/blog/2008/07/coding-without-comments.html
43+
[issues]: https://github.com/pythainlp/pythainlp/issues
44+
[empty-line]: https://stackoverflow.com/questions/5813311/no-newline-at-end-of-file#5813359
45+
[posix]: https://stackoverflow.com/questions/729692/why-should-text-files-end-with-a-newline
3146

3247
### Version Control System
3348

@@ -42,12 +57,13 @@ so it may be a good idea to familiarize yourself with it.
4257

4358
### Pull Request
4459

45-
- We use the famous [gitflow](http://nvie.com/posts/a-successful-git-branching-model/)
46-
to manage our branches.
60+
- We use the famous [gitflow][] to manage our branches.
4761
- When you create pull requests on GitHub, GitHub Actions will run tests
4862
and several checks automatically. Click the "Details" link at the end of
4963
each check to see what needs to be fixed.
5064

65+
[gitflow]: http://nvie.com/posts/a-successful-git-branching-model/
66+
5167
## Documentation
5268

5369
- We use [Sphinx](https://www.sphinx-doc.org/en/master/) to generate API document

0 commit comments

Comments
 (0)