UAL-RE / LD-Cool-P

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

Bug: update_readme fails due to issue with saving README metadata as JSON file #240

Closed zoidy closed 3 years ago

zoidy commented 3 years ago

Describe the bug When running update_readme for item in the 2.UnderReview returns an error because the software is ~trying to find the deposit in the folder 1.ToDo instead of 2.UnderReview~ attempting to write a file in the 1.Todo instead of 2.UnderReview.

Reproduction Steps Run update_readme XXXXXXXX. If you move the folder for XXXXXXXX manually to 1.ToDo and run the update_readme, it works. Moving it back to 2.UnderReview using move_next and running update_readme again causes the error to happen again.

Outputted Messages

FileNotFoundError: [Errno 2] No such file or directory: '/mnt/block1_sfo2/curation/1.ToDo/Joseph_Iuliano_14849762/v01/METADATA/deposit_agreement_original_14849762.json'

Version information

Expected behavior The readme is updated appropriately.

Additional context Perhaps it has something to do with the fact that this deposit was retrieved using get_metadata?

Implemented in: TBD

astrochun commented 3 years ago

Generally, update_readme checks for the current path of files. But I'm not sure why it selected 1.ToDo. The logs from 07/13 suggests that the move was made so it went from 1.ToDo to 2.UnderReview.

Update: I was able to re-create the issue. The issue stems from retrieving README form metadata and it's not in ReadmeClass. Specifically the bug is in Qualtrics.save_metadata with a hard coding to "1.ToDo". To rectify this, using the MoveClass.get_source_stage method should rectify this issue. This is a regression from addressing #160 (via #226)