Remove columns 'description' and 'origin_id'.

They are useless.
This commit is contained in:
Valentin Lorentz 2019-06-18 17:09:33 +02:00
parent 83b3a75f11
commit aef7d5952e
9 changed files with 1 additions and 10 deletions

View file

@ -28,7 +28,6 @@ class BitBucketLister(SWHIndexingHttpLister):
'html_url': repo['links']['html']['href'],
'origin_url': repo['links']['clone'][0]['href'],
'origin_type': repo['scm'],
'description': repo['description']
}
def get_next_target_from_response(self, response):

View file

@ -29,12 +29,10 @@ class ModelBase(SQLBase, metaclass=ABCSQLMeta):
html_url = Column(String)
origin_url = Column(String)
origin_type = Column(String)
description = Column(String)
last_seen = Column(DateTime, nullable=False)
task_id = Column(Integer)
origin_id = Column(Integer)
def __init__(self, **kw):
kw['last_seen'] = datetime.now()

View file

@ -161,7 +161,7 @@ class HttpListerTesterBase(abc.ABC):
self.assertIsInstance(di, dict)
pubs = [k for k in vars(fl.MODEL).keys() if not k.startswith('_')]
for k in pubs:
if k not in ['last_seen', 'task_id', 'origin_id', 'id']:
if k not in ['last_seen', 'task_id', 'id']:
self.assertIn(k, di)
def disable_scheduler(self, fl):

View file

@ -76,7 +76,6 @@ class CRANLister(SimpleLister):
'html_url': project_url,
'origin_url': project_url,
'origin_type': 'cran',
'description': repo["Description"]
}
def transport_response_simplified(self, response):

View file

@ -25,7 +25,6 @@ class GitHubLister(SWHIndexingHttpLister):
'html_url': repo['html_url'],
'origin_url': repo['html_url'],
'origin_type': 'git',
'description': repo['description'],
'fork': repo['fork'],
}

View file

@ -130,7 +130,6 @@ class GNULister(SimpleLister):
'origin_url': repo['url'],
'time_last_updated': repo['time_modified'],
'origin_type': 'gnu',
'description': None,
}
def transport_response_simplified(self, response):

View file

@ -45,7 +45,6 @@ class NpmListerBase(SWHIndexingHttpLister):
'html_url': package_metadata_url,
'origin_url': package_url,
'origin_type': 'npm',
'description': None
}
def task_dict(self, origin_type, origin_url, **kwargs):

View file

@ -83,7 +83,6 @@ class PhabricatorLister(SWHIndexingHttpLister):
'full_name': repo['fields']['name'],
'html_url': url,
'origin_url': url,
'description': None,
'origin_type': repo['fields']['vcs'],
'instance': self.instance,
}

View file

@ -67,7 +67,6 @@ class PyPILister(ListerOnePageApiTransport, SimpleLister):
'html_url': project_url_meta,
'origin_url': project_url,
'origin_type': 'pypi',
'description': None,
}
def transport_response_simplified(self, response):