January 2023 Library Carpentry Workshop

Smithsonian Institution

January 9, 10, & 11, 2023

1:00 - 4:00pm EST

Instructors: Rayvn Manuel, Jennifer Spillane, Kristina Heinricy, Crystal Sanchez, Mike Trizna

Helpers: Paula Pappalardo, Jennifer Spillane, Jen Hammock, Jennifer Giaccai

General Information

Library Carpentry is made by people working in library- and information-related roles to help you:

Library Carpentry introduces you to the fundamentals of computing and provides you with a platform for further self-directed learning. For more information on what we teach and why, please see our paper "Library Carpentry: software skills training for library professionals".

Who: The course is for Smithsonian badge holders and contractors working in library- and information-related roles. You don't need to have any previous knowledge of the tools that will be presented at the workshop.

When: January 9, 10, & 11, 2023. Add to your Google Calendar.

Requirements: Participants must bring a laptop with a Mac, Linux, or Windows operating system (not a tablet, Chromebook, etc.) that they have administrative privileges on. They should have a few specific software packages installed (listed below).

Accessibility: We are committed to making this workshop accessible to everybody. For workshops at a physical location, the workshop organizers have checked that:

Materials will be provided in advance of the workshop and large-print handouts are available if needed by notifying the organizers in advance. If we can help making learning easier for you (e.g. sign-language interpreters, lactation facilities) please get in touch (using contact details below) and we will attempt to provide them.

Contact: Please email carpentries@si.edu for more information.

Roles: To learn more about the roles at the workshop (who will be doing what), refer to our Workshop FAQ.


Registration

Registration assumes participation for all three days. You can specify days you cannot attend during registration. Registration opens December 19th at 10AM EST.


Code of Conduct

Everyone who participates in Carpentries activities is required to conform to the Code of Conduct. This document also outlines how to report an incident if needed.


Collaborative Notes

We will use this collaborative document for chatting, taking notes, and sharing URLs and bits of code.


Surveys

Please be sure to complete these surveys before and after the workshop.

Pre-workshop Survey

Post-workshop Survey


Schedule

Registration assumes participation for all three days. You can specify days you cannot attend during registration. Registration opens December 19th at 10AM EST.

Day 1 - January 9, 2023

The Unix Shell

13:00 EST Workshop Introductions
13:15 The Unix Shell
16:00 End of Day 1

Day 2 - January 10, 2023

Regular Expressions & OpenRefine

13:00 EST Intro to Regular Expressions
14:00 OpenRefine
16:00 End of Day 2

Day 3 - January 11, 2023

Introduction To Git

13:00 EST GitHub without the command line
16:00 End of Day 3


Setup

To participate in a Library Carpentry workshop, you will need access to software as described below. In addition, you will need an up-to-date web browser.

We maintain a list of common issues that occur during installation as a reference for instructors that may be useful on the Configuration Problems and Solutions wiki page.

The Bash Shell

Bash is a commonly-used shell that gives you the power to do tasks more quickly.

  1. Download the Git for Windows installer.
  2. Run the installer and follow the steps below:
    1. Click on "Next" four times (two times if you've previously installed Git). You don't need to change anything in the Information, location, components, and start menu screens.
    2. From the dropdown menu, "Choosing the default editor used by Git", select "Use the Nano editor by default" (NOTE: you will need to scroll up to find it) and click on "Next".
    3. On the page that says "Adjusting the name of the initial branch in new repositories", ensure that "Let Git decide" is selected. This will ensure the highest level of compatibility for our lessons.
    4. Ensure that "Git from the command line and also from 3rd-party software" is selected and click on "Next". (If you don't do this Git Bash will not work properly, requiring you to remove the Git Bash installation, re-run the installer and to select the "Git from the command line and also from 3rd-party software" option.)
    5. Select "Use bundled OpenSSH".
    6. Ensure that "Use the native Windows Secure Channel Library" is selected and click on "Next".
    7. Ensure that "Checkout Windows-style, commit Unix-style line endings" is selected and click on "Next".
    8. Ensure that "Use Windows' default console window" is selected and click on "Next".
    9. Ensure that "Default (fast-forward or merge) is selected and click "Next"
    10. Ensure that "Git Credential Manager" is selected and click on "Next".
    11. Ensure that "Enable file system caching" is selected and click on "Next".
    12. Click on "Install".
    13. Click on "Finish" or "Next".
  3. If your "HOME" environment variable is not set (or you don't know what this is):
    1. Open command prompt (Open Start Menu then type cmd and press Enter)
    2. Type the following line into the command prompt window exactly as shown:

      setx HOME "%USERPROFILE%"

    3. Press Enter, you should see SUCCESS: Specified value was saved.
    4. Quit command prompt by typing exit then pressing Enter

This will provide you with both Git and Bash in the Git Bash program.

Video Tutorial

The default shell in some versions of macOS is Bash, and Bash is available in all versions, so no need to install anything. You access Bash from the Terminal (found in /Applications/Utilities). See the Git installation video tutorial for an example on how to open the Terminal. You may want to keep Terminal in your dock for this workshop.

To see if your default shell is Bash type echo $SHELL in Terminal and press the Return key. If the message printed does not end with '/bash' then your default is something else and you can run Bash by typing bash

If you want to change your default shell, see this Apple Support article and follow the instructions on "How to change your default shell".

Video Tutorial

The default shell is usually Bash and there is usually no need to install anything.

To see if your default shell is Bash type echo $SHELL in a terminal and press the Enter key. If the message printed does not end with '/bash' then your default is something else and you can run Bash by typing bash.

OpenRefine

For this lesson you will need OpenRefine and a web browser. Note: this is a Java program that runs on your machine (not in the cloud). It runs inside a web browser, but no web connection is needed.

  1. Open Software Center, click on OpenRefine, and then click Install.
  2. Check the Desktop for an OpenRefine icon. If it is not there, you may need to restart your computer.
  3. If you get a Windows Defender warning about running the software, select 'More Info', then select 'Run Anyway'.
  • Open the Self Service app, click on the Utilities category, and then click Install under the OpenRefine icon.
  • Check the Desktop for an OpenRefine icon. If it is not there, you may need to restart your computer.
    1. Check that you have either the Firefox or the Chrome browser installed and set as your default browser. OpenRefine runs in your default browser. It will not run correctly in Internet Explorer.
    2. Download software from http://openrefine.org/
    3. Create a new directory called OpenRefine.
    4. Unzip the downloaded file into the OpenRefine directory by right-clicking and selecting "Extract ...".
    5. Go to your newly created OpenRefine directory.
    6. Launch OpenRefine by clicking openrefine.exe (this will launch a command prompt window, but you can ignore that - just wait for OpenRefine to open in the browser).
    7. If you are using a different browser, or if OpenRefine does not automatically open for you, point your browser at http://127.0.0.1:3333/ or http://localhost:3333 to use the program.
    1. Check that you have either the Firefox or the Chrome browser installed and set as your default browser. OpenRefine runs in your default browser. It may not run correctly in Safari.
    2. Download software from http://openrefine.org/.
    3. Create a new directory called OpenRefine.
    4. Unzip the downloaded file into the OpenRefine directory by double-clicking it.
    5. Go to your newly created OpenRefine directory.
    6. Launch OpenRefine by dragging the icon into the Applications folder.
    7. Use Ctrl-click/Open ... to launch it.
    8. If you are using a different browser, or if OpenRefine does not automatically open for you, point your browser at http://127.0.0.1:3333/ or http://localhost:3333 to use the program.
    1. Check that you have either the Firefox or the Chrome browser installed and set as your default browser. OpenRefine runs in your default browser.
    2. Download software from http://openrefine.org/.
    3. Make a directory called OpenRefine.
    4. Unzip the downloaded file into the OpenRefine directory.
    5. Go to your newly created OpenRefine directory.
    6. Launch OpenRefine by entering ./refine into the terminal within the OpenRefine directory.
    7. If you are using a different browser, or if OpenRefine does not automatically open for you, point your browser at http://127.0.0.1:3333/ or http://localhost:3333 to use the program.

    If you ran into any difficulty installing OpenRefine on your machine, we have a browser-based back-up solution that will run at this link: Binder

    GitHub

    For this lesson you will need a GitHub account and GitHub Desktop installed on your machine.

    To sign up for a GitHub account:

    1. Go to https://github.com/signup and enter your email address (preferably your @si.edu or @cfa.harvard.edu address), choose a secure password, and then choose a username.
    2. Complete the "puzzle" to prove you are not a robot, click Create Account, and then confirm your email address with the code provided.
    1. Open Software Center, click on GitHub Desktop, and then click Install.
    2. Check the Desktop for a GitHub Desktop icon. If it is not there, you may need to restart your computer.
    3. Open GitHub Desktop, click on File > Options, and then click the Sign In button on the Accounts tab. This will direct you to a browser, where you will sign in to the account you created previously.
    1. Open the Self Service app, click on the Scientific category, and then click Install under the GitHub Desktop icon.
    2. Check the Desktop for a GitHub Desktop icon. If it is not there, you may need to restart your computer.
    3. Open GitHub Desktop, in the top menu click on GitHub Desktop > Preferences, and then click the Sign In button on the Accounts tab. This will direct you to a browser, where you will sign in to the account you created previously.
    1. Go to https://desktop.github.com/ and click on the big Download for Windows button.
    2. Follow the prompts to install the software.
    3. Open GitHub Desktop, click on File > Options, and then click the Sign In button on the Accounts tab. This will direct you to a browser, where you will sign in to the account you created previously.
    1. Go to https://desktop.github.com/ and click on the big Download for macOS button.
    2. Follow the prompts to install the software.
    3. Open GitHub Desktop, in the top menu click on GitHub Desktop > Preferences, and then click the Sign In button on the Accounts tab. This will direct you to a browser, where you will sign in to the account you created previously.