{"action":"created","comment":{"url":"https://api.github.com/repos/patacrep/patacrep/pulls/comments/46095042","id":46095042,"diff_hunk":"@@ -84,42 +85,60 @@ def write_tex(self, output):\n         - output: a file object, in which the file will be written.\n         \"\"\"\n         # Updating configuration\n-        config = DEFAULT_CONFIG.copy()\n-        config.update(self.config)\n+        self._config = DEFAULT_CONFIG.copy()\n+        self._config.update(self._raw_config)\n         renderer = TexBookRenderer(\n-            config['template'],\n-            config['datadir'],\n-            config['lang'],\n-            config['encoding'],\n+            self._config['template'],\n+            self._config['datadir'],\n+            self._config['lang'],\n+            self._config['encoding'],\n             )\n-        config.update(renderer.get_variables())\n-        config.update(self.config)\n+        self._config.update(renderer.get_variables())\n+        self._config.update(self._raw_config)\n \n-        config['_compiled_authwords'] = authors.compile_authwords(\n-            copy.deepcopy(config['authwords'])\n+        self._config['_compiled_authwords'] = authors.compile_authwords(\n+            copy.deepcopy(self._config['authwords'])\n             )\n \n         # Loading custom plugins\n-        config['_content_plugins'] = files.load_plugins(\n-            datadirs=config.get('datadir', []),\n+        self._config['_content_plugins'] = files.load_plugins(\n+            datadirs=self._config.get('datadir', []),\n             root_modules=['content'],\n             keyword='CONTENT_PLUGINS',\n             )\n-        config['_song_plugins'] = files.load_plugins(\n-            datadirs=config.get('datadir', []),\n+        self._config['_song_plugins'] = files.load_plugins(\n+            datadirs=self._config.get('datadir', []),\n             root_modules=['songs'],\n             keyword='SONG_RENDERERS',\n             )['tsg']\n \n         # Configuration set\n-        config['render'] = content.render\n-        config['content'] = content.process_content(\n-            config.get('content', []),\n-            config,\n+        self._config['render'] = content.render\n+        self._config['content'] = content.process_content(\n+            self._config.get('content', []),\n+            self._config,\n             )\n-        config['filename'] = output.name[:-4]\n+        self._config['filename'] = output.name[:-4]\n \n-        renderer.render_tex(output, config)\n+        renderer.render_tex(output, self._config)\n+\n+    def has_errors(self):\n+        \"\"\"Return `True` iff errors have been encountered in the book.\n+\n+        Note that `foo.has_errors() == False` does not means that the book has\n+        not any errors: it does only mean that no error has been found yet.\n+        \"\"\"\n+        for _ in self.iter_errors():","path":"patacrep/build.py","position":120,"original_position":120,"commit_id":"5d68bd338f2b6ee43a9b0bebf3e03f8262438afb","original_commit_id":"5d68bd338f2b6ee43a9b0bebf3e03f8262438afb","user":{"login":"paternal","id":6587757,"avatar_url":"https://avatars.githubusercontent.com/u/6587757?v=3","gravatar_id":"","url":"https://api.github.com/users/paternal","html_url":"https://github.com/paternal","followers_url":"https://api.github.com/users/paternal/followers","following_url":"https://api.github.com/users/paternal/following{/other_user}","gists_url":"https://api.github.com/users/paternal/gists{/gist_id}","starred_url":"https://api.github.com/users/paternal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/paternal/subscriptions","organizations_url":"https://api.github.com/users/paternal/orgs","repos_url":"https://api.github.com/users/paternal/repos","events_url":"https://api.github.com/users/paternal/events{/privacy}","received_events_url":"https://api.github.com/users/paternal/received_events","type":"User","site_admin":false},"body":"Je n'ai quasiment pas testé, mais normalement, non : chaque appel à `self.iter_errors()` crée un *nouvel* itérateur, donc ça recommence à zéro à chaque fois.","created_at":"2015-11-29T17:15:31Z","updated_at":"2015-11-29T17:15:31Z","html_url":"https://github.com/patacrep/patacrep/pull/176#discussion_r46095042","pull_request_url":"https://api.github.com/repos/patacrep/patacrep/pulls/176","_links":{"self":{"href":"https://api.github.com/repos/patacrep/patacrep/pulls/comments/46095042"},"html":{"href":"https://github.com/patacrep/patacrep/pull/176#discussion_r46095042"},"pull_request":{"href":"https://api.github.com/repos/patacrep/patacrep/pulls/176"}}},"pull_request":{"url":"https://api.github.com/repos/patacrep/patacrep/pulls/176","id":50729506,"html_url":"https://github.com/patacrep/patacrep/pull/176","diff_url":"https://github.com/patacrep/patacrep/pull/176.diff","patch_url":"https://github.com/patacrep/patacrep/pull/176.patch","issue_url":"https://api.github.com/repos/patacrep/patacrep/issues/176","number":176,"state":"open","locked":false,"title":"Add an `errors` attribute to songs, compiling the song errors","user":{"login":"paternal","id":6587757,"avatar_url":"https://avatars.githubusercontent.com/u/6587757?v=3","gravatar_id":"","url":"https://api.github.com/users/paternal","html_url":"https://github.com/paternal","followers_url":"https://api.github.com/users/paternal/followers","following_url":"https://api.github.com/users/paternal/following{/other_user}","gists_url":"https://api.github.com/users/paternal/gists{/gist_id}","starred_url":"https://api.github.com/users/paternal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/paternal/subscriptions","organizations_url":"https://api.github.com/users/paternal/orgs","repos_url":"https://api.github.com/users/paternal/repos","events_url":"https://api.github.com/users/paternal/events{/privacy}","received_events_url":"https://api.github.com/users/paternal/received_events","type":"User","site_admin":false},"body":"Closes #121 and #123.","created_at":"2015-11-14T18:57:17Z","updated_at":"2015-11-29T17:15:31Z","closed_at":null,"merged_at":null,"merge_commit_sha":"090aa72e02b8e16e6ae3a03073ecc121c684d735","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/patacrep/patacrep/pulls/176/commits","review_comments_url":"https://api.github.com/repos/patacrep/patacrep/pulls/176/comments","review_comment_url":"https://api.github.com/repos/patacrep/patacrep/pulls/comments{/number}","comments_url":"https://api.github.com/repos/patacrep/patacrep/issues/176/comments","statuses_url":"https://api.github.com/repos/patacrep/patacrep/statuses/5d68bd338f2b6ee43a9b0bebf3e03f8262438afb","head":{"label":"patacrep:errors","ref":"errors","sha":"5d68bd338f2b6ee43a9b0bebf3e03f8262438afb","user":{"login":"patacrep","id":6632026,"avatar_url":"https://avatars.githubusercontent.com/u/6632026?v=3","gravatar_id":"","url":"https://api.github.com/users/patacrep","html_url":"https://github.com/patacrep","followers_url":"https://api.github.com/users/patacrep/followers","following_url":"https://api.github.com/users/patacrep/following{/other_user}","gists_url":"https://api.github.com/users/patacrep/gists{/gist_id}","starred_url":"https://api.github.com/users/patacrep/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/patacrep/subscriptions","organizations_url":"https://api.github.com/users/patacrep/orgs","repos_url":"https://api.github.com/users/patacrep/repos","events_url":"https://api.github.com/users/patacrep/events{/privacy}","received_events_url":"https://api.github.com/users/patacrep/received_events","type":"Organization","site_admin":false},"repo":{"id":9257808,"name":"patacrep","full_name":"patacrep/patacrep","owner":{"login":"patacrep","id":6632026,"avatar_url":"https://avatars.githubusercontent.com/u/6632026?v=3","gravatar_id":"","url":"https://api.github.com/users/patacrep","html_url":"https://github.com/patacrep","followers_url":"https://api.github.com/users/patacrep/followers","following_url":"https://api.github.com/users/patacrep/following{/other_user}","gists_url":"https://api.github.com/users/patacrep/gists{/gist_id}","starred_url":"https://api.github.com/users/patacrep/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/patacrep/subscriptions","organizations_url":"https://api.github.com/users/patacrep/orgs","repos_url":"https://api.github.com/users/patacrep/repos","events_url":"https://api.github.com/users/patacrep/events{/privacy}","received_events_url":"https://api.github.com/users/patacrep/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/patacrep/patacrep","description":"Engine for LaTeX songbooks ","fork":false,"url":"https://api.github.com/repos/patacrep/patacrep","forks_url":"https://api.github.com/repos/patacrep/patacrep/forks","keys_url":"https://api.github.com/repos/patacrep/patacrep/keys{/key_id}","collaborators_url":"https://api.github.com/repos/patacrep/patacrep/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/patacrep/patacrep/teams","hooks_url":"https://api.github.com/repos/patacrep/patacrep/hooks","issue_events_url":"https://api.github.com/repos/patacrep/patacrep/issues/events{/number}","events_url":"https://api.github.com/repos/patacrep/patacrep/events","assignees_url":"https://api.github.com/repos/patacrep/patacrep/assignees{/user}","branches_url":"https://api.github.com/repos/patacrep/patacrep/branches{/branch}","tags_url":"https://api.github.com/repos/patacrep/patacrep/tags","blobs_url":"https://api.github.com/repos/patacrep/patacrep/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/patacrep/patacrep/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/patacrep/patacrep/git/refs{/sha}","trees_url":"https://api.github.com/repos/patacrep/patacrep/git/trees{/sha}","statuses_url":"https://api.github.com/repos/patacrep/patacrep/statuses/{sha}","languages_url":"https://api.github.com/repos/patacrep/patacrep/languages","stargazers_url":"https://api.github.com/repos/patacrep/patacrep/stargazers","contributors_url":"https://api.github.com/repos/patacrep/patacrep/contributors","subscribers_url":"https://api.github.com/repos/patacrep/patacrep/subscribers","subscription_url":"https://api.github.com/repos/patacrep/patacrep/subscription","commits_url":"https://api.github.com/repos/patacrep/patacrep/commits{/sha}","git_commits_url":"https://api.github.com/repos/patacrep/patacrep/git/commits{/sha}","comments_url":"https://api.github.com/repos/patacrep/patacrep/comments{/number}","issue_comment_url":"https://api.github.com/repos/patacrep/patacrep/issues/comments{/number}","contents_url":"https://api.github.com/repos/patacrep/patacrep/contents/{+path}","compare_url":"https://api.github.com/repos/patacrep/patacrep/compare/{base}...{head}","merges_url":"https://api.github.com/repos/patacrep/patacrep/merges","archive_url":"https://api.github.com/repos/patacrep/patacrep/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/patacrep/patacrep/downloads","issues_url":"https://api.github.com/repos/patacrep/patacrep/issues{/number}","pulls_url":"https://api.github.com/repos/patacrep/patacrep/pulls{/number}","milestones_url":"https://api.github.com/repos/patacrep/patacrep/milestones{/number}","notifications_url":"https://api.github.com/repos/patacrep/patacrep/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/patacrep/patacrep/labels{/name}","releases_url":"https://api.github.com/repos/patacrep/patacrep/releases{/id}","created_at":"2013-04-06T09:16:23Z","updated_at":"2015-11-19T12:11:31Z","pushed_at":"2015-11-29T14:08:02Z","git_url":"git://github.com/patacrep/patacrep.git","ssh_url":"git@github.com:patacrep/patacrep.git","clone_url":"https://github.com/patacrep/patacrep.git","svn_url":"https://github.com/patacrep/patacrep","homepage":"www.patacrep.com","size":23602,"stargazers_count":8,"watchers_count":8,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"open_issues_count":25,"forks":4,"open_issues":25,"watchers":8,"default_branch":"master"}},"base":{"label":"patacrep:master","ref":"master","sha":"8b0b467e5050ccb736ca88c5d056e9318320388a","user":{"login":"patacrep","id":6632026,"avatar_url":"https://avatars.githubusercontent.com/u/6632026?v=3","gravatar_id":"","url":"https://api.github.com/users/patacrep","html_url":"https://github.com/patacrep","followers_url":"https://api.github.com/users/patacrep/followers","following_url":"https://api.github.com/users/patacrep/following{/other_user}","gists_url":"https://api.github.com/users/patacrep/gists{/gist_id}","starred_url":"https://api.github.com/users/patacrep/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/patacrep/subscriptions","organizations_url":"https://api.github.com/users/patacrep/orgs","repos_url":"https://api.github.com/users/patacrep/repos","events_url":"https://api.github.com/users/patacrep/events{/privacy}","received_events_url":"https://api.github.com/users/patacrep/received_events","type":"Organization","site_admin":false},"repo":{"id":9257808,"name":"patacrep","full_name":"patacrep/patacrep","owner":{"login":"patacrep","id":6632026,"avatar_url":"https://avatars.githubusercontent.com/u/6632026?v=3","gravatar_id":"","url":"https://api.github.com/users/patacrep","html_url":"https://github.com/patacrep","followers_url":"https://api.github.com/users/patacrep/followers","following_url":"https://api.github.com/users/patacrep/following{/other_user}","gists_url":"https://api.github.com/users/patacrep/gists{/gist_id}","starred_url":"https://api.github.com/users/patacrep/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/patacrep/subscriptions","organizations_url":"https://api.github.com/users/patacrep/orgs","repos_url":"https://api.github.com/users/patacrep/repos","events_url":"https://api.github.com/users/patacrep/events{/privacy}","received_events_url":"https://api.github.com/users/patacrep/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/patacrep/patacrep","description":"Engine for LaTeX songbooks ","fork":false,"url":"https://api.github.com/repos/patacrep/patacrep","forks_url":"https://api.github.com/repos/patacrep/patacrep/forks","keys_url":"https://api.github.com/repos/patacrep/patacrep/keys{/key_id}","collaborators_url":"https://api.github.com/repos/patacrep/patacrep/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/patacrep/patacrep/teams","hooks_url":"https://api.github.com/repos/patacrep/patacrep/hooks","issue_events_url":"https://api.github.com/repos/patacrep/patacrep/issues/events{/number}","events_url":"https://api.github.com/repos/patacrep/patacrep/events","assignees_url":"https://api.github.com/repos/patacrep/patacrep/assignees{/user}","branches_url":"https://api.github.com/repos/patacrep/patacrep/branches{/branch}","tags_url":"https://api.github.com/repos/patacrep/patacrep/tags","blobs_url":"https://api.github.com/repos/patacrep/patacrep/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/patacrep/patacrep/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/patacrep/patacrep/git/refs{/sha}","trees_url":"https://api.github.com/repos/patacrep/patacrep/git/trees{/sha}","statuses_url":"https://api.github.com/repos/patacrep/patacrep/statuses/{sha}","languages_url":"https://api.github.com/repos/patacrep/patacrep/languages","stargazers_url":"https://api.github.com/repos/patacrep/patacrep/stargazers","contributors_url":"https://api.github.com/repos/patacrep/patacrep/contributors","subscribers_url":"https://api.github.com/repos/patacrep/patacrep/subscribers","subscription_url":"https://api.github.com/repos/patacrep/patacrep/subscription","commits_url":"https://api.github.com/repos/patacrep/patacrep/commits{/sha}","git_commits_url":"https://api.github.com/repos/patacrep/patacrep/git/commits{/sha}","comments_url":"https://api.github.com/repos/patacrep/patacrep/comments{/number}","issue_comment_url":"https://api.github.com/repos/patacrep/patacrep/issues/comments{/number}","contents_url":"https://api.github.com/repos/patacrep/patacrep/contents/{+path}","compare_url":"https://api.github.com/repos/patacrep/patacrep/compare/{base}...{head}","merges_url":"https://api.github.com/repos/patacrep/patacrep/merges","archive_url":"https://api.github.com/repos/patacrep/patacrep/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/patacrep/patacrep/downloads","issues_url":"https://api.github.com/repos/patacrep/patacrep/issues{/number}","pulls_url":"https://api.github.com/repos/patacrep/patacrep/pulls{/number}","milestones_url":"https://api.github.com/repos/patacrep/patacrep/milestones{/number}","notifications_url":"https://api.github.com/repos/patacrep/patacrep/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/patacrep/patacrep/labels{/name}","releases_url":"https://api.github.com/repos/patacrep/patacrep/releases{/id}","created_at":"2013-04-06T09:16:23Z","updated_at":"2015-11-19T12:11:31Z","pushed_at":"2015-11-29T14:08:02Z","git_url":"git://github.com/patacrep/patacrep.git","ssh_url":"git@github.com:patacrep/patacrep.git","clone_url":"https://github.com/patacrep/patacrep.git","svn_url":"https://github.com/patacrep/patacrep","homepage":"www.patacrep.com","size":23602,"stargazers_count":8,"watchers_count":8,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"open_issues_count":25,"forks":4,"open_issues":25,"watchers":8,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/patacrep/patacrep/pulls/176"},"html":{"href":"https://github.com/patacrep/patacrep/pull/176"},"issue":{"href":"https://api.github.com/repos/patacrep/patacrep/issues/176"},"comments":{"href":"https://api.github.com/repos/patacrep/patacrep/issues/176/comments"},"review_comments":{"href":"https://api.github.com/repos/patacrep/patacrep/pulls/176/comments"},"review_comment":{"href":"https://api.github.com/repos/patacrep/patacrep/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/patacrep/patacrep/pulls/176/commits"},"statuses":{"href":"https://api.github.com/repos/patacrep/patacrep/statuses/5d68bd338f2b6ee43a9b0bebf3e03f8262438afb"}}}}