Skip to content

Commit

Permalink
👌 Minor changes from PR review
Browse files Browse the repository at this point in the history
  • Loading branch information
znatty22 committed Feb 16, 2018
1 parent cfdd266 commit 62a4dac
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 9 deletions.
2 changes: 1 addition & 1 deletion dataservice/api/participant/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,4 @@ class Participant(db.Model, Base):
nullable=False)

def __repr__(self):
return '<Participant {}>'.format(self.external_id)
return '<Participant {}>'.format(self.kf_id)
12 changes: 6 additions & 6 deletions dataservice/api/study/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,23 @@

class Study(db.Model, Base):
"""
Study entity representing the dbGap study.
Study entity representing the dbGaP study.
:param kf_id: Unique id given by the Kid's First DCC
:param created_at: Time of object creation
:param modified_at: Last time of object modification
:param data_access_authority: Name of organization which governs data
access
:param external_id: dbGap accession number
:param version: dbGap version
:param external_id: dbGaP accession number
:param version: dbGaP version
:param name: Name or title of study
:param attribution: Link to attribution prose provided by dbGap
:param attribution: Link to attribution prose provided by dbGaP
"""
__tablename__ = "study"

data_access_authority = db.Column(db.Text(),
nullable=False,
default='dbGap')
default='dbGaP')

external_id = db.Column(db.Text(), nullable=False)
version = db.Column(db.Text())
Expand All @@ -33,4 +33,4 @@ class Study(db.Model, Base):
backref='study')

def __repr__(self):
return '<Study {}>'.format(self.external_id)
return '<Study {}>'.format(self.kf_id)
2 changes: 1 addition & 1 deletion dataservice/util/data_gen/data_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def __init__(self, config_name=None):
if not config_name:
config_name = os.environ.get('FLASK_CONFIG', 'default')
self.setup(config_name)
self.max_participants = 1
self.max_participants = 10
self._sample_choices()
self._aliquot_choices()
self._experiment_choices()
Expand Down
1 change: 0 additions & 1 deletion migrations/versions/c23f9043d57b_.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ def upgrade():
sa.UniqueConstraint('kf_id'),
sa.UniqueConstraint('uuid')
)
op.create_unique_constraint(None, 'outcome', ['kf_id'])
op.add_column('participant', sa.Column('study_id', sa.String(length=8), nullable=False))
op.create_foreign_key(None, 'participant', 'study', ['study_id'], ['kf_id'])
# ### end Alembic commands ###
Expand Down

0 comments on commit 62a4dac

Please sign in to comment.