diff --git a/docs/check-setup-310.log b/docs/check-setup-310.log new file mode 100644 index 0000000..7ba68ed --- /dev/null +++ b/docs/check-setup-310.log @@ -0,0 +1,184 @@ +# DSCI 310 setup check 2023.1 + +## Operating system +ProductName: macOS +ProductVersion: 13.4 +BuildVersion: 22F66 + +## System programs +MISSING rstudio 2023.06.* +OK R 4.3.2 (2023-10-31) -- "Eye Holes" +OK python 3.11.6 +OK conda 23 +OK bash 3.2.57(1)-release (arm64-apple-darwin22) +OK git 2.39.2 (Apple Git-143) +OK make 3.81 +OK latex 3.141592653-2.6-1.40.25 (TeX Live 2023) +OK tlmgr 5:21 +0200) +OK docker 24.0.6, build ed223bc +OK code 1.85.0 + +## Python packages +OK otter-grader=5.2.2 +OK pandas=2.1.1 +OK nbconvert-core=7.8.0 +MISSING playwright=1.* +OK jupyterlab=4.0.6 +OK jupyterlab-git=0.41.0 +OK jupyterlab-spellchecker=0.8.4 +OK jupyterlab PDF-generation was successful. +MISSING jupyterlab WebPDF-generation failed. It seems like you did not run `pip install "nbconvert[webpdf]"`. +OK jupyterlab HTML-generation was successful. + +## R packages +OK tidyverse=2.0.0 +OK markdown=1.7 +OK rmarkdown=2.24 +OK renv=1.0.2 +OK IRkernel=1.3.2 +OK tinytex=0.46 +OK janitor=2.2.0 +OK gapminder=1.0.0 +OK readxl=1.4.3 +OK ottr=1.1.3 +OK canlang=0.0.1 +OK rmarkdown PDF-generation was successful. +OK rmarkdown HTML-generation was successful. + +## Environmental variables +GIT_PS1_SHOWDIRTYSTATE=1 +TERM_PROGRAM=Apple_Terminal +TERM=xterm-256color +SHELL=/bin/bash +CLICOLOR=1 +TMPDIR=/var/folders/yx/296325p15r92zgg4zc7px5qh0000gp/T/ +CONDA_SHLVL=1 +TERM_PROGRAM_VERSION=447 +CONDA_PROMPT_MODIFIER=(base) +TERM_SESSION_ID=AEF44705-253D-4AE4-A5F6-ED5FC1859015 +GITHUB_COM_PAT=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 +USER=timberst +CONDA_EXE=/Users/timberst/miniconda3/bin/conda +SSH_AUTH_SOCK=/private/tmp/com.apple.launchd.92mmfw0xBh/Listeners +GITHUB_PAT=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 +BASH_SILENCE_DEPRECATION_WARNING=1 +_CE_CONDA= +LSCOLORS=ExGxFxdxCxDxDxxbaDecac +PATH=/Users/timberst/.cargo/bin:/Users/timberst/miniconda3/bin:/Users/timberst/miniconda3/condabin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/Applications/quarto/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin +XML_CATALOG_FILES=file:///Users/timberst/miniconda3/etc/xml/catalog file:///etc/xml/catalog +__CFBundleIdentifier=com.apple.Terminal +CONDA_PREFIX=/Users/timberst/miniconda3 +PWD=/Users/timberst/Documents/dsci-310/dsci-310-student +LANG=en_CA.UTF-8 +XPC_FLAGS=0x0 +XPC_SERVICE_NAME=0 +_CE_M= +HOME=/Users/timberst +SHLVL=2 +LOGNAME=timberst +CONDA_PYTHON_EXE=/Users/timberst/miniconda3/bin/python +CONDA_DEFAULT_ENV=base +DISPLAY=/private/tmp/com.apple.launchd.l13hPiudL2/org.xquartz:0 +CANVAS_PAT=11224~Emah7Zet5Y4iuDzUL4tA8jfbFjQHyM1LPgNBsAHElKeBf92MRecO5qWanEqtv5uF +_=/usr/bin/env + +## Content of .bash_profile +# Set the default editor for programs launch from terminal +EDITOR="code --wait" +VISUAL=$EDITOR # Use the same value as for "EDITOR" in the line above +git config --global core.editor "code --wait" + +# >>> conda initialize >>> +# !! Contents within this block are managed by 'conda init' !! +__conda_setup="$('/Users/timberst/miniconda3/bin/conda' 'shell.bash' 'hook' 2> /dev/null)" +if [ $? -eq 0 ]; then + eval "$__conda_setup" +else + if [ -f "/Users/timberst/miniconda3/etc/profile.d/conda.sh" ]; then + . "/Users/timberst/miniconda3/etc/profile.d/conda.sh" + else + export PATH="/Users/timberst/miniconda3/bin:$PATH" + fi +fi +unset __conda_setup +# <<< conda initialize <<< + +# Silence default shell note when launching bash +export BASH_SILENCE_DEPRECATION_WARNING=1 + +# Load the git prompt script +source ~/.git-prompt.sh +# Show unstaged (*) and staged (+) changes in the prompt string +export GIT_PS1_SHOWDIRTYSTATE=1 + +# Color text so it is easier to distinguish elements from each other +export CLICOLOR=1 +export LSCOLORS=ExGxFxdxCxDxDxxbaDecac +# Color the prompt string and add git info +export PS1=${CONDA_PROMPT_MODIFIER}'\[\033[01;32m\]\u@\h\[\033[01;35m\] \w\[\033[34m\]$(__git_ps1 " (%s)")\[\033[00m\]\n\$ ' + +# TAB completion configuration +# TAB completion ignores case +bind "set completion-ignore-case on" +# Require only one instead of two TAB presses before showing matches +bind "set show-all-if-ambiguous on" +# Unfortunately the tab cycling does not work together with single tab match expansion on macOS +# since bash is too old, so I have commented out the option below, +# but feel free to remove the leading `#` if you want to test it out. +# If there are multiple matches for completion, cycle through them with TAB +# bind 'TAB':menu-complete + +# History configuration +# Cycle through history based on characters already typed on the line +bind '"\e[A":history-search-backward' +bind '"\e[B":history-search-forward' +# Append to the history file, don't overwrite it. +shopt -s histappend +# Write commands to history one-by-one right after they are executed +# instead of all together when the terminal is closed. +# Make new terminals see all commands run in currently open terminals and +# prepend a newline to the prompt string to separate it from the last command's output +PROMPT_COMMAND='history -a; echo' +# Increase history size +HISTSIZE=50000 +HISTFILESIZE=50000 + +# Aliases and functions +# Note that aliases only are in effect when you are using the shell interactively +# (e.g. opening the terminal and typing or pasting commands). +# If you run a bash script or makefile, +# the original command is used instead of your alias. +# --- +# MDS help script +alias mds-help='bash ~/.mds-help.sh' +# Some common operations +alias l='ls -lthAF' +alias jl='jupyter lab' +alias ca='conda activate' +alias gl='git log --date short -10 --pretty=format:"%C(auto,yellow)%h %C(auto,blue)%ad%C(auto)%d %C(auto,reset)%s"' +alias gt='git status' +alias gm='git commit -m' +alias gap='git add -p' +# Move, remove, and copy show what was done and prompt before overwriting files. +alias rm="rm -vi" +alias mv="mv -vi" +alias cp="cp -vi" +alias mkdir="mkdir -vp" +# Case insensitive grep by default +alias grep='grep -i' +. "$HOME/.cargo/env" + +#Github enterprise token +export GITHUB_PAT='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' + +# Canvas enterprise token +export CANVAS_PAT='11224~Emah7Zet5Y4iuDzUL4tA8jfbFjQHyM1LPgNBsAHElKeBf92MRecO5qWanEqtv5uF' + +#Github.com org token +export GITHUB_COM_PAT='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' +## Content of .bashrc +# Do NOT add anything to this file, use `~/.bash_profile` instead. +# The next line automatically loads your `~/.bash_profile` +# any time a program tries to read your `~/.bashrc` file. +if [ -f ~/.bash_profile ]; then . ~/.bash_profile; fi +. "$HOME/.cargo/env" diff --git a/docs/computer-setup.html b/docs/computer-setup.html index 750f6ed..affc0d7 100644 --- a/docs/computer-setup.html +++ b/docs/computer-setup.html @@ -2527,11 +2527,11 @@

Laptop requirements

Software installation instructions

Please click the appropriate link below to view the installation instructions for your operating system:

-

The following people contributed to these instructions: Anmol Jawandha, Tomas Beuzen, Rodolfo Lourenzutti, Joel Ostblom, Arman Seyed-Ahmadi, Florencia D’Andrea, and Tiffany Timbers.

+

The following people contributed to these instructions: Daniel Chen, Anmol Jawandha, Tomas Beuzen, Rodolfo Lourenzutti, Joel Ostblom, Arman Seyed-Ahmadi, Florencia D’Andrea, and Tiffany Timbers.

diff --git a/docs/install_stack_mac_arm.html b/docs/install_stack_mac.html similarity index 100% rename from docs/install_stack_mac_arm.html rename to docs/install_stack_mac.html diff --git a/docs/install_stack_mac_x86.html b/docs/install_stack_mac_x86.html deleted file mode 100644 index 823f28f..0000000 --- a/docs/install_stack_mac_x86.html +++ /dev/null @@ -1,3080 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - DSCI 310: macOS (x86) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-

macOS (x86)

- - - -

DSCI 310 software stack install instructions for macOS (x86).

-
- - -
-
- -
-

Installation notes

-

If you have already installed Git, Latex, or any of the R or Python related packages -please uninstall these and follow the instructions below to reinstall them -(make sure to also remove any user configuration files and backup them if desired). -In order to be able to support you effectively and minimize setup issues and software -conflicts, we suggest you install the required software as specified below.

-

In all the sections below, -if you are presented with the choice to download either a 64-bit (also called x64) -or a 32-bit (also called x86) version of the application always choose the 64-bit version.

-

Once you have completed these installation instructions, -make sure to follow the post-installation notes at the end -to check that all software is setup correctly.

-

Web browser

-

In DSCI 310 we will be using several tools that work most reliably on Google Chrome and Firefox -(including our online quiz software), so we recommend that you use one of these browsers.

- -

Bash shell

-

Apple recently changed the Mac default shell in the Terminal to Zsh, however, -we aim to teach with the same shell across all three operating systems we support, -which is the Bash shell. Thus, we ask that you change the default shell in your -Terminal to Bash by opening the Terminal (how to video) and typing:

-
chsh -s /bin/bash
-

You will have to quit all instances of open Terminals and then -restart the Terminal for this to take effect.

-

Visual Studio Code

-

Installing

-

The open-source text editor Visual Studio Code (VS Code) is both a powerful text editor and a full-blown Python IDE, -which we will use for more complex analysis. -You can download and install the macOS version of VS Code from the VS code website -https://code.visualstudio.com/download. -Once the download is finished, click “Open with Archive utility”, -and move the extracted VS Code application from “Downloads” to “Applications”. -In addition to reading the getting started instructions, -be sure to follow the “Launching from the command line” steps as well.

-

You can test that VS code is installed and can be opened from Terminal by restarting terminal and typing the following command:

-
code --version
-

you should see something like this if you were successful:

-
1.74.3
-97dec172d3256f8ca4bfb2143f3f76b503ca0534
-x64
-
-

Note: If you get an error message such as -bash: code: command not found, -but you can see the VS Code application has been installed, -then something went wrong with setting up the launch from the command line. -Try following these instructions -again, in particular you might want to try the described manual method of adding VS Code to your path.

-
-

GitHub

-

In DSCI 310 we will use the publicly available GitHub.com. -If you do not already have an account, please sign up for one at GitHub.com

-

Sign up for a free account at GitHub.com if you don’t have one already.

-

Git

-

We will be using the command line version of Git as well as Git through RStudio and JupyterLab. -Some of the Git commands we will use are only available since Git 2.23, -so if your Git is older than this version, -we ask you to update it using the Xcode command line tools (not all of Xcode), which includes Git.

-

Open Terminal and type the following command to install Xcode command line tools:

-
xcode-select --install
-

After installation, in terminal type the following to ask for the version:

-
git --version
-

you should see something like this (does not have to be the exact same version) if you were successful:

-
git version 2.35.1
-
-

Note: If you run into trouble, please see that Install Git -Mac OS section from Happy Git and GitHub for the useR -for additional help or strategies for Git installation.

-
-

Configuring Git user info

-

Next, we need to configure Git by telling it your name and email. -To do this, type the following into the terminal -(replacing Jane Doe and , with your name and email that -you used to sign up for GitHub, respectively):

-
git config --global user.name "Jane Doe"
-git config --global user.email janedoe@example.com
-
-

Note: To ensure that you haven’t made a typo in any of the above, -you can view your global Git configurations by either opening the -configuration file in a text editor (e.g. via the command code ~/.gitconfig) -or by typing git config --list --global.

-
-

Setting VS Code as the default editor

-

To make programs run from the terminal (such as git) use vscode by default, -we will modify ~/.bash_profile. First, open it using VS Code (this will also -create the file if it doesn’t already exist):

-
code ~/.bash_profile
-
-

Note: If you see any existing lines in your ~/.bash_profile -related to a previous Python or R installation, -please remove these.

-
-

Now append the following lines to ~/.bash_profile:

-
# Set the default editor for programs launch from terminal
-EDITOR="code --wait"
-VISUAL=$EDITOR  # Use the same value as for "EDITOR" in the line above
-

Then save the file and exit VS Code. -Ensure there is a blank line at the end of the file.

-
-

Note: Most terminal programs will read the EDITOR environmental variable -when determining which editor to use, but some read VISUAL, -so we’re setting both to the same value.

-
-

In some cases, -VScode is not set as the default text editor for git -even after appending the two lines above, -so to make sure it is registered properly, -also run the following from your terminal:

-
git config --global core.editor "code --wait"
-

On MacOS, -VScode sometimes reads a different configuration file than your other programs. -To avoid this, -open your ~/.bashrc file:

-
code ~/.bashrc
-

And append the following lines:

-
if [ -f ~/.bash_profile ]; then . ~/.bash_profile; fi
-

Python, Conda, and JupyterLab

-

Python and Conda

-

In DSCI 310 we will be using Python and the conda pacakge manager. -To install them, we will use the Miniconda platform (read more here). -Then Miniconda MacOSX 64-bit pkg install for Python 3.x can be downloaded here..

-

After installation, restart the terminal. If the installation was successful, -you will see (base) prepending to your prompt string. -To confirm that conda is working, you can ask it which version was installed:

-
conda --version
-

which should return something like this:

-
conda 22.11.1
-
-

Note: If you see zsh: command not found: conda, -see the section on Bash -above to set your default Terminal shell to Bash as opposed to Zsh.

-
-

Next, type the following to ask for the version of Python:

-
python --version
-

which should return Python 3.9.0 or greater:

-
Python 3.9.5
-
-

Note: If instead you see Python 2.7.X you installed the wrong version. -Uninstall the Miniconda you just installed (which usually lives in the /opt directory), -and try the installation again, selecting Python 3.9.

-
-

Installing Python packages

-

conda installs Python packages from different online repositories which are called “channels”. -A package needs to go through thorough testing before it is included in the default channel, -which is good for stability, -but also means that new versions will be delayed and fewer packages are available overall. -There is a community-driven effort called the conda-forge (read more here), -which provides more up to date packages. -To enable us to access the most up to date version of the Python packages we are going to use, -we will add the more up to date channel. -To add the conda-forge channel by typing the following in the terminal:

-
conda config --add channels conda-forge
-

To install packages individually, -we can now use the following command: -conda install <package-name>. -After running that command -conda will show you the packages that will be downloaded, -and you can press enter to proceed with the installation. -If you want to answer yes by default and skip this confirmation step, -you can replace conda install with conda install -y. -Also note that we may occasionally need to install packages using pip, -the standard Python package manager. -The installation command is very similar to that of conda: pip install <package-name>. -Let’s try this out in the next section, -by installing some of the key packages we will use in DSCI 310.

-

JupyterLab setup

-

We will be using JupyterLab as our main coding environment -and pandas is one of the key data analyses packages. -The Jupytext Python package and the JupyterLab git extension facilitates -using notebooks in JupyterLab together with Git & GitHub. -The spellchecker helps us correcting typos in our writing -and the LSP packages fill the same function for our code. -Install them via the following commands:

-
conda install jupyterlab jupyterlab-git jupyterlab-spellchecker jupytext jupyterlab-lsp jupyter-lsp-python
-

To test that your JupyterLab installation is functional, you can type jupyter lab into a terminal, -which should open a new tab in your default browser with the JupyterLab interface. -To exit out of JupyterLab you can click File -> Shutdown, -or go to the terminal from which you launched JupyterLab and hold Ctrl while pressing c twice.

-

R, XQuartz, IRkernel, and RStudio

-

R is the second language that we will be using frequently in this course. -We will use R both in Jupyter notebooks and in RStudio.

-

R

-

Go to https://cran.r-project.org/bin/macosx/ -and download the latest version of R for Mac. Open the file and follow the installer instructions.

-

After installation, open a new terminal window and type the following:

-
R --version
-

You should see something like this if you were successful:

-
R version 4.2.2 (2022-10-31 ucrt) -- "Innocent and Trusting"
-Copyright (C) 2022 The R Foundation for Statistical Computing
-Platform: x86_64-apple-darwin17.0 (64-bit)
-
-R is free software and comes with ABSOLUTELY NO WARRANTY.
-You are welcome to redistribute it under the terms of the
-GNU General Public License versions 2 or 3.
-For more information about these matters see
-https://www.gnu.org/licenses/.
-
-

Note: Although it is possible to install R through conda, we highly recommend not doing so. -In case you have already installed R using conda you can remove it by executing conda uninstall r-base.

-
-

XQuartz

-

Some R packages rely on the dependency XQuartz which no longer ships with the Mac OS, -thus we need to install it separately. -Download it from here: https://www.xquartz.org/ -and follow the installation instructions.

-

RStudio

-

Download the macOS Desktop version (not Pro) of RStudio Preview from -https://rstudio.com/products/rstudio/download/preview/. -Open the file and follow the installer instructions.

-

To see if you were successful, -try opening RStudio by clicking on its icon (from Finder, Applications or Launchpad). -It should open and look something like this picture below:

-

Now we are going to change RStudio’s Insert Pipe shortcut so that it inserts -the new native pipe operator |>. -Go to Tools > Global Options > Code > Editing and tick the following option:

-

-

Once the change is made you can try in the RStudio console Command + Shift + m to check if works.

-

Installing R packages

-

Next, install the key R packages needed for the course by opening up RStudio and -typing the following into the R console inside RStudio:

-
install.packages(c("cowplot", "GGally", "kknn", "scales", "tidyverse", "tidymodels"))
-

IRkernel

-

The IRkernel package is needed to make R work in Jupyter notebooks. -To enable this kernel in the notebooks, install by pasting the following command into the RStudio Console:

-
install.packages('IRkernel')
-

Next, open a terminal and type the following -(you can’t use RStudio for this step -since it doesn’t honor $PATH changes in ~/.bash_profile)

-
R -e "IRkernel::installspec()"
-

To see if you were successful, try running JupyterLab and check if you have a working R kernel. -To launch the JupyterLab type the following in Terminal:

-
jupyter lab
-

A browser should have launched and you should see a page that looks like the screenshot below. -Now click on “R” notebook (circled in red on the screenshot below) to launch an JupyterLab with an R kernel.

-

-

Sometimes a kernel loads, but doesn’t work as expected. -To test whether your installation was done correctly now type library(tidyverse) -in the code cell and click on the run button to run the cell. -If your R kernel works you should see something like the image below:

-

-

To improve the experience of using R in JupyterLab, -we will add keyboard shortcuts for inserting the common R operators <- and |>. -Go to Settings -> Advanced Settings Editor -> Keyboard Shortcuts -and paste the following in the rightmost panel that says User Preferences -(replacing the {}):

-
{
-    "shortcuts": [
-        {
-            "command": "apputils:run-first-enabled",
-            "selector": "body",
-            "keys": ["Alt -"],
-            "args": {
-                "commands": [
-                    "console:replace-selection",
-                    "fileeditor:replace-selection",
-                    "notebook:replace-selection",
-                ],
-                "args": {"text": "<- "}
-            }
-        },
-        {
-            "command": "apputils:run-first-enabled",
-            "selector": "body",
-            "keys": ["Accel Shift M"],
-            "args": {
-                "commands": [
-                    "console:replace-selection",
-                    "fileeditor:replace-selection",
-                    "notebook:replace-selection",
-                ],
-                "args": {"text": "|> "}
-            }
-        }
-    ]
-}
-

After you have pasted this text, -hit the small floppy disk in the top right (or Ctrl + s) -to save the settings. -Here is a screenshot of what it looks like with the settings saved:

-

-

To check that the extension is working, -open JupyterLab, -launch an R notebook, -and try inserting the operators by pressing Alt + - or Command + Shift + m, respectively. -You could add any arbitrary text insertion command the same way, -but this is all that we suggest for this course.

-

LaTeX

-

We will install the lightest possible version of LaTeX and its necessary -packages as possible so that we can render Jupyter notebooks and R Markdown documents to html and PDF. -If you have previously installed LaTeX, please uninstall it before proceeding with these instructions.

-

First, run the following command to make sure that /usr/local/bin is writable:

-
sudo chown -R $(whoami):admin /usr/local/bin
-
-

Note: You might be asked to enter your password during installation.

-
-

Now open RStudio and run the following commands to install the tinytex package and setup tinytex:

-
install.packages('tinytex')
-tinytex::install_tinytex()
-

You can check that the installation is working by opening a terminal and asking for the version of latex:

-
latex --version
-

You should see something like this if you were successful:

-
pdfTeX 3.141592653-2.6-1.40.24 (TeX Live 2022)
-kpathsea version 6.3.4
-Copyright 2022 Han The Thanh (pdfTeX) et al.
-There is NO warranty.  Redistribution of this software is
-covered by the terms of both the pdfTeX copyright and
-the Lesser GNU General Public License.
-For more information about these matters, see the file
-named COPYING and the pdfTeX source.
-Primary author of pdfTeX: Han The Thanh (pdfTeX) et al.
-Compiled with libpng 1.6.37; using libpng 1.6.37
-Compiled with zlib 1.2.11; using zlib 1.2.11
-Compiled with xpdf version 4.03
-

The above is all we need to have LaTeX work with R Markdown documents, -however for Jupyter we need to add several more packages. -Do this by opening a terminal and copying the following there press enter:

-
tlmgr install eurosym \
-  adjustbox \
-  caption \
-  collectbox \
-  enumitem \
-  environ \
-  fp \
-  jknapltx \
-  ms \
-  parskip \
-  pgf \
-  rsfs \
-  tcolorbox \
-  titling \
-  trimspaces \
-  ucs \
-  ulem \
-  upquote \
-  lwarp \
-  oberdiek \
-  pgfplots \
-  bbm-macros \
-  cmap \
-  polyglossia \
-  gnu-freefont \
-  fncychap \
-  wrapfig \
-  capt-of \
-  needspace \
-  tabulary \
-  varwidth \
-  fancyhdr \
-  titlesec \
-  ucharclasses \
-  pdfcol
-

To test that your latex installation is working with jupyter notebooks, -launch jupyter lab from a terminal and open either a new notebook -or the same one you used to test IRkernel above. -Go to File -> Export notebook as... -> Export Notebook to PDF. -If the PDF file is created, -your LaTeX environment is set up correctly.

-

WebPDF export

-

Jupyter recently added another way to export notebooks to PDF -which does not require Latex -and makes the exported PDF look similar to notebooks exported to HTML. -This requires the pyppeteer package, -which we can install as follows.

-
conda install pyppeteer
-pyppeteer-install
-

Try this by going to File -> Export notebook as... -> Export Notebook to WebPDF.

-

WebPDF Issues

-

If there are issues exporting to WebPDF, run the following in Terminal:

-
jupyter nbconvert --to webpdf --allow-chromium-download Untitled.ipynb
-

The above assumes that your file name is Untitled.ipynb

-

Docker

-

You will use Docker to create reproducible, -sharable, and shippable computing environments for your analyses. -For this you will need a Docker account. -You can sign up for a free one here.

-

After signing-up and signing into the Docker Store, go here: -https://store.docker.com/editions/community/docker-ce-desktop-mac -and click on the “Get Docker” button on the right hand side of the screen. -Then, follow the installation instructions on that screen to install the stable version.

-

To test if Docker is working, after installation open the Docker app by clicking -on its icon (from Finder, Applications or Launchpad). -Next open Terminal and type the following:

-
docker run hello-world
-

you should see something like this if you were successful:

-
Unable to find image 'hello-world:latest' locally
-latest: Pulling from library/hello-world
-1b930d010525: Pull complete 
-Digest: sha256:451ce787d12369c5df2a32c85e5a03d52cbcef6eb3586dd03075f3034f10adcd
-Status: Downloaded newer image for hello-world:latest
-
-Hello from Docker!
-This message shows that your installation appears to be working correctly.
-
-To generate this message, Docker took the following steps:
- 1. The Docker client contacted the Docker daemon.
- 2. The Docker daemon pulled the "hello-world" image from the Docker Hub.
-    (amd64)
- 3. The Docker daemon created a new container from that image which runs the
-    executable that produces the output you are currently reading.
- 4. The Docker daemon streamed that output to the Docker client, which sent it
-    to your terminal.
-
-To try something more ambitious, you can run an Ubuntu container with:
- $ docker run -it ubuntu bash
-
-Share images, automate workflows, and more with a free Docker ID:
- https://hub.docker.com/
-
-For more examples and ideas, visit:
- https://docs.docker.com/get-started/
-

Post-installation notes

-

You have completed the installation instructions, well done 🙌! -We have created a script to help you check that your installation was successful, -and to provide instructions for how you can troubleshoot any potential issues. -To run this script, -please execute the following command from your terminal.

-
bash <(curl -Ss https://raw.githubusercontent.com/UBC-DSCI/dsci-310-student/main/src/check_setup.sh)
-

The output from running the script will look something like this:

-
# DSCI 310 setup check 1.0
-
-If a program or package is marked as MISSING,
-this means that you are missing the required version of that program or package.
-Either it is not installed at all or the wrong version is installed.
-The required version is indicated with a number and an asterisk (*),
-e.g. 4.* means that all versions starting with 4 are accepted (4.0.1, 4.2.5, etc).
-
-You can run the following commands to find out which version
-of a program or package is installed (if any):
-```
-name_of_program --version  # For system programs
-conda list  # For Python packages
-R -q -e "installed.packages()[,c(Package, Version)]"  # For R packages
-```
-
-Checking program and package versions...
-
-## Operating system
-ProductName:    macOS
-ProductVersion: 13.1
-BuildVersion:   21A344
-
-## System programs
-OK        rstudio 
-OK        R 4.2.2 (2022-10-31 ucrt) -- :Innocent and Trusting"
-OK        python 3.11.0
-OK        conda 22.11.1
-OK        bash 3.2.57(1)-release (arm64-apple-darwin22)
-OK        git 2.35.1
-OK        make 3.81
-OK        latex 3.141592653-2.6-1.40.24 (TeX Live 2022)
-OK        tlmgr 58:07 +0200)
-OK        docker 20.10.13, build a224086
-OK        code 1.74.3
-
-## Python packages
-OK        pandas=1.5.2
-OK        pyppeteer=1.0.2
-OK        nbconvert=7.2.8
-OK        jupyterlab=3.5.2
-OK        jupyterlab-git=0.41.0
-OK        jupytext=1.14.4
-OK        jupyterlab-spellchecker=0.7.2
-OK        jupyterlab PDF-generation was successful.
-OK        jupyterlab WebPDF-generation was successful.
-OK        jupyterlab HTML-generation was successful.
-
-## R packages
-OK        cowplot=1.1.1
-OK        GGally=2.1.2
-OK        kknn=1.3.1
-OK        scales=1.1.1
-OK        tidyverse=1.3.1
-OK        tidymodels=0.1.4
-OK        tinytex=0.36
-OK        rmarkdown PDF-generation was successful.
-OK        rmarkdown HTML-generation was successful.
-
-The above output has been saved to the file /Users/jbourak/check_setup.log
-together with system configuration details and any detailed error messages about PDF and HTML generation.
-You can open this folder in your file browser by typing `open .` (without the surrounding backticks).
-

As you can see at the end of the output, -a log file is saved in your current directory. -We might ask you to upload this file -if we need to troubleshoot your installation, -so that we can help you more effectively. -If any of your packages are marked as “MISSING” -you will need to figure out what is wrong and possibly reinstall them. -Once all packages are marked as “OK” -we will ask you to submit this log file, -so that we can confirm that your installation was successful. -Details on where to submit will be provided later.

-
-

Note: In general you should be careful running scripts unless they come -from a trusted source as in this case -(just like how you should be careful when downloading and installing programs on your computer).

-
-

Attributions

- -
- - -
- -
-
- - - - - -
- - - - - - - - - diff --git a/docs/src/check_setup.sh b/docs/src/check_setup.sh index 7df2504..dbc6614 100644 --- a/docs/src/check_setup.sh +++ b/docs/src/check_setup.sh @@ -10,7 +10,7 @@ NC='\033[0m' # No Color # 0. Help message and OS info echo '' -echo -e "${ORANGE}# DSCI 310 setup check 2023.1${NC}" | tee check-setup-310.log +echo -e "${ORANGE}# DSCI 310 setup check 2024.1${NC}" | tee check-setup-310.log echo '' | tee -a check-setup-310.log echo 'If a program or package is marked as MISSING,' echo 'this means that you are missing the required version of that program or package.' @@ -80,8 +80,8 @@ echo -e "${ORANGE}## System programs${NC}" >> check-setup-310.log # so easier to test the location of the executable than having students add it to PATH. if [[ "$(uname)" == 'Darwin' ]]; then # rstudio is installed as an .app - if ! $(grep -iq "= \"2023\.06.*" <<< "$(mdls -name kMDItemVersion /Applications/RStudio.app)"); then - echo "MISSING rstudio 2023.06.*" >> check-setup-310.log + if ! $(grep -iq "= \"2023\.*" <<< "$(mdls -name kMDItemVersion /Applications/RStudio.app)"); then + echo "MISSING rstudio 2023.*" >> check-setup-310.log else # This is what is needed instead of --version installed_version_tmp=$(grep -io "= \"2023\.06.*" <<< "$(mdls -name kMDItemVersion /Applications/RStudio.app)")