Skip to content

Commit

Permalink
Modify for the Python workshop
Browse files Browse the repository at this point in the history
  • Loading branch information
frfeng committed Nov 20, 2023
1 parent 81e95dd commit 0c34983
Show file tree
Hide file tree
Showing 6 changed files with 82 additions and 76 deletions.
6 changes: 3 additions & 3 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ curriculum: "swc-gapminder"
# 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: "r"
flavor: "python"

# If the workshop will be a lesson pilot (for a new official lesson or
# a lesson in The Carpentries Incubator), set pilot to "true"
Expand All @@ -53,14 +53,14 @@ pilot: true
# Most workshops don't use extra pages. More information about extra
# pages are included in the README:
# https://github.com/carpentries/workshop-template#creating-extra-pages
title: "UM Software Carpentry Workshop"
title: "UM Software Carpentry Workshop - Python pilot"

#------------------------------------------------------------
# Incubator workshop settings (only relevant for workshops teaching a lesson
# in The Carpentries Incubator).
#
# For an Incubator workshop, uncomment the line below and add the URL of the lesson site.
incubator_lesson_site: "https://umcarpentries.org/intro-curriculum-r/"
incubator_lesson_site: "https://umcarpentries.org/intro-curriculum-python/"
#
# For an Incubator workshop, uncomment the line below and add the URL of your pre-workshop survey
# incubator_pre_survey: "put the URL of your pre-workshop survey here"
Expand Down
5 changes: 3 additions & 2 deletions _includes/install_instructions/git.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ <h3>Git</h3>
You will need an account at <a href="https://github.com/">github.com</a>
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
Before signing up, you may want to review this short list of <a href="https://happygitwithr.com/github-acct#username-advice">GitHub username advice</a>.
Please also consider what personal information you'd like to reveal. For
example, you may want to review these
<a href="https://help.github.com/articles/keeping-your-email-address-private/">instructions
for keeping your email address private</a> provided at GitHub.
Expand All @@ -33,7 +34,7 @@ <h3>Git</h3>
<div class="tab-content">
<article role="tabpanel" class="tab-pane active" id="git-windows">
<p>
Git should be installed on your computer as part of your Bash
Git should be installed on your computer as part of your Git for Windows
install (see the
<a href="#shell">Shell installation instructions</a>).
</p>
Expand Down
80 changes: 42 additions & 38 deletions _includes/install_instructions/python.html
Original file line number Diff line number Diff line change
@@ -1,41 +1,38 @@
{% comment %}

Remove the third paragraph if the workshop will teach Python
using something other than the Jupyter Notebook. Details at
using something other than the JupyterLab. Details at

https://jupyter-notebook.readthedocs.io/en/stable/notebook.html#browser-compatibility
https://jupyterlab.readthedocs.io/en/stable/getting_started/installation.html#supported-browsers
{% endcomment %}
<div id="python">
<h3>Python</h3>

<p>
<a href="https://python.org">Python</a> 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
<a href="https://www.anaconda.com/products/individual">Anaconda</a>,
an all-in-one installer.
</p>

<p>
Regardless of how you choose to install it,
<strong>please make sure you install Python version 3.x</strong>
(e.g., 3.6 is fine).
<a href="https://python.org">Python</a> is a popular general-purpose programming language.
Installing Python and its scientific packages individually can be a bit difficult, so we recommend
<a href="https://www.anaconda.com/download">Anaconda</a>,
a Python distribution bundled with common scientific packages and other popular tools.
</p>

{% comment %}
Please remove or comment out this paragraph using
<!-- and --> or {% comment %} and {% endcomment %}
if you do not plan to use Jupyter Notebook environment.
if you do not plan to use JupyterLab environment.
{% endcomment %}
<p>
We will teach Python using the <a href="https://jupyter.org/">Jupyter Notebook</a>,
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
<a href="https://jupyter-notebook.readthedocs.io/en/stable/notebook.html#browser-compatibility">supported</a>
(some older browsers, including Internet Explorer version 9
and below, are not).
We will teach Python using <a href="https://jupyter.org/">JupyterLab</a>,
a programming environment that runs in a web browser. For this to work you will need a reasonably
up-to-date web browser. The latest versions of the Chrome, Safari and Firefox browsers are all
<a href="https://jupyterlab.readthedocs.io/en/stable/getting_started/installation.html#supported-browsers">supported</a>.
Note you do not need to install JupyterLab separately as it comes pre-installed with Anaconda.
</p>

<p>
Note if you have already installed Anaconda previously, you don't need to install it again for this workshop.
However, you do need to make sure your Python libraries meet the version requirements for this workshop by running the provided <code>check_setup.ipynb</code> file.
If a library does not meet a version requirement,
you can run <code>pip install library_name --upgrade</code> in your command window (i.e., Anaconda Prompt for windows and Terminal for MacOS/Linux) to upgrade the library.
</p>

<div>
Expand All @@ -48,34 +45,41 @@ <h3>Python</h3>
<div class="tab-content">
<article role="tabpanel" class="tab-pane active" id="python-windows">
<ol>
<li>Open <a href="https://www.anaconda.com/products/individual#download-section">https://www.anaconda.com/products/individual#download-section</a> with your web browser.</li>
<li>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 <em>Anaconda3-...-Windows-x86_64.exe</em>)</li>
<li>Install Python 3 by running the Anaconda Installer, using all of the defaults for installation <em>except</em> make sure to check <strong>Add Anaconda to my PATH environment variable</strong>.</li>
<li>Open <a href="https://www.anaconda.com/download">https://www.anaconda.com/download</a> with your web browser.</li>
<li>Download the Anaconda for Windows installer. </li>
<li>Run the Anaconda Installer, using all of the defaults for installation <em>except</em> make sure to check <strong>Make Anaconda the default Python</strong>.</li>
<li>Once Anaconda is installed, launch the Anaconda Prompt by going to the Windows search bar, type in <code>anaconda prompt</code>, and press Enter.</li>
<li>In the Anaconda Prompt type <code>jupyter lab</code> and press Enter. This will open JupyterLab in your browser.</li>
<!-- <li>To keep the JupyterLab running, do not close the command line window (you can minimize it), as it works as JupterLab's "local host server".</li> -->
</ol>
<h4>Video Tutorial</h4>
Note: To keep the JupyterLab running, do not close the command line window (you can minimize it), as it works as JupterLab's "local host server".
<!-- <h4>Video Tutorial</h4>
<div class="yt-wrapper2">
<div class="yt-wrapper">
<iframe type="text/html" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" src="https://www.youtube-nocookie.com/embed/xxQ0mzZ8UvA?modestbranding=1&playsinline=1&iv_load_policy=3&rel=0" class="yt-frame" allowfullscreen></iframe>
</div>
</div>
</div> -->
</article>
<article role="tabpanel" class="tab-pane" id="python-macos">
<ol>
<li>Open <a href="https://www.anaconda.com/products/individual#download-section">https://www.anaconda.com/products/individual#download-section</a> with your web browser.</li>
<li>Download the Anaconda Installer with Python 3 for macOS (you can either use the Graphical or the Command Line Installer).</li>
<li>Install Python 3 by running the Anaconda Installer using all of the defaults for installation.</li>
<li>Open <a href="https://www.anaconda.com/download">https://www.anaconda.com/download</a> with your web browser.</li>
<li>Download the Anaconda Installer for macOS. You may need to choose an installer between an Intel-chip Mac and Apple silicon (e.g., M1/M2) Mac.</li>
<li>Run the Anaconda Installer, using all of the defaults for installation <em>except</em> make sure to check <strong>Make Anaconda the default Python</strong>.</li>
<li>Once Anaconda is installed, type <code>jupyter lab</code> in your Terminal and press Return. This will open JupyterLab in your browser.</li>
<!-- <li>To keep the JupyterLab running, do not close the Terminal window (you can minimize it), as it works as JupterLab's "local host server".</li> -->
</ol>
<h4>Video Tutorial</h4>
Note: To keep the JupyterLab running, do not close the command line window (you can minimize it), as it works as JupterLab's "local host server".
<!-- <h4>Video Tutorial</h4>
<div class="yt-wrapper2">
<div class="yt-wrapper">
<iframe type="text/html" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" src="https://www.youtube-nocookie.com/embed/TcSAln46u9U?modestbranding=1&playsinline=1&iv_load_policy=3&rel=0" class="yt-frame" allowfullscreen></iframe>
</div>
</div>
</div> -->
</article>
<article role="tabpanel" class="tab-pane" id="python-linux">
<ol>
<li>Open <a href="https://www.anaconda.com/products/individual#download-section">https://www.anaconda.com/products/individual#download-section</a> with your web browser.</li>
<li>Download the Anaconda Installer with Python 3 for Linux.<br>
<li>Open <a href="https://www.anaconda.com/download">https://www.anaconda.com/download</a> with your web browser.</li>
<li>Download the Anaconda Installer for Linux.<br>
(The installation requires using the shell. If you aren't
comfortable doing the installation yourself
stop here and request help at the workshop.)
Expand Down Expand Up @@ -103,11 +107,11 @@ <h4>Video Tutorial</h4>
to prepend Anaconda to your <code>PATH</code>
(this makes the Anaconda distribution the default Python).
</li>
<li>
Close the terminal window.
</li>
<li>Once Anaconda is installed, type <code>jupyter lab</code> in your Terminal and press Return. This will open JupyterLab in your browser.</li>
<!-- <li>To keep the JupyterLab running, do not close the Terminal window (you can minimize it), as it works as JupterLab's "local host server".</li> -->
</ol>
Note: To keep the JupyterLab running, do not close the command line window (you can minimize it), as it works as JupterLab's "local host server".
</article>
</div>
</div>
</div>
</div>
18 changes: 9 additions & 9 deletions _includes/install_instructions/shell.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<div id="shell">
<h3>The Bash Shell</h3>
<h3>The Unix Shell</h3>
<p>
Bash is a commonly-used shell that gives you the power to do
The <a href="https://en.wikipedia.org/wiki/Unix_shell">Unix shell</a> is a <a href="https://en.wikipedia.org/wiki/Command-line_interface">command-line interface</a> that gives you the power to do
tasks more quickly.
</p>

Expand Down Expand Up @@ -106,23 +106,23 @@ <h4>Video Tutorial</h4>
</article>
<article role="tabpanel" class="tab-pane" id="shell-macos">
<p>
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
The default shell in newer versions of macOS is Z shell, also known as zsh, and
it comes pre-installed with your MacOS.
You access shell from the Terminal (found in
<code>/Applications/Utilities</code>).
See the Git installation <a href="#shell-macos-video-tutorial">video tutorial</a>
for an example on how to open the Terminal.
You may want to keep Terminal in your dock for this workshop.
</p>
<p>
<!-- <p>
To see if your default shell is Bash type <code>echo $SHELL</code>
in Terminal and press the <kbd>Return</kbd> key. If the message
printed does not end with '/bash' then your default is something
else and you can run Bash by typing <code>bash</code>
</p>
</p> -->
<p>
If you want to change your default shell, see <a href="https://support.apple.com/en-au/HT208050" rel="noopener">
this Apple Support article</a> and follow the instructions on "How to change your default shell".
If you use an earlier version of MacOS with a different shell, see <a href="https://support.apple.com/en-au/HT208050" rel="noopener">
this Apple Support article</a> and follow the instructions on how to make zsh the default shell.
</p>
<h4 id="shell-macos-video-tutorial">Video Tutorial</h4>
<div class="yt-wrapper2">
Expand Down
16 changes: 8 additions & 8 deletions _includes/swc/schedule.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
<div class="col-md-6">
<h3>Day 1</h3>
<table class="table table-striped">
<tr> <td>Before</td> <td><a href="{{ site.pre_survey }}{{ site.github.project_title }}">Pre-workshop survey</a> </td> </tr>
<!-- <tr> <td>Before</td> <td><a href="{{ site.pre_survey }}{{ site.github.project_title }}">Pre-workshop survey</a> </td> </tr> -->
<tr> <td>09:00</td> <td>Welcome to the workshop</td> </tr>
<tr> <td>09:15</td> <td>R for Plotting</td> </tr>
<tr> <td>09:15</td> <td>Python for Plotting</td> </tr>
<tr> <td>10:30</td> <td>Morning break</td> </tr>
<tr> <td>10:45</td> <td>R for Plotting (Continued)</td> </tr>
<tr> <td>10:45</td> <td>Python for Plotting (Continued)</td> </tr>
<tr> <td>12:00</td> <td>Lunch break</td> </tr>
<tr> <td>13:00</td> <td>The Unix Shell</td> </tr>
<tr> <td>14:15</td> <td>Afternoon break</td> </tr>
Expand All @@ -17,15 +17,15 @@ <h3>Day 1</h3>
<div class="col-md-6">
<h3>Day 2</h3>
<table class="table table-striped">
<tr> <td>09:00</td> <td>R for Data Analysis</td> </tr>
<tr> <td>09:00</td> <td>Python for Data Analysis</td> </tr>
<tr> <td>10:30</td> <td>Morning break</td> </tr>
<tr> <td>10:45</td> <td>R for Data Analysis (Continued)</td> </tr>
<tr> <td>10:45</td> <td>Python for Data Analysis (Continued)</td> </tr>
<tr> <td>12:00</td> <td>Lunch break</td> </tr>
<tr> <td>13:00</td> <td>Writing Reports with R Markdown</td> </tr>
<tr> <td>13:00</td> <td>Jupyter Notebook and Markdown</td> </tr>
<tr> <td>14:30</td> <td>Afternoon break</td> </tr>
<tr> <td>14:45</td> <td>Writing Reports with R Markdown (Continued)</td> </tr>
<tr> <td>14:45</td> <td>Jupyter Notebook and Markdown (Continued)</td> </tr>
<tr> <td>15:30</td> <td>Conclusions & Wrap-up</td> </tr>
<tr> <td>16:15</td> <td><a href="{{ site.post_survey }}{{ site.github.project_title }}" target="_blank">Post-workshop Survey</a></td> </tr>
<!-- <tr> <td>16:15</td> <td><a href="{{ site.post_survey }}{{ site.github.project_title }}" target="_blank">Post-workshop Survey</a></td> </tr> -->
<tr> <td>16:30</td> <td>END</td> </tr>
</table>
</div>
Expand Down
Loading

0 comments on commit 0c34983

Please sign in to comment.