{"action":"closed","issue":{"url":"https://api.github.com/repos/morepath/morepath/issues/331","repository_url":"https://api.github.com/repos/morepath/morepath","labels_url":"https://api.github.com/repos/morepath/morepath/issues/331/labels{/name}","comments_url":"https://api.github.com/repos/morepath/morepath/issues/331/comments","events_url":"https://api.github.com/repos/morepath/morepath/issues/331/events","html_url":"https://github.com/morepath/morepath/issues/331","id":84997309,"number":331,"title":"Autosetup should include caller package","user":{"login":"href","id":273163,"avatar_url":"https://avatars.githubusercontent.com/u/273163?v=3","gravatar_id":"","url":"https://api.github.com/users/href","html_url":"https://github.com/href","followers_url":"https://api.github.com/users/href/followers","following_url":"https://api.github.com/users/href/following{/other_user}","gists_url":"https://api.github.com/users/href/gists{/gist_id}","starred_url":"https://api.github.com/users/href/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/href/subscriptions","organizations_url":"https://api.github.com/users/href/orgs","repos_url":"https://api.github.com/users/href/repos","events_url":"https://api.github.com/users/href/events{/privacy}","received_events_url":"https://api.github.com/users/href/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/morepath/morepath/milestones/11","html_url":"https://github.com/morepath/morepath/milestones/0.13","labels_url":"https://api.github.com/repos/morepath/morepath/milestones/11/labels","id":1340074,"number":11,"title":"0.13","description":"","creator":{"login":"faassen","id":327472,"avatar_url":"https://avatars.githubusercontent.com/u/327472?v=3","gravatar_id":"","url":"https://api.github.com/users/faassen","html_url":"https://github.com/faassen","followers_url":"https://api.github.com/users/faassen/followers","following_url":"https://api.github.com/users/faassen/following{/other_user}","gists_url":"https://api.github.com/users/faassen/gists{/gist_id}","starred_url":"https://api.github.com/users/faassen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/faassen/subscriptions","organizations_url":"https://api.github.com/users/faassen/orgs","repos_url":"https://api.github.com/users/faassen/repos","events_url":"https://api.github.com/users/faassen/events{/privacy}","received_events_url":"https://api.github.com/users/faassen/received_events","type":"User","site_admin":false},"open_issues":15,"closed_issues":4,"state":"open","created_at":"2015-10-06T11:05:25Z","updated_at":"2016-04-04T10:22:26Z","due_on":null,"closed_at":null},"comments":8,"created_at":"2015-06-04T09:13:00Z","updated_at":"2016-04-04T10:22:26Z","closed_at":"2016-04-04T10:22:26Z","body":"Currently, this is our quickstart story:\r\n```python\r\n  import morepath\r\n\r\n  class App(morepath.App):\r\n      pass\r\n\r\n  @App.path(path='')\r\n  class Root(object):\r\n      pass\r\n\r\n  @App.view(model=Root)\r\n  def hello_world(self, request):\r\n      return \"Hello world!\"\r\n\r\n  if __name__ == '__main__':\r\n      config = morepath.setup()\r\n      config.scan()\r\n      config.commit()\r\n      morepath.run(App())\r\n```\r\n\r\nWorking on the upcoming configuration docs I realized that we could make this shorter if we made autosetup scan the caller package as well (just like `config.scan` does). The change is rather trivial and the tests seem to pass with only a minor change (morepath ends up being scanned twice - the tests are not properly independent yet).\r\n\r\nAutosetup would basically become this:\r\n```python\r\ndef autosetup(ignore=None, include_caller_package=True):\r\n    c = autoconfig(ignore)\r\n    if include_caller_package:\r\n        c.scan()\r\n    c.commit()\r\n```\r\n\r\nAnd the quickstart could be made into this:\r\n```python\r\n  import morepath\r\n\r\n  class App(morepath.App):\r\n      pass\r\n\r\n  @App.path(path='')\r\n  class Root(object):\r\n      pass\r\n\r\n  @App.view(model=Root)\r\n  def hello_world(self, request):\r\n      return \"Hello world!\"\r\n\r\n  if __name__ == '__main__':\r\n      morepath.autosetup()\r\n      morepath.run(App())\r\n```\r\n\r\nWhat do you think?"}}