{"action":"closed","number":187,"pull_request":{"url":"https://api.github.com/repos/ioos/compliance-checker/pulls/187","id":49651127,"html_url":"https://github.com/ioos/compliance-checker/pull/187","diff_url":"https://github.com/ioos/compliance-checker/pull/187.diff","patch_url":"https://github.com/ioos/compliance-checker/pull/187.patch","issue_url":"https://api.github.com/repos/ioos/compliance-checker/issues/187","number":187,"state":"closed","locked":false,"title":"CF check flags exception fix + add unittest","user":{"login":"mhidas","id":3579859,"avatar_url":"https://avatars.githubusercontent.com/u/3579859?v=3","gravatar_id":"","url":"https://api.github.com/users/mhidas","html_url":"https://github.com/mhidas","followers_url":"https://api.github.com/users/mhidas/followers","following_url":"https://api.github.com/users/mhidas/following{/other_user}","gists_url":"https://api.github.com/users/mhidas/gists{/gist_id}","starred_url":"https://api.github.com/users/mhidas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mhidas/subscriptions","organizations_url":"https://api.github.com/users/mhidas/orgs","repos_url":"https://api.github.com/users/mhidas/repos","events_url":"https://api.github.com/users/mhidas/events{/privacy}","received_events_url":"https://api.github.com/users/mhidas/received_events","type":"User","site_admin":false},"body":"Running the CF checker on e.g. [this file](http://thredds.aodn.org.au/thredds/catalog/IMOS/eMII/checker_test/SRS/ALT/catalog.html?dataset=eMII/checker_test/SRS/ALT/IMOS_SRS_TCPS_20130912T034200Z_SRSSTO_FV01_SBE37_15m_END-20141010T002300Z_C-20141105T064337Z.nc) results in the exception\r\n```\r\ncf.check_flags: 'unicode' object has no attribute 'dtype'\r\n```\r\nThis is because some of the variables (incorrectly) have string-valued `flag_values` attributes and the code tries to access their `dtype`. \r\n\r\nI've recently added a check making sure the `flag_values` attribute is a list ( #171). Now I've moved this check to the top so it's the first thing checked (and also converts any other type to a numpy array so the other checks don't fail).\r\n\r\nAlso, there was no unittest for `check_flags`, so I've added one.","created_at":"2015-11-04T05:53:11Z","updated_at":"2015-11-04T19:08:09Z","closed_at":"2015-11-04T19:08:09Z","merged_at":"2015-11-04T19:08:09Z","merge_commit_sha":"38bc7f5bfab632c538cbfcee1ed9067ee6821dfc","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/ioos/compliance-checker/pulls/187/commits","review_comments_url":"https://api.github.com/repos/ioos/compliance-checker/pulls/187/comments","review_comment_url":"https://api.github.com/repos/ioos/compliance-checker/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ioos/compliance-checker/issues/187/comments","statuses_url":"https://api.github.com/repos/ioos/compliance-checker/statuses/64f2e5e4b7e89d964b3e00518914f4da4e59276d","head":{"label":"aodn:check_flags_exception_dtype","ref":"check_flags_exception_dtype","sha":"64f2e5e4b7e89d964b3e00518914f4da4e59276d","user":{"login":"aodn","id":2802166,"avatar_url":"https://avatars.githubusercontent.com/u/2802166?v=3","gravatar_id":"","url":"https://api.github.com/users/aodn","html_url":"https://github.com/aodn","followers_url":"https://api.github.com/users/aodn/followers","following_url":"https://api.github.com/users/aodn/following{/other_user}","gists_url":"https://api.github.com/users/aodn/gists{/gist_id}","starred_url":"https://api.github.com/users/aodn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aodn/subscriptions","organizations_url":"https://api.github.com/users/aodn/orgs","repos_url":"https://api.github.com/users/aodn/repos","events_url":"https://api.github.com/users/aodn/events{/privacy}","received_events_url":"https://api.github.com/users/aodn/received_events","type":"Organization","site_admin":false},"repo":{"id":31340194,"name":"compliance-checker","full_name":"aodn/compliance-checker","owner":{"login":"aodn","id":2802166,"avatar_url":"https://avatars.githubusercontent.com/u/2802166?v=3","gravatar_id":"","url":"https://api.github.com/users/aodn","html_url":"https://github.com/aodn","followers_url":"https://api.github.com/users/aodn/followers","following_url":"https://api.github.com/users/aodn/following{/other_user}","gists_url":"https://api.github.com/users/aodn/gists{/gist_id}","starred_url":"https://api.github.com/users/aodn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aodn/subscriptions","organizations_url":"https://api.github.com/users/aodn/orgs","repos_url":"https://api.github.com/users/aodn/repos","events_url":"https://api.github.com/users/aodn/events{/privacy}","received_events_url":"https://api.github.com/users/aodn/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/aodn/compliance-checker","description":"Python tool to check your datasets vs compliance standards","fork":true,"url":"https://api.github.com/repos/aodn/compliance-checker","forks_url":"https://api.github.com/repos/aodn/compliance-checker/forks","keys_url":"https://api.github.com/repos/aodn/compliance-checker/keys{/key_id}","collaborators_url":"https://api.github.com/repos/aodn/compliance-checker/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/aodn/compliance-checker/teams","hooks_url":"https://api.github.com/repos/aodn/compliance-checker/hooks","issue_events_url":"https://api.github.com/repos/aodn/compliance-checker/issues/events{/number}","events_url":"https://api.github.com/repos/aodn/compliance-checker/events","assignees_url":"https://api.github.com/repos/aodn/compliance-checker/assignees{/user}","branches_url":"https://api.github.com/repos/aodn/compliance-checker/branches{/branch}","tags_url":"https://api.github.com/repos/aodn/compliance-checker/tags","blobs_url":"https://api.github.com/repos/aodn/compliance-checker/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/aodn/compliance-checker/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/aodn/compliance-checker/git/refs{/sha}","trees_url":"https://api.github.com/repos/aodn/compliance-checker/git/trees{/sha}","statuses_url":"https://api.github.com/repos/aodn/compliance-checker/statuses/{sha}","languages_url":"https://api.github.com/repos/aodn/compliance-checker/languages","stargazers_url":"https://api.github.com/repos/aodn/compliance-checker/stargazers","contributors_url":"https://api.github.com/repos/aodn/compliance-checker/contributors","subscribers_url":"https://api.github.com/repos/aodn/compliance-checker/subscribers","subscription_url":"https://api.github.com/repos/aodn/compliance-checker/subscription","commits_url":"https://api.github.com/repos/aodn/compliance-checker/commits{/sha}","git_commits_url":"https://api.github.com/repos/aodn/compliance-checker/git/commits{/sha}","comments_url":"https://api.github.com/repos/aodn/compliance-checker/comments{/number}","issue_comment_url":"https://api.github.com/repos/aodn/compliance-checker/issues/comments{/number}","contents_url":"https://api.github.com/repos/aodn/compliance-checker/contents/{+path}","compare_url":"https://api.github.com/repos/aodn/compliance-checker/compare/{base}...{head}","merges_url":"https://api.github.com/repos/aodn/compliance-checker/merges","archive_url":"https://api.github.com/repos/aodn/compliance-checker/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/aodn/compliance-checker/downloads","issues_url":"https://api.github.com/repos/aodn/compliance-checker/issues{/number}","pulls_url":"https://api.github.com/repos/aodn/compliance-checker/pulls{/number}","milestones_url":"https://api.github.com/repos/aodn/compliance-checker/milestones{/number}","notifications_url":"https://api.github.com/repos/aodn/compliance-checker/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/aodn/compliance-checker/labels{/name}","releases_url":"https://api.github.com/repos/aodn/compliance-checker/releases{/id}","created_at":"2015-02-25T22:55:04Z","updated_at":"2015-09-16T01:20:19Z","pushed_at":"2015-11-04T05:42:44Z","git_url":"git://github.com/aodn/compliance-checker.git","ssh_url":"git@github.com:aodn/compliance-checker.git","clone_url":"https://github.com/aodn/compliance-checker.git","svn_url":"https://github.com/aodn/compliance-checker","homepage":"","size":2360,"stargazers_count":1,"watchers_count":1,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":8,"forks":0,"open_issues":8,"watchers":1,"default_branch":"master"}},"base":{"label":"ioos:master","ref":"master","sha":"539fc4124c5e3c0b8586d2c375e87c92f6e0a821","user":{"login":"ioos","id":5313832,"avatar_url":"https://avatars.githubusercontent.com/u/5313832?v=3","gravatar_id":"","url":"https://api.github.com/users/ioos","html_url":"https://github.com/ioos","followers_url":"https://api.github.com/users/ioos/followers","following_url":"https://api.github.com/users/ioos/following{/other_user}","gists_url":"https://api.github.com/users/ioos/gists{/gist_id}","starred_url":"https://api.github.com/users/ioos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ioos/subscriptions","organizations_url":"https://api.github.com/users/ioos/orgs","repos_url":"https://api.github.com/users/ioos/repos","events_url":"https://api.github.com/users/ioos/events{/privacy}","received_events_url":"https://api.github.com/users/ioos/received_events","type":"Organization","site_admin":false},"repo":{"id":13279768,"name":"compliance-checker","full_name":"ioos/compliance-checker","owner":{"login":"ioos","id":5313832,"avatar_url":"https://avatars.githubusercontent.com/u/5313832?v=3","gravatar_id":"","url":"https://api.github.com/users/ioos","html_url":"https://github.com/ioos","followers_url":"https://api.github.com/users/ioos/followers","following_url":"https://api.github.com/users/ioos/following{/other_user}","gists_url":"https://api.github.com/users/ioos/gists{/gist_id}","starred_url":"https://api.github.com/users/ioos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ioos/subscriptions","organizations_url":"https://api.github.com/users/ioos/orgs","repos_url":"https://api.github.com/users/ioos/repos","events_url":"https://api.github.com/users/ioos/events{/privacy}","received_events_url":"https://api.github.com/users/ioos/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ioos/compliance-checker","description":"Python tool to check your datasets vs compliance standards","fork":false,"url":"https://api.github.com/repos/ioos/compliance-checker","forks_url":"https://api.github.com/repos/ioos/compliance-checker/forks","keys_url":"https://api.github.com/repos/ioos/compliance-checker/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ioos/compliance-checker/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ioos/compliance-checker/teams","hooks_url":"https://api.github.com/repos/ioos/compliance-checker/hooks","issue_events_url":"https://api.github.com/repos/ioos/compliance-checker/issues/events{/number}","events_url":"https://api.github.com/repos/ioos/compliance-checker/events","assignees_url":"https://api.github.com/repos/ioos/compliance-checker/assignees{/user}","branches_url":"https://api.github.com/repos/ioos/compliance-checker/branches{/branch}","tags_url":"https://api.github.com/repos/ioos/compliance-checker/tags","blobs_url":"https://api.github.com/repos/ioos/compliance-checker/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ioos/compliance-checker/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ioos/compliance-checker/git/refs{/sha}","trees_url":"https://api.github.com/repos/ioos/compliance-checker/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ioos/compliance-checker/statuses/{sha}","languages_url":"https://api.github.com/repos/ioos/compliance-checker/languages","stargazers_url":"https://api.github.com/repos/ioos/compliance-checker/stargazers","contributors_url":"https://api.github.com/repos/ioos/compliance-checker/contributors","subscribers_url":"https://api.github.com/repos/ioos/compliance-checker/subscribers","subscription_url":"https://api.github.com/repos/ioos/compliance-checker/subscription","commits_url":"https://api.github.com/repos/ioos/compliance-checker/commits{/sha}","git_commits_url":"https://api.github.com/repos/ioos/compliance-checker/git/commits{/sha}","comments_url":"https://api.github.com/repos/ioos/compliance-checker/comments{/number}","issue_comment_url":"https://api.github.com/repos/ioos/compliance-checker/issues/comments{/number}","contents_url":"https://api.github.com/repos/ioos/compliance-checker/contents/{+path}","compare_url":"https://api.github.com/repos/ioos/compliance-checker/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ioos/compliance-checker/merges","archive_url":"https://api.github.com/repos/ioos/compliance-checker/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ioos/compliance-checker/downloads","issues_url":"https://api.github.com/repos/ioos/compliance-checker/issues{/number}","pulls_url":"https://api.github.com/repos/ioos/compliance-checker/pulls{/number}","milestones_url":"https://api.github.com/repos/ioos/compliance-checker/milestones{/number}","notifications_url":"https://api.github.com/repos/ioos/compliance-checker/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ioos/compliance-checker/labels{/name}","releases_url":"https://api.github.com/repos/ioos/compliance-checker/releases{/id}","created_at":"2013-10-02T18:49:48Z","updated_at":"2015-10-01T15:23:43Z","pushed_at":"2015-11-04T19:08:09Z","git_url":"git://github.com/ioos/compliance-checker.git","ssh_url":"git@github.com:ioos/compliance-checker.git","clone_url":"https://github.com/ioos/compliance-checker.git","svn_url":"https://github.com/ioos/compliance-checker","homepage":"","size":2314,"stargazers_count":6,"watchers_count":6,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":13,"mirror_url":null,"open_issues_count":23,"forks":13,"open_issues":23,"watchers":6,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ioos/compliance-checker/pulls/187"},"html":{"href":"https://github.com/ioos/compliance-checker/pull/187"},"issue":{"href":"https://api.github.com/repos/ioos/compliance-checker/issues/187"},"comments":{"href":"https://api.github.com/repos/ioos/compliance-checker/issues/187/comments"},"review_comments":{"href":"https://api.github.com/repos/ioos/compliance-checker/pulls/187/comments"},"review_comment":{"href":"https://api.github.com/repos/ioos/compliance-checker/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ioos/compliance-checker/pulls/187/commits"},"statuses":{"href":"https://api.github.com/repos/ioos/compliance-checker/statuses/64f2e5e4b7e89d964b3e00518914f4da4e59276d"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"lukecampbell","id":1155163,"avatar_url":"https://avatars.githubusercontent.com/u/1155163?v=3","gravatar_id":"","url":"https://api.github.com/users/lukecampbell","html_url":"https://github.com/lukecampbell","followers_url":"https://api.github.com/users/lukecampbell/followers","following_url":"https://api.github.com/users/lukecampbell/following{/other_user}","gists_url":"https://api.github.com/users/lukecampbell/gists{/gist_id}","starred_url":"https://api.github.com/users/lukecampbell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lukecampbell/subscriptions","organizations_url":"https://api.github.com/users/lukecampbell/orgs","repos_url":"https://api.github.com/users/lukecampbell/repos","events_url":"https://api.github.com/users/lukecampbell/events{/privacy}","received_events_url":"https://api.github.com/users/lukecampbell/received_events","type":"User","site_admin":false},"comments":0,"review_comments":0,"commits":2,"additions":577,"deletions":9,"changed_files":4}}