Skip to content

Commit

Permalink
[Form Builder] Added documentation and fixes for presigning of S3 URLs
Browse files Browse the repository at this point in the history
  • Loading branch information
meta-paul committed Feb 14, 2024
1 parent 2beefdb commit 7537bae
Show file tree
Hide file tree
Showing 57 changed files with 347 additions and 144 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions data_for_review/data/runs/NO_PROJECT/1/1/1/agent_meta.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"task_start": 1707937389.27229, "task_end": 1707937421.1177907, "tips": null, "feedback": null}
1 change: 1 addition & 0 deletions data_for_review/data/runs/NO_PROJECT/1/1/1/state.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"inputs": {"form": {"title": "Form example", "instruction": "<p>Please answer <b>all</b> questions to the best of your ability as part of our study.</p><p>This is an example of how a completed task may look like: <img src=\"{{getMultiplePresignedUrls(\"https://dev-alented-private.s3.amazonaws.com/mephisto/help_page.png\")}}\" /></p>.", "sections": [{"name": "section_about", "title": "About you", "instruction": "<p>Please introduce yourself. We would like to know more about your:</p><ul><li>Background</li><li>Personal information</li><li>Etc</li></ul>", "collapsable": false, "fieldsets": [{"title": "Personal information", "instruction": "", "rows": [{"fields": [{"help": "", "id": "id_name_first", "label": "First name", "name": "name_first", "placeholder": "Type first name", "tooltip": "Your first name", "type": "input", "validators": {"required": true, "minLength": 2, "maxLength": 20}, "value": ""}, {"help": "", "id": "id_name_last", "label": "Last name", "name": "name_last", "placeholder": "Type last name", "tooltip": "Your last name", "type": "input", "validators": {"required": true}, "value": ""}], "help": "Please use your legal name"}, {"fields": [{"help": "We may contact you later at your Mephisto email for additional information", "id": "id_email", "label": "Email address for Mephisto", "name": "email", "placeholder": "user@mephisto.ai", "tooltip": "Email address for Mephisto", "type": "email", "validators": {"required": true, "regexp": ["^[a-zA-Z0-9._-]+@mephisto\\.ai$", "ig"]}, "value": ""}]}]}, {"title": "Cultural background", "instruction": "Please tell us about your cultural affiliations and values that you use in your daily life.", "rows": [{"fields": [{"help": "Select country of your residence", "id": "id_country", "label": "Country", "multiple": false, "name": "country", "options": [{"label": "---", "value": ""}, {"label": "United States of America", "value": "USA"}, {"label": "Canada", "value": "CAN"}], "placeholder": "", "tooltip": "Country", "type": "select", "validators": {"required": true}, "value": ""}, {"help": "Select language spoken in your local community", "id": "id_language", "label": "Language", "multiple": true, "name": "language", "options": [{"label": "English", "value": "en"}, {"label": "French", "value": "fr"}, {"label": "Spanish", "value": "es"}, {"label": "Chinese", "value": "ch"}], "placeholder": "", "tooltip": "Language", "type": "select", "validators": {"required": true, "minLength": 2, "maxLength": 3}, "value": ""}]}], "help": "This information will help us compile study statistics"}, {"title": "Additional information", "instruction": "Optional details about you. You can fill out what you are most comfortable with.", "rows": [{"fields": [{"help": "", "id": "id_bio", "label": "Biography since age of 18", "name": "bio", "placeholder": "", "tooltip": "Your bio in a few paragraphs", "type": "textarea", "validators": {"required": false}, "value": ""}]}, {"fields": [{"help": "", "id": "id_skills", "label": "Technical Skills", "name": "skills", "options": [{"checked": false, "label": "React", "value": "react"}, {"checked": true, "label": "JavaScript", "value": "javascript"}, {"checked": false, "label": "Python", "value": "python"}, {"checked": false, "label": "SQL", "value": "sql"}], "tooltip": "Technical skills you may possess", "type": "checkbox", "validators": {"required": true, "minLength": 2, "maxLength": 3}}]}, {"fields": [{"help": "", "id": "id_kids", "label": "How many children do you have?", "name": "kids", "options": [{"checked": false, "label": "None", "value": "0"}, {"checked": false, "label": "One", "value": "1"}, {"checked": false, "label": "Two", "value": "2"}, {"checked": false, "label": "Three or more", "value": ">=3"}], "tooltip": "How many children do you have?", "type": "radio", "validators": {"required": true}}]}, {"fields": [{"help": "We only accept files in PNG, JPG, and JPEG formats.", "id": "id_avatar", "label": "Profile Picture", "name": "avatar", "placeholder": "Select a file", "tooltip": "Your profile photo", "type": "file", "validators": {"required": true, "fileExtension": ["png", "jpg", "jpeg"]}, "value": ""}, {"help": "", "id": "id_resume", "label": "Resume", "name": "resume", "placeholder": "Select a file", "tooltip": "Your current resume", "type": "file", "validators": {"required": false}, "value": ""}]}], "help": "Some additional details about your persona"}]}, {"name": "section_second", "title": "Second section", "instruction": "Example of another section", "initially_collapsed": true, "fieldsets": [{"title": "Motivation", "instruction": "", "rows": [{"fields": [{"id": "id_motto", "label": "Personal Motto", "name": "motto", "tooltip": "Your personal motto", "type": "input", "validators": {"required": true}}], "help": "Please type in your favorite personal motto"}]}]}], "submit_button": {"instruction": "<i>Please double-check if everything has been filled in correctly.</i>", "text": "Submit", "tooltip": "Submit form"}}}, "outputs": {"final_submission": {"name_first": "Qwe", "name_last": "Qwe", "email": "qwe@mephisto.ai", "country": "USA", "language": ["es", "ch"], "bio": "", "skills": {"react": true, "javascript": true, "python": false, "sql": false}, "kids": "1", "avatar": {"lastModified": 1706823899460, "name": "tasks_list.png", "size": 24026, "type": "image/png"}, "resume": "", "motto": "dasdasdasdasdas", "files": [{"fieldname": "avatar", "originalname": "tasks_list.png", "encoding": "7bit", "mimetype": "image/png", "destination": "/tmp/", "filename": "1707937420876-663375665-avatar-tasks_list.png", "path": "/tmp/1707937420876-663375665-avatar-tasks_list.png", "size": 24026}]}, "requests": [{"uuid": "7daac7d7-fdb0-4a7d-bc92-958259a49daf", "target": "getMultiplePresignedUrls", "args_json": "[\"https://dev-alented-private.s3.amazonaws.com/mephisto/help_page.png\"]", "response_json": null, "timestamp": 1707937390.490068}, {"uuid": "64546bc2-86cb-4d1e-8055-c924b0e668bb", "target": "7daac7d7-fdb0-4a7d-bc92-958259a49daf", "args_json": null, "response_json": "[[\"https://dev-alented-private.s3.amazonaws.com/mephisto/help_page.png\", \"https://dev-alented-private.s3.amazonaws.com/mephisto/help_page.png?response-content-type=image%2Fpng&AWSAccessKeyId=AKIAS56YDPVYGCIDIE5K&Signature=YsLmUFwnormybZf8U0pTR3on1%2BA%3D&Expires=1707937510\"]]", "timestamp": 1707937390.5208004}]}, "start_time": 1707937389.27229, "end_time": 1707937421.1177907}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions data_for_review/data/runs/NO_PROJECT/1/1/2/agent_meta.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"task_start": 1707937484.8482091, "task_end": 1707937511.707398, "tips": null, "feedback": null}
1 change: 1 addition & 0 deletions data_for_review/data/runs/NO_PROJECT/1/1/2/state.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"inputs": {"form": {"title": "Form example", "instruction": "<p>Please answer <b>all</b> questions to the best of your ability as part of our study.</p><p>This is an example of how a completed task may look like: <img src=\"{{getMultiplePresignedUrls(\"https://dev-alented-private.s3.amazonaws.com/mephisto/help_page.png\")}}\" /></p>.", "sections": [{"name": "section_about", "title": "About you", "instruction": "<p>Please introduce yourself. We would like to know more about your:</p><ul><li>Background</li><li>Personal information</li><li>Etc</li></ul>", "collapsable": false, "fieldsets": [{"title": "Personal information", "instruction": "", "rows": [{"fields": [{"help": "", "id": "id_name_first", "label": "First name", "name": "name_first", "placeholder": "Type first name", "tooltip": "Your first name", "type": "input", "validators": {"required": true, "minLength": 2, "maxLength": 20}, "value": ""}, {"help": "", "id": "id_name_last", "label": "Last name", "name": "name_last", "placeholder": "Type last name", "tooltip": "Your last name", "type": "input", "validators": {"required": true}, "value": ""}], "help": "Please use your legal name"}, {"fields": [{"help": "We may contact you later at your Mephisto email for additional information", "id": "id_email", "label": "Email address for Mephisto", "name": "email", "placeholder": "user@mephisto.ai", "tooltip": "Email address for Mephisto", "type": "email", "validators": {"required": true, "regexp": ["^[a-zA-Z0-9._-]+@mephisto\\.ai$", "ig"]}, "value": ""}]}]}, {"title": "Cultural background", "instruction": "Please tell us about your cultural affiliations and values that you use in your daily life.", "rows": [{"fields": [{"help": "Select country of your residence", "id": "id_country", "label": "Country", "multiple": false, "name": "country", "options": [{"label": "---", "value": ""}, {"label": "United States of America", "value": "USA"}, {"label": "Canada", "value": "CAN"}], "placeholder": "", "tooltip": "Country", "type": "select", "validators": {"required": true}, "value": ""}, {"help": "Select language spoken in your local community", "id": "id_language", "label": "Language", "multiple": true, "name": "language", "options": [{"label": "English", "value": "en"}, {"label": "French", "value": "fr"}, {"label": "Spanish", "value": "es"}, {"label": "Chinese", "value": "ch"}], "placeholder": "", "tooltip": "Language", "type": "select", "validators": {"required": true, "minLength": 2, "maxLength": 3}, "value": ""}]}], "help": "This information will help us compile study statistics"}, {"title": "Additional information", "instruction": "Optional details about you. You can fill out what you are most comfortable with.", "rows": [{"fields": [{"help": "", "id": "id_bio", "label": "Biography since age of 18", "name": "bio", "placeholder": "", "tooltip": "Your bio in a few paragraphs", "type": "textarea", "validators": {"required": false}, "value": ""}]}, {"fields": [{"help": "", "id": "id_skills", "label": "Technical Skills", "name": "skills", "options": [{"checked": false, "label": "React", "value": "react"}, {"checked": true, "label": "JavaScript", "value": "javascript"}, {"checked": false, "label": "Python", "value": "python"}, {"checked": false, "label": "SQL", "value": "sql"}], "tooltip": "Technical skills you may possess", "type": "checkbox", "validators": {"required": true, "minLength": 2, "maxLength": 3}}]}, {"fields": [{"help": "", "id": "id_kids", "label": "How many children do you have?", "name": "kids", "options": [{"checked": false, "label": "None", "value": "0"}, {"checked": false, "label": "One", "value": "1"}, {"checked": false, "label": "Two", "value": "2"}, {"checked": false, "label": "Three or more", "value": ">=3"}], "tooltip": "How many children do you have?", "type": "radio", "validators": {"required": true}}]}, {"fields": [{"help": "We only accept files in PNG, JPG, and JPEG formats.", "id": "id_avatar", "label": "Profile Picture", "name": "avatar", "placeholder": "Select a file", "tooltip": "Your profile photo", "type": "file", "validators": {"required": true, "fileExtension": ["png", "jpg", "jpeg"]}, "value": ""}, {"help": "", "id": "id_resume", "label": "Resume", "name": "resume", "placeholder": "Select a file", "tooltip": "Your current resume", "type": "file", "validators": {"required": false}, "value": ""}]}], "help": "Some additional details about your persona"}]}, {"name": "section_second", "title": "Second section", "instruction": "Example of another section", "initially_collapsed": true, "fieldsets": [{"title": "Motivation", "instruction": "", "rows": [{"fields": [{"id": "id_motto", "label": "Personal Motto", "name": "motto", "tooltip": "Your personal motto", "type": "input", "validators": {"required": true}}], "help": "Please type in your favorite personal motto"}]}]}], "submit_button": {"instruction": "<i>Please double-check if everything has been filled in correctly.</i>", "text": "Submit", "tooltip": "Submit form"}}}, "outputs": {"final_submission": {"name_first": "Asdf", "name_last": "Asdf", "email": "asdf@mephisto.ai", "country": "CAN", "language": ["fr", "es"], "bio": "", "skills": {"react": true, "javascript": true, "python": false, "sql": false}, "kids": ">=3", "avatar": {"lastModified": 1706820157399, "name": "submission_reject_dialog.png", "size": 23982, "type": "image/png"}, "resume": "", "motto": "asdf asdf asdf", "files": [{"fieldname": "avatar", "originalname": "submission_reject_dialog.png", "encoding": "7bit", "mimetype": "image/png", "destination": "/tmp/", "filename": "1707937511496-946753397-avatar-submission_reject_dialog.png", "path": "/tmp/1707937511496-946753397-avatar-submission_reject_dialog.png", "size": 23982}]}, "requests": [{"uuid": "e782da6d-0cbb-4091-9e3a-a3eb2df49ead", "target": "getMultiplePresignedUrls", "args_json": "[\"https://dev-alented-private.s3.amazonaws.com/mephisto/help_page.png\"]", "response_json": null, "timestamp": 1707937486.1177983}, {"uuid": "f78fcee9-1e99-4fff-8906-d9e1e6c3d972", "target": "e782da6d-0cbb-4091-9e3a-a3eb2df49ead", "args_json": null, "response_json": "[[\"https://dev-alented-private.s3.amazonaws.com/mephisto/help_page.png\", \"https://dev-alented-private.s3.amazonaws.com/mephisto/help_page.png?response-content-type=image%2Fpng&AWSAccessKeyId=AKIAS56YDPVYGCIDIE5K&Signature=OQL2s7qBOT9nqivmNwU38HgpgYE%3D&Expires=1707937606\"]]", "timestamp": 1707937486.1474278}]}, "start_time": 1707937484.8482091, "end_time": 1707937511.707398}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions data_for_review/data/runs/NO_PROJECT/1/1/3/agent_meta.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"task_start": 1707937564.9948661, "task_end": 1707937631.8736277, "tips": null, "feedback": null}
1 change: 1 addition & 0 deletions data_for_review/data/runs/NO_PROJECT/1/1/3/state.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"inputs": {"form": {"title": "Form example", "instruction": "<p>Please answer <b>all</b> questions to the best of your ability as part of our study.</p><p>This is an example of how a completed task may look like: <img src=\"{{getMultiplePresignedUrls(\"https://dev-alented-private.s3.amazonaws.com/mephisto/help_page.png\")}}\" /></p>.", "sections": [{"name": "section_about", "title": "About you", "instruction": "<p>Please introduce yourself. We would like to know more about your:</p><ul><li>Background</li><li>Personal information</li><li>Etc</li></ul>", "collapsable": false, "fieldsets": [{"title": "Personal information", "instruction": "", "rows": [{"fields": [{"help": "", "id": "id_name_first", "label": "First name", "name": "name_first", "placeholder": "Type first name", "tooltip": "Your first name", "type": "input", "validators": {"required": true, "minLength": 2, "maxLength": 20}, "value": ""}, {"help": "", "id": "id_name_last", "label": "Last name", "name": "name_last", "placeholder": "Type last name", "tooltip": "Your last name", "type": "input", "validators": {"required": true}, "value": ""}], "help": "Please use your legal name"}, {"fields": [{"help": "We may contact you later at your Mephisto email for additional information", "id": "id_email", "label": "Email address for Mephisto", "name": "email", "placeholder": "user@mephisto.ai", "tooltip": "Email address for Mephisto", "type": "email", "validators": {"required": true, "regexp": ["^[a-zA-Z0-9._-]+@mephisto\\.ai$", "ig"]}, "value": ""}]}]}, {"title": "Cultural background", "instruction": "Please tell us about your cultural affiliations and values that you use in your daily life.", "rows": [{"fields": [{"help": "Select country of your residence", "id": "id_country", "label": "Country", "multiple": false, "name": "country", "options": [{"label": "---", "value": ""}, {"label": "United States of America", "value": "USA"}, {"label": "Canada", "value": "CAN"}], "placeholder": "", "tooltip": "Country", "type": "select", "validators": {"required": true}, "value": ""}, {"help": "Select language spoken in your local community", "id": "id_language", "label": "Language", "multiple": true, "name": "language", "options": [{"label": "English", "value": "en"}, {"label": "French", "value": "fr"}, {"label": "Spanish", "value": "es"}, {"label": "Chinese", "value": "ch"}], "placeholder": "", "tooltip": "Language", "type": "select", "validators": {"required": true, "minLength": 2, "maxLength": 3}, "value": ""}]}], "help": "This information will help us compile study statistics"}, {"title": "Additional information", "instruction": "Optional details about you. You can fill out what you are most comfortable with.", "rows": [{"fields": [{"help": "", "id": "id_bio", "label": "Biography since age of 18", "name": "bio", "placeholder": "", "tooltip": "Your bio in a few paragraphs", "type": "textarea", "validators": {"required": false}, "value": ""}]}, {"fields": [{"help": "", "id": "id_skills", "label": "Technical Skills", "name": "skills", "options": [{"checked": false, "label": "React", "value": "react"}, {"checked": true, "label": "JavaScript", "value": "javascript"}, {"checked": false, "label": "Python", "value": "python"}, {"checked": false, "label": "SQL", "value": "sql"}], "tooltip": "Technical skills you may possess", "type": "checkbox", "validators": {"required": true, "minLength": 2, "maxLength": 3}}]}, {"fields": [{"help": "", "id": "id_kids", "label": "How many children do you have?", "name": "kids", "options": [{"checked": false, "label": "None", "value": "0"}, {"checked": false, "label": "One", "value": "1"}, {"checked": false, "label": "Two", "value": "2"}, {"checked": false, "label": "Three or more", "value": ">=3"}], "tooltip": "How many children do you have?", "type": "radio", "validators": {"required": true}}]}, {"fields": [{"help": "We only accept files in PNG, JPG, and JPEG formats.", "id": "id_avatar", "label": "Profile Picture", "name": "avatar", "placeholder": "Select a file", "tooltip": "Your profile photo", "type": "file", "validators": {"required": true, "fileExtension": ["png", "jpg", "jpeg"]}, "value": ""}, {"help": "", "id": "id_resume", "label": "Resume", "name": "resume", "placeholder": "Select a file", "tooltip": "Your current resume", "type": "file", "validators": {"required": false}, "value": ""}]}], "help": "Some additional details about your persona"}]}, {"name": "section_second", "title": "Second section", "instruction": "Example of another section", "initially_collapsed": true, "fieldsets": [{"title": "Motivation", "instruction": "", "rows": [{"fields": [{"id": "id_motto", "label": "Personal Motto", "name": "motto", "tooltip": "Your personal motto", "type": "input", "validators": {"required": true}}], "help": "Please type in your favorite personal motto"}]}]}], "submit_button": {"instruction": "<i>Please double-check if everything has been filled in correctly.</i>", "text": "Submit", "tooltip": "Submit form"}}}, "outputs": {"final_submission": {"name_first": "iop", "name_last": "iop", "email": "iop@mephisto.ai", "country": "CAN", "language": ["fr", "es"], "bio": "", "skills": {"react": true, "javascript": true, "python": true, "sql": false}, "kids": "2", "avatar": {"lastModified": 1689125356688, "name": "pg_for_prolific.png", "size": 33390, "type": "image/png"}, "resume": "", "motto": "uiopiopiopiopiopiop", "files": [{"fieldname": "avatar", "originalname": "pg_for_prolific.png", "encoding": "7bit", "mimetype": "image/png", "destination": "/tmp/", "filename": "1707937630512-896537233-avatar-pg_for_prolific.png", "path": "/tmp/1707937630512-896537233-avatar-pg_for_prolific.png", "size": 33390}]}, "requests": [{"uuid": "e31eda2d-43e2-47fa-b4f7-7e5622df9df1", "target": "getMultiplePresignedUrls", "args_json": "[\"https://dev-alented-private.s3.amazonaws.com/mephisto/help_page.png\"]", "response_json": null, "timestamp": 1707937566.2293427}, {"uuid": "5a1641e9-dfc7-4477-aea2-9f940d637741", "target": "e31eda2d-43e2-47fa-b4f7-7e5622df9df1", "args_json": null, "response_json": "[[\"https://dev-alented-private.s3.amazonaws.com/mephisto/help_page.png\", \"https://dev-alented-private.s3.amazonaws.com/mephisto/help_page.png?response-content-type=image%2Fpng&AWSAccessKeyId=AKIAS56YDPVYGCIDIE5K&Signature=ITYzSZ4nvlFJyWGbQtFhoGyryHo%3D&Expires=1707937686\"]]", "timestamp": 1707937566.2434895}]}, "start_time": 1707937564.9948661, "end_time": 1707937631.8736277}
Loading

0 comments on commit 7537bae

Please sign in to comment.