cncf / landscapeapp

🌄Upstream landscape generation application
https://landscapes.dev/
Apache License 2.0
253 stars 124 forks source link

Use closest first logic when rendering membership #318

Closed dankohn closed 4 years ago

dankohn commented 4 years ago

Sometimes, subsidiaries and parents both like to join. GitHub is a silver member, and it's parent Microsoft is a platinum member. Treat GitHub as a silver member.

Also, follow parents via sub-organization, not acquired by. So, Nokia should not show Microsoft as a parent, because the acquisition was in the past, but Nokia is now independent.

I can't figure out why Wavemaker is showing as a big logo.

dankohn commented 4 years ago

Please also figure out why Pixar isn't showing as a member, since it's part of Disney.

https://landscape.aswf.io/format=card-mode&selected=open-subdiv

AndreyKozlov1984 commented 4 years ago

Right now I use a list of acquisited companies to get children. I can filter this relation, so the acquistion type is "subsidiary", but in your proposal from #317 is for each company to get its parent, and probably apply recursively, the first one who has any membership should be used then.

I prefer to go to the parent companies, that is an easier approach

AndreyKozlov1984 commented 4 years ago

So , if I use this https://api.crunchbase.com/v3.1/organizations/nokia/owned_by together with our api key, I see that nokia is not owned by anyone. Your approach works. Same with verizon and verizon media.

Sadly, with pixar I don't get a parent, that is sad. Still, if I go to the "the walt disney company" - I can see a pixar as a subsidiary of it. Note, "Walt disney studio" has a parent of "the walt disney company", so I could go that way too.

Now a summary: Step 1. for a given company look if it itself or any of its parent or then grandparent and so on on the parents axis belong to the certain membership.

Step 2. for all the companies which have a given membership take all their acquisitions which are subsidiaries and mark those companies as having a given membership, unless some membership is already received from a Step 1.

Step 3, to help with Walt Disney - if a given company belongs to the given membership, then mark all the parents of this company as having the same membership, unless it is mentioned explicitly, and then continue with subsidiaries for each parent and to them also provide the given membership.

dankohn commented 4 years ago

I just edited Walt Disney to make Pixar a subsidiary. So, now you're set: https://www.crunchbase.com/organization/pixar

You can skip step 3, I think.

dankohn commented 4 years ago

This still isn't working as seen on https://landscape.aswf.io/format=card-mode&organization=disney-research,lucasfilm,pixar-animation-studios,walt-disney-animation-studios,the-walt-disney-company

Lucasfilm and Pixar Animation are handled correctly but Disney Research and Walt Disney Animation are not.

dankohn commented 4 years ago

Fixed in https://github.com/cncf/landscapeapp/commit/33211997f2ea1083c4ddff22a73d3088ed46b476