{"action":"created","issue":{"url":"https://api.github.com/repos/ska-sa/montblanc/issues/80","labels_url":"https://api.github.com/repos/ska-sa/montblanc/issues/80/labels{/name}","comments_url":"https://api.github.com/repos/ska-sa/montblanc/issues/80/comments","events_url":"https://api.github.com/repos/ska-sa/montblanc/issues/80/events","html_url":"https://github.com/ska-sa/montblanc/pull/80","id":94735837,"number":80,"title":"API breaking refactor of the solver configuration and naming schemes","user":{"login":"sjperkins","id":3530212,"avatar_url":"https://avatars.githubusercontent.com/u/3530212?v=3","gravatar_id":"","url":"https://api.github.com/users/sjperkins","html_url":"https://github.com/sjperkins","followers_url":"https://api.github.com/users/sjperkins/followers","following_url":"https://api.github.com/users/sjperkins/following{/other_user}","gists_url":"https://api.github.com/users/sjperkins/gists{/gist_id}","starred_url":"https://api.github.com/users/sjperkins/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sjperkins/subscriptions","organizations_url":"https://api.github.com/users/sjperkins/orgs","repos_url":"https://api.github.com/users/sjperkins/repos","events_url":"https://api.github.com/users/sjperkins/events{/privacy}","received_events_url":"https://api.github.com/users/sjperkins/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-07-13T14:35:42Z","updated_at":"2015-07-20T10:19:41Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/ska-sa/montblanc/pulls/80","html_url":"https://github.com/ska-sa/montblanc/pull/80","diff_url":"https://github.com/ska-sa/montblanc/pull/80.diff","patch_url":"https://github.com/ska-sa/montblanc/pull/80.patch"},"body":"Previously, we had\r\n\r\n```python\r\nimport montblanc\r\n\r\nwith montblanc.get_biro_solver(msfile='WSRT.MS', npsrc=10, ngsrc=20, nssrc=5,\r\n  weight_vector=True, version='v2') as slvr:\r\n\r\n  ...\r\n\r\n  slvr.solve()\r\n\r\n```\r\n\r\nIn this pull request, the above API has been expanded in order to more easily handle new source types, as well as the myriad of configuration options that will doubtless be necessary for configuring a montblanc solver.\r\n\r\nKeeping track of all of this via Python's keyword argument mechanism would have become increasingly unwieldy.\r\n\r\n# Summary of changes\r\n\r\n- montblanc.**get_biro_solver** renamed to montblanc.**rime_solver**\r\n- montblanc.rime_solver now takes a single **SolverConfiguration** argument\r\n- Source types (and their numbering variables), can now be registered in the **[src_types.py](https://github.com/ska-sa/montblanc/blob/c15b121ab44a9ba0e31fffd83631c64add772630/montblanc/src_types.py)** file.\r\n- Configuration options, as well as their defaults, valid values and descriptions are now defined in a central location. See **[slvr_cfg.py](https://github.com/ska-sa/montblanc/blob/c15b121ab44a9ba0e31fffd83631c64add772630/montblanc/slvr_config.py)**\r\n\r\nThe above usage pattern now changes to:\r\n\r\n```python\r\nimport montblanc\r\n\r\nslvr_cfg = montblanc.rime_solver_cfg(msfile='WSRT.MS',\r\n  sources=montblanc.sources(point=10, gaussian=20, sersic=5),\r\n  weight_vector=True, version='v2')\r\n\r\nwith montblanc.rime_solver(slvr_cfg) as slvr:\r\n\r\n  ...\r\n\r\n  slvr.solve()\r\n\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/ska-sa/montblanc/issues/comments/122840493","html_url":"https://github.com/ska-sa/montblanc/pull/80#issuecomment-122840493","issue_url":"https://api.github.com/repos/ska-sa/montblanc/issues/80","id":122840493,"user":{"login":"sjperkins","id":3530212,"avatar_url":"https://avatars.githubusercontent.com/u/3530212?v=3","gravatar_id":"","url":"https://api.github.com/users/sjperkins","html_url":"https://github.com/sjperkins","followers_url":"https://api.github.com/users/sjperkins/followers","following_url":"https://api.github.com/users/sjperkins/following{/other_user}","gists_url":"https://api.github.com/users/sjperkins/gists{/gist_id}","starred_url":"https://api.github.com/users/sjperkins/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sjperkins/subscriptions","organizations_url":"https://api.github.com/users/sjperkins/orgs","repos_url":"https://api.github.com/users/sjperkins/repos","events_url":"https://api.github.com/users/sjperkins/events{/privacy}","received_events_url":"https://api.github.com/users/sjperkins/received_events","type":"User","site_admin":false},"created_at":"2015-07-20T10:19:41Z","updated_at":"2015-07-20T10:19:41Z","body":"@o-smirnov @jtlz2 @saiyanprince @marziarivi This pull request will be merged into master at end of today."}}