{"action":"created","issue":{"url":"https://api.github.com/repos/patacrep/patacrep/issues/176","labels_url":"https://api.github.com/repos/patacrep/patacrep/issues/176/labels{/name}","comments_url":"https://api.github.com/repos/patacrep/patacrep/issues/176/comments","events_url":"https://api.github.com/repos/patacrep/patacrep/issues/176/events","html_url":"https://github.com/patacrep/patacrep/pull/176","id":116945293,"number":176,"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},"labels":[{"url":"https://api.github.com/repos/patacrep/patacrep/labels/enhancement","name":"enhancement","color":"84b6eb"},{"url":"https://api.github.com/repos/patacrep/patacrep/labels/pr:work%20in%20progress","name":"pr:work in progress","color":"fbca04"},{"url":"https://api.github.com/repos/patacrep/patacrep/labels/song","name":"song","color":"fad8c7"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-11-14T18:57:17Z","updated_at":"2015-11-14T19:05:00Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/patacrep/patacrep/pulls/176","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"},"body":"Closes #121 and #123."},"comment":{"url":"https://api.github.com/repos/patacrep/patacrep/issues/comments/156734378","html_url":"https://github.com/patacrep/patacrep/pull/176#issuecomment-156734378","issue_url":"https://api.github.com/repos/patacrep/patacrep/issues/176","id":156734378,"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},"created_at":"2015-11-14T19:05:00Z","updated_at":"2015-11-14T19:05:00Z","body":"Première étape. L'attribut `errors` est finalement une liste d'objets [`SongError`](https://github.com/patacrep/patacrep/blob/f8c84de29c14a0627b2e75f04121953ff3659261/patacrep/songs/errors.py#L3-L13). Reste à faire : \r\n\r\n- [ ] Ajouter un attribut (ou une `@property`) `errors` au songbook, qui compile les erreurs de ses chansons.\r\n- [ ] Fournir une méthode `Songbook.get_errors_as_dict()` qui transforme la liste d'erreurs (avec des classes maisons) en une liste d'erreurs sous la forme d'un dictionnaire de classes « standard » (pour utilisation par patagui).\r\n- [ ] Ajouter une option pour arrêter la compilation en cas d'erreurs. Je pensais à `--failfast` : \r\n    - absent (comportement actuel) : affiche les erreurs, mais continue ;\r\n    - `--failfast=none` : comportement par défaut ;\r\n    - `--failfast=song` : S'arrête à la première chanson contenant des erreurs ;\r\n    - `--failfast=book` : S'arrête après la lecteur de l'ensemble des chansons, si l'une comporte des erreurs ;\r\n    - `--failfast` (sans argument) : Identique à `--failfast=song`.\r\n- [ ] Reconnaître et compiler les erreurs de langue et de fichiers (images, partitions) absents. Je vois pas comment on peut faire cela. L'idéal serait de faire cela lors de l'analyse (dans la classe [`songs.chordpro.ast.Song`](https://github.com/patacrep/patacrep/blob/f8c84de29c14a0627b2e75f04121953ff3659261/patacrep/songs/chordpro/ast.py#L204)), mais à ce moment là, on ne sait pas encore comment le fichier va être rendu, donc ça n'a pas de sens d'analyser les langues ou les fichiers absents. On pourrait faire ça au moment où ces attributs sont utilisés, mais c'est pendant la compilation, donc je ne sais pas si ça a du sens, si ça n'est pas « trop tard ». Une idée ?\r\n"}}