diff options
author | Philip Paquette <pcpaquette@gmail.com> | 2019-09-11 12:58:45 -0400 |
---|---|---|
committer | Philip Paquette <pcpaquette@gmail.com> | 2019-09-14 18:18:53 -0400 |
commit | abb42dcd4886705d6ba8af27f68ef605218ac67c (patch) | |
tree | 9ae16f7a09fff539fa72e65198e284bca6ac3376 /diplomacy/utils/convoy_paths.py | |
parent | a954a00d263750c279dbb2c0a9ae85707022bcd7 (diff) |
Added ReadtheDocs documentation for the public API
- Reformatted the docstring to be compatible
- Added tests to make sure the documentation compiles properly
- Added sphinx as a pip requirement
Co-authored-by: Philip Paquette <pcpaquette@gmail.com>
Co-authored-by: notoraptor <stevenbocco@gmail.com>
Diffstat (limited to 'diplomacy/utils/convoy_paths.py')
-rw-r--r-- | diplomacy/utils/convoy_paths.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/diplomacy/utils/convoy_paths.py b/diplomacy/utils/convoy_paths.py index 27b6836..7c21863 100644 --- a/diplomacy/utils/convoy_paths.py +++ b/diplomacy/utils/convoy_paths.py @@ -47,6 +47,7 @@ DISK_CACHE_PATH = os.path.join(HOME_DIRECTORY, '.cache', 'diplomacy', CACHE_FILE def display_progress_bar(queue, max_loop_iters): """ Displays a progress bar + :param queue: Multiprocessing queue to display the progress bar :param max_loop_iters: The expected maximum number of iterations """ @@ -122,6 +123,7 @@ def get_convoy_paths(map_object, start_location, max_convoy_length, queue): def build_convoy_paths_cache(map_object, max_convoy_length): """ Builds the convoy paths cache for a map + :param map_object: The instantiated map object :param max_convoy_length: The maximum convoy length permitted :return: A dictionary where the key is the number of fleets in the path and @@ -158,6 +160,7 @@ def build_convoy_paths_cache(map_object, max_convoy_length): def get_file_md5(file_path): """ Calculates a file MD5 hash + :param file_path: The file path :return: The computed md5 hash """ @@ -169,6 +172,7 @@ def get_file_md5(file_path): def add_to_cache(map_name): """ Lazy generates convoys paths for a map and adds it to the disk cache + :param map_name: The name of the map :return: The convoy_paths for that map """ |