{"action":"created","issue":{"url":"https://api.github.com/repos/psss/fmf/issues/26","repository_url":"https://api.github.com/repos/psss/fmf","labels_url":"https://api.github.com/repos/psss/fmf/issues/26/labels{/name}","comments_url":"https://api.github.com/repos/psss/fmf/issues/26/comments","events_url":"https://api.github.com/repos/psss/fmf/issues/26/events","html_url":"https://github.com/psss/fmf/issues/26","id":323317823,"number":26,"title":"Inherit from upper in the tree","user":{"login":"AloisMahdal","id":217935,"avatar_url":"https://avatars1.githubusercontent.com/u/217935?v=4","gravatar_id":"","url":"https://api.github.com/users/AloisMahdal","html_url":"https://github.com/AloisMahdal","followers_url":"https://api.github.com/users/AloisMahdal/followers","following_url":"https://api.github.com/users/AloisMahdal/following{/other_user}","gists_url":"https://api.github.com/users/AloisMahdal/gists{/gist_id}","starred_url":"https://api.github.com/users/AloisMahdal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AloisMahdal/subscriptions","organizations_url":"https://api.github.com/users/AloisMahdal/orgs","repos_url":"https://api.github.com/users/AloisMahdal/repos","events_url":"https://api.github.com/users/AloisMahdal/events{/privacy}","received_events_url":"https://api.github.com/users/AloisMahdal/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2018-05-15T17:44:46Z","updated_at":"2018-05-22T11:50:49Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"This is probably more of a design issue, so I understand if there is some resistance, but I think I can jusify it.\r\n\r\nIt seems that fmf does not have concept of whole item tree but rather tends to just discover items in all subdirectories.  This is nice and simple, but creates the problem that items don't really have \"identity\" and  meta-data actually depends on *where I ask*.\r\n\r\nFor example, I have repository like this:\r\n\r\n    .\r\n    └── demo\r\n        ├── foo\r\n        │   └── main.fmf\r\n        └── main.fmf\r\n\r\nIn the top main.fmf, I have\r\n\r\n    project: demo\r\n    maintainer: joe\r\n\r\nand in the foo/main.fmf\r\n\r\n    description: The Foo\r\n\r\nNow I get different results about *foo* depending on where I ask:\r\n\r\n    $ fmf\r\n    fmf-tree/demo/foo\r\n    description: The Foo\r\n    maintainer: joe\r\n    project: demo\r\n    $ cd demo\r\n    $ fmf\r\n    demo/foo\r\n    description: The Foo\r\n    maintainer: joe\r\n    project: demo\r\n    $ cd foo\r\n    $ fmf\r\n    foo\r\n    description: The Foo\r\n\r\nIf I have inheritancy, doesn't it imply that I already treat my items as tree?  If so, shouldn't they always be resolved as part of the same tree?\r\n\r\nOr, from another angle: why can't I \"ask\" for complete set of meta-data when I'm in the directory of a in leaf item?"},"comment":{"url":"https://api.github.com/repos/psss/fmf/issues/comments/390962170","html_url":"https://github.com/psss/fmf/issues/26#issuecomment-390962170","issue_url":"https://api.github.com/repos/psss/fmf/issues/26","id":390962170,"user":{"login":"psss","id":2803150,"avatar_url":"https://avatars2.githubusercontent.com/u/2803150?v=4","gravatar_id":"","url":"https://api.github.com/users/psss","html_url":"https://github.com/psss","followers_url":"https://api.github.com/users/psss/followers","following_url":"https://api.github.com/users/psss/following{/other_user}","gists_url":"https://api.github.com/users/psss/gists{/gist_id}","starred_url":"https://api.github.com/users/psss/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/psss/subscriptions","organizations_url":"https://api.github.com/users/psss/orgs","repos_url":"https://api.github.com/users/psss/repos","events_url":"https://api.github.com/users/psss/events{/privacy}","received_events_url":"https://api.github.com/users/psss/received_events","type":"User","site_admin":false},"created_at":"2018-05-22T11:50:49Z","updated_at":"2018-05-22T11:50:49Z","author_association":"OWNER","body":"Thanks for the idea, Alois. I see the use case. And the git-like approach with the `.fmf` directory seems fine to me. However there are still some questions to be answered:\r\n\r\nThe `Tree` class always expects to receive the root directory of the metadata tree. What `fmf` command line tool does is that it uses the first argument or defaults to the current directory if no path given. In both cases it prints all leaf objects availabe in the metadata tree.\r\n\r\nI can imagine we change the default behaviour of the `fmf` command and instead of using the current working directory it would search for the `.fmf` directory or the top-most `main.fmf` file in the current directory structure.\r\n\r\nWould that cover your use case? Note that you always get all objects and that directory structure does not have to map 1:1 to the metadata tree structure and that you can also directly use python API for implementing you custom scenarios."}}
{"actor":{"display_login":"psss"}}