{"action":"created","issue":{"url":"https://api.github.com/repos/JeffersonLab/ccdb/issues/5","labels_url":"https://api.github.com/repos/JeffersonLab/ccdb/issues/5/labels{/name}","comments_url":"https://api.github.com/repos/JeffersonLab/ccdb/issues/5/comments","events_url":"https://api.github.com/repos/JeffersonLab/ccdb/issues/5/events","html_url":"https://github.com/JeffersonLab/ccdb/issues/5","id":116812550,"number":5,"title":"ccdb command ignores variation parent","user":{"login":"DraTeots","id":4732545,"avatar_url":"https://avatars.githubusercontent.com/u/4732545?v=3","gravatar_id":"","url":"https://api.github.com/users/DraTeots","html_url":"https://github.com/DraTeots","followers_url":"https://api.github.com/users/DraTeots/followers","following_url":"https://api.github.com/users/DraTeots/following{/other_user}","gists_url":"https://api.github.com/users/DraTeots/gists{/gist_id}","starred_url":"https://api.github.com/users/DraTeots/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DraTeots/subscriptions","organizations_url":"https://api.github.com/users/DraTeots/orgs","repos_url":"https://api.github.com/users/DraTeots/repos","events_url":"https://api.github.com/users/DraTeots/events{/privacy}","received_events_url":"https://api.github.com/users/DraTeots/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/JeffersonLab/ccdb/labels/bug","name":"bug","color":"fc2929"}],"state":"closed","locked":false,"assignee":{"login":"DraTeots","id":4732545,"avatar_url":"https://avatars.githubusercontent.com/u/4732545?v=3","gravatar_id":"","url":"https://api.github.com/users/DraTeots","html_url":"https://github.com/DraTeots","followers_url":"https://api.github.com/users/DraTeots/followers","following_url":"https://api.github.com/users/DraTeots/following{/other_user}","gists_url":"https://api.github.com/users/DraTeots/gists{/gist_id}","starred_url":"https://api.github.com/users/DraTeots/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DraTeots/subscriptions","organizations_url":"https://api.github.com/users/DraTeots/orgs","repos_url":"https://api.github.com/users/DraTeots/repos","events_url":"https://api.github.com/users/DraTeots/events{/privacy}","received_events_url":"https://api.github.com/users/DraTeots/received_events","type":"User","site_admin":false},"milestone":null,"comments":4,"created_at":"2015-11-13T17:28:14Z","updated_at":"2015-12-03T18:55:51Z","closed_at":"2015-12-03T05:00:23Z","body":" As we discussed yesterday in the BCAL reconstruction meeting, we had \r\n decided for the variation=calib to duplicate some of the constants \r\n (e.g. ADC_gains) from the variation=default. According to Mark Ito, a \r\n variation will default to the parent data if no specific 'variation \r\n data' has been loaded. This would save us considerable effort in \r\n completing the variation=calib. However, this does not seem to work:\r\n\r\n```\r\nifarm1102> ccdb dump /BCAL/ADC_gains::calib > ! ADC_gains.txt\r\nifarm1102> more ADC_gains.txt\r\nThere is no data for table /BCAL/ADC_gains, run 0, variation 'calib'\r\nCannot fill data for assignment with this ID\r\nifarm1102> ccdb dump /BCAL/ADC_gains::default > ! ADC_gains.txt\r\nifarm1102> more ADC_gains.txt\r\n\r\n #\r\n   3.32441e-05\r\n   6.81519e-05\r\n   4.44338e-05\r\n   8.16211e-05\r\n   3.15279e-05\r\n   5.12456e-05\r\n   5.01645e-05\r\n   5.9035e-05\r\n ........\r\n\r\n```"},"comment":{"url":"https://api.github.com/repos/JeffersonLab/ccdb/issues/comments/161746634","html_url":"https://github.com/JeffersonLab/ccdb/issues/5#issuecomment-161746634","issue_url":"https://api.github.com/repos/JeffersonLab/ccdb/issues/5","id":161746634,"user":{"login":"DraTeots","id":4732545,"avatar_url":"https://avatars.githubusercontent.com/u/4732545?v=3","gravatar_id":"","url":"https://api.github.com/users/DraTeots","html_url":"https://github.com/DraTeots","followers_url":"https://api.github.com/users/DraTeots/followers","following_url":"https://api.github.com/users/DraTeots/following{/other_user}","gists_url":"https://api.github.com/users/DraTeots/gists{/gist_id}","starred_url":"https://api.github.com/users/DraTeots/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DraTeots/subscriptions","organizations_url":"https://api.github.com/users/DraTeots/orgs","repos_url":"https://api.github.com/users/DraTeots/repos","events_url":"https://api.github.com/users/DraTeots/events{/privacy}","received_events_url":"https://api.github.com/users/DraTeots/received_events","type":"User","site_admin":false},"created_at":"2015-12-03T18:55:51Z","updated_at":"2015-12-03T18:55:51Z","body":"Indeed. The issue is still in cat command. The problem is that falling back to variation parent is implemented in get_assignment method, but it happens that cat uses get_assignment*s*\r\n\r\nReviewing both method I realized, that a signature of ```get_assignment``` has to be changed. I hope it will not break your code. \r\n\r\nAfter the update get_assignment will be:\r\n\r\n```python\r\ndef get_assignment(self, path_or_table, run, variation, date_and_time=None, use_variation_tree=True):\r\n \"\"\"\r\n        Gets the latest assignment that matches the parameters\r\n\r\n        @param run: run number\r\n        @param path_or_table: string with name path of table or Table object\r\n        @param variation: name of the variation or variation object\r\n        @param date_and_time: Constants should be of this or later date\r\n        @param use_variation_tree:\r\n\r\n        @return: latest assignment that matches the parameters\r\n        @rtype: Assignment\r\n\r\n        \"\"\"\r\n```\r\n\r\nProbably I have to also add ```get_assignment_by_request``` function too. "}}