Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create data for use in tests #40

Closed
athowes opened this issue May 15, 2024 · 3 comments · Fixed by #41
Closed

Create data for use in tests #40

athowes opened this issue May 15, 2024 · 3 comments · Fixed by #41

Comments

@athowes
Copy link
Collaborator

athowes commented May 15, 2024

I like the idea of moving data simulation into its own vignette. Also want to point out that it's considered a best practice to include a separate data generation script in the /data subdirectory for reproducibility: https://r-pkgs.org/data.html

Originally posted by @kgostic in #9 (comment)

I think that we should have some test data generated with a script in data-raw that is saved to the package. Perhaps it should only be accessible internally. I'm reading https://r-pkgs.org/data.html to figure out how to best do this. Then many tests can just import that data without generating it.

@seabbs
Copy link
Contributor

seabbs commented May 15, 2024

Agree. You can also look at .... epinowcast for some thoughts on how to do this (though maybe not the best thoughts).

@athowes
Copy link
Collaborator Author

athowes commented May 15, 2024

for some thoughts on how to do this

As in have it in data/? And it be accessible?

@seabbs
Copy link
Contributor

seabbs commented May 15, 2024

No - see the PR but CRAN often pushes back against this https://stackoverflow.com/questions/13463103/inst-and-extdata-folders-in-r-packaging

I don't have a strong opinion on this but CRAN often does.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants