<commit_before># Quickstart

1. Install libjansson, Cython and Python 3
2. Run `make` to build the server.
3. Run `make run` to run the server.
4. Start talking to `ws://localhost:8080/`, e.g. using [telsocket](http://telsocket.org/)

# Testing

Run `make test` to run unit tests. Example of a successful run:

	$ make test
	test_get_game_end (bship_logic.tests.ApiTests)
	get_game_end fails when called inappropriately ... ok

	<lots of "... ok"><commit_msg>Write deb instructions<commit_after># Quickstart

1. Install libjansson, Cython and Python 3
2. Run `make` to build the server.
3. Run `make install` to install the server to your system (as root).
4. Run `make run` to run the server.
5. Start talking to `ws://localhost:8080/`, e.g. using [telsocket](http://telsocket.org/)

(Run `make uninstall` to uninstall the server)

# Making a Debian package

1. Install fakeroot and debhelper.
2. Run `make deb`
3. The finished .deb file will be placed in ..

# Installing on a production server

1. `dpkg -i` the deb package
2. `apt -f install` to install dependencies
3. Enable/start the battleship systemd service
4. Serve `/usr/share/battleship` on a web server

# Testing

Run `make test` to run unit tests. Example of a successful run:

	$ make test
	test_get_game_end (bship_logic.tests.ApiTests)
	get_game_end fails when called inappropriately ... ok

	<lots of "... ok">
{'fraction_non_alphanumeric': 0.10507246376811594, 'fraction_numerical': 0.01884057971014493, 'mean_word_length': 3.745704467353952, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3170398', 'n_tokens_mistral': 470, 'n_tokens_neox': 448, 'n_words': 190}