{"id":20479334,"url":"https://github.com/jiko23/family-tree","last_synced_at":"2025-10-26T22:02:33.791Z","repository":{"id":98200783,"uuid":"425701796","full_name":"jiko23/Family-Tree","owner":"jiko23","description":"Model out the Shan family tree so that when given a ‘name’ and a ‘relationship’ as an input, the output are the people that correspond to the relationship. Input needs to be read from a text file, and output should be printed to console. Program should execute and take the location to the test file as parameter.","archived":false,"fork":false,"pushed_at":"2021-11-08T05:03:10.000Z","size":13,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-26T22:02:33.582Z","etag":null,"topics":["backend","data-structures","python-3"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jiko23.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-11-08T04:50:29.000Z","updated_at":"2021-11-08T05:11:03.000Z","dependencies_parsed_at":"2023-03-08T12:15:38.964Z","dependency_job_id":null,"html_url":"https://github.com/jiko23/Family-Tree","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/jiko23/Family-Tree","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jiko23%2FFamily-Tree","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jiko23%2FFamily-Tree/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jiko23%2FFamily-Tree/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jiko23%2FFamily-Tree/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jiko23","download_url":"https://codeload.github.com/jiko23/Family-Tree/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jiko23%2FFamily-Tree/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":281178927,"owners_count":26456678,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-26T02:00:06.575Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["backend","data-structures","python-3"],"created_at":"2024-11-15T15:43:30.817Z","updated_at":"2025-10-26T22:02:33.756Z","avatar_url":"https://github.com/jiko23.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Family-Tree\nProblem statement: https://www.geektrust.in/coding-problem/backend/family\n\n\nThis program consists of total three python scripts. These are:\n\n\t1) family.py --\u003e This dictionary holds the numerical representaions of the family members\n\t\t\tfor the ease of building and functioning of the family. If any new member \n\t\t\tis added to the family then the numerical representaion of the member will\n\t\t\tbe also present in this dictionary.\n\n\t2) family_functionality.py --\u003e  Class Family depicts a family tree. Every member in the family will consist of name,relationship with other member/members and gender. This is a acyclic graph\n\t\t\t\t\tas to avoid cycles within a family because there cannot be cycles in a family.\n\t\t\t\t\tThere will be following functions:\n\n\t\t\t\t\t\t1) check_Cycle --\u003e Will check the adjacent members of a family member to detect cycles.\n\t\t\t\t\t\t2) cycle --\u003e Will check for a member and then call check_Cycle function to also check the adjacent members or relatives for cycles in the family.\n\t\t\t\t\t\t3) search_Mother --\u003e Will check if mother exists in the family or not if not then while adding a child is not possible through the mother.\n\t\t\t\t\t\t4) add_Member --\u003e Will add members in the family tree and establish relationship between given members but cannot add child using this function.\n\t\t\t\t\t\t5) add_Child --\u003e Will add child only through mother and if mother doesnot exists in the family then cannot insert a child.\n\t\t\t\t\t\t6) find_Member --\u003e Will search for adjacent members to a member based on a relationship.\n\n\n\t3) geektrust.py --\u003e This is the main file. It is for the purpose of accepting the input.txt file and the number of new members to be included in the family. In the input.txt the commands\n\t\t\tto be accepted are as follows:\n\t\t\t\ta) To add a member: ADD_MEMBER Member_1 Member_2 Relation_of_Member_2_with_Member_1 Gender_of_Member_2 . Remember not to try to add child with it i.e. do not mention mother name in 1st\n\t\t\t\tor else by default it will assume that user is trying to add a child.\n\n\t\t\t\tb) To add a child: ADD_CHILD MotherName ChildName Relationship_to_Mother Child_Gender . Mother must exist in the family.\n\n\t\t\t\tc) To get relationship: GET_RELATIONSHIP Member Relationship . To get relatives of a member based on a relationship.\n\n\nEnvironment Requirement: Kindly Install Anaconda for Python. Python version \u003e 3 or 3.5. Follow this link: https://docs.anaconda.com/anaconda/install/index.html\n\nRunning the Program: To run the program kindly run the main program i.e. geektrust.py. Remember that all program scripts, input file must be in the same location or else kindly put location while running\n\t\tthe program.\n\n\t\t\trun command on anaconda powershell prompt --\u003e python -m geektrust input.txt number_of_new_member_tobe_added_to_family\n\n\t\t\tto check the unittest coverage: (a) coverage run -m geektrust input.txt number_of_new_member_tobe_added_to_family\n\n\t\t\t\t\t\t\t(b) coverage report -m\n\n\t\t\tto get the html of the coverage report: coverage html\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjiko23%2Ffamily-tree","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjiko23%2Ffamily-tree","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjiko23%2Ffamily-tree/lists"}