Please make sure you have Python3 and pip installed before you begin.
To run this application, using command prompt, move to the directory where these files are stored. Run the following commands:
pip install -r requirements.txt
To run the main python file, run the following command: python -m meet_the_family
2 sample input files are provided in IO folder with names "input1.txt" and "input2.txt" whose expected outputs are in "output1.txt" and "output2.txt" respectively. Each input file contains lines of the format:
ADD_CHILD mother_name child_name gender
GET_RELATIONSHIP name relation_name
To run the test file, run the following command: python -m test
Note: Assumptions:
- Same Sex Marriage is not allowed.
- Divorce and marriage again is not allowed.
- Child addition is possible only if both parents exist (Single parent not allowed)
GET_RELATIONSHIP supports the following relations:
- Paternal-Uncle
- Maternal-Uncle
- Paternal-Aunt
- Maternal-Aunt
- Son
- Daughter
- Siblings
- Brother
- Sister
- Sister-In-Law
- Brother-In-Law