payload: {"action":"created","issue":{"url":"https://api.github.com/repos/panoptes/POCS/issues/837","repository_url":"https://api.github.com/repos/panoptes/POCS","labels_url":"https://api.github.com/repos/panoptes/POCS/issues/837/labels{/name}","comments_url":"https://api.github.com/repos/panoptes/POCS/issues/837/comments","events_url":"https://api.github.com/repos/panoptes/POCS/issues/837/events","html_url":"https://github.com/panoptes/POCS/issues/837","id":449854250,"node_id":"MDU6SXNzdWU0NDk4NTQyNTA=","number":837,"title":"Creation of scheduler outside of Observatory class","user":{"login":"ImmortalRabbit","id":29354535,"node_id":"MDQ6VXNlcjI5MzU0NTM1","avatar_url":"https://avatars1.githubusercontent.com/u/29354535?v=4","gravatar_id":"","url":"https://api.github.com/users/ImmortalRabbit","html_url":"https://github.com/ImmortalRabbit","followers_url":"https://api.github.com/users/ImmortalRabbit/followers","following_url":"https://api.github.com/users/ImmortalRabbit/following{/other_user}","gists_url":"https://api.github.com/users/ImmortalRabbit/gists{/gist_id}","starred_url":"https://api.github.com/users/ImmortalRabbit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ImmortalRabbit/subscriptions","organizations_url":"https://api.github.com/users/ImmortalRabbit/orgs","repos_url":"https://api.github.com/users/ImmortalRabbit/repos","events_url":"https://api.github.com/users/ImmortalRabbit/events{/privacy}","received_events_url":"https://api.github.com/users/ImmortalRabbit/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2019-05-29T14:49:02Z","updated_at":"2019-05-30T14:43:04Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"**Is your feature request related to a problem? Please describe.**\r\nIn order to add dependency injection, creation of scheduler should be done outside of Observatory class.\r\n**Describe the solution you'd like**\r\nI would like to add creation of scheduler outside of Observatory class. In order to do that I am willing to send scheduler into Observatory class as cameras were sent: \r\n`def __init__(self, cameras=None, scheduler=None, *args, **kwargs):`\r\nor\r\n`def __init__(self, cameras=None, scheduler, *args, **kwargs):`\r\nI am not quiet sure, should I consider situation when scheduler will not be sent to Observatory class. According to my understanding scheduler is just a software and it's not like cameras that can be not attached. \r\nThen planning to replace A with B:\r\nA:\r\n```\r\n        self.scheduler = None\r\n        self._create_scheduler()\r\n```\r\nB:\r\n```\r\n       self.scheduler = None \r\n       if scheduler:\r\n            self.logger.info('Creation of the scheduler in the observatory')\r\n            self.scheduler = scheduler\r\n```\r\n**Describe alternatives you've considered**\r\nA clear and concise description of any alternative solutions or features you've considered.\r\n\r\n**Additional context**\r\nAdd any other context or screenshots about the feature request here.\r\n\r\n**Related Issues/PRs**\r\nIf there are any related Issues or PRs list them here:\r\n##### Depends on: #836 \r\n##### Required by: \r\n\r\n@wtgee @jamessynge "},"comment":{"url":"https://api.github.com/repos/panoptes/POCS/issues/comments/497354829","html_url":"https://github.com/panoptes/POCS/issues/837#issuecomment-497354829","issue_url":"https://api.github.com/repos/panoptes/POCS/issues/837","id":497354829,"node_id":"MDEyOklzc3VlQ29tbWVudDQ5NzM1NDgyOQ==","user":{"login":"ImmortalRabbit","id":29354535,"node_id":"MDQ6VXNlcjI5MzU0NTM1","avatar_url":"https://avatars1.githubusercontent.com/u/29354535?v=4","gravatar_id":"","url":"https://api.github.com/users/ImmortalRabbit","html_url":"https://github.com/ImmortalRabbit","followers_url":"https://api.github.com/users/ImmortalRabbit/followers","following_url":"https://api.github.com/users/ImmortalRabbit/following{/other_user}","gists_url":"https://api.github.com/users/ImmortalRabbit/gists{/gist_id}","starred_url":"https://api.github.com/users/ImmortalRabbit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ImmortalRabbit/subscriptions","organizations_url":"https://api.github.com/users/ImmortalRabbit/orgs","repos_url":"https://api.github.com/users/ImmortalRabbit/repos","events_url":"https://api.github.com/users/ImmortalRabbit/events{/privacy}","received_events_url":"https://api.github.com/users/ImmortalRabbit/received_events","type":"User","site_admin":false},"created_at":"2019-05-30T14:43:04Z","updated_at":"2019-05-30T14:43:04Z","author_association":"CONTRIBUTOR","body":"> One thing we will need to do is identify the methods inside the `Observatory` that rely on a scheduler and give appropriate warnings (or handle in some other way) if a scheduler is not present. For example, an observatory cannot `.observe()` without a scheduler so it makes sense to do some checks before allowing that method.\r\n\r\n```\r\n        if not self.scheduler:\r\n            return dict()\r\n```\r\n\r\nOr should I raise error than just empty dictionary? Or empty dictionary will cause an error?\r\n\r\n\r\n"}}
other: {"actor":{"display_login":"ImmortalRabbit"}}