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

Adjust README to chosen file structure #152

Open
bbartholdy opened this issue Feb 6, 2023 · 1 comment
Open

Adjust README to chosen file structure #152

bbartholdy opened this issue Feb 6, 2023 · 1 comment

Comments

@bbartholdy
Copy link

bbartholdy commented Feb 6, 2023

This is a very small thing and may not be worth implementing, but maybe worth bringing attention.

Following a call to use_readme_rmd(), the generated README will include the ## Contents section with a reference to the analysis directory. However, the user is also given the option to use "inst" and "vignettes" as location arguments in the use_analysis() function. This will result in broken links in the "## Contents" section of the generated README files.

## Contents

The **analysis** directory contains:

- [:file_folder: paper](/analysis/paper): R Markdown source document for
  manuscript. Includes code to reproduce the figures and tables
  generated by the analysis. It also has a rendered version,
  `paper.docx`, suitable for reading (the code is replaced by figures
  and tables in this file)
- [:file_folder: data](/analysis/data): Data used in the analysis.
- [:file_folder: figures](/analysis/figures): Plots and other
  illustrations
- [:file_folder:
  supplementary-materials](/analysis/supplementary-materials):
  Supplementary materials including notes and other documents prepared
  and collected during the analysis.

A quick solution would just be to add a warning that users may need to fix these links when using the "inst" and "vignettes" arguments.

A more comprehensive solution would be to generate the README filepaths based on what structure the user has already implemented (i.e. analysis/ or inst/). Although I'm not sure how feasible this is (for example if the user generates the README before using use_analysis()).

@benmarwick
Copy link
Owner

Yes, good observation, I agree with the need for this, though I have no idea frequently any of the options are used (I'm 'analysis' all the way, what is everyone else doing?). A pull request for the comprehensive solution that you mention would be most welcome!

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

No branches or pull requests

2 participants