To start development environment:
$ virtualenv venv
$ source venv/bin/activate
$ pip install -r requirements.txt(Use python3)
For running tests:
$ python3 test.py
# OR
$ ./test.py
# OR
$ make testFor adding test, write a function in test.py and add the function to the TESTS list in test.py:
def test_my_test_func():
""" A Caption for my test """
assert 1 == 1
TESTS = [
# ...
test_my_test_func,
# ...
]For using pylint to check code quality, you can use make:
$ make pylintFor generating manual page(man) in the man/tchess.1, you can run:
$ ./bin/generate-man-page.py
# OR
$ make manpage(This is possible ONLY on Unix systems).
To see project todos, run:
$ make todoTo release a new version automaticaly:
$ python ./bin/release.py <new-version>
$ ./bin/release.py 1.0
# OR
$ python ./bin/release.py micro # bump a micro
$ python ./bin/release.py minor # bump a minor
$ python ./bin/release.py major # bump a major
$ python ./bin/release.py # micro by defaultThe above commands will change the version. But they do not commit changes and create the tag.
To create tag and commit, use --commit option:
$ ./bin/release.py --commit
$ git pushAfter push, new release will be published into pypi by github workflows.