Git Product home page Git Product logo

punch_tree's Introduction

Family Tree CLI

Setup

pip install click python cli.py to access the cli application

Available Commands

python cli.py add-person <person_name> python cli.py add-relation <relation> python cli.py connect <person1> <relationship> <person2> python cli.py count <person1> <relations> python cli.py find <person1> <relations>

Validation

Limited Relationship Validation

The code only checks if a relationship type is present in the predefined relations list, but doesn't enforce other constraints (e.g., preventing a person from being their own parent).

No Data Integrity Checks

The code doesn't perform extensive validation on the data itself, such as ensuring consistency of relationships or preventing duplicates. Additional Assumptions:

Single Relationship Type per Connection

Each connection between people is assumed to have only one relationship type (e.g., a person can't be both a parent and a sibling to another person).

No Gender-Specific Relationships

The code doesn't account for gender-specific relationships (e.g., "mother", "father", "sister", "brother").

Single Name Identifier

People are identified solely by their name, assuming uniqueness and no need for additional identifiers or disambiguation.

Important Considerations

Relationship Complexity

The code may be limited in representing complex family structures, such as blended families or adoption, due to its assumptions about relationships.

Error Handling

The code's error handling is basic and might not fully address unexpected input or data inconsistencies.

Extensibility

Incorporating additional features or handling more complex relationships might require significant code modifications due to the assumptions made in the data structure and logic.

punch_tree's People

Contributors

highoncarbs avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.