{"action":"created","comment":{"url":"https://api.github.com/repos/spacetx/starfish/pulls/comments/225610388","pull_request_review_id":165248035,"id":225610388,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIyNTYxMDM4OA==","diff_hunk":"@@ -0,0 +1,60 @@\n+import collections\n+import json\n+import os\n+from typing import Any, Dict, Sequence, Union\n+\n+\n+class Config(collections.UserDict):","path":"starfish/util/config.py","position":7,"original_position":7,"commit_id":"27abac361511db7ac2b00417d94fd3bca9f5d5f7","original_commit_id":"5d917f0654b66c210f58825178339d5acc26275a","user":{"login":"joshmoore","id":88113,"node_id":"MDQ6VXNlcjg4MTEz","avatar_url":"https://avatars2.githubusercontent.com/u/88113?v=4","gravatar_id":"","url":"https://api.github.com/users/joshmoore","html_url":"https://github.com/joshmoore","followers_url":"https://api.github.com/users/joshmoore/followers","following_url":"https://api.github.com/users/joshmoore/following{/other_user}","gists_url":"https://api.github.com/users/joshmoore/gists{/gist_id}","starred_url":"https://api.github.com/users/joshmoore/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joshmoore/subscriptions","organizations_url":"https://api.github.com/users/joshmoore/orgs","repos_url":"https://api.github.com/users/joshmoore/repos","events_url":"https://api.github.com/users/joshmoore/events{/privacy}","received_events_url":"https://api.github.com/users/joshmoore/received_events","type":"User","site_admin":false},"body":"Other changes pushed. Time to decide on this.","created_at":"2018-10-16T16:15:06Z","updated_at":"2018-10-16T16:15:06Z","html_url":"https://github.com/spacetx/starfish/pull/645#discussion_r225610388","pull_request_url":"https://api.github.com/repos/spacetx/starfish/pulls/645","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/spacetx/starfish/pulls/comments/225610388"},"html":{"href":"https://github.com/spacetx/starfish/pull/645#discussion_r225610388"},"pull_request":{"href":"https://api.github.com/repos/spacetx/starfish/pulls/645"}},"in_reply_to_id":222154204},"pull_request":{"url":"https://api.github.com/repos/spacetx/starfish/pulls/645","id":218607957,"node_id":"MDExOlB1bGxSZXF1ZXN0MjE4NjA3OTU3","html_url":"https://github.com/spacetx/starfish/pull/645","diff_url":"https://github.com/spacetx/starfish/pull/645.diff","patch_url":"https://github.com/spacetx/starfish/pull/645.patch","issue_url":"https://api.github.com/repos/spacetx/starfish/issues/645","number":645,"state":"open","locked":false,"title":"Allow setting of allow_caching","user":{"login":"joshmoore","id":88113,"node_id":"MDQ6VXNlcjg4MTEz","avatar_url":"https://avatars2.githubusercontent.com/u/88113?v=4","gravatar_id":"","url":"https://api.github.com/users/joshmoore","html_url":"https://github.com/joshmoore","followers_url":"https://api.github.com/users/joshmoore/followers","following_url":"https://api.github.com/users/joshmoore/following{/other_user}","gists_url":"https://api.github.com/users/joshmoore/gists{/gist_id}","starred_url":"https://api.github.com/users/joshmoore/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joshmoore/subscriptions","organizations_url":"https://api.github.com/users/joshmoore/orgs","repos_url":"https://api.github.com/users/joshmoore/repos","events_url":"https://api.github.com/users/joshmoore/events{/privacy}","received_events_url":"https://api.github.com/users/joshmoore/received_events","type":"User","site_admin":false},"body":"For testing the performance of the S3 storage, I'd like to be able to disable caching.  (Note: just setting `~/.starfish-cache` to `000` doesn't suffice. DiskCache doesn't fail gracefully) If this is a generally agreed upon strategy, I'll propagate it to all the other `from_json` methods. If not, then I'll look into otherwise configuring the backend, e.g. by passing the maximum size to 0.\r\n\r\n----\r\n\r\n## starfish.util.config.Config object ##\r\n\r\nThe loading mechanism for configs is influenced by Ansible's `@filename` syntax:\r\n\r\n```\r\nansible-playbook release.yml --extra-vars \"@some_file.json\"\r\n```\r\n\r\nbut omits any YAML-ness. The `Config` constructor will accept one of:\r\n\r\n * a json-like object\r\n * a json-like string\r\n * a @filename containing json data\r\n\r\nfrom either:\r\n * the value passed to the constructor, or\r\n * an environment variable (\"STARFISH_CONFIG\" by default)\r\n\r\nThe `Config` object itself is a `UserDict` and so can be used like any dictionary. Additionally a null-safe `lookup()`, name and signature open to discussion, can be used for reaching deep in to the higher.\r\n\r\nOne suggestion for the data layout _within_ the config json is to follow roughly Django's style (which itself uses DiskCache heavily). See https://docs.djangoproject.com/en/2.1/topics/cache/. A potential example would be:\r\n\r\n```\r\n{\r\n    \"cache\":\r\n    {\r\n        \"backend\": ...,\r\n        \"location\": \"~/.starfish-cache\",\r\n        \"timeout\": 0\r\n    }\r\n}\r\n```\r\n\r\n(There are a _number_ of packages like this that could be used instead of spinning our own.)\r\n\r\n----\r\nOpen questions:\r\n * [ ] propagate a variable to all `starfish` CLI commands\r\n * [ ] propagate the `config` variable through all the `from_json` methods?\r\n * [ ] ... through other starfish library methods?\r\n * [ ] ... into slicedimage? (barring use of the \"lookup\" method)","created_at":"2018-09-27T10:53:49Z","updated_at":"2018-10-16T16:15:06Z","closed_at":null,"merged_at":null,"merge_commit_sha":"67fd3d551137d468ec02ee9eaee715ee8ba4b717","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/spacetx/starfish/pulls/645/commits","review_comments_url":"https://api.github.com/repos/spacetx/starfish/pulls/645/comments","review_comment_url":"https://api.github.com/repos/spacetx/starfish/pulls/comments{/number}","comments_url":"https://api.github.com/repos/spacetx/starfish/issues/645/comments","statuses_url":"https://api.github.com/repos/spacetx/starfish/statuses/27abac361511db7ac2b00417d94fd3bca9f5d5f7","head":{"label":"joshmoore:disable-caching","ref":"disable-caching","sha":"27abac361511db7ac2b00417d94fd3bca9f5d5f7","user":{"login":"joshmoore","id":88113,"node_id":"MDQ6VXNlcjg4MTEz","avatar_url":"https://avatars2.githubusercontent.com/u/88113?v=4","gravatar_id":"","url":"https://api.github.com/users/joshmoore","html_url":"https://github.com/joshmoore","followers_url":"https://api.github.com/users/joshmoore/followers","following_url":"https://api.github.com/users/joshmoore/following{/other_user}","gists_url":"https://api.github.com/users/joshmoore/gists{/gist_id}","starred_url":"https://api.github.com/users/joshmoore/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joshmoore/subscriptions","organizations_url":"https://api.github.com/users/joshmoore/orgs","repos_url":"https://api.github.com/users/joshmoore/repos","events_url":"https://api.github.com/users/joshmoore/events{/privacy}","received_events_url":"https://api.github.com/users/joshmoore/received_events","type":"User","site_admin":false},"repo":{"id":138727687,"node_id":"MDEwOlJlcG9zaXRvcnkxMzg3Mjc2ODc=","name":"starfish","full_name":"joshmoore/starfish","private":false,"owner":{"login":"joshmoore","id":88113,"node_id":"MDQ6VXNlcjg4MTEz","avatar_url":"https://avatars2.githubusercontent.com/u/88113?v=4","gravatar_id":"","url":"https://api.github.com/users/joshmoore","html_url":"https://github.com/joshmoore","followers_url":"https://api.github.com/users/joshmoore/followers","following_url":"https://api.github.com/users/joshmoore/following{/other_user}","gists_url":"https://api.github.com/users/joshmoore/gists{/gist_id}","starred_url":"https://api.github.com/users/joshmoore/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joshmoore/subscriptions","organizations_url":"https://api.github.com/users/joshmoore/orgs","repos_url":"https://api.github.com/users/joshmoore/repos","events_url":"https://api.github.com/users/joshmoore/events{/privacy}","received_events_url":"https://api.github.com/users/joshmoore/received_events","type":"User","site_admin":false},"html_url":"https://github.com/joshmoore/starfish","description":"*fish -- a standardized analysis pipeline for image-based transcriptomics","fork":true,"url":"https://api.github.com/repos/joshmoore/starfish","forks_url":"https://api.github.com/repos/joshmoore/starfish/forks","keys_url":"https://api.github.com/repos/joshmoore/starfish/keys{/key_id}","collaborators_url":"https://api.github.com/repos/joshmoore/starfish/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/joshmoore/starfish/teams","hooks_url":"https://api.github.com/repos/joshmoore/starfish/hooks","issue_events_url":"https://api.github.com/repos/joshmoore/starfish/issues/events{/number}","events_url":"https://api.github.com/repos/joshmoore/starfish/events","assignees_url":"https://api.github.com/repos/joshmoore/starfish/assignees{/user}","branches_url":"https://api.github.com/repos/joshmoore/starfish/branches{/branch}","tags_url":"https://api.github.com/repos/joshmoore/starfish/tags","blobs_url":"https://api.github.com/repos/joshmoore/starfish/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/joshmoore/starfish/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/joshmoore/starfish/git/refs{/sha}","trees_url":"https://api.github.com/repos/joshmoore/starfish/git/trees{/sha}","statuses_url":"https://api.github.com/repos/joshmoore/starfish/statuses/{sha}","languages_url":"https://api.github.com/repos/joshmoore/starfish/languages","stargazers_url":"https://api.github.com/repos/joshmoore/starfish/stargazers","contributors_url":"https://api.github.com/repos/joshmoore/starfish/contributors","subscribers_url":"https://api.github.com/repos/joshmoore/starfish/subscribers","subscription_url":"https://api.github.com/repos/joshmoore/starfish/subscription","commits_url":"https://api.github.com/repos/joshmoore/starfish/commits{/sha}","git_commits_url":"https://api.github.com/repos/joshmoore/starfish/git/commits{/sha}","comments_url":"https://api.github.com/repos/joshmoore/starfish/comments{/number}","issue_comment_url":"https://api.github.com/repos/joshmoore/starfish/issues/comments{/number}","contents_url":"https://api.github.com/repos/joshmoore/starfish/contents/{+path}","compare_url":"https://api.github.com/repos/joshmoore/starfish/compare/{base}...{head}","merges_url":"https://api.github.com/repos/joshmoore/starfish/merges","archive_url":"https://api.github.com/repos/joshmoore/starfish/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/joshmoore/starfish/downloads","issues_url":"https://api.github.com/repos/joshmoore/starfish/issues{/number}","pulls_url":"https://api.github.com/repos/joshmoore/starfish/pulls{/number}","milestones_url":"https://api.github.com/repos/joshmoore/starfish/milestones{/number}","notifications_url":"https://api.github.com/repos/joshmoore/starfish/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/joshmoore/starfish/labels{/name}","releases_url":"https://api.github.com/repos/joshmoore/starfish/releases{/id}","deployments_url":"https://api.github.com/repos/joshmoore/starfish/deployments","created_at":"2018-06-26T11:20:55Z","updated_at":"2018-06-26T11:20:57Z","pushed_at":"2018-10-16T16:14:10Z","git_url":"git://github.com/joshmoore/starfish.git","ssh_url":"git@github.com:joshmoore/starfish.git","clone_url":"https://github.com/joshmoore/starfish.git","svn_url":"https://github.com/joshmoore/starfish","homepage":"","size":63203,"stargazers_count":0,"watchers_count":0,"language":"Jupyter Notebook","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":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"spacetx:master","ref":"master","sha":"d526680ccd023fa6662b82f030cbbadeb184f3f7","user":{"login":"spacetx","id":37218549,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM3MjE4NTQ5","avatar_url":"https://avatars0.githubusercontent.com/u/37218549?v=4","gravatar_id":"","url":"https://api.github.com/users/spacetx","html_url":"https://github.com/spacetx","followers_url":"https://api.github.com/users/spacetx/followers","following_url":"https://api.github.com/users/spacetx/following{/other_user}","gists_url":"https://api.github.com/users/spacetx/gists{/gist_id}","starred_url":"https://api.github.com/users/spacetx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spacetx/subscriptions","organizations_url":"https://api.github.com/users/spacetx/orgs","repos_url":"https://api.github.com/users/spacetx/repos","events_url":"https://api.github.com/users/spacetx/events{/privacy}","received_events_url":"https://api.github.com/users/spacetx/received_events","type":"Organization","site_admin":false},"repo":{"id":92539237,"node_id":"MDEwOlJlcG9zaXRvcnk5MjUzOTIzNw==","name":"starfish","full_name":"spacetx/starfish","private":false,"owner":{"login":"spacetx","id":37218549,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM3MjE4NTQ5","avatar_url":"https://avatars0.githubusercontent.com/u/37218549?v=4","gravatar_id":"","url":"https://api.github.com/users/spacetx","html_url":"https://github.com/spacetx","followers_url":"https://api.github.com/users/spacetx/followers","following_url":"https://api.github.com/users/spacetx/following{/other_user}","gists_url":"https://api.github.com/users/spacetx/gists{/gist_id}","starred_url":"https://api.github.com/users/spacetx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spacetx/subscriptions","organizations_url":"https://api.github.com/users/spacetx/orgs","repos_url":"https://api.github.com/users/spacetx/repos","events_url":"https://api.github.com/users/spacetx/events{/privacy}","received_events_url":"https://api.github.com/users/spacetx/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/spacetx/starfish","description":"*fish -- a standardized analysis pipeline for image-based transcriptomics","fork":false,"url":"https://api.github.com/repos/spacetx/starfish","forks_url":"https://api.github.com/repos/spacetx/starfish/forks","keys_url":"https://api.github.com/repos/spacetx/starfish/keys{/key_id}","collaborators_url":"https://api.github.com/repos/spacetx/starfish/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/spacetx/starfish/teams","hooks_url":"https://api.github.com/repos/spacetx/starfish/hooks","issue_events_url":"https://api.github.com/repos/spacetx/starfish/issues/events{/number}","events_url":"https://api.github.com/repos/spacetx/starfish/events","assignees_url":"https://api.github.com/repos/spacetx/starfish/assignees{/user}","branches_url":"https://api.github.com/repos/spacetx/starfish/branches{/branch}","tags_url":"https://api.github.com/repos/spacetx/starfish/tags","blobs_url":"https://api.github.com/repos/spacetx/starfish/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/spacetx/starfish/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/spacetx/starfish/git/refs{/sha}","trees_url":"https://api.github.com/repos/spacetx/starfish/git/trees{/sha}","statuses_url":"https://api.github.com/repos/spacetx/starfish/statuses/{sha}","languages_url":"https://api.github.com/repos/spacetx/starfish/languages","stargazers_url":"https://api.github.com/repos/spacetx/starfish/stargazers","contributors_url":"https://api.github.com/repos/spacetx/starfish/contributors","subscribers_url":"https://api.github.com/repos/spacetx/starfish/subscribers","subscription_url":"https://api.github.com/repos/spacetx/starfish/subscription","commits_url":"https://api.github.com/repos/spacetx/starfish/commits{/sha}","git_commits_url":"https://api.github.com/repos/spacetx/starfish/git/commits{/sha}","comments_url":"https://api.github.com/repos/spacetx/starfish/comments{/number}","issue_comment_url":"https://api.github.com/repos/spacetx/starfish/issues/comments{/number}","contents_url":"https://api.github.com/repos/spacetx/starfish/contents/{+path}","compare_url":"https://api.github.com/repos/spacetx/starfish/compare/{base}...{head}","merges_url":"https://api.github.com/repos/spacetx/starfish/merges","archive_url":"https://api.github.com/repos/spacetx/starfish/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/spacetx/starfish/downloads","issues_url":"https://api.github.com/repos/spacetx/starfish/issues{/number}","pulls_url":"https://api.github.com/repos/spacetx/starfish/pulls{/number}","milestones_url":"https://api.github.com/repos/spacetx/starfish/milestones{/number}","notifications_url":"https://api.github.com/repos/spacetx/starfish/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/spacetx/starfish/labels{/name}","releases_url":"https://api.github.com/repos/spacetx/starfish/releases{/id}","deployments_url":"https://api.github.com/repos/spacetx/starfish/deployments","created_at":"2017-05-26T18:45:11Z","updated_at":"2018-10-12T23:42:57Z","pushed_at":"2018-10-16T16:14:12Z","git_url":"git://github.com/spacetx/starfish.git","ssh_url":"git@github.com:spacetx/starfish.git","clone_url":"https://github.com/spacetx/starfish.git","svn_url":"https://github.com/spacetx/starfish","homepage":"","size":69209,"stargazers_count":51,"watchers_count":51,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":18,"mirror_url":null,"archived":false,"open_issues_count":113,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":18,"open_issues":113,"watchers":51,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/spacetx/starfish/pulls/645"},"html":{"href":"https://github.com/spacetx/starfish/pull/645"},"issue":{"href":"https://api.github.com/repos/spacetx/starfish/issues/645"},"comments":{"href":"https://api.github.com/repos/spacetx/starfish/issues/645/comments"},"review_comments":{"href":"https://api.github.com/repos/spacetx/starfish/pulls/645/comments"},"review_comment":{"href":"https://api.github.com/repos/spacetx/starfish/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/spacetx/starfish/pulls/645/commits"},"statuses":{"href":"https://api.github.com/repos/spacetx/starfish/statuses/27abac361511db7ac2b00417d94fd3bca9f5d5f7"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"joshmoore"}}