cjvanlissa / worcs

Rstudio project template and convenience functions for the Workflow for Open Reproducible Code in Science (WORCS)
https://cjvanlissa.github.io/worcs/
GNU General Public License v3.0
76 stars 11 forks source link

load_data() gives error when reproducing worcs project #132

Open DominiqueMaciejewski opened 1 year ago

DominiqueMaciejewski commented 1 year ago

Hi all,

I am running into an issue with the worcs package. I just wanted to see whether my project could be reproduced. However, when I download the project from GitHub and run the load_data() command, I get this error message:

Error in check_sum(fn_this_file, worcsfile$checksums[[data_name_this_file]]) : 
  Checksum for file 'xxx/ER_Flex_TyM-master/RESSEMA_df.csv' did not match the checksum on record (in '.worcs'). This means that the file has changed since the checksum was stored.

I do not get this error message, when I use load_data() in my original folder. Plus, when I manually copy and paste the codebook and datasets into the downloaded folder, then I can also run load_data() without any issues.

Do you have any idea where it goes wrong? I have the latest commits on Github.

Thanks in advance and let me know what additional info you'd need.

cjvanlissa commented 1 year ago

Yes, I think this is because Git changes the line endings of text files, which changes their checksum. In the new version of CRAN, we compute check sums in a way that (tries to) circumvent Git's changes to line endings. Can you update your checksums with the new version, and try again?

DominiqueMaciejewski commented 1 year ago

I just updated worcs to version 0.1.11, but the problem still persists. Additionally, now when I manually copy codebook and datasets into the downloaded folder, I cannot run load_data() without issues anymore (that worked in the previous version).

To clarify, I repeated the steps of saving the data using open_data()/ closed_data(), recommitted, and then downloaded the folder from Github again

cjvanlissa commented 1 year ago

Are you at the office? Maybe we can have a look at it together tomorrow?

DominiqueMaciejewski commented 1 year ago

Yes, I am there tomorrow the whole day, free from 10 onwards. Let me know, and I can walk by your office.

cjvanlissa commented 1 year ago

Perfect :) How about 11?

DominiqueMaciejewski commented 1 year ago

Perfect :) see you then and thanks!!