Git Product home page Git Product logo

Comments (4)

Wuestengecko avatar Wuestengecko commented on June 24, 2024

What do you think about this proposal?

- parent: !find
    type: SystemFunction
    name: brew coffee
  create: ...

Except for type (which is special cased to look at the class), this approach would be extensible to allow filtering for every attribute that a model object could have. For example, if you were searching for a Requirement and you know that its combination of chapter_name and foreign_id makes it unique, you could use:

- parent: !find
    type: Requirement
    chapter_name: Chapter 3
    foreign_id: 7
  create: ...

from py-capellambse.

vik378 avatar vik378 commented on June 24, 2024

very cool! just to stretch it a bit, would it work if we then also search by human-friendly IDs (property value), like owned_property["DB-ID"]: LFNC-0123 ?

from py-capellambse.

Wuestengecko avatar Wuestengecko commented on June 24, 2024

This could become a bit difficult. I was planning on simply using the good ol' attrgetter, which would give us things like owner.name: ... for free, but that doesn't have the necessary logic / complexity for fully custom attribute names (especially ones that are not guaranteed to be Python identifiers). I'll think about that for a little and try to come up with something.

from py-capellambse.

Wuestengecko avatar Wuestengecko commented on June 24, 2024

Implemented with #387.

from py-capellambse.

Related Issues (20)

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.