config.py 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. # main imports
  2. import os
  3. # env variables
  4. WEB_API_PREFIX_URL_KEY = 'WEB_API_PREFIX_URL'
  5. WEB_API_PREFIX_URL = os.environ.get(WEB_API_PREFIX_URL_KEY) \
  6. if os.environ.get(WEB_API_PREFIX_URL_KEY) is not None else 'api'
  7. # api variables
  8. DIRAN_DOMAIN_NAME = "https://diran.univ-littoral.fr/"
  9. GET_SCENE_QUALITIES_API_URL = DIRAN_DOMAIN_NAME + WEB_API_PREFIX_URL + "/listSceneQualities?sceneName={0}"
  10. GET_SCENE_IMAGE_API_URL = DIRAN_DOMAIN_NAME + WEB_API_PREFIX_URL + "/getImage?sceneName={0}&imageQuality={1}"
  11. GET_SCENES_API_URL = DIRAN_DOMAIN_NAME + WEB_API_PREFIX_URL + "/listScenes"
  12. # folder variables
  13. model_expe_folder = "expes_models/{0}/{1}"
  14. output_expe_folder = "expes_results"
  15. output_expe_folder_name_day = "expes_results/{0}/{1}"
  16. output_tmp_folder = "tmp"
  17. # expes list
  18. expe_name_list = ["quest_one_image"]
  19. # configure experiences labels
  20. expes_configuration = {
  21. # First experience configuration
  22. 'quest_one_image':{
  23. 'text':{
  24. 'question': "Do you see one image or a composition of more than one?",
  25. 'indication': "press left if you see one image, right if not",
  26. 'end_text': "Experience is finished. Thanks for your participation",
  27. },
  28. 'params':{
  29. 'iterations': 10
  30. },
  31. 'session_params': [
  32. 'expe_percentage',
  33. 'expe_orientation',
  34. 'expe_position',
  35. 'expe_stim',
  36. 'expe_previous_iteration'
  37. ],
  38. # template file used in django `expe` route
  39. 'template': 'expe/expe.html',
  40. # javascript file used
  41. 'js':[
  42. 'loadImg.js',
  43. 'keyEvents.js'
  44. ],
  45. 'output_header':
  46. "stimulus;name_stimulus;cropping_percentage;orientation;image_ref_position;answer;time_reaction;entropy\n"
  47. }
  48. }