inbo / checklist

An R package for checking R packages and R code
https://inbo.github.io/checklist
GNU General Public License v3.0
16 stars 2 forks source link

Update citation_meta_class.R #117

Closed hansvancalster closed 7 months ago

hansvancalster commented 8 months ago

This should fix a bug where .zenodo.json file was incorrectly flagged as modified. The relative path to the file should be relative to the root of the git repository. This failed in cases where meta$get_path is a child directory beneath the git root repository. The gert package uses gert::git_find to find the git parent directory in case a child directory is passed to the repo = argument. So the proposed change should make sure that the file argument in is_tracked_not_modified is relative to the path passed to its repo argument (which gets passed down to repo argument of gert functions and thus resolve to gert::git_find(repo).

hansvancalster commented 7 months ago

I just noticed that there is a problem with this fix in case the project is not a git version controlled project. At least, I think that is the reason why the unit test test_e_bookdown_zenodo.R fails.

hansvancalster commented 7 months ago

I just noticed that there is a problem with this fix in case the project is not a git version controlled project. At least, I think that is the reason why the unit test test_e_bookdown_zenodo.R fails.

Fixed in bb0fc57. The one failing test seems unrelated to changes in this PR?

ThierryO commented 7 months ago

The failing unit test is due to a problem with zen4R.

hansvancalster commented 7 months ago

Anything else that needs to be done for this PR? I think it's ready to be merged in bugfix branch.