-
Notifications
You must be signed in to change notification settings - Fork 11
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
Develop #149
Conversation
There was a problem hiding this 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
app/deploy/fabfile.py
Outdated
@@ -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' ] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
formatting
app/deploy/fabfile.py
Outdated
@@ -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', |
There was a problem hiding this comment.
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), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
formatting
app/redidropper/routes/api.py
Outdated
#@login_required | ||
def all_files_info(): | ||
""" Get the list of all uploaded files and their path """ | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
formatting, delete this line
app/redidropper/routes/api.py
Outdated
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() |
There was a problem hiding this comment.
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"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why was this needed?
There was a problem hiding this comment.
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
app/tests/base_test_with_data.py
Outdated
@@ -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']), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
formatting
app/tests/test_api.py
Outdated
event_id=fdata['event'], | ||
file_name=fdata['name'], | ||
file_type="N/A", | ||
file_check_sum=utils.compute_text_md5(fdata['name']), |
There was a problem hiding this comment.
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): |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thank you!
vagrant/bootstrap_functions.sh
Outdated
@@ -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" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
formatting
I have addressed the review comments. |
Great job! merging |
Added Image type field to SubjectFile and api to get information about all uploaded files