Commit 714ff3d0 authored by Christian Tischer's avatar Christian Tischer
Browse files

Merge branch 'carpentries-style' into 'master'

Carpentries style

See merge request !38
parents b617e91f 8870468f
Pipeline #10608 passed with stage
in 1 minute and 16 seconds
<p>
<a href="{{site.swc_site}}">Software Carpentry</a>
aims to help researchers get their work done
in less time and with less pain
by teaching them basic research computing skills.
This hands-on workshop will cover basic concepts and tools,
including program design, version control, data management,
and task automation.
Participants will be encouraged to help one another
and to apply what they have learned to their own research problems.
</p>
<p align="center">
<em>
For more information on what we teach and why,
please see our paper
"<a href="http://journals.plos.org/plosbiology/article?id=10.1371/journal.pbio.1001745">Best Practices for Scientific Computing</a>".
</em>
</p>
<div class="row">
<div class="col-md-6">
<h3>Day 1</h3>
<table class="table table-striped">
<tr> <td>09:00</td> <td>Automating tasks with the Unix shell</td> </tr>
<tr> <td>10:30</td> <td>Coffee</td> </tr>
<tr> <td>12:00</td> <td>Lunch break</td> </tr>
<tr> <td>13:00</td> <td>Building programs with Python</td> </tr>
<tr> <td>14:30</td> <td>Coffee</td> </tr>
<tr> <td>16:00</td> <td>Wrap-up</td> </tr>
</table>
</div>
<div class="col-md-6">
<h3>Day 2</h3>
<table class="table table-striped">
<tr> <td>09:00</td> <td>Version control with Git</td> </tr>
<tr> <td>10:30</td> <td>Coffee</td> </tr>
<tr> <td>12:00</td> <td>Lunch break</td> </tr>
<tr> <td>13:00</td> <td>Managing data with SQL</td> </tr>
<tr> <td>14:30</td> <td>Coffee</td> </tr>
<tr> <td>16:00</td> <td>Wrap-up</td> </tr>
</table>
</div>
</div>
<div class="row">
<div class="col-md-6">
<h3 id="syllabus-shell">The Unix Shell</h3>
<ul>
<li>Files and directories</li>
<li>History and tab completion</li>
<li>Pipes and redirection</li>
<li>Looping over files</li>
<li>Creating and running shell scripts</li>
<li>Finding things</li>
<li><a href="{{site.swc_pages}}/shell-novice/reference/">Reference...</a></li>
</ul>
</div>
<div class="col-md-6">
<h3 id="syllabus-python">Programming in Python</h3>
<ul>
<li>Using libraries</li>
<li>Working with arrays</li>
<li>Reading and plotting data</li>
<li>Creating and using functions</li>
<li>Loops and conditionals</li>
<li>Defensive programming</li>
<li>Using Python from the command line</li>
<li><a href="{{site.swc_pages}}/python-novice-inflammation/reference/">Reference...</a></li>
</ul>
</div>
<!--
<div class="col-md-6">
<h3 id="syllabus-r">Programming in R</h3>
<ul>
<li>Working with vectors and data frames</li>
<li>Reading and plotting data</li>
<li>Creating and using functions</li>
<li>Loops and conditionals</li>
<li>Using R from the command line</li>
<li><a href="{{site.swc_pages}}/r-novice-inflammation/reference/">Reference...</a></li>
</ul>
</div>
-->
<!--
<div class="col-md-6">
<h3 id="syllabus-matlab">Programming in MATLAB</h3>
<ul>
<li>Working with arrays</li>
<li>Reading and plotting data</li>
<li>Creating and using functions</li>
<li>Loops and conditionals</li>
<li>Defensive programming</li>
<li><a href="{{site.swc_pages}}/matlab-novice-inflammation/reference/">Reference...</a></li>
</ul>
</div>
-->
</div>
<div class="row">
<div class="col-md-6">
<h3 id="syllabus-git">Version Control with Git</h3>
<ul>
<li>Creating a repository</li>
<li>Recording changes to files: <code>add</code>, <code>commit</code>, ...</li>
<li>Viewing changes: <code>status</code>, <code>diff</code>, ...</li>
<li>Ignoring files</li>
<li>Working on the web: <code>clone</code>, <code>pull</code>, <code>push</code>, ...</li>
<li>Resolving conflicts</li>
<li>Open licenses</li>
<li>Where to host work, and why</li>
<li><a href="{{site.swc_pages}}/git-novice/reference/">Reference...</a></li>
</ul>
</div>
<!--
<div class="col-md-6">
<h3 id="syllabus-sql">Managing Data with SQL</h3>
<ul>
<li>Reading and sorting data</li>
<li>Filtering with <code>where</code></li>
<li>Calculating new values on the fly</li>
<li>Handling missing values</li>
<li>Combining values using aggregation</li>
<li>Combining information from multiple tables using <code>join</code></li>
<li>Creating, modifying, and deleting data</li>
<li>Programming with databases</li>
<li><a href="{{site.swc_pages}}/sql-novice-survey/reference/">Reference...</a></li>
</ul>
</div>
-->
<div class="col-md-6">
<h3 id="syllabus-r">Open Refine</h3>
<ul>
<li>Introduction to OpenRefine</li>
<li>Importing data</li>
<li>Basic functions</li>
<li>Advanced Functions</li>
<li><a href="{{site.lc_pages}}library-openrefine/reference">Reference...</a></li>
</ul>
</div>
</div>
<p id="who">
<strong>Who:</strong>
The course is aimed at graduate students and other researchers.
<strong>
You don't need to have any previous knowledge of the tools
that will be presented at the workshop.
</strong>
</p>
{% include base_path.html %}
{% comment %}
Display syllabus in tabular form.
Days are displayed if at least one episode has 'start = true'.
{% endcomment %}
<div class="syllabus">
<h2 id="schedule">Schedule</h2>
{% assign lesson_number = 0 %}
{% assign day = 0 %}
{% assign multiday = false %}
{% for episode in site.episodes %}
{% if episode.start %}{% assign multiday = true %}{% break %}{% endif %}
{% endfor %}
{% assign current = site.start_time %}
<table class="table table-striped">
<tr>
{% if multiday %}<td class="col-md-1"></td>{% endif %}
<td class="{% if multiday %}col-md-1{% else %}col-md-2{% endif %}"></td>
<td class="col-md-3"><a href="{{ relative_root_path }}{% link setup.md %}">Setup</a></td>
<td class="col-md-7">Download files required for the lesson</td>
</tr>
{% for episode in site.episodes %}
{% if episode.start %} {% comment %} Starting a new day? {% endcomment %}
{% assign day = day | plus: 1 %}
{% if day > 1 %} {% comment %} If about to start day 2 or later, show finishing time for previous day {% endcomment %}
{% assign hours = current | divided_by: 60 %}
{% assign minutes = current | modulo: 60 %}
<tr>
{% if multiday %}<td class="col-md-1"></td>{% endif %}
<td class="{% if multiday %}col-md-1{% else %}col-md-2{% endif %}">{% if hours < 10 %}0{% endif %}{{ hours }}:{% if minutes < 10 %}0{% endif %}{{ minutes }}</td>
<td class="col-md-3">Finish</td>
<td class="col-md-7"></td>
</tr>
{% endif %}
{% assign current = site.start_time %} {% comment %}Re-set start time of this episode to general daily start time {% endcomment %}
{% endif %}
{% assign hours = current | divided_by: 60 %}
{% assign minutes = current | modulo: 60 %}
<tr>
{% if multiday %}<td class="col-md-1">{% if episode.start %}Day {{ day }}{% endif %}</td>{% endif %}
<td class="{% if multiday %}col-md-1{% else %}col-md-2{% endif %}">{% if hours < 10 %}0{% endif %}{{ hours }}:{% if minutes < 10 %}0{% endif %}{{ minutes }}</td>
<td class="col-md-3">
{% assign lesson_number = lesson_number | plus: 1 %}
{{ lesson_number }}. <a href="{{ relative_root_path }}{{ episode.url }}">{{ episode.title }}</a>
</td>
<td class="col-md-7">
{% if episode.break %}
Break
{% else %}
{% if episode.questions %}
{% for question in episode.questions %}
{{question|markdownify|strip_html}}
{% unless forloop.last %}
<br/>
{% endunless %}
{% endfor %}
{% endif %}
{% endif %}
</td>
</tr>
{% assign current = current | plus: episode.teaching | plus: episode.exercises | plus: episode.break %}
{% endfor %}
{% assign hours = current | divided_by: 60 %}
{% assign minutes = current | modulo: 60 %}
<tr>
{% if multiday %}<td class="col-md-1"></td>{% endif %}
<td class="{% if multiday %}col-md-1{% else %}col-md-2{% endif %}">{% if hours < 10 %}0{% endif %}{{ hours }}:{% if minutes < 10 %}0{% endif %}{{ minutes }}</td>
<td class="col-md-3">Finish</td>
<td class="col-md-7"></td>
</tr>
</table>
<p>
The actual schedule may vary slightly depending on the topics and exercises chosen by the instructor.
</p>
</div>
{% comment %}
Advertising box at the top of a workshop website home page.
{% endcomment %}
<div class="jumbotron">
<div class="row">
<div class="col-md-10 col-md-offset-1">
<h2>{{page.venue}}</h2>
<div class="row">
<div class="col-md-6">
<p>{{page.humandate}}</p>
<p>{% if page.humantime %}{{page.humantime}}{% endif %}</p>
</div>
<div class="col-md-6">
<p>
<strong>Instructors:</strong>
{% if page.instructor %}
{{page.instructor | join: ', ' %}}
{% else %}
to be announced.
{% endif %}
</p>
{% if page.helper %}
<p>
<strong>Helpers:</strong>
{{page.helper | join: ', ' %}}
</p>
{% endif %}
</div>
</div>
</div>
</div>
</div>
<a href="//calendar.google.com/calendar/render?action=TEMPLATE&text={% if page.carpentry == "swc" %}Software{% elsif page.carpentry == "lc" %}Library{% elsif page.carpentry == "dc" %}Data{% endif %} Carpentry Workshop&dates={{ page.startdate | replace: "-", "" }}/{{ page.enddate | replace: "-", "" | plus: 0}}&trp=false&sprop&sprop=name:&sf=true&output=xml&location={{ page.address }}&details={% if page.carpentry == "swc" %}Software{% elsif page.carpentry == "lc" %}Library{% elsif page.carpentry == "dc" %}Data{% endif %} Carpentry Workshop at {{ page.venue }}">Add to your Google Calendar.</a>
{% comment %}
Footer for a standard workshop.
{% endcomment %}
<footer>
<div class="row">
<div class="col-md-6" align="left">
<h4>
Copyright &copy; 2016–{{ 'now' | date: "%Y" }}
{% if site.carpentry == "swc" %}
<a href="{{ site.swc_site }}">Software Carpentry</a>
{% elsif site.carpentry == "dc" %}
<a href="{{ site.dc_site }}">Data Carpentry</a>
{% elsif site.carpentry == "lc" %}
<a href="{{ site.lc_site }}">Library Carpentry</a>
{% elsif site.carpentry == "cp" %}
<a href="{{ site.carpentries_site }}">The Carpentries</a>
{% endif %}
</h4>
</div>
<div class="col-md-6" align="right">
<h4>
<a href="mailto:{{ site.email }}">Contact The Carpentries</a>
</h4>
</div>
</div>
</footer>
---
---
{% include base_path.html %}
{% include gh_variables.html %}
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta http-equiv="last-modified" content="{{ site.time }}">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- meta "search-domain" used for google site search function google_search() -->
<meta name="search-domain" value="{{ search_domain_url }}">
<link rel="stylesheet" type="text/css" href="{{ relative_root_path }}/assets/css/bootstrap.css" />
<link rel="stylesheet" type="text/css" href="{{ relative_root_path }}/assets/css/bootstrap-theme.css" />
<link rel="stylesheet" type="text/css" href="{{ relative_root_path }}/assets/css/lesson.css" />
<link rel="stylesheet" type="text/css" href="{{ relative_root_path }}/assets/css/syntax.css" />
{% include favicons.html %}
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
<script src="https://unpkg.com/mermaid@8.0.0/dist/mermaid.min.js"></script>
<script>var config = {
startOnLoad:true,
flowchart:{
useMaxWidth:true,
}
};mermaid.initialize(config);</script>
<title>
{% if page.title %}{{ page.title }}{% endif %}{% if page.title and site.title %} &ndash; {% endif %}{% if site.title %}{{ site.title }}{% endif %}
</title>
</head>
<body>
{% include life_cycle.html %}
<div class="container">
{% include navbar.html %}
{{ content }}
{% if site.kind == "workshop" %}
{% include workshop_footer.html %}
{% else %}
{% include lesson_footer.html %}
{% endif %}
</div>
{% include javascript.html %}
</body>
</html>
---
layout: base
---
{% include episode_navbar.html episode_navbar_title=true %}
<article>
{% include episode_title.html %}
{% include episode_break.html %}
{{content}}
</article>
{% include episode_navbar.html episode_navbar_title=false %}
---
layout: base
---
{% include episode_navbar.html episode_navbar_title=true %}
<article>
{% include episode_title.html %}
{% include episode_overview.html %}
{{content}}
{% include episode_keypoints.html %}
</article>
{% include episode_navbar.html episode_navbar_title=false %}
---
layout: base
---
{% include main_title.html %}
<article>
{{ content }}
</article>
{% include syllabus.html %}
---
layout: default
layout: base
---
<article class="module">
......@@ -78,62 +78,51 @@ window.onload = set_view_defaults;
<h1 class="post-title">{{ page.title }}</h1>
</header>
{% if page.prerequisites %}
<div class="prerequisites">
<br>
<br>
<blockquote class="prereq">
<h2>Prerequisites</h2>
Before starting this lesson, you should be familiar with:<br>
<br>
<ul>
{% for prereq in page.prerequisites %}
<li>{{ prereq | markdownify }}</li>
{% endfor %}
</ul>
</div>
</blockquote>
{% endif %}
<div class="learning-objectives">
<br>
<br>
<blockquote class="objectives">
<h2>Learning Objectives</h2>
After completing this lesson, learners should be able to:<br>
<br>
After completing this lesson, learners should be able to:
<ul>
{% for objective in page.objectives %}
<li>{{ objective | markdownify }}</li>
{% endfor %}
</ul>
</div>
</blockquote>
<br>
<br>
<h2>Motivation</h2>
{{ page.motivation | markdownify }}
<br>
<br>
<h2>Concept map</h2>
<h2>Concept</h2>
<div class="row">
<div class="col-md-5">
<div class="mermaid">
{{ page.concept_map }}
</div>
<br>
<br>
<h2>Example</h2>
</div>
<div class="col-md-5">
<figure>
<img src="{{ page.figure | relative_url }}">
<img src="{{ page.figure | relative_url }}" class="example_figure">
{% if page.figure_legend %}
<figcaption>{{ page.figure_legend }}</figcaption>
{% endif %}
</figure>
</div>
</div>
<div class="module-content">
{{ content }}
</div>
<br>
<br>
<h2>Activity</h2>
{% if page.activity_preface %}
......@@ -158,19 +147,16 @@ Show activity for: <select id="id_activity_platform" name="activityplatformlist"
{% endif %}
{% for platform in page.activities %}
<div id="{{ platform[0] | slugify }}-activity-div">
&nbsp; <br>
<h3>{{ platform[0] }}</h3>
<blockquote class="discussion" id="{{ platform[0] | slugify }}-activity-div">
<h2>{{ platform[0] }}</h2>
{% assign includefile = platform[1] %}
{% capture activity %}{% include {{ includefile }} %}{% endcapture %}
{{ activity | markdownify }}
</div>
</blockquote>
{% endfor %}
{% if page.exercises_preface or page.exercises %}
<br>
<br>
<h2>Formative assessment</h2>
{% endif %}
......@@ -179,7 +165,7 @@ Show activity for: <select id="id_activity_platform" name="activityplatformlist"
{% endif %}
{% if page.exercises %}
Perform additional excercises for: <select id="id_exercises_platform" name="exercisesplatformlist" onchange="change_exercises_content_by_platform('id_exercises_platform');return false;">
Perform additional exercises for: <select id="id_exercises_platform" name="exercisesplatformlist" onchange="change_exercises_content_by_platform('id_exercises_platform');return false;">
{% if site.default-platform == "NONE" %}
<option value="null-exercises" id="null-exercises-option" selected="selected"> Select a platform... </option>
{% else %}
......@@ -195,33 +181,32 @@ Perform additional excercises for: <select id="id_exercises_platform" name="exer
</select>
{% endif %}
{% for platform in page.exercises %}
<div id="{{ platform[0] | slugify }}-exercises-div">
&nbsp; <br>
<h3>{{ platform[0] }}</h3>
<blockquote class="challenge" id="{{ platform[0] | slugify }}-exercises-div">
<h2>{{ platform[0] }}</h2>
{% assign includefile = platform[1] %}
{% capture exercise %}{% include {{ includefile }} %}{% endcapture %}
{{ exercise | markdownify }}
</div>
</blockquote>
{% endfor %}
<br>
<br>
<br/>
<blockquote class="keypoints">
<h2>Follow-up material</h2>
<p>We recommend reading these modules next:</p>
<ul>
{% for follow_up in page.learn_next %}
<li>{{ follow_up | markdownify }}</li>
{% endfor %}
</ul>
<br>
<br>
<h2>Learn more</h2>
<p>Learn more:</p>
<ul>
{% for external_link in page.external_links %}
<li>{{ external_link | markdownify }}</li>
{% endfor %}
</ul>
</blockquote>
</article>
{% capture links %}{% include links.md %}{% endcapture %}
{{ links | markdownify }}
---
layout: default
layout: base
---
<article class="post">
<header class="post-header">
<h1 class="post-title">{{ page.title }}</h1>
</header>
<div class="post-content">
{{ content }}
</div>
{% include main_title.html %}
<article>
{{content}}
</article>
---
layout: page
title: "Reference"
---
{% include all_keypoints.html %}
{{content}}
---
---
{% include base_path.html %}
{% include gh_variables.html %}
<!doctype html>
<html lang="en">
<head>
<meta name="slug" content="{{project_title}}" />
<meta name="startdate" content="{{page.startdate}}" />
<meta name="enddate" content="{{page.enddate}}" />
<meta name="humandate" content="{{page.humandate}}" />
<meta name="country" content="{{page.country}}" />
<meta name="venue" content="{{page.venue}}" />
<meta name="address" content="{{page.address}}" />
<meta name="latlng" content="{{page.latlng}}" />
<meta name="language" content="{{page.language}}" />
<meta name="eventbrite" content="{{page.eventbrite}}" />
<meta name="instructor" content="{{page.instructor|join:'|'}}" />
<meta name="helper" content="{{page.helper|join:'|'}}" />
<meta name="contact" content="{{page.email}}" />
<meta name="carpentry" content="{{site.carpentry}}"
{% if page.redirect %}
<meta http-equiv="refresh" content="0; url={{page.redirect}}" />
{% endif %}
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta http-equiv="last-modified" content="{{ site.time }}">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" type="text/css" href="{{ relative_root_path }}/assets/css/bootstrap.css" />
<link rel="stylesheet" type="text/css" href="{{ relative_root_path }}/assets/css/bootstrap-theme.css" />
<link rel="stylesheet" type="text/css" href="{{ relative_root_path }}/assets/css/lesson.css" />
{% include favicons.html %}
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
<title>{{ page.venue }}: {{ page.humandate }}</title>
</head>
<body>
<div class="container">
{% include navbar.html %}
{% include workshop_ad.html %}
{{ content }}
{% include workshop_footer.html %}
</div>
{% include javascript.html %}