Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Develop #149

Merged
merged 6 commits into from
May 2, 2017
Merged

Develop #149

merged 6 commits into from
May 2, 2017

Conversation

akash314
Copy link

Added Image type field to SubjectFile and api to get information about all uploaded files

@coveralls
Copy link

Coverage Status

Coverage increased (+1.8%) to 64.885% when pulling 2f2ad14 on akash314:develop into 8812630 on ctsit:develop.

Copy link
Contributor

@PFWhite PFWhite left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great job overall! Needs a bit of fixing up

@@ -352,7 +352,8 @@ def mysql_create_tables():
'002/upgrade.sql',
'002/data.sql',
'003/upgrade.sql',
'004/upgrade.sql']
'004/upgrade.sql',
'005/upgrade.sql' ]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

formatting

@@ -377,7 +378,8 @@ def mysql_drop_tables():
abort(colors.red("Unable to drop tables in database '%(db_name)s'."
"The database does not exist" % env))

files = ['004/downgrade.sql',
files = ['005/downgrade.sql',
'004/downgrade.sql',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

formatting

@@ -100,7 +101,8 @@ def serialize(self):
'file_name': self.file_name,
'file_check_sum': self.file_check_sum,
'file_size': self.file_size,
'uploaded_at': utils.localize_est_datetime(self.uploaded_at),
'file_type': self.file_type,
'uploaded_at': utils.localize_est_datetime(self.uploaded_at),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

formatting

#@login_required
def all_files_info():
""" Get the list of all uploaded files and their path """

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

formatting, delete this line

return_list = []
for subject_file in all_files:
path = subject_file.get_full_path(app.config['REDIDROPPER_UPLOAD_SAVED_DIR'])
file_json = subject_file.serialize()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The serialize function used here needs work. Right now it doesnt contain the new fields that you add in this story. Also some of the information is commented out in that code. You should delete it.

Also make sure that when you are returning the event, return the "unique_event_name" this is the foreign key that we typically use.

@@ -15,6 +15,7 @@
<link href="{{ url_for('static', filename='css/layout.css') }}" rel="stylesheet">
<link href="{{ url_for('static', filename='css/start_upload.css') }}" rel="stylesheet">
<link href="{{ url_for('static', filename='css/parallax.css') }}" rel="stylesheet">
<link href="{{ url_for('static', filename='css/dashboard.css') }}" rel="stylesheet">
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why was this needed?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

css for Image-type drop down

@@ -116,7 +117,8 @@ def create_sample_data(self):
subject_id=subject.id,
event_id=fdata['event'],
file_name=fdata['name'],
file_check_sum=utils.compute_text_md5(fdata['name']),
file_type="N/A",
file_check_sum=utils.compute_text_md5(fdata['name']),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

formatting

event_id=fdata['event'],
file_name=fdata['name'],
file_type="N/A",
file_check_sum=utils.compute_text_md5(fdata['name']),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

formatting

@@ -84,6 +91,54 @@ def test_edit_user(self):
self.fail('user not existing')
print('edit user test')

def test_update_fileType(self):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great job on this unit test! Meaningful, useful and complete

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thank you!

@@ -80,7 +80,10 @@ function install_dropper() {
mysql ctsi_dropper_s < db/003/upgrade.sql
log "Execute sql: db/004/upgrade.sql"
mysql ctsi_dropper_s < db/004/upgrade.sql

log "Execute sql: db/005/upgrade.sql"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

formatting

@coveralls
Copy link

Coverage Status

Coverage increased (+1.9%) to 64.975% when pulling abd689a on akash314:develop into 8812630 on ctsit:develop.

@coveralls
Copy link

Coverage Status

Coverage increased (+1.9%) to 64.975% when pulling 413c20d on akash314:develop into 8812630 on ctsit:develop.

@akash314
Copy link
Author

akash314 commented May 1, 2017

I have addressed the review comments.

@PFWhite
Copy link
Contributor

PFWhite commented May 2, 2017

Great job! merging

@PFWhite PFWhite merged commit 937d23f into ctsit:develop May 2, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants