diff --git a/_config.yml b/_config.yml index 1bc34daf..b72b7b82 100644 --- a/_config.yml +++ b/_config.yml @@ -16,21 +16,26 @@ # https://github.com/carpentries/training-template carpentry: "swc" -# This option is currently only needed for Data Carpentry workshops. -# The value of the variable will be ignored for Software Carpentry and -# Library Carpentry workshops. +# This option is currently only needed for +# Data Carpentry and Software Carpentry workshops. +# The value of the variable will be ignored for Library Carpentry +# workshops. # Possible values are: # dc-ecology: for Data Carpentry Ecology workshops # dc-genomics: for Data Carpentry Genomics # dc-socsci: for Data Carpentry Social Sciences # dc-geospatial: for Data Carpentry Geospatial +# swc-inflammation: for Software Carpentry based on the inflammation dataset +# swc-gapminder: for Software Carpentry based on the Gapminder dataset curriculum: "FIXME" -# If there is both an R and python official version of a curriculum, change the -# value of the variable below ("flavor") to get the schedule updated accordingly -# (valid values are 'r' or 'python'). -# Note: this is only for Data Carpentry curricula at this time. -flavor: "r" +# If there is both an R and python official version of a curriculum +# (as listed on https://software-carpentry.org/lessons/ and +# https://datacarpentry.org/lessons/), change the +# value of the variable below ("flavor") to get the schedule and installation +# instructions updated accordingly (valid values are 'r' or 'python'). +# Note: this is only for Data Carpentry and SWC at this time. +flavor: "FIXME" # Overall title for the Workshop. # This variable is used to (optionally) add a title in the "jumbotron" diff --git a/_extras/customization.md b/_extras/customization.md index bc5e0541..427978f4 100644 --- a/_extras/customization.md +++ b/_extras/customization.md @@ -3,18 +3,31 @@ layout: page title: Customizing Your Workshop's Website permalink: /customization/index.html --- + +## Table of Content + +* TOC +{:toc} + ## Configuration File `_config.yml` You should edit the `_config.yml` configuration file in the root directory of your workshop to configure some site-wide variables and make the site function correctly: -* `carpentry` - to tell us which carpentry workshop this is, possible values are ("swc" for Software - Carpentry workshops, "dc" for Data Carpentry workshops, "lc" for Library Carpentry Workshops, or - "cp" for general Carpentries events such as instructor trainings). -* `curriculum` - for Data Carpentry, which one of the curriculum is being taught. Possible values - are: `dc-ecology`, `dc-genomics`, `dc-socsci`, `dc-geospatial`. -* `flavor` - `r` or `python` depending on which lessons are being taught at the workshop (currently - only for Data Carpentry workshops) +* `carpentry` - to tell us which carpentry workshop this is. Possible values are: + - `"swc"` for Software Carpentry workshops, + - `"dc"` for Data Carpentry workshops, + - `"lc"` for Library Carpentry workshops, and + - `"cp"` for general Carpentries events such as instructor trainings (for which you should use + as the website template). +* `curriculum` - to tell us which curriculum is being taught. + At the moment, applicable to Software and Data Carpentry workshops only. + Possible values are: + - `"dc-ecology"`, `"dc-genomics"`, `"dc-socsci"`, or `"dc-geospatial"` for Data Carpentry + workshops + - `"swc-inflammation"` or `"swc-gapminder"` for Software Carpentry workshops. +* `flavor` - `"r"` or `"python"` depending on which lessons are being taught at the workshop + (currently only for Data Carpentry and Software Carpentry workshops). * `title` - overall title for the workshop. If set (i.e., different from "Workshop Title" or empty), it will appear in the "jumbotron" (the gray box at the top of the page). This variable is also used for the title of the extra pages. More information about extra pages are [available in the @@ -23,7 +36,7 @@ configure some site-wide variables and make the site function correctly: For example, if the URL for the repository is `https://github.com/gvwilson/2015-07-01-miskatonic`, the URL for the website will be `http://gvwilson.github.io/2015-07-01-miskatonic`. -You should not need to modify any of the other values in `_config.yml`. +You should not need to modify any of the other variable values in `_config.yml`. ## Home Page (`index.md`): data in the YAML header @@ -49,7 +62,7 @@ options. * `country` must be a two-letter ISO-3166 code for the country in which the workshop is going to take place, such as "fr" (for France) or "nz" (for New Zealand) - see [Wikipedia](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) - for a complete list. See section below for value to use for + for a complete list. See section below for value to use for online workshops. * `language` is the language that will be used in the workshop. @@ -60,7 +73,7 @@ options. * `latitude` and `longitude` are the latitude and longitude of the workshop site (so we can put a pin on our map). You can use - [this site](https://getlatlong.net/) to find these values. + [this site](https://getlatlong.net/) to find these values. See section below for value to use for online workshops. * `humandate` is the human-friendly start and end date for the @@ -140,16 +153,69 @@ so that they show what you're actually planning to teach and when. These files are located in the appropriate workshop folder (`dc`, `lc` or `swc`) inside the `_includes` folder. -## Home Page: Setup +## Home Page: Setup Instructions -You may have to edit the `setup.html` located -in the `dc`, `lc` or `swc` folders -inside the `_includes` folder. -Make sure you delete the sections for the -software and data -you will **not** be using in your workshop, -so that learners don't spend time installing -software they don't need. +If you need assistance with customizing the setup instructions for your website, +feel free to ask your questions in the Carpentries +[Instructors Slack channel](https://swcarpentry.slack.com/archives/C08BVNU00) +([join The Carpentries Slack workspace](https://swc-slack-invite.herokuapp.com/)). + +### Software Carpentry workshops + +#### Default settings + +For Software Carpentry workshops, +setting the `flavor` variable in `_config.yml` to `r` or `python` +will include the respective installation instructions for these tools. +Additionally, by default, the installation instructions for +a text editor, the Bash shell, and Git are included. + +#### If you need to remove tools + +If you need to remove any of the instructions for the default +set of tools, +you can delete lines that include these instructions in +the `_includes/swc/setup.html` file. + +#### If you need to add tools + +If you need to add installation instructions for other tools, +we provide installation instructions for SQL and OpenRefine. +To make them appear on your workshop website, +you can move the `{% raw %}{% include %}{% endraw %}` statements outside the comment +block in `_includes/swc/setup.html`. + +If you need to add installation instructions for other tools, +you will need to write your own. You can use installation instructions +for other tools located in the `_includes/install_instructions/` folder +as examples. + +### Data Carpentry workshops + +For Data Carpentry workshops, +installation instructions live on the workshop overview page for each curriculum. +Instead of including installation instructions in the workshop template, +the workshop template includes links to these instructions. +The correct link will be displyed +when using the appropriate combination of values +for the `curriculum` and `flavor` variables +in the `_config.yml` file. + +### Library Carpentry workshops + +By default, Library Carpentry workshop websites +include installation instructions for the Bash shell and Git. + +You may need to add installation instructions for additional tools +you will be using during your workshop +by editing the `_includes/lc/setup.html` file. +You can either write your own instructions using the ones +provided in `_includes/lc/setup.html` as an example, +or, if you are using tools that already have installation instructions +provided for Software Carpentry, +you can add `{% raw %}{% include install_instructions/ %}{% endraw %}` +where `` needs to be replaced by one of the files +in the `_includes/install_instructions` folder. ## Updating the repository @@ -161,19 +227,30 @@ you need to get changes from this repository into the clone of it with your workshop page, please follow the steps bellow: -1. Add the workshop-template repository as upstream: +1. Add the workshop-template repository as upstream: + ~~~ + $ git remote add upstream https://github.com/carpentries/workshop-template.git + ~~~ + {: .language-bash} - $ git remote add upstream https://github.com/carpentries/workshop-template.git - -2. Fetch the data from upstream repository (also know as the workshop-template +2. Fetch the data from upstream repository (also know as the workshop-template repository): + ~~~ + $ git pull upstream + ~~~ + {: .language-bash} - $ git pull upstream - -4. Address possible merge conflicts, and +3. Address possible merge conflicts, and + ~~~ + $ git commit -a + ~~~ + {: .language-bash} - $ git commit -a +4. Push the changes to your repository on GitHub: + ~~~ + $ git push origin gh-pages + ~~~ + {: .language-bash} -5. Push the changes to your repository on GitHub: - $ git push origin gh-pages +{% include links.md %} diff --git a/_includes/dc/syllabus.html b/_includes/dc/syllabus.html index 577a7206..58489c74 100644 --- a/_includes/dc/syllabus.html +++ b/_includes/dc/syllabus.html @@ -60,7 +60,9 @@

Introduction to Python

{% else %} - {% include warning-flavor.html %} +
+ {% include warning-flavor.html %} +
{% endif %}

Data Management with SQL

@@ -138,7 +140,7 @@

Data Cleaning with OpenRefine

  • Examining Numeric Data
  • Generating Scripts
  • Exporting Data
  • -
  • Other Resources
  • +
  • Other Resources
  • diff --git a/_includes/install_instructions/editor.html b/_includes/install_instructions/editor.html new file mode 100644 index 00000000..1ac951f3 --- /dev/null +++ b/_includes/install_instructions/editor.html @@ -0,0 +1,64 @@ +
    +

    Text Editor

    + +

    + When you're writing code, it's nice to have a text editor that is + optimized for writing code, with features like automatic + color-coding of key words. The default text editor on macOS and + Linux is usually set to Vim, which is not famous for being + intuitive. If you accidentally find yourself stuck in it, hit + the Esc key, followed by :+Q+! + (colon, lower-case 'q', exclamation mark), then hitting Return to + return to the shell. +

    + +
    + + +
    +
    +

    + nano is a basic editor and the default that instructors use in the workshop. + It is installed along with Git. +

    +

    + Others editors that you can use are + Notepad++ or + Sublime Text. + Be aware that you must + add its installation directory to your system path. + Please ask your instructor to help you do this. +

    +
    +
    +

    + nano is a basic editor and the default that instructors use in the workshop. + See the Git installation video tutorial + for an example on how to open nano. + It should be pre-installed. +

    +

    + Others editors that you can use are + BBEdit or + Sublime Text. +

    +
    +
    +

    + nano is a basic editor and the default that instructors use in the workshop. + It should be pre-installed. +

    +

    + Others editors that you can use are + Gedit, + Kate or + Sublime Text. +

    +
    +
    +
    +
    diff --git a/_includes/install_instructions/git.html b/_includes/install_instructions/git.html new file mode 100644 index 00000000..cd0d5723 --- /dev/null +++ b/_includes/install_instructions/git.html @@ -0,0 +1,67 @@ +{% comment %} +Git Setup instructions rely on Shell instructions. If you don't include +Shell instructions as part of your workshop website, make sure to adjust +the text below accordingly. +{% endcomment %} +
    +

    Git

    +

    + Git is a version control system that lets you track who made changes + to what when and has options for easily updating a shared or public + version of your code + on github.com. You will need a + supported + web browser. +

    +

    + You will need an account at github.com + for parts of the Git lesson. Basic GitHub accounts are free. We encourage + you to create a GitHub account if you don't have one already. + Please consider what personal information you'd like to reveal. For + example, you may want to review these + instructions + for keeping your email address private provided at GitHub. +

    + +
    + + +
    + +
    + Video Tutorial +

    + For macOS, install Git for Mac + by downloading and running the most recent "mavericks" installer from + this list. + Because this installer is not signed by the developer, you may have to + right click (control click) on the .pkg file, click Open, and click + Open on the pop up window. + After installing Git, there will not be anything in your /Applications folder, + as Git is a command line program. + For older versions of OS X (10.5-10.8) use the + most recent available installer labelled "snow-leopard" + available here. +

    +
    +
    +

    + If Git is not already available on your machine you can try to + install it via your distro's package manager. For Debian/Ubuntu run + sudo apt-get install git and for Fedora run + sudo dnf install git. +

    +
    +
    +
    +
    diff --git a/_includes/install_instructions/openrefine.html b/_includes/install_instructions/openrefine.html new file mode 100644 index 00000000..9357af0c --- /dev/null +++ b/_includes/install_instructions/openrefine.html @@ -0,0 +1,57 @@ +
    +

    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. + 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. +
    3. Download software from http://openrefine.org/
    4. +
    5. Create a new directory called OpenRefine.
    6. +
    7. Unzip the downloaded file into the OpenRefine directory by right-clicking and selecting "Extract ...".
    8. +
    9. Go to your newly created OpenRefine directory.
    10. +
    11. 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).
    12. +
    13. 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.
    14. +
    +
    +
    +
      +
    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. +
    3. Download software from http://openrefine.org/.
    4. +
    5. Create a new directory called OpenRefine.
    6. +
    7. Unzip the downloaded file into the OpenRefine directory by double-clicking it.
    8. +
    9. Go to your newly created OpenRefine directory.
    10. +
    11. Launch OpenRefine by dragging the icon into the Applications folder.
    12. +
    13. Use Ctrl-click/Open ... to launch it.
    14. +
    15. 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.
    16. +
    +
    +
    +
      +
    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. +
    3. Download software from http://openrefine.org/.
    4. +
    5. Make a directory called OpenRefine.
    6. +
    7. Unzip the downloaded file into the OpenRefine directory.
    8. +
    9. Go to your newly created OpenRefine directory.
    10. +
    11. Launch OpenRefine by entering ./refine into the terminal within the OpenRefine directory.
    12. +
    13. 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.
    14. +
    +
    +
    +
    +
    diff --git a/_includes/install_instructions/python.html b/_includes/install_instructions/python.html new file mode 100644 index 00000000..2b56dbac --- /dev/null +++ b/_includes/install_instructions/python.html @@ -0,0 +1,103 @@ +{% comment %} + +Remove the third paragraph if the workshop will teach Python +using something other than the Jupyter Notebook. Details at + +https://jupyter-notebook.readthedocs.io/en/stable/notebook.html#browser-compatibility +{% endcomment %} +
    +

    Python

    + +

    + Python is a popular language for + research computing, and great for general-purpose programming as + well. Installing all of its research packages individually can be + a bit difficult, so we recommend + Anaconda, + an all-in-one installer. +

    + +

    + Regardless of how you choose to install it, + please make sure you install Python version 3.x + (e.g., 3.6 is fine). +

    + + {% comment %} + Please remove or comment out this paragraph using + or {% comment %} and {% endcomment %} + if you do not plan to use Jupyter Notebook environment. + {% endcomment %} +

    + We will teach Python using the Jupyter Notebook, + a programming environment that runs in a web browser (Jupyter Notebook will be installed by Anaconda). For this to work you will need a reasonably + up-to-date browser. The current versions of the Chrome, Safari and + Firefox browsers are all + supported + (some older browsers, including Internet Explorer version 9 + and below, are not). +

    + +
    + + +
    +
    + Video Tutorial +
      +
    1. Open https://www.anaconda.com/products/individual#download-section with your web browser.
    2. +
    3. Download the Anaconda for Windows installer with Python 3. (If you are not sure which version to choose, you probably want the 64-bit Graphical Installer Anaconda3-...-Windows-x86_64.exe)
    4. +
    5. Install Python 3 by running the Anaconda Installer, using all of the defaults for installation except make sure to check Add Anaconda to my PATH environment variable.
    6. +
    +
    + +
    +
      +
    1. Open https://www.anaconda.com/products/individual#download-section with your web browser.
    2. +
    3. Download the Anaconda Installer with Python 3 for Linux.
      + (The installation requires using the shell. If you aren't + comfortable doing the installation yourself + stop here and request help at the workshop.) +
    4. +
    5. + Open a terminal window and navigate to the directory where + the executable is downloaded (e.g., `cd ~/Downloads`). +
    6. +
    7. + Type
      bash Anaconda3-
      and then press + Tab to autocomplete the full file name. The name of + file you just downloaded should appear. +
    8. +
    9. + Press Enter + (or Return depending on your keyboard). + You will follow the text-only prompts. + To move through the text, press Spacebar. + Type yes and press enter to approve the license. + Press Enter (or Return) + to approve the default location + for the files. + Type yes and press + Enter (or Return) + to prepend Anaconda to your PATH + (this makes the Anaconda distribution the default Python). +
    10. +
    11. + Close the terminal window. +
    12. +
    +
    +
    +
    +
    diff --git a/_includes/install_instructions/r.html b/_includes/install_instructions/r.html new file mode 100644 index 00000000..04e16bd7 --- /dev/null +++ b/_includes/install_instructions/r.html @@ -0,0 +1,55 @@ +
    +

    R

    + +

    + R is a programming language + that is especially powerful for data exploration, visualization, and + statistical analysis. To interact with R, we use + RStudio. +

    + +
    + + +
    +
    + Video Tutorial +

    + Install R by downloading and running + this .exe file + from CRAN. + Also, please install the + RStudio IDE. + Note that if you have separate user and admin accounts, you should run the + installers as administrator (right-click on .exe file and select "Run as + administrator" instead of double-clicking). Otherwise problems may occur later, + for example when installing R packages. +

    +
    + +
    +

    + You can download the binary files for your distribution + from CRAN. Or + you can use your package manager (e.g. for Debian/Ubuntu + run sudo apt-get install r-base and for Fedora run + sudo dnf install R). Also, please install the + RStudio IDE. +

    +
    +
    +
    +
    diff --git a/_includes/install_instructions/shell.html b/_includes/install_instructions/shell.html new file mode 100644 index 00000000..79865be1 --- /dev/null +++ b/_includes/install_instructions/shell.html @@ -0,0 +1,123 @@ +
    +

    The Bash Shell

    +

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

    + +
    + + +
    +
    + Video Tutorial +
      +
    1. Download the Git for Windows installer.
    2. +
    3. Run the installer and follow the steps below: +
        + {% comment %} Git 2.27.0 Setup {% endcomment %} +
      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. +
      3. + + From the dropdown menu select "Use the nano editor by default" and click on "Next". + +
      4. + {% comment %} Adjusting your PATH environment {% endcomment %} +
      5. + 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.) +
      6. + {% comment %} Choosing the SSH executable {% endcomment %} + {% comment %} Choosing HTTPS transport backend {% endcomment %} +
      7. + Ensure that "Use the native Windows Secure Channel library" is selected and click on "Next". +
      8. + {% comment %} This should mean that people stuck behind corporate firewalls that do MITM attacks + with their own root CA are still able to access remote git repos. {% endcomment %} + {% comment %} Configuring the line ending conversions {% endcomment %} +
      9. + Ensure that "Checkout Windows-style, commit Unix-style line endings" is selected and click on "Next". +
      10. + {% comment %} Configuring the terminal emulator to use with Git Bash {% endcomment %} +
      11. + + Ensure that "Use Windows' default console window" is selected and click on "Next". + +
      12. + {% comment %} Configuring extra options {% endcomment %} +
      13. + Ensure that "Default (fast-forward or merge) is selected and click "Next" +
      14. +
      15. + Ensure that "Enable file system caching" and "Enable Git Credential Manager" are selected + and click on "Next". +
      16. + {% comment %} Configuring experimental options {% endcomment %} +
      17. Click on "Install".
      18. + {% comment %} Installing {% endcomment %} + {% comment %} Completing the Git Setup Wizard {% endcomment %} + {% comment %} as of 2020-06-02, the Window will say "click Finish", but the button is labelled as "Next" {% endcomment %} +
      19. Click on "Finish" or "Next".
      20. +
      +
    4. +
    5. + 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. +
      3. + Type the following line into the command prompt window exactly as shown: +

        setx HOME "%USERPROFILE%"

        +
      4. +
      5. Press Enter, you should see SUCCESS: Specified value was saved.
      6. +
      7. Quit command prompt by typing exit then pressing Enter
      8. +
      +
    6. +
    +

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

    +
    +
    +

    + 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". +

    +
    +
    +

    + 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. +

    +
    +
    +
    +
    diff --git a/_includes/install_instructions/sql.html b/_includes/install_instructions/sql.html new file mode 100644 index 00000000..2df2c506 --- /dev/null +++ b/_includes/install_instructions/sql.html @@ -0,0 +1,53 @@ +
    +

    SQLite

    + +

    + SQL is a specialized programming language used with databases. We + use a database manager called + SQLite in our lessons. +

    + +
    + +
    +
    +
      +
    • Run "Git Bash" from the Start menu
    • +
    • Copy the following curl -fsSL {{site.url}}{{site.baseurl}}/getsql.sh | bash
    • +
    • Paste it into the window that Git Bash opened. If you're unsure, ask an instructor for help
    • +
    • You should see something like 3.27.2 2019-02-25 16:06:06 ...
    • +
    + +

    If you want to do this manually, download sqlite3, make a bin directory in the user's home directory, unzip sqlite3, move it into the bin directory, and then add the bin directory to the path.

    + +
    +
    +

    + SQLite comes pre-installed on macOS. +

    +
    +
    +

    + SQLite comes pre-installed on Linux. +

    +
    +
    + +
    +
    +
    + +

    If you installed Anaconda, it also has a copy of SQLite + without support to readline. + Instructors will provide a workaround for it if needed.

    +
    diff --git a/_includes/javascript.html b/_includes/javascript.html index fcc74e6e..c9e1d120 100644 --- a/_includes/javascript.html +++ b/_includes/javascript.html @@ -4,11 +4,51 @@ + diff --git a/_includes/swc/setup.html b/_includes/swc/setup.html index ea5aa727..4ab835bb 100644 --- a/_includes/swc/setup.html +++ b/_includes/swc/setup.html @@ -1,538 +1,25 @@ -
    {% comment %} Start of 'shell' section. {% endcomment %} -

    The Bash Shell

    -

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

    - -
    - - -
    -
    - Video Tutorial -
      -
    1. Download the Git for Windows installer.
    2. -
    3. Run the installer and follow the steps below: -
        - {% comment %} Git 2.23.0 Setup {% endcomment %} -
      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. -
      3. - - From the dropdown menu select "Use the nano editor by default" and click on "Next". - -
      4. - {% comment %} Adjusting your PATH environment {% endcomment %} -
      5. - 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.) -
      6. - {% comment %} Choosing the SSH executable {% endcomment %} - {% comment %} Choosing HTTPS transport backend {% endcomment %} -
      7. - Ensure that "Use the native Windows Secure Channel library" is selected and click on "Next". -
      8. - {% comment %} This should mean that people stuck behind corporate firewalls that do MITM attacks - with their own root CA are still able to access remote git repos. {% endcomment %} - {% comment %} Configuring the line ending conversions {% endcomment %} -
      9. - Ensure that "Checkout Windows-style, commit Unix-style line endings" is selected and click on "Next". -
      10. - {% comment %} Configuring the terminal emulator to use with Git Bash {% endcomment %} -
      11. - - Ensure that "Use Windows' default console window" is selected and click on "Next". - -
      12. - {% comment %} Configuring extra options {% endcomment %} -
      13. - Ensure that "Enable file system caching" and "Enable Git Credential Manager" are selected - and click on "Next". -
      14. - {% comment %} Configuring experimental options {% endcomment %} -
      15. Click on "Install".
      16. - {% comment %} Installing {% endcomment %} - {% comment %} Completing the Git Setup Wizard {% endcomment %} -
      17. Click on "Finish".
      18. -
      -
    4. -
    5. - 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. -
      3. - Type the following line into the command prompt window exactly as shown: -

        setx HOME "%USERPROFILE%"

        -
      4. -
      5. Press [Enter], you should see SUCCESS: Specified value was saved.
      6. -
      7. Quit command prompt by typing exit then pressing [Enter]
      8. -
      -
    6. -
    -

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

    -
    -
    -

    - 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 enter/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". -

    -
    -
    -

    - 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/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. -

    -
    -
    -
    -
    {% comment %} End of 'shell' section. {% endcomment %} - -
    {% comment %} Start of 'Git' section. GitHub browser compatibility - is given at https://help.github.com/articles/supported-browsers/{% endcomment %} -

    Git

    -

    - Git is a version control system that lets you track who made changes - to what when and has options for easily updating a shared or public - version of your code - on github.com. You will need a - supported - web browser. -

    -

    - You will need an account at github.com - for parts of the Git lesson. Basic GitHub accounts are free. We encourage - you to create a GitHub account if you don't have one already. - Please consider what personal information you'd like to reveal. For - example, you may want to review these - instructions - for keeping your email address private provided at GitHub. -

    - -
    - - -
    -
    -

    - Git should be installed on your computer as part of your Bash - install (described above). -

    -
    -
    - Video Tutorial -

    - For OS X 10.9 and higher, install Git for Mac - by downloading and running the most recent "mavericks" installer from - this list. - Because this installer is not signed by the developer, you may have to - right click (control click) on the .pkg file, click Open, and click - Open on the pop up window. - After installing Git, there will not be anything in your /Applications folder, - as Git is a command line program. - For older versions of OS X (10.5-10.8) use the - most recent available installer labelled "snow-leopard" - available here. -

    -
    -
    -

    - If Git is not already available on your machine you can try to - install it via your distro's package manager. For Debian/Ubuntu run - sudo apt-get install git and for Fedora run - sudo dnf install git. -

    -
    -
    -
    -
    {% comment %} End of 'Git' section. {% endcomment %} - -
    {% comment %} Start of 'editor' section. {% endcomment %} -

    Text Editor

    - -

    - When you're writing code, it's nice to have a text editor that is - optimized for writing code, with features like automatic - color-coding of key words. The default text editor on macOS and - Linux is usually set to Vim, which is not famous for being - intuitive. If you accidentally find yourself stuck in it, hit - the Esc key, followed by :+Q+! - (colon, lower-case 'q', exclamation mark), then hitting Return to - return to the shell. -

    - -
    - - -
    -
    -

    - nano is a basic editor and the default that instructors use in the workshop. - It is installed along with Git. -

    -

    - Others editors that you can use are - Notepad++ or - Sublime Text. - Be aware that you must - add its installation directory to your system path. - Please ask your instructor to help you do this. -

    -
    -
    -

    - nano is a basic editor and the default that instructors use in the workshop. - See the Git installation video tutorial - for an example on how to open nano. - It should be pre-installed. -

    -

    - Others editors that you can use are - BBEdit or - Sublime Text. -

    -
    -
    -

    - nano is a basic editor and the default that instructors use in the workshop. - It should be pre-installed. -

    -

    - Others editors that you can use are - Gedit, - Kate or - Sublime Text. -

    -
    -
    -
    -
    {% comment %} End of 'editor' section. {% endcomment %} - -
    {% comment %} Start of 'Python' section. Remove the third paragraph if - the workshop will teach Python using something other than - the Jupyter Notebook. - Details at https://jupyter-notebook.readthedocs.io/en/stable/notebook.html#browser-compatibility {% endcomment %} -

    Python

    - -

    - Python is a popular language for - research computing, and great for general-purpose programming as - well. Installing all of its research packages individually can be - a bit difficult, so we recommend - Anaconda, - an all-in-one installer. -

    - -

    - Regardless of how you choose to install it, - please make sure you install Python version 3.x - (e.g., 3.6 is fine). -

    - -

    - We will teach Python using the Jupyter Notebook, - a programming environment that runs in a web browser (Jupyter Notebook will be installed by Anaconda). For this to work you will need a reasonably - up-to-date browser. The current versions of the Chrome, Safari and - Firefox browsers are all - supported - (some older browsers, including Internet Explorer version 9 - and below, are not). -

    - -
    - - -
    -
    - Video Tutorial -
      -
    1. Open https://www.anaconda.com/distribution/#download-section with your web browser.
    2. -
    3. Download the Anaconda for Windows installer with Python 3. (If you are not sure which version to choose, you probably want the 64-bit Graphical Installer Anaconda3-...-Windows-x86_64.exe)
    4. -
    5. Install Python 3 by running the Anaconda Installer, using all of the defaults for installation except make sure to check Add Anaconda to my PATH environment variable.
    6. -
    -
    - -
    -
      -
    1. Open https://www.anaconda.com/distribution/#download-section with your web browser.
    2. -
    3. Download the Anaconda Installer with Python 3 for Linux.
      - (The installation requires using the shell. If you aren't - comfortable doing the installation yourself - stop here and request help at the workshop.) -
    4. -
    5. - Open a terminal window and navigate to the directory where - the executable is downloaded (e.g., `cd ~/Downloads`). -
    6. -
    7. - Type
      bash Anaconda3-
      and then press - Tab to autocomplete the full file name. The name of - file you just downloaded should appear. -
    8. -
    9. - Press Enter. - You will follow the text-only prompts. - To move through the text, press Spacebar. - Type yes and press enter to approve the license. - Press Enter to approve the default location - for the files. - Type yes and press Enter - to prepend Anaconda to your PATH - (this makes the Anaconda distribution the default Python). -
    10. -
    11. - Close the terminal window. -
    12. -
    -
    -
    -
    - {% comment %} -

    - Once you are done installing the software listed above, - please go to this page, - which has instructions on how to test that everything was installed correctly. -

    - {% endcomment %} -
    {% comment %} End of 'Python' section. {% endcomment %} - -
    {% comment %} Start of 'R' section. {% endcomment %} -

    R

    - -

    - R is a programming language - that is especially powerful for data exploration, visualization, and - statistical analysis. To interact with R, we use - RStudio. -

    - -
    - - -
    -
    - Video Tutorial -

    - Install R by downloading and running - this .exe file - from CRAN. - Also, please install the - RStudio IDE. - Note that if you have separate user and admin accounts, you should run the - installers as administrator (right-click on .exe file and select "Run as - administrator" instead of double-clicking). Otherwise problems may occur later, - for example when installing R packages. -

    -
    - -
    -

    - You can download the binary files for your distribution - from CRAN. Or - you can use your package manager (e.g. for Debian/Ubuntu - run sudo apt-get install r-base and for Fedora run - sudo dnf install R). Also, please install the - RStudio IDE. -

    -
    -
    -
    -
    {% comment %} End of 'R' section. {% endcomment %} - -
    {% comment %} Start of 'SQLite' section. {% endcomment %} -

    SQLite

    - -

    - SQL is a specialized programming language used with databases. We - use a simple database manager called - SQLite in our lessons. -

    - -
    - -
    -
    -

    -

      -
    • Run git-bash from the start menu
    • -
    • Copy the following curl {{site.url}}{{site.baseurl}}/getsql.sh | bash
    • -
    • Paste it into the window that git bash opened. If you're unsure, ask an instructor for help
    • -
    • You should see something like 3.27.2 2019-02-25 16:06:06 ...
    • -
    - -

    If you want to do this manually, download sqlite3, make a bin directory in the user's home directory, unzip sqlite3, move it into the bin directory, and then add the bin directory to the path.

    - -

    -
    -
    -

    - SQLite comes pre-installed on macOS. -

    -
    -
    -

    - SQLite comes pre-installed on Linux. -

    -
    -
    -

    -

      -
    • In case of problems: register for an account at Python Anywhere
    • -
    • Download survey.db
    • -
    • Click on files and upload survey.db
    • -
    • Click on dashboard and Choose new console $ bash
    • -
    -

    -
    -
    -
    - -

    If you installed Anaconda, it also has a copy of SQLite - without support to readline. - Instructors will provide a workaround for it if needed.

    -
    {% comment %} End of 'SQLite' section. {% endcomment %} - -
    {% comment %} Start of 'OpenRefine' section. {% endcomment %} -

    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. -

    - -
    - - -
    -
    -

    - 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. -

    -

    Download software from http://openrefine.org/

    -

    Create a new directory called OpenRefine.

    -

    Unzip the downloaded file into the OpenRefine directory by right-clicking and selecting "Extract ...".

    -

    Go to your newly created OpenRefine directory.

    -

    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).

    -

    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.

    -
    -
    -

    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.

    -

    Download software from http://openrefine.org/.

    -

    Create a new directory called OpenRefine.

    -

    Unzip the downloaded file into the OpenRefine directory by double-clicking it.

    -

    Go to your newly created OpenRefine directory.

    -

    Launch OpenRefine by dragging the icon into the Applications folder.

    -

    Use Ctrl-click/Open ... to launch it.

    -

    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.

    -
    -
    -

    Check that you have either the Firefox or the Chrome browser installed and set as your default browser. OpenRefine runs in your default browser.

    -

    Download software from http://openrefine.org/.

    -

    Make a directory called OpenRefine.

    -

    Unzip the downloaded file into the OpenRefine directory.

    -

    Go to your newly created OpenRefine directory.

    -

    Launch OpenRefine by entering ./refine into the terminal within the OpenRefine directory.

    -

    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.

    -
    -
    -
    -
    {% comment %} End of 'OpenRefine' section. {% endcomment %} +{% assign curricula = "swc-gapminder|swc-inflammation" | split: "|" %} +{% unless curricula contains site.curriculum %} +{% include warning-curriculum.html %} +{% endunless %} + +{% include install_instructions/shell.html %} +{% include install_instructions/git.html %} +{% include install_instructions/editor.html %} + +{% if site.flavor == "r" %} +{% include install_instructions/r.html %} +{% elsif site.flavor == "python" %} +{% include install_instructions/python.html %} +{% else %} +{% include warning-flavor.html %} +{% endif %} {% comment %} -
    -

    Virtual Machine

    +The following setup instructions are commented out because Carpentries workshops +cover the these topics less frequently. Please uncomment the lines that +correspond to the topics covered in your workshop. -

    - Some instructors prefer to have learners use a virtual machine (VM) - rather than install software on their own computers. If your - instructors have chosen to do this, please: -

    -
      -
    1. - Install VirtualBox. -
    2. -
    3. - Download our VM image. - Warning: this file is 1.7 GByte, so please - download it before coming to your workshop. -
    4. -
    5. - Load the VM into VirtualBox by selecting "Import Appliance" and - loading the .ova file. -
    6. -
    -
    +{% include install_instructions/sql.html %} +{% include install_instructions/openrefine.html %} {% endcomment %} diff --git a/_includes/warning-curriculum.html b/_includes/warning-curriculum.html index 3cce3f55..6f57d166 100644 --- a/_includes/warning-curriculum.html +++ b/_includes/warning-curriculum.html @@ -1,4 +1,8 @@
    - Unrecognized value for variable curriculum set in _config.yml. Currently the variable is set to: {{ site.curriculum }} + Unrecognized value for variable curriculum set in + _config.yml. Currently the variable is set to: + {{ site.curriculum }}. Check the values of + carpentry and curriculum in the + _config.yml file.
    diff --git a/_includes/warning-flavor.html b/_includes/warning-flavor.html index b776d09a..66309baf 100644 --- a/_includes/warning-flavor.html +++ b/_includes/warning-flavor.html @@ -1,3 +1,7 @@ -
    -

    unrecognized value for variable flavor set in _config.yml. Valid values are r and python, currently set to {{ site.flavor }}.

    +
    +

    + Unrecognized value for variable flavor set in + _config.yml. Valid values are "r" and + "python", currently set to {{ site.flavor }}. +

    diff --git a/_includes/workshop_os.js b/_includes/workshop_os.js deleted file mode 100644 index 39c2bf41..00000000 --- a/_includes/workshop_os.js +++ /dev/null @@ -1,30 +0,0 @@ -/* Based on https://stackoverflow.com/a/30894829/1802726 */ -var show_instructions = function() { - //set all nav tabs to inactive - $('.nav-tabs li').removeClass('active'); - - //get all nav tabs matching the os and set to active - $('.nav-tabs li a[href*="'+localStorage.os+'"]').closest('li').addClass('active'); - - //set all tabs to inactive - $('.tab-pane').removeClass('active'); - - //get all tabs matching the os and set to active - $('.tab-pane[id*="'+localStorage.os+'"]').addClass('active'); -} - -if (typeof(Storage) !== "undefined") { - if (localStorage.os == "undefined") { - localStorage.os = "windows"; - } - show_instructions(); -} else { - console.log("No localStorage"); -} - -/* Based on https://stackoverflow.com/a/30894829/1802726 */ -$('.nav-tabs li a').click(function(){ - //get selected os - localStorage.os = $(this)[0].dataset.os; - show_instructions(); -}); diff --git a/_layouts/workshop.html b/_layouts/workshop.html index dfee5714..9f28f7e1 100644 --- a/_layouts/workshop.html +++ b/_layouts/workshop.html @@ -67,8 +67,5 @@ {% include workshop_footer.html %}
    {% include javascript.html %} - diff --git a/index.md b/index.md index 3a606c13..cb36ca5a 100644 --- a/index.md +++ b/index.md @@ -65,6 +65,18 @@ It looks like you are setting up a website for a Data Carpentry curriculum but y {% endunless %} {% endif %} +{% comment %} +Check SWC curriculum +{% endcomment %} + +{% if site.carpentry == "swc" %} +{% unless site.curriculum == "swc-inflammation" or site.curriculum == "swc-gapminder" %} +
    +It looks like you are setting up a website for a Software Carpentry curriculum but you haven't specified the curriculum type in the _config.yml file (current value in _config.yml: "{{ site.curriculum }}", possible values: swc-inflammation, or swc-gapminder). After editing this file, you need to run make serve again to see the changes reflected. +
    +{% endunless %} +{% endif %} + {% comment %} EVENTBRITE @@ -74,7 +86,7 @@ are not using Eventbrite, or leave it in, since it will not be displayed if the 'eventbrite' field in the header is not set. {% endcomment %} {% if page.eventbrite %} -Some adblockers block the registration window. If you do not see the +Some adblockers block the registration window. If you do not see the registration box below, please check your adblocker settings.