Skip to content

Commit

Permalink
call github name
Browse files Browse the repository at this point in the history
  • Loading branch information
hpiwowar committed Sep 25, 2015
1 parent c1b0c82 commit 05a06bd
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 124 deletions.
3 changes: 0 additions & 3 deletions models/contribution.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,6 @@ class Contribution(db.Model):
person_id = db.Column(db.Integer, db.ForeignKey("person.id"))
package_id = db.Column(db.Text, db.ForeignKey("package.id"))

#person = db.relationship("Person", backref="contributions")
#package = db.relationship("Package", backref="contributions")

role = db.Column(db.Text)
quantity = db.Column(db.Integer)
percent = db.Column(db.Float)
Expand Down
11 changes: 0 additions & 11 deletions models/cran_package.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,17 +50,6 @@ def save_host_contributors(self):
self._save_contribution(person, "author")



def _remove_all_authors_cruft(self, all_authors):
return all_authors

def _extract_author_strings(self, all_authors):
return []

def _name_and_email_from_author_str(self, author_str):
return [None, None]


def set_github_repo_ids(self):
q = db.session.query(GithubRepo.login, GithubRepo.repo_name)
q = q.filter(GithubRepo.language == 'r')
Expand Down
3 changes: 3 additions & 0 deletions models/person.py
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,9 @@ def get_or_make_person(**kwargs):
else:
print u"minting a new person using {}".format(kwargs)
new_person = Person(**kwargs)

# do these things now so that can use them to detect dedups later this run
new_person.set_github_about_() # also sets name so has to go first
new_person.set_parsed_name()
db.session.add(new_person)

Expand Down
110 changes: 0 additions & 110 deletions models/profile.py

This file was deleted.

23 changes: 23 additions & 0 deletions test/test_cran_package.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
from models import cran_package
from test.utils import http

import unittest
from nose.tools import assert_equals
from nose.tools import assert_not_equals
from nose.tools import assert_true
from nose.tools import assert_items_equal


class TestCranPackage(unittest.TestCase):
pass
# @http
# def test_get_tags(self):
# response = cran_package.get_tags("knitr")
# expected = ['ReproducibleResearch']
# assert_equals(response, expected)

# response = cran_package.get_tags("MASS")
# expected = ['Distributions', 'Econometrics', 'Environmetrics', 'Multivariate', 'NumericalMathematics', 'Pharmacokinetics', 'Psychometrics', 'Robust', 'SocialSciences']
# assert_equals(response, expected)


0 comments on commit 05a06bd

Please sign in to comment.