{"action":"created","issue":{"url":"https://api.github.com/repos/aiidateam/aiida_core/issues/2207","repository_url":"https://api.github.com/repos/aiidateam/aiida_core","labels_url":"https://api.github.com/repos/aiidateam/aiida_core/issues/2207/labels{/name}","comments_url":"https://api.github.com/repos/aiidateam/aiida_core/issues/2207/comments","events_url":"https://api.github.com/repos/aiidateam/aiida_core/issues/2207/events","html_url":"https://github.com/aiidateam/aiida_core/issues/2207","id":381500884,"node_id":"MDU6SXNzdWUzODE1MDA4ODQ=","number":2207,"title":"Reduce/remove files from the exclusion list of pre-commit, prospector, yapf, pylint","user":{"login":"giovannipizzi","id":16132028,"node_id":"MDQ6VXNlcjE2MTMyMDI4","avatar_url":"https://avatars0.githubusercontent.com/u/16132028?v=4","gravatar_id":"","url":"https://api.github.com/users/giovannipizzi","html_url":"https://github.com/giovannipizzi","followers_url":"https://api.github.com/users/giovannipizzi/followers","following_url":"https://api.github.com/users/giovannipizzi/following{/other_user}","gists_url":"https://api.github.com/users/giovannipizzi/gists{/gist_id}","starred_url":"https://api.github.com/users/giovannipizzi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/giovannipizzi/subscriptions","organizations_url":"https://api.github.com/users/giovannipizzi/orgs","repos_url":"https://api.github.com/users/giovannipizzi/repos","events_url":"https://api.github.com/users/giovannipizzi/events{/privacy}","received_events_url":"https://api.github.com/users/giovannipizzi/received_events","type":"User","site_admin":false},"labels":[{"id":763233371,"node_id":"MDU6TGFiZWw3NjMyMzMzNzE=","url":"https://api.github.com/repos/aiidateam/aiida_core/labels/priority/quality-of-life","name":"priority/quality-of-life","color":"f9d0c4","default":false}],"state":"open","locked":false,"assignee":{"login":"giovannipizzi","id":16132028,"node_id":"MDQ6VXNlcjE2MTMyMDI4","avatar_url":"https://avatars0.githubusercontent.com/u/16132028?v=4","gravatar_id":"","url":"https://api.github.com/users/giovannipizzi","html_url":"https://github.com/giovannipizzi","followers_url":"https://api.github.com/users/giovannipizzi/followers","following_url":"https://api.github.com/users/giovannipizzi/following{/other_user}","gists_url":"https://api.github.com/users/giovannipizzi/gists{/gist_id}","starred_url":"https://api.github.com/users/giovannipizzi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/giovannipizzi/subscriptions","organizations_url":"https://api.github.com/users/giovannipizzi/orgs","repos_url":"https://api.github.com/users/giovannipizzi/repos","events_url":"https://api.github.com/users/giovannipizzi/events{/privacy}","received_events_url":"https://api.github.com/users/giovannipizzi/received_events","type":"User","site_admin":false},"assignees":[{"login":"giovannipizzi","id":16132028,"node_id":"MDQ6VXNlcjE2MTMyMDI4","avatar_url":"https://avatars0.githubusercontent.com/u/16132028?v=4","gravatar_id":"","url":"https://api.github.com/users/giovannipizzi","html_url":"https://github.com/giovannipizzi","followers_url":"https://api.github.com/users/giovannipizzi/followers","following_url":"https://api.github.com/users/giovannipizzi/following{/other_user}","gists_url":"https://api.github.com/users/giovannipizzi/gists{/gist_id}","starred_url":"https://api.github.com/users/giovannipizzi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/giovannipizzi/subscriptions","organizations_url":"https://api.github.com/users/giovannipizzi/orgs","repos_url":"https://api.github.com/users/giovannipizzi/repos","events_url":"https://api.github.com/users/giovannipizzi/events{/privacy}","received_events_url":"https://api.github.com/users/giovannipizzi/received_events","type":"User","site_admin":false}],"milestone":null,"comments":1,"created_at":"2018-11-16T08:47:15Z","updated_at":"2018-12-03T14:37:13Z","closed_at":null,"author_association":"MEMBER","body":"We now still have a quite long blacklist of files not to be checked by pre-commit hooks (yapf, prospector).\r\nMost of them only have 1/2 things to fix.\r\nA simple script to check how many errors there are is the following (run it in a py3 venv with prospector installed):\r\n```python\r\nimport yaml, json, os\r\nfrom subprocess import run, DEVNULL, PIPE\r\n\r\nwith open('.pre-commit-config.yaml') as f:\r\n    data = yaml.load(f)\r\n\r\nassert data[0]['hooks'][0]['id'] == 'yapf'\r\nfiles = [_.strip() for _ in data[0]['hooks'][0]['exclude'].split('(')[2].split(')')[0].replace('\\n', '').split(\"|\") if '*' not in _]\r\n\r\nfor file in files:\r\n    if not os.path.isfile(file):\r\n        print(\"REMOVE ->\", file)\r\n\r\nprint(\"*\"*72)\r\nfor file in files[:2]:\r\n    response = run(['prospector', '-o', 'json', file], stdout=PIPE, stderr=DEVNULL, encoding='utf8')\r\n    response_data = json.loads(response.stdout)\r\n    print(\"{} {}\".format(file, response_data['summary']['message_count']))\r\n```\r\n(of course it can be changed to also show the specific errors etc.)\r\n\r\nThe idea is that we can already remove and fix most of those with few problems.\r\nAs once put in there they will always be checked and must be ok, it's better to first try to remove as many as possible of those that are simple to fix, and leave the complicated ones at the end."},"comment":{"url":"https://api.github.com/repos/aiidateam/aiida_core/issues/comments/443731395","html_url":"https://github.com/aiidateam/aiida_core/issues/2207#issuecomment-443731395","issue_url":"https://api.github.com/repos/aiidateam/aiida_core/issues/2207","id":443731395,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0MzczMTM5NQ==","user":{"login":"giovannipizzi","id":16132028,"node_id":"MDQ6VXNlcjE2MTMyMDI4","avatar_url":"https://avatars0.githubusercontent.com/u/16132028?v=4","gravatar_id":"","url":"https://api.github.com/users/giovannipizzi","html_url":"https://github.com/giovannipizzi","followers_url":"https://api.github.com/users/giovannipizzi/followers","following_url":"https://api.github.com/users/giovannipizzi/following{/other_user}","gists_url":"https://api.github.com/users/giovannipizzi/gists{/gist_id}","starred_url":"https://api.github.com/users/giovannipizzi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/giovannipizzi/subscriptions","organizations_url":"https://api.github.com/users/giovannipizzi/orgs","repos_url":"https://api.github.com/users/giovannipizzi/repos","events_url":"https://api.github.com/users/giovannipizzi/events{/privacy}","received_events_url":"https://api.github.com/users/giovannipizzi/received_events","type":"User","site_admin":false},"created_at":"2018-12-03T14:37:13Z","updated_at":"2018-12-03T14:37:13Z","author_association":"MEMBER","body":"Once all files are processed, we should then check if there are leftover 'disable' that are actually not needed"}}
{"actor":{"display_login":"giovannipizzi"}}