RSE-Sheffield / fair4rs-lesson-setup

Instructions for setting up a lesson repository for the University of Sheffield FAIR4RS training programme
Creative Commons Attribution 4.0 International
1 stars 0 forks source link

patch failed: config.yaml:17 #24

Closed ubdbra001 closed 3 months ago

ubdbra001 commented 4 months ago

Hi @tdjames1

I tried following the instructions, got to applying the patch and received the following message:

error: CITATION.cff: already exists in index
error: patch failed: config.yaml:17
error: config.yaml: patch does not apply

I'm on windows and I started with the Rmd template from the carpentries if that makes any difference.

Thanks,

Dan

tdjames1 commented 4 months ago

Thanks for noting this error, it's because the carpentries template has been adjusted to include a CITATION.cff file which it didn't at the time of developing the patch file (see #23). A quick fix would be to remove lines 1-30 inclusive of the patch file, then edit the CITATION.cff with the info indicated in that section of the patch file.

ubdbra001 commented 3 months ago

Got it, will give that a go and report back. Thanks!

ubdbra001 commented 3 months ago

Had a go and that fixes the first part of the error:

error: CITATION.cff: already exists in index

The second part remained:

error: patch failed: config.yaml:17
error: config.yaml: patch does not apply

I had a bit of a tinker with it and it's because there's been a change to config.yaml that means that patch doesn't match up any more. Once I added the additional text it worked okay.

Would it be worth me regenerating the patch given I'm going to have to make these changes to my repo anyway?

tdjames1 commented 3 months ago

If you'd be happy to do it that would be great!

I created the patch by creating a repo from the workbench template, making the various changes then running:

git diff daa55ad6609e.. > fair4rs_config.patch

where the daa55ad commit was the initial commit i.e. the unmodified workbench template.