Giter Site home page Giter Site logo

konbini's People

Contributors

hueyyeng avatar

Stargazers

 avatar

Watchers

 avatar

konbini's Issues

Expand SgProject dataclass attributes

archived: bool = False
code: Optional[str] = None
sg_description: Optional[str] = None
sg_status: Optional[str] = None
sg_type: Optional[str] = None
start_date: Optional[str] = None  # Date uses YYYY-MM-DD format
end_date: Optional[str] = None
image: Optional[str] = None
duration: Optional[int] = None  # Number of days

Create helper function to retrieve valid status list

Pain point

TLDR: Status entity refers to the Global Status List and entities that link to it have their own "valid list".

Status entity is practically useless by itself because other SG entities that have relevant status field does not necessarily have valid values that refers to Status entity

Example

This differs by studios so the valid values varies. You can check the valid values by using sg.schema_field_read(ENTITY, status_field) where ENTITY is Project/Asset/Shot blah and status_field is the status field name which once again... varies between each SG entities. Go figure.

  1. Project entity have sg_status and example valid values is ['Bidding', 'Active', 'Lost', 'Hold'].
  2. Asset/Shot/Sequence uses sg_status_list and example valid generalised values is ['wtg', 'ip', 'fin']

Tackling this problem

Originally thought of syncing the list of Status entities into internal pipeline system but that is a dumb approach as the SG entities may not necessarily point to Status entity. Example from above, Project entity with sg_status.

For Asset/Shot/Sequence/etc, the valid statuses is configurable by performing the configure field on their respective Status column.

Having a helper function that returns the list of valid values should prevent devs from trying to set a status that is not valid for the particular SG entity.

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.