diff --git a/.Rbuildignore b/.Rbuildignore index 731f890..865819f 100644 --- a/.Rbuildignore +++ b/.Rbuildignore @@ -10,3 +10,4 @@ ^pkgdown$ ^\.github$ ^.*\.orig$ +^.*\.tex$ diff --git a/maintainer.tex b/maintainer.tex new file mode 100644 index 0000000..699e2ea --- /dev/null +++ b/maintainer.tex @@ -0,0 +1,92 @@ +\documentclass{article} +\usepackage{graphicx} % Required for inserting images +\usepackage[margin=1in]{geometry} +\usepackage{url} +\usepackage{listings} + + +\title{\texttt{fido} Maintainer Guide} +\author{Michelle Nixon} +\date{\today} + +\begin{document} + +\maketitle + + + +\subsection*{Non-Trivial Changes} + +\begin{itemize} + \item Long vignettes need to be pre-computed first before submitting to CRAN. This is to prevent warning/notes related to run-time issues. The basic idea is to have the vignette written in one file (for example, \texttt{introduction-to-fido.Rmd.org}) and use \texttt{knitr} to create a file where all the R code is already pre-computed. The \texttt{knitr} file will have just the \texttt{.Rmd} extension and, therefore, will be the one build by \texttt{R}. To knit the vignettes, run the command: + + \texttt{knitr::knit("name-of-vignette.Rmd.orig", output = "name-of-vignette.Rmd")} + + in the directory with the vignettes. The inspiration for this approach was taken from \url{https://www.kloppenborg.ca/2021/06/long-running-vignettes/}. \textbf{Note}: It is advisable to run the vignette on your computer to make sure that the pre-compiled vignette looks OK (especially with figures-- they will usually get a title by default but easy to edit manually). + \item I updated the manual math. This provides a little better control of how things render in HTML and PDF format. The basic idea is that both \texttt{eqn} and \texttt{deqn} can take two inputs: + + \texttt{eqn\{math in Latex form\}\{math in ASCII form\}}. + + For some of the complicated math formula, this has two benefits: (1) things can be made to look nice and (2) it prevents notes on CRAN. \textbf{Note:} The math supported by the Latex is very, very basic. They have very limited support for the two common math packages. + \item The configure script needed updated due to an issue with a specific CRAN container (development version of \texttt{R} on Fedora). This specific CRAN container was ``special'' in the sense that OpenMP was present, but \texttt{R} was not configured to use it. The fix was replacing the following: + + \begin{lstlisting}[language=R] + cat < test-omp.cpp + #include + int main() { + return omp_get_num_threads(); + } + EOF + + ## Execute R CMD SHLIB. + if ${CC} ${CFLAGS} -fopenmp test-omp.cpp >/dev/null 2>&1; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" + >&5 printf "%s\n" "yes" >&6; } + openmp_already_works="yes" + else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" + >&5 printf "%s\n" "no" >&6; } + fi + \end{lstlisting} + with + \begin{lstlisting}[language=R] + cat > test-omp.cpp < + extern "C" void configtest(int * arg) { + *arg = omp_get_num_threads(); + } + EOF + # Without the following you're relying on the GNU/Linux-like behaviour + # w.r.t. undefined symbols (see WRE 1.2.1.1): + cat > Makevars <