-
-
Notifications
You must be signed in to change notification settings - Fork 117
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
ttimbers
wants to merge
1
commit into
rstudio:main
Choose a base branch
from
ttimbers:add-jupyter-packages
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,3 +7,4 @@ | |
^codecov\.yml$ | ||
^TinyTeX\.zip$ | ||
^.github$ | ||
^data-raw$ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#' Additional tinytex packages needed for rendering of PDFs in Jupyter | ||
#' | ||
#' These 16 TexLive packages are required to allow for rendering of PDFs in | ||
#' Jupyter when tinytex is used to install LaTeX. | ||
#' | ||
#' @format A vector with 16 package names: | ||
#' \describe{ | ||
#' \item{adjustbox}{} | ||
#' \item{caption}{} | ||
#' \item{collectbox}{} | ||
#' \item{enumitem}{} | ||
#' \item{environ}{} | ||
#' \item{eurosym}{} | ||
#' \item{jknapltx}{} | ||
#' \item{parskip}{} | ||
#' \item{pgf}{} | ||
#' \item{rsfs}{} | ||
#' \item{tcolorbox}{} | ||
#' \item{titling}{} | ||
#' \item{trimspaces}{} | ||
#' \item{ucs}{} | ||
#' \item{ulem}{} | ||
#' \item{upquote}{} | ||
#' } | ||
#' @source \url{https://github.com/yihui/tinytex/issues/228} | ||
"jup_pkgs" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
## code to prepare `jup_pkgs` dataset goes here | ||
|
||
jup_pkgs <- c( | ||
"adjustbox", | ||
"caption", | ||
"collectbox", | ||
"enumitem", | ||
"environ", | ||
"eurosym", | ||
"jknapltx", | ||
"parskip", | ||
"pgf", | ||
"rsfs", | ||
"tcolorbox", | ||
"titling", | ||
"trimspaces", | ||
"ucs", | ||
"ulem", | ||
"upquote" | ||
) | ||
|
||
usethis::use_data(jup_pkgs, overwrite = TRUE) | ||
Binary file not shown.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
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 documentingjup_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.There was a problem hiding this comment.
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 withusethis
" (see Twitter conversation here). So in general it seems that technically this does not makeusethis
a dev dependency. However, I am happy to defer to your preferred way to do this. Another advantage of doing something likeinstall_yihui_pkgs
with a the list of packages intools/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.
There was a problem hiding this comment.
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!