question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Model.children and Model.parent

See original GitHub issue

Would it be straightforward to create children and parent attributes for all Model objects? Proposed usage:

Mission.children = ["FlightProfile", "Atmosphere", "AircraftPerformance"]
AircraftPerformance.children = ["Aircraft", "FuselagePerf",.... ]
Aircraft.parent = "AircraftPerformance"

I understand it’s possible to re-construct these by iterating over all model varkeys and using lineage, but it seems like it would be more elegant to create during model creation, i.e. execution of Model.__init__?

This would help with visualizing model structures. Related to #1088.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
bqpdcommented, Nov 12, 2020

Closing this until there’s a specific usecase…

0reactions
bqpdcommented, Oct 26, 2020

It’s something I’ve dallied with adding a few times, but it always turns out to not quite be necessary…happy to add if there’s a specific usecase though, like ended up happening with posynomials.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Parent Modeling: Helping parents improve their children's ...
In one case, Parent Modeling is a therapeutic intervention employed by clinicians to teach parents how to change their children's behaviors, ...
Read more >
24 models who followed in their parents' footsteps - Insider
Some of today's biggest models are related to former supermodels. Cindy Crawford and her model daughter, Kaia Gerber, share an uncanny ...
Read more >
Modeling behavior: how children copy their parents
Be a good role model: You are your child's first and most important role model. · Point out the positives: Reinforce and acknowledge...
Read more >
The Parent-Adult-Child model: the basics
It has two functions. One is to enable people to be better actual parents of their children. The other is to enable many...
Read more >
Role Model the Behavior You Want to See From Your Kids
Every parent wants to raise kids who are kind to others. This goal becomes a reality when you model respect and empathy in...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found