A tool to find the shortest path between two actors.
Setup is fairly standard for a python project. Most of the dependencies you need should already be available (assuming you are using Python 2.7). I would advise setting up a virtual environment, though it is by no means necessary.
pip install -r requirements.txt
Tests are implemented using Python's built-in
unittest library, and
code coverage metrics are obtained using the
coverage library.
python tests.py
coverage run tests.pycoverage report -m
Contextual help is available via python run.py --help or
python run.py <command> --help, but there are two main commands:
-
python run.py import [directory]- Import JSON files from
[directory]. Defaults to./films - Files are assumed to be of the following format
{'film': {'name': <name>}, 'cast': [{'name': <name>}, ...]
- Import JSON files from
-
python run.py search actor [target_actor]- Find the path of actors and movies from
actorto[target_actor]. If[target_actor]is not specified,Kevin Baconbe used by default.
- Find the path of actors and movies from
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2014 Nick Terwoord <me@nt3r.com>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. You just DO WHAT THE FUCK YOU WANT TO.