UAL-RE / LD-Cool-P

Python tool to enable data curation
MIT License
4 stars 5 forks source link

Enhancement: Dump JSON metadata from Qualtrics API #226

Closed astrochun closed 3 years ago

astrochun commented 3 years ago

Description

This feature will write the Qualtrics metadata for the deposit agreement, as well as, the Figshare+Qualtrics metadata for the README form.

Closes #160

ToDo List

Test plan

Testing already indicated in the issue

Update Changelog

Resources

Screenshots or additional context

Here is the result of retrieving a dataset and updating it:

For the Qualtrics Deposit Agreement: ``` 14:10:12 - INFO: ** CREATING CURATION REVIEW REPORT ** 14:10:12 - INFO: Creating folder : ****/1.ToDo/Martha_Farella_12904412/v1/UAL_RDM 14:10:12 - INFO: Saving ReDATA Curation Report to: ****/1.ToDo/Martha_Farella_12904412/v1/UAL_RDM 14:10:12 - INFO: Saving as : ReDATA-DepositReview_Martha_Farella_12904412_v1.docx 14:10:13 - INFO: 14:10:13 - INFO: ** RETRIEVING DEPOSIT AGREEMENT ** 14:10:18 - INFO: Attempting to identify using article_id or curation_id ... 14:10:18 - INFO: Unique match based on article_id or curation_id ! 14:10:18 - INFO: 14:10:18 - INFO: ** SAVING QUALTRICS METADATA ** 14:10:18 - INFO: Writing: ****/1.ToDo/Martha_Farella_12904412/v1/METADATA/deposit_agreement_original_12904412.json ``` For the README metadata: ``` 14:10:44 - INFO: Saving Main.md template in METADATA ... 14:10:44 - INFO: Source file name: ****/LD_Cool_P/ldcoolp/curation/inspection/readme/templates/Main.md 14:10:45 - INFO: Constructing README.txt file based on default template ... 14:10:45 - INFO: Writing file : ****/1.ToDo/Martha_Farella_12904412/v1/DATA/README.txt 14:10:45 - INFO: 14:10:45 - INFO: ** SAVING README METADATA ** 14:10:45 - INFO: Writing: ****/1.ToDo/Martha_Farella_12904412/v1/METADATA/readme_original_12904412.json 14:10:45 - INFO: PROMPT: Do you wish to move deposit to the next curation stage? ``` Also when an update is triggered: ``` 14:15:25 - INFO: ** SELECTING README TEMPLATE ** 14:15:25 - INFO: ****/1.ToDo/Martha_Farella_12904412/v1/METADATA/Main.md exists. Not overwriting template! 14:15:25 - INFO: ****/1.ToDo/Martha_Farella_12904412/v1/METADATA/README_template.md symbolic file link exists. Not overwriting! 14:15:25 - INFO: README.txt changed. Updating! 14:15:25 - INFO: Saving previous copy as : README_2021-06-24T141452.txt 14:15:25 - INFO: Writing updated README.txt file : ****/1.ToDo/Martha_Farella_12904412/v1/DATA/README.txt 14:15:25 - INFO: 14:15:25 - INFO: ** SAVING README METADATA ** 14:15:25 - INFO: Writing: ****/1.ToDo/Martha_Farella_12904412/v1/METADATA/readme_revised_12904412_2021-06-24T141525.json 14:15:25 - INFO: Completed: 12904412 ... 14:15:25 - INFO: Completed: 1 / 1 14:15:25 - INFO: ********************************* ```