{"action":"created","comment":{"url":"https://api.github.com/repos/ooi-integration/qc-lookup/pulls/comments/175147127","pull_request_review_id":104635757,"id":175147127,"diff_hunk":"@@ -0,0 +1,73 @@\n+#!/bin/bash\n+\n+#####################################################################\n+# Obtain the various ReferenceDesignator values from asset-management\n+#####################################################################\n+\n+# set up links to the CSVs in asset-management/deployment\n+ls ../../asset-management/deployment/*.csv | awk -F\"/\" '{print \"ln -s ../../asset-management/deployment/\" $NF \" \" $NF}' > amdeploy\n+source amdeploy\n+\n+# extract the ReferenceDesignator column values from all these CSVs\n+for i in $(ls *.csv); do\n+    x=$(head -1 $i | awk -F \",\" '{for (x = 1; x <= NF; ++x) if ($x == \"Reference Designator\") print x}')\n+    awk -F \",\" '{print $refdes}' refdes=$x $i | grep -v \"Reference Designator\" > ${i}.refdes\n+done\n+\n+# get all the unique ReferenceDesignator values\n+sort -u *csv.refdes > refdes.txt\n+\n+# remove all the CSV links\n+ls *csv | awk '{print \"unlink \" $0}' > csvunlink\n+source csvunlink\n+\n+# cleanup temp files\n+rm *.refdes amdeploy csvunlink\n+\n+##################################################################\n+# Obtain the units, types and parameters from preload-database.sql\n+##################################################################\n+\n+# set up a link to preload-database/preload-database.sql\n+ln -s ../../preload-database/preload_database.sql preload_database.sql\n+\n+# get the unit values from preload_database.sql\n+grep \"INSERT INTO \\\"unit\\\"\" preload_database.sql | awk -F\"VALUES\" '{print $NF}' | awk -F\",\" '{print substr($2,2,length($2)-4)}' > unit.txt\n+\n+# get the type values from preload_database.sql\n+grep \"INSERT INTO \\\"value_encoding\\\"\" preload_database.sql | awk -F\"VALUES\" '{print $NF}' | awk -F\",\" '{print substr($1,2) \":\" substr($2,2,length($2)-4)}' > type.txt\n+\n+# get the parameter values from preload_database.sql and drop duplicates by keeping\n+# the one with the highest type encoding value; this is done by sorting the results\n+# in descending order # then retaining the 1st entry for the parameter name\n+# and re-sorting the results into ascending sequence\n+grep \"INSERT INTO \\\"parameter\\\"\" preload_database.sql | awk -F\"VALUES\" '{print $NF}' | awk -F\",\" '{print substr($2,2,length($2)-2) \":\" $3}' | sort -ur > parameter_1.txt\n+x=zzzzzzzzzz\n+for i in $(cat parameter_1.txt); do y=$(echo $i | cut -d: -f1); z=$(echo $i | cut -d: -f2); if [[ $x != $y ]]; then echo \"$y:$z\"; fi; x=$y; done | sort > parameter.txt\n+\n+# clean up temp file\n+rm parameter_1.txt\n+\n+#############################################################\n+# Substitute pipe-separation for comma-separation in the CSVs\n+#############################################################\n+\n+sed 's!,!|!g' ../data_qc_global_range_values.csv > data_qc_global_range_values.psv\n+sed 's!,!|!g' ../data_qc_gradient_test_values.csv > data_qc_gradient_test_values.psv\n+sed 's!,!|!g' ../data_qc_spike_test_values.csv > data_qc_spike_test_values.psv\n+sed 's!,!|!g' ../data_qc_stuck_test_values.csv > data_qc_stuck_test_values.psv\n+sed 's!,!|!g' ../data_qc_trend_test_values.csv > data_qc_trend_test_values.psv\n+\n+# the \"local\" CSV has rows that contain commas within the intended fields; they contain square brackets\n+\n+# convert all commas to pipes on the \"local\" CSV on the rows that don't use commas within the 4th field","path":"test/setuptest.sh","position":null,"original_position":63,"commit_id":"6be222e5f31758f05971b8896fd760b255a9c709","original_commit_id":"0482b5d90c18e4e42c7aa140bae8d5960682b1cb","user":{"login":"tlfish3638","id":31706152,"avatar_url":"https://avatars1.githubusercontent.com/u/31706152?v=4","gravatar_id":"","url":"https://api.github.com/users/tlfish3638","html_url":"https://github.com/tlfish3638","followers_url":"https://api.github.com/users/tlfish3638/followers","following_url":"https://api.github.com/users/tlfish3638/following{/other_user}","gists_url":"https://api.github.com/users/tlfish3638/gists{/gist_id}","starred_url":"https://api.github.com/users/tlfish3638/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tlfish3638/subscriptions","organizations_url":"https://api.github.com/users/tlfish3638/orgs","repos_url":"https://api.github.com/users/tlfish3638/repos","events_url":"https://api.github.com/users/tlfish3638/events{/privacy}","received_events_url":"https://api.github.com/users/tlfish3638/received_events","type":"User","site_admin":false},"body":"I'm using pandas in the nosetests code now","created_at":"2018-03-16T16:35:10Z","updated_at":"2018-03-16T16:35:10Z","html_url":"https://github.com/ooi-integration/qc-lookup/pull/2#discussion_r175147127","pull_request_url":"https://api.github.com/repos/ooi-integration/qc-lookup/pulls/2","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/ooi-integration/qc-lookup/pulls/comments/175147127"},"html":{"href":"https://github.com/ooi-integration/qc-lookup/pull/2#discussion_r175147127"},"pull_request":{"href":"https://api.github.com/repos/ooi-integration/qc-lookup/pulls/2"}},"in_reply_to_id":173252356},"pull_request":{"url":"https://api.github.com/repos/ooi-integration/qc-lookup/pulls/2","id":173494201,"html_url":"https://github.com/ooi-integration/qc-lookup/pull/2","diff_url":"https://github.com/ooi-integration/qc-lookup/pull/2.diff","patch_url":"https://github.com/ooi-integration/qc-lookup/pull/2.patch","issue_url":"https://api.github.com/repos/ooi-integration/qc-lookup/issues/2","number":2,"state":"open","locked":false,"title":"Issue #11649 Added Travis service to run QC sanity checks","user":{"login":"tlfish3638","id":31706152,"avatar_url":"https://avatars1.githubusercontent.com/u/31706152?v=4","gravatar_id":"","url":"https://api.github.com/users/tlfish3638","html_url":"https://github.com/tlfish3638","followers_url":"https://api.github.com/users/tlfish3638/followers","following_url":"https://api.github.com/users/tlfish3638/following{/other_user}","gists_url":"https://api.github.com/users/tlfish3638/gists{/gist_id}","starred_url":"https://api.github.com/users/tlfish3638/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tlfish3638/subscriptions","organizations_url":"https://api.github.com/users/tlfish3638/orgs","repos_url":"https://api.github.com/users/tlfish3638/repos","events_url":"https://api.github.com/users/tlfish3638/events{/privacy}","received_events_url":"https://api.github.com/users/tlfish3638/received_events","type":"User","site_admin":false},"body":"The 6 CSVs needed modifications to make them pass the tests; see the ticket in Redmine for clarification from Leila Belebbassi (update #8). A .travis.yml and the 2 files in the test folder were added to make the test work. The setuptest.sh extracts information from the asset-management and preload-database repositories to use for validation of the CSV entries. It transforms the commas (as delimiters) in the CSVs to pipes due to an additional use of commas in the \"local\" CSV to separate parts of 2 of the fields it contains.","created_at":"2018-03-07T15:56:04Z","updated_at":"2018-03-16T16:35:10Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7b41ba3fa29f27530ad916ab7e6bea8b85d51432","assignee":null,"assignees":[],"requested_reviewers":[{"login":"leilabbb","id":11836767,"avatar_url":"https://avatars2.githubusercontent.com/u/11836767?v=4","gravatar_id":"","url":"https://api.github.com/users/leilabbb","html_url":"https://github.com/leilabbb","followers_url":"https://api.github.com/users/leilabbb/followers","following_url":"https://api.github.com/users/leilabbb/following{/other_user}","gists_url":"https://api.github.com/users/leilabbb/gists{/gist_id}","starred_url":"https://api.github.com/users/leilabbb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/leilabbb/subscriptions","organizations_url":"https://api.github.com/users/leilabbb/orgs","repos_url":"https://api.github.com/users/leilabbb/repos","events_url":"https://api.github.com/users/leilabbb/events{/privacy}","received_events_url":"https://api.github.com/users/leilabbb/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/ooi-integration/qc-lookup/pulls/2/commits","review_comments_url":"https://api.github.com/repos/ooi-integration/qc-lookup/pulls/2/comments","review_comment_url":"https://api.github.com/repos/ooi-integration/qc-lookup/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ooi-integration/qc-lookup/issues/2/comments","statuses_url":"https://api.github.com/repos/ooi-integration/qc-lookup/statuses/6be222e5f31758f05971b8896fd760b255a9c709","head":{"label":"tlfish3638:issue_11649","ref":"issue_11649","sha":"6be222e5f31758f05971b8896fd760b255a9c709","user":{"login":"tlfish3638","id":31706152,"avatar_url":"https://avatars1.githubusercontent.com/u/31706152?v=4","gravatar_id":"","url":"https://api.github.com/users/tlfish3638","html_url":"https://github.com/tlfish3638","followers_url":"https://api.github.com/users/tlfish3638/followers","following_url":"https://api.github.com/users/tlfish3638/following{/other_user}","gists_url":"https://api.github.com/users/tlfish3638/gists{/gist_id}","starred_url":"https://api.github.com/users/tlfish3638/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tlfish3638/subscriptions","organizations_url":"https://api.github.com/users/tlfish3638/orgs","repos_url":"https://api.github.com/users/tlfish3638/repos","events_url":"https://api.github.com/users/tlfish3638/events{/privacy}","received_events_url":"https://api.github.com/users/tlfish3638/received_events","type":"User","site_admin":false},"repo":{"id":114004202,"name":"qc-lookup","full_name":"tlfish3638/qc-lookup","owner":{"login":"tlfish3638","id":31706152,"avatar_url":"https://avatars1.githubusercontent.com/u/31706152?v=4","gravatar_id":"","url":"https://api.github.com/users/tlfish3638","html_url":"https://github.com/tlfish3638","followers_url":"https://api.github.com/users/tlfish3638/followers","following_url":"https://api.github.com/users/tlfish3638/following{/other_user}","gists_url":"https://api.github.com/users/tlfish3638/gists{/gist_id}","starred_url":"https://api.github.com/users/tlfish3638/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tlfish3638/subscriptions","organizations_url":"https://api.github.com/users/tlfish3638/orgs","repos_url":"https://api.github.com/users/tlfish3638/repos","events_url":"https://api.github.com/users/tlfish3638/events{/privacy}","received_events_url":"https://api.github.com/users/tlfish3638/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/tlfish3638/qc-lookup","description":"Lookup tables for the automated OOI Quality Control algorithms","fork":true,"url":"https://api.github.com/repos/tlfish3638/qc-lookup","forks_url":"https://api.github.com/repos/tlfish3638/qc-lookup/forks","keys_url":"https://api.github.com/repos/tlfish3638/qc-lookup/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tlfish3638/qc-lookup/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tlfish3638/qc-lookup/teams","hooks_url":"https://api.github.com/repos/tlfish3638/qc-lookup/hooks","issue_events_url":"https://api.github.com/repos/tlfish3638/qc-lookup/issues/events{/number}","events_url":"https://api.github.com/repos/tlfish3638/qc-lookup/events","assignees_url":"https://api.github.com/repos/tlfish3638/qc-lookup/assignees{/user}","branches_url":"https://api.github.com/repos/tlfish3638/qc-lookup/branches{/branch}","tags_url":"https://api.github.com/repos/tlfish3638/qc-lookup/tags","blobs_url":"https://api.github.com/repos/tlfish3638/qc-lookup/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tlfish3638/qc-lookup/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tlfish3638/qc-lookup/git/refs{/sha}","trees_url":"https://api.github.com/repos/tlfish3638/qc-lookup/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tlfish3638/qc-lookup/statuses/{sha}","languages_url":"https://api.github.com/repos/tlfish3638/qc-lookup/languages","stargazers_url":"https://api.github.com/repos/tlfish3638/qc-lookup/stargazers","contributors_url":"https://api.github.com/repos/tlfish3638/qc-lookup/contributors","subscribers_url":"https://api.github.com/repos/tlfish3638/qc-lookup/subscribers","subscription_url":"https://api.github.com/repos/tlfish3638/qc-lookup/subscription","commits_url":"https://api.github.com/repos/tlfish3638/qc-lookup/commits{/sha}","git_commits_url":"https://api.github.com/repos/tlfish3638/qc-lookup/git/commits{/sha}","comments_url":"https://api.github.com/repos/tlfish3638/qc-lookup/comments{/number}","issue_comment_url":"https://api.github.com/repos/tlfish3638/qc-lookup/issues/comments{/number}","contents_url":"https://api.github.com/repos/tlfish3638/qc-lookup/contents/{+path}","compare_url":"https://api.github.com/repos/tlfish3638/qc-lookup/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tlfish3638/qc-lookup/merges","archive_url":"https://api.github.com/repos/tlfish3638/qc-lookup/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tlfish3638/qc-lookup/downloads","issues_url":"https://api.github.com/repos/tlfish3638/qc-lookup/issues{/number}","pulls_url":"https://api.github.com/repos/tlfish3638/qc-lookup/pulls{/number}","milestones_url":"https://api.github.com/repos/tlfish3638/qc-lookup/milestones{/number}","notifications_url":"https://api.github.com/repos/tlfish3638/qc-lookup/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tlfish3638/qc-lookup/labels{/name}","releases_url":"https://api.github.com/repos/tlfish3638/qc-lookup/releases{/id}","deployments_url":"https://api.github.com/repos/tlfish3638/qc-lookup/deployments","created_at":"2017-12-12T15:05:39Z","updated_at":"2018-03-07T15:37:31Z","pushed_at":"2018-03-16T16:26:11Z","git_url":"git://github.com/tlfish3638/qc-lookup.git","ssh_url":"git@github.com:tlfish3638/qc-lookup.git","clone_url":"https://github.com/tlfish3638/qc-lookup.git","svn_url":"https://github.com/tlfish3638/qc-lookup","homepage":"","size":3252,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"ooi-integration:master","ref":"master","sha":"ac4cd77852c157f1fe1dbfb8e197590d32f02b3a","user":{"login":"ooi-integration","id":10948260,"avatar_url":"https://avatars0.githubusercontent.com/u/10948260?v=4","gravatar_id":"","url":"https://api.github.com/users/ooi-integration","html_url":"https://github.com/ooi-integration","followers_url":"https://api.github.com/users/ooi-integration/followers","following_url":"https://api.github.com/users/ooi-integration/following{/other_user}","gists_url":"https://api.github.com/users/ooi-integration/gists{/gist_id}","starred_url":"https://api.github.com/users/ooi-integration/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ooi-integration/subscriptions","organizations_url":"https://api.github.com/users/ooi-integration/orgs","repos_url":"https://api.github.com/users/ooi-integration/repos","events_url":"https://api.github.com/users/ooi-integration/events{/privacy}","received_events_url":"https://api.github.com/users/ooi-integration/received_events","type":"Organization","site_admin":false},"repo":{"id":40919280,"name":"qc-lookup","full_name":"ooi-integration/qc-lookup","owner":{"login":"ooi-integration","id":10948260,"avatar_url":"https://avatars0.githubusercontent.com/u/10948260?v=4","gravatar_id":"","url":"https://api.github.com/users/ooi-integration","html_url":"https://github.com/ooi-integration","followers_url":"https://api.github.com/users/ooi-integration/followers","following_url":"https://api.github.com/users/ooi-integration/following{/other_user}","gists_url":"https://api.github.com/users/ooi-integration/gists{/gist_id}","starred_url":"https://api.github.com/users/ooi-integration/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ooi-integration/subscriptions","organizations_url":"https://api.github.com/users/ooi-integration/orgs","repos_url":"https://api.github.com/users/ooi-integration/repos","events_url":"https://api.github.com/users/ooi-integration/events{/privacy}","received_events_url":"https://api.github.com/users/ooi-integration/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ooi-integration/qc-lookup","description":"Lookup tables for the automated OOI Quality Control algorithms","fork":false,"url":"https://api.github.com/repos/ooi-integration/qc-lookup","forks_url":"https://api.github.com/repos/ooi-integration/qc-lookup/forks","keys_url":"https://api.github.com/repos/ooi-integration/qc-lookup/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ooi-integration/qc-lookup/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ooi-integration/qc-lookup/teams","hooks_url":"https://api.github.com/repos/ooi-integration/qc-lookup/hooks","issue_events_url":"https://api.github.com/repos/ooi-integration/qc-lookup/issues/events{/number}","events_url":"https://api.github.com/repos/ooi-integration/qc-lookup/events","assignees_url":"https://api.github.com/repos/ooi-integration/qc-lookup/assignees{/user}","branches_url":"https://api.github.com/repos/ooi-integration/qc-lookup/branches{/branch}","tags_url":"https://api.github.com/repos/ooi-integration/qc-lookup/tags","blobs_url":"https://api.github.com/repos/ooi-integration/qc-lookup/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ooi-integration/qc-lookup/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ooi-integration/qc-lookup/git/refs{/sha}","trees_url":"https://api.github.com/repos/ooi-integration/qc-lookup/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ooi-integration/qc-lookup/statuses/{sha}","languages_url":"https://api.github.com/repos/ooi-integration/qc-lookup/languages","stargazers_url":"https://api.github.com/repos/ooi-integration/qc-lookup/stargazers","contributors_url":"https://api.github.com/repos/ooi-integration/qc-lookup/contributors","subscribers_url":"https://api.github.com/repos/ooi-integration/qc-lookup/subscribers","subscription_url":"https://api.github.com/repos/ooi-integration/qc-lookup/subscription","commits_url":"https://api.github.com/repos/ooi-integration/qc-lookup/commits{/sha}","git_commits_url":"https://api.github.com/repos/ooi-integration/qc-lookup/git/commits{/sha}","comments_url":"https://api.github.com/repos/ooi-integration/qc-lookup/comments{/number}","issue_comment_url":"https://api.github.com/repos/ooi-integration/qc-lookup/issues/comments{/number}","contents_url":"https://api.github.com/repos/ooi-integration/qc-lookup/contents/{+path}","compare_url":"https://api.github.com/repos/ooi-integration/qc-lookup/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ooi-integration/qc-lookup/merges","archive_url":"https://api.github.com/repos/ooi-integration/qc-lookup/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ooi-integration/qc-lookup/downloads","issues_url":"https://api.github.com/repos/ooi-integration/qc-lookup/issues{/number}","pulls_url":"https://api.github.com/repos/ooi-integration/qc-lookup/pulls{/number}","milestones_url":"https://api.github.com/repos/ooi-integration/qc-lookup/milestones{/number}","notifications_url":"https://api.github.com/repos/ooi-integration/qc-lookup/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ooi-integration/qc-lookup/labels{/name}","releases_url":"https://api.github.com/repos/ooi-integration/qc-lookup/releases{/id}","deployments_url":"https://api.github.com/repos/ooi-integration/qc-lookup/deployments","created_at":"2015-08-17T18:40:32Z","updated_at":"2016-12-01T16:33:03Z","pushed_at":"2018-03-16T16:26:13Z","git_url":"git://github.com/ooi-integration/qc-lookup.git","ssh_url":"git@github.com:ooi-integration/qc-lookup.git","clone_url":"https://github.com/ooi-integration/qc-lookup.git","svn_url":"https://github.com/ooi-integration/qc-lookup","homepage":"","size":3246,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"archived":false,"open_issues_count":1,"license":null,"forks":3,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ooi-integration/qc-lookup/pulls/2"},"html":{"href":"https://github.com/ooi-integration/qc-lookup/pull/2"},"issue":{"href":"https://api.github.com/repos/ooi-integration/qc-lookup/issues/2"},"comments":{"href":"https://api.github.com/repos/ooi-integration/qc-lookup/issues/2/comments"},"review_comments":{"href":"https://api.github.com/repos/ooi-integration/qc-lookup/pulls/2/comments"},"review_comment":{"href":"https://api.github.com/repos/ooi-integration/qc-lookup/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ooi-integration/qc-lookup/pulls/2/commits"},"statuses":{"href":"https://api.github.com/repos/ooi-integration/qc-lookup/statuses/6be222e5f31758f05971b8896fd760b255a9c709"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"tlfish3638"}}