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

zip_paper creates incomplete submissions #69

Open
s-u opened this issue Jun 20, 2023 · 2 comments
Open

zip_paper creates incomplete submissions #69

s-u opened this issue Jun 20, 2023 · 2 comments

Comments

@s-u
Copy link
Member

s-u commented Jun 20, 2023

zip_paper is very misleading as it doesn't create valid submissions unless the files follow very specific naming conventions which are not documented. It doesn't include any dependencies used in the sources such as images unless they happen to be in a sub-directory with name in it (since all it does is to use name as regexp). This causes issues with common conventions such as figures in the figures or images folder. Also the ZIP file does not include files necessary for the LaTeX rendering.

  • the requirements should be documented such that it is clear where the sources have to reside for zip_paper to work. Ideally it would be nice if it could find the location of included files such as images automatically
  • the ZIP file should include both html and LaTeX artifacts (possibly creating them if not present) such that the submissions can processed directly with pdflatex
  • it would be helpful to check that the resulting ZIP file is complete (i.e. test that both html and tex rendering works on the result)
@huizezhang-sherry
Copy link
Collaborator

huizezhang-sherry commented Jun 29, 2023

Hi Simon,

Apologise for the late reply.

Additional files like figures or data can be included in the zip with the argument others. For example, rjtools::zip_paper(NAME, others = c("figs", "data/xxx.rda")) will include all the figures under the figs folder and the xxx.rda data in the zip. I think the argument can have a better name, say, inlcude and better documentation.

Another option is to auto-detect commonly used image folder names (img, figures, images, etc) and ask users whether they would like to include them.

@s-u
Copy link
Member Author

s-u commented Jun 29, 2023

Yes, definitely better documentation should be the first step, in particular since this is supposed to be function to prepare submissions. I'm still a bit uneasy about the approach of using substring search to pick files - I think it would be better to define some guidelines on the structure instead - like R packages where we have well-defined directory names and structure for contents that is to be submitted.

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