epiverse-trace / epidemics

A library of published compartmental epidemic models, and classes to represent demographic structure, non-pharmaceutical interventions, and vaccination regimes, to compose epidemic scenarios.
https://epiverse-trace.github.io/epidemics/
Other
8 stars 2 forks source link

Consolidate `**/.gitignore` files #161

Closed chartgerink closed 6 months ago

chartgerink commented 6 months ago

This PR merges the various .gitignore files in subfolders into the main .gitignore in the root directory of the repository.

It confused me to find multiple .gitignore files spread around the repo. I figured I would open this PR to see whether this is helpful.

I tried finding out what reasons there might be for doing this, but given that these are subfolders are without their one git history (they are not submodules) I did not see a reason to keep them separate.

If there's a specific reason for this, I would love to learn about it. I'll leave it to the code owner to decide what to do and respect that decision 😊

pratikunterwegs commented 6 months ago

Thanks @chartgerink - the separate files are autogenerated by {usethis}, and I trust their logic for where to note files to be ignored for the various use cases. Agreed they migh make it less clear why a particular file one expects to be tracked is not - so I don't mind unifying them if that's a common policy we choose to adopt. I think it's best to leave these files as they are for now though.

pratikunterwegs commented 6 months ago

Just as a note: I used to be in favour of submodules, and I know @joshwlambert has tried them too, but we don't use them in this project and I don't think there's a use case at the moment either.

chartgerink commented 6 months ago

Thanks for the clarification @pratikunterwegs 🙏 I was not aware that it's a usethis thing. Appreciate the feedback 😊

I'll close this PR.

pratikunterwegs commented 6 months ago

No worries - out of curiosity, is it considered best practice to have only one .gitignore? Not sure why {usethis} would depart from that if so.

Also as a note, {epidemics} along with {iraca} is among the more complex projects in terms of organisation. There are a couple of very early blog posts around how we organise and lint Rcpp packages which might help get a handle on it. And there are plenty of general Rcpp resources as well of course.

chartgerink commented 6 months ago

Thanks! I will read those posts - good tip.

There is no hard prescription as to whether multiple or single .gitignore is best practice from git itself. It might vary depending on the specific language and community culture around it.

I only have come across it in the case of submodules myself. By induction, I would think it is best practice but there are too many unknowns for me to say that confidently :-) It seems however that the R community (especially usethis) seems to prefer this structure at the time.