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

added list of tlmgr packages to install as data #233

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ttimbers
Copy link

Based on the conversation in #228 I am submitting this pull request to add a data object named jup_pkgs so that the additional packages required for using {tinytex} with Jupyter can be installed via:

tinytex::install_tinytex(extra_packages = tinytex::jup_pkgs)

A couple of notes:

  • A separate doc PR will need to be sent to yihui/yihui.org to communicate that this exists and how to install {tinytex} to get these packages installed. Can you point me to where you would like this added there in the {tinytex} docs?
  • I am not sure if/how tests should be made for this contribution. Suggestions/direction welcome.
  • What if folks wanted this for Jupyter only, similar to folks who might use the For Other Users approach? Where should I add this list of packages to make this work? I guess an optional bash shell argument for the tools/install-unx.sh script would work for example?

Copy link
Member

@yihui yihui left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • I am not sure if/how tests should be made for this contribution. Suggestions/direction welcome.

Don't worry about it. I don't care in this case.

Thanks!

"upquote"
)

usethis::use_data(jup_pkgs, overwrite = TRUE)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't want to introduce the dependency on usethis only for the purpose of saving a simple vector to .rda and documenting it. I prefer not exporting or documenting jup_pkgs here. That means users will need to use :::, which I think is fine. This is not a super important object anyway.

That said, it will be good to briefly mention it on the TinyTeX documentation site, e.g. after FAQ 12: https://yihui.org/tinytex/faq/

An alternative approach is like this: https://github.com/yihui/tinytex/blob/b84fd550ffb72a8f20d323144fe269f4a5173c9a/R/install.R#L342-L346 i.e. save the list of packages under tools/pkgs-jupyter.txt, so both the R function and the shell script can read it.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was curious as to whether adding usethis::use_data_raw() would mean that it needed to be added as a dev dependency. So I queried Allison Hill on this. She said that "The scripts in data_raw/ are for you. They are your way of creating the package but that directory is added to your .Rbuildignore when you set it up with usethis" (see Twitter conversation here). So in general it seems that technically this does not make usethis a dev dependency. However, I am happy to defer to your preferred way to do this. Another advantage of doing something like install_yihui_pkgs with a the list of packages in tools/pkgs-jupyter.txt is that, as you mentioned, the shell script can read it.

Once you confirm this is for sure the way you want to go, I will change to PR to reflect it.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, please store the list of packages in tools/pkgs-jupyter.txt, and remove the dependency on usethis. Thank you!

@CLAassistant
Copy link

CLAassistant commented Sep 22, 2020

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@yihui yihui force-pushed the main branch 3 times, most recently from 450bcac to afb10f3 Compare August 26, 2022 16:01
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

Successfully merging this pull request may close these issues.

3 participants