alan-turing-institute / eider

eider: an R package for processing health records declaratively
https://alan-turing-institute.github.io/eider/
Other
2 stars 0 forks source link

Package organisation #2

Closed yongrenjie closed 8 months ago

yongrenjie commented 9 months ago

This PR:


Some notes to check back against, because R packaging is really quite different from what I'm used to:

yongrenjie commented 8 months ago

I think we should avoid editing the roxygen files by hand if we can.

Yup, you're absolutely right! Those files should only be edited by running e.g. devtools::document().

I think the really ideal case would be to gitignore files like NAMESPACE and make the user regenerate it when they clone the repo. The issue with this I think is when we submit to CRAN (and we plan to, right?) those files have to be present for the package to build, so we have to keep them there :x.

We should also think about how to deal with the global variables for the seed. At the moment I think they’re defined in a couple of files (this is my fault) but we should have it somewhere central, obvious and accessible. I don’t think the primary workflow should require random numbers in it, but I think it would be good to make sure it doesn’t/ensure there are no side effects.

I think we can use a function parameter with a default argument. Agreed that it shouldn't need random numbers, I think it's only the data generation bit that uses that.

Do we want to save the “tmp” files in the repo? the fst and the zsav ones?

I'd say not, I gitignore'd them to be safe too.

We should be consistent with naming RE snake_case etc.

Sure! Let's snake_case everything. 🐍