{"action":"created","comment":{"url":"https://api.github.com/repos/CenterForOpenScience/osf.io/pulls/comments/168052180","pull_request_review_id":96357783,"id":168052180,"diff_hunk":"@@ -18,37 +19,67 @@\n from website.util import api_v2_url\n \n \n-class PreprintProvider(ObjectIDMixin, ReviewProviderMixin, DirtyFieldsMixin, BaseModel):\n-\n-    PUSH_SHARE_TYPE_CHOICES = (('Preprint', 'Preprint'),\n-                               ('Thesis', 'Thesis'),)\n-    PUSH_SHARE_TYPE_HELP = 'This SHARE type will be used when pushing publications to SHARE'\n-\n-    REVIEWABLE_RELATION_NAME = 'preprint_services'\n+class AbstractProvider(TypedModel, ObjectIDMixin, ReviewProviderMixin, DirtyFieldsMixin, BaseModel):\n \n     name = models.CharField(null=False, max_length=128)  # max length on prod: 22\n+    advisory_board = models.TextField(default='', blank=True)\n     description = models.TextField(default='', blank=True)\n     domain = models.URLField(blank=True, default='', max_length=200)\n     domain_redirect_enabled = models.BooleanField(default=False)\n     external_url = models.URLField(null=True, blank=True, max_length=200)  # max length on prod: 25\n     email_contact = models.CharField(null=True, blank=True, max_length=200)  # max length on prod: 23\n     email_support = models.CharField(null=True, blank=True, max_length=200)  # max length on prod: 23\n-    example = models.CharField(null=True, blank=True, max_length=20)  # max length on prod: 5\n-    access_token = EncryptedTextField(null=True, blank=True)\n-    advisory_board = models.TextField(default='', blank=True)\n     social_twitter = models.CharField(null=True, blank=True, max_length=200)  # max length on prod: 8\n     social_facebook = models.CharField(null=True, blank=True, max_length=200)  # max length on prod: 8\n     social_instagram = models.CharField(null=True, blank=True, max_length=200)  # max length on prod: 8\n     footer_links = models.TextField(default='', blank=True)\n+    facebook_app_id = models.BigIntegerField(blank=True, null=True)\n+    example = models.CharField(null=True, blank=True, max_length=20)  # max length on prod: 5\n+    licenses_acceptable = models.ManyToManyField(NodeLicense, blank=True, related_name='licenses_acceptable')\n+    default_license = models.ForeignKey(NodeLicense, related_name='default_license',\n+                                        null=True, blank=True, on_delete=models.CASCADE)\n+    allow_submissions = models.BooleanField(default=True)\n+\n+    def __unicode__(self):\n+        return '{} with id {}'.format(self.name, self.id)","path":"osf/models/provider.py","position":44,"original_position":44,"commit_id":"594d1ca24ea3a6c123c3312df0b807bc19bb152d","original_commit_id":"594d1ca24ea3a6c123c3312df0b807bc19bb152d","user":{"login":"alexschiller","id":1322421,"avatar_url":"https://avatars3.githubusercontent.com/u/1322421?v=4","gravatar_id":"","url":"https://api.github.com/users/alexschiller","html_url":"https://github.com/alexschiller","followers_url":"https://api.github.com/users/alexschiller/followers","following_url":"https://api.github.com/users/alexschiller/following{/other_user}","gists_url":"https://api.github.com/users/alexschiller/gists{/gist_id}","starred_url":"https://api.github.com/users/alexschiller/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexschiller/subscriptions","organizations_url":"https://api.github.com/users/alexschiller/orgs","repos_url":"https://api.github.com/users/alexschiller/repos","events_url":"https://api.github.com/users/alexschiller/events{/privacy}","received_events_url":"https://api.github.com/users/alexschiller/received_events","type":"User","site_admin":false},"body":"With this becoming abstract might want to put the class type or something else to distinguish.","created_at":"2018-02-14T01:03:34Z","updated_at":"2018-02-14T01:40:06Z","html_url":"https://github.com/CenterForOpenScience/osf.io/pull/8158#discussion_r168052180","pull_request_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/pulls/8158","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/CenterForOpenScience/osf.io/pulls/comments/168052180"},"html":{"href":"https://github.com/CenterForOpenScience/osf.io/pull/8158#discussion_r168052180"},"pull_request":{"href":"https://api.github.com/repos/CenterForOpenScience/osf.io/pulls/8158"}}},"pull_request":{"url":"https://api.github.com/repos/CenterForOpenScience/osf.io/pulls/8158","id":167831743,"html_url":"https://github.com/CenterForOpenScience/osf.io/pull/8158","diff_url":"https://github.com/CenterForOpenScience/osf.io/pull/8158.diff","patch_url":"https://github.com/CenterForOpenScience/osf.io/pull/8158.patch","issue_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/issues/8158","number":8158,"state":"open","locked":false,"title":"[IN-149] [Preprints] Add AbstractProvider","user":{"login":"fabmiz","id":4511563,"avatar_url":"https://avatars2.githubusercontent.com/u/4511563?v=4","gravatar_id":"","url":"https://api.github.com/users/fabmiz","html_url":"https://github.com/fabmiz","followers_url":"https://api.github.com/users/fabmiz/followers","following_url":"https://api.github.com/users/fabmiz/following{/other_user}","gists_url":"https://api.github.com/users/fabmiz/gists{/gist_id}","starred_url":"https://api.github.com/users/fabmiz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fabmiz/subscriptions","organizations_url":"https://api.github.com/users/fabmiz/orgs","repos_url":"https://api.github.com/users/fabmiz/repos","events_url":"https://api.github.com/users/fabmiz/events{/privacy}","received_events_url":"https://api.github.com/users/fabmiz/received_events","type":"User","site_admin":false},"body":"## Purpose\r\n\r\n[WIP] Generalize PreprintProvider model into a class that can be used\r\nfor other upcoming types of providers (such as CollectionsProvider) \r\n\r\n## Changes\r\n\r\n- Add migration to create AbstractProvider table\r\n- Update tests\r\n- Update modules previously using PreprintProvider  model\r\n\r\n## QA Notes\r\n- Mostly backend changes. \r\n- Regression tests for Preprints, PreprintProvider to make sure nothing\r\nis broken by this change.\r\n- Maybe API testing on preprints/preprint_providers routes\r\n\r\n## Side Effects\r\n\r\n## Ticket\r\n\r\n[IN-149](https://openscience.atlassian.net/browse/IN-149)\r\n","created_at":"2018-02-07T22:51:44Z","updated_at":"2018-02-14T01:40:06Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7d1562c7d6e825b8c4b10bca57c25bcac43430c9","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/pulls/8158/commits","review_comments_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/pulls/8158/comments","review_comment_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/pulls/comments{/number}","comments_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/issues/8158/comments","statuses_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/statuses/594d1ca24ea3a6c123c3312df0b807bc19bb152d","head":{"label":"fabmiz:feature/IN-149_abstractProvider","ref":"feature/IN-149_abstractProvider","sha":"594d1ca24ea3a6c123c3312df0b807bc19bb152d","user":{"login":"fabmiz","id":4511563,"avatar_url":"https://avatars2.githubusercontent.com/u/4511563?v=4","gravatar_id":"","url":"https://api.github.com/users/fabmiz","html_url":"https://github.com/fabmiz","followers_url":"https://api.github.com/users/fabmiz/followers","following_url":"https://api.github.com/users/fabmiz/following{/other_user}","gists_url":"https://api.github.com/users/fabmiz/gists{/gist_id}","starred_url":"https://api.github.com/users/fabmiz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fabmiz/subscriptions","organizations_url":"https://api.github.com/users/fabmiz/orgs","repos_url":"https://api.github.com/users/fabmiz/repos","events_url":"https://api.github.com/users/fabmiz/events{/privacy}","received_events_url":"https://api.github.com/users/fabmiz/received_events","type":"User","site_admin":false},"repo":{"id":84862157,"name":"osf.io","full_name":"fabmiz/osf.io","owner":{"login":"fabmiz","id":4511563,"avatar_url":"https://avatars2.githubusercontent.com/u/4511563?v=4","gravatar_id":"","url":"https://api.github.com/users/fabmiz","html_url":"https://github.com/fabmiz","followers_url":"https://api.github.com/users/fabmiz/followers","following_url":"https://api.github.com/users/fabmiz/following{/other_user}","gists_url":"https://api.github.com/users/fabmiz/gists{/gist_id}","starred_url":"https://api.github.com/users/fabmiz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fabmiz/subscriptions","organizations_url":"https://api.github.com/users/fabmiz/orgs","repos_url":"https://api.github.com/users/fabmiz/repos","events_url":"https://api.github.com/users/fabmiz/events{/privacy}","received_events_url":"https://api.github.com/users/fabmiz/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/fabmiz/osf.io","description":"Facilitating Open Science","fork":true,"url":"https://api.github.com/repos/fabmiz/osf.io","forks_url":"https://api.github.com/repos/fabmiz/osf.io/forks","keys_url":"https://api.github.com/repos/fabmiz/osf.io/keys{/key_id}","collaborators_url":"https://api.github.com/repos/fabmiz/osf.io/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/fabmiz/osf.io/teams","hooks_url":"https://api.github.com/repos/fabmiz/osf.io/hooks","issue_events_url":"https://api.github.com/repos/fabmiz/osf.io/issues/events{/number}","events_url":"https://api.github.com/repos/fabmiz/osf.io/events","assignees_url":"https://api.github.com/repos/fabmiz/osf.io/assignees{/user}","branches_url":"https://api.github.com/repos/fabmiz/osf.io/branches{/branch}","tags_url":"https://api.github.com/repos/fabmiz/osf.io/tags","blobs_url":"https://api.github.com/repos/fabmiz/osf.io/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/fabmiz/osf.io/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/fabmiz/osf.io/git/refs{/sha}","trees_url":"https://api.github.com/repos/fabmiz/osf.io/git/trees{/sha}","statuses_url":"https://api.github.com/repos/fabmiz/osf.io/statuses/{sha}","languages_url":"https://api.github.com/repos/fabmiz/osf.io/languages","stargazers_url":"https://api.github.com/repos/fabmiz/osf.io/stargazers","contributors_url":"https://api.github.com/repos/fabmiz/osf.io/contributors","subscribers_url":"https://api.github.com/repos/fabmiz/osf.io/subscribers","subscription_url":"https://api.github.com/repos/fabmiz/osf.io/subscription","commits_url":"https://api.github.com/repos/fabmiz/osf.io/commits{/sha}","git_commits_url":"https://api.github.com/repos/fabmiz/osf.io/git/commits{/sha}","comments_url":"https://api.github.com/repos/fabmiz/osf.io/comments{/number}","issue_comment_url":"https://api.github.com/repos/fabmiz/osf.io/issues/comments{/number}","contents_url":"https://api.github.com/repos/fabmiz/osf.io/contents/{+path}","compare_url":"https://api.github.com/repos/fabmiz/osf.io/compare/{base}...{head}","merges_url":"https://api.github.com/repos/fabmiz/osf.io/merges","archive_url":"https://api.github.com/repos/fabmiz/osf.io/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/fabmiz/osf.io/downloads","issues_url":"https://api.github.com/repos/fabmiz/osf.io/issues{/number}","pulls_url":"https://api.github.com/repos/fabmiz/osf.io/pulls{/number}","milestones_url":"https://api.github.com/repos/fabmiz/osf.io/milestones{/number}","notifications_url":"https://api.github.com/repos/fabmiz/osf.io/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/fabmiz/osf.io/labels{/name}","releases_url":"https://api.github.com/repos/fabmiz/osf.io/releases{/id}","deployments_url":"https://api.github.com/repos/fabmiz/osf.io/deployments","created_at":"2017-03-13T18:42:50Z","updated_at":"2017-03-13T18:43:01Z","pushed_at":"2018-02-08T17:01:34Z","git_url":"git://github.com/fabmiz/osf.io.git","ssh_url":"git@github.com:fabmiz/osf.io.git","clone_url":"https://github.com/fabmiz/osf.io.git","svn_url":"https://github.com/fabmiz/osf.io","homepage":"https://osf.io","size":166492,"stargazers_count":0,"watchers_count":0,"language":"Python","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":"develop"}},"base":{"label":"CenterForOpenScience:develop","ref":"develop","sha":"94a56fa43321f063532243676fe35d56a4632f95","user":{"login":"CenterForOpenScience","id":3344584,"avatar_url":"https://avatars1.githubusercontent.com/u/3344584?v=4","gravatar_id":"","url":"https://api.github.com/users/CenterForOpenScience","html_url":"https://github.com/CenterForOpenScience","followers_url":"https://api.github.com/users/CenterForOpenScience/followers","following_url":"https://api.github.com/users/CenterForOpenScience/following{/other_user}","gists_url":"https://api.github.com/users/CenterForOpenScience/gists{/gist_id}","starred_url":"https://api.github.com/users/CenterForOpenScience/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CenterForOpenScience/subscriptions","organizations_url":"https://api.github.com/users/CenterForOpenScience/orgs","repos_url":"https://api.github.com/users/CenterForOpenScience/repos","events_url":"https://api.github.com/users/CenterForOpenScience/events{/privacy}","received_events_url":"https://api.github.com/users/CenterForOpenScience/received_events","type":"Organization","site_admin":false},"repo":{"id":10199599,"name":"osf.io","full_name":"CenterForOpenScience/osf.io","owner":{"login":"CenterForOpenScience","id":3344584,"avatar_url":"https://avatars1.githubusercontent.com/u/3344584?v=4","gravatar_id":"","url":"https://api.github.com/users/CenterForOpenScience","html_url":"https://github.com/CenterForOpenScience","followers_url":"https://api.github.com/users/CenterForOpenScience/followers","following_url":"https://api.github.com/users/CenterForOpenScience/following{/other_user}","gists_url":"https://api.github.com/users/CenterForOpenScience/gists{/gist_id}","starred_url":"https://api.github.com/users/CenterForOpenScience/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CenterForOpenScience/subscriptions","organizations_url":"https://api.github.com/users/CenterForOpenScience/orgs","repos_url":"https://api.github.com/users/CenterForOpenScience/repos","events_url":"https://api.github.com/users/CenterForOpenScience/events{/privacy}","received_events_url":"https://api.github.com/users/CenterForOpenScience/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/CenterForOpenScience/osf.io","description":"Facilitating Open Science","fork":false,"url":"https://api.github.com/repos/CenterForOpenScience/osf.io","forks_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/forks","keys_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/keys{/key_id}","collaborators_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/teams","hooks_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/hooks","issue_events_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/issues/events{/number}","events_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/events","assignees_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/assignees{/user}","branches_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/branches{/branch}","tags_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/tags","blobs_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/git/refs{/sha}","trees_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/git/trees{/sha}","statuses_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/statuses/{sha}","languages_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/languages","stargazers_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/stargazers","contributors_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/contributors","subscribers_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/subscribers","subscription_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/subscription","commits_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/commits{/sha}","git_commits_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/git/commits{/sha}","comments_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/comments{/number}","issue_comment_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/issues/comments{/number}","contents_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/contents/{+path}","compare_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/compare/{base}...{head}","merges_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/merges","archive_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/downloads","issues_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/issues{/number}","pulls_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/pulls{/number}","milestones_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/milestones{/number}","notifications_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/labels{/name}","releases_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/releases{/id}","deployments_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/deployments","created_at":"2013-05-21T15:53:37Z","updated_at":"2018-02-09T06:18:50Z","pushed_at":"2018-02-13T23:43:15Z","git_url":"git://github.com/CenterForOpenScience/osf.io.git","ssh_url":"git@github.com:CenterForOpenScience/osf.io.git","clone_url":"https://github.com/CenterForOpenScience/osf.io.git","svn_url":"https://github.com/CenterForOpenScience/osf.io","homepage":"https://osf.io","size":166940,"stargazers_count":418,"watchers_count":418,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":241,"mirror_url":null,"archived":false,"open_issues_count":227,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":241,"open_issues":227,"watchers":418,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/CenterForOpenScience/osf.io/pulls/8158"},"html":{"href":"https://github.com/CenterForOpenScience/osf.io/pull/8158"},"issue":{"href":"https://api.github.com/repos/CenterForOpenScience/osf.io/issues/8158"},"comments":{"href":"https://api.github.com/repos/CenterForOpenScience/osf.io/issues/8158/comments"},"review_comments":{"href":"https://api.github.com/repos/CenterForOpenScience/osf.io/pulls/8158/comments"},"review_comment":{"href":"https://api.github.com/repos/CenterForOpenScience/osf.io/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/CenterForOpenScience/osf.io/pulls/8158/commits"},"statuses":{"href":"https://api.github.com/repos/CenterForOpenScience/osf.io/statuses/594d1ca24ea3a6c123c3312df0b807bc19bb152d"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"alexschiller"}}