Skip to content

Commit

Permalink
Preparing for June 2016 release
Browse files Browse the repository at this point in the history
  • Loading branch information
gvwilson committed Jun 20, 2016
1 parent 15331a0 commit 9c447b8
Show file tree
Hide file tree
Showing 69 changed files with 3,344 additions and 14,700 deletions.
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
*~
.DS_Store
.sass-cache
_site
__pycache__
44 changes: 44 additions & 0 deletions CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
---
layout: page
title: "Contributor Code of Conduct"
permalink: /conduct/
---
As contributors and maintainers of this project,
we pledge to respect all people who contribute through reporting issues,
posting feature requests,
updating documentation,
submitting pull requests or patches,
and other activities.

We are committed to making participation in this project a harassment-free experience for everyone,
regardless of level of experience,
gender,
gender identity and expression,
sexual orientation,
disability,
personal appearance,
body size,
race,
ethnicity,
age,
or religion.

Examples of unacceptable behavior by participants include the use of sexual language or imagery,
derogatory comments or personal attacks,
trolling,
public or private harassment,
insults,
or other unprofessional conduct.

Project maintainers have the right and responsibility to remove, edit, or reject
comments, commits, code, wiki edits, issues, and other contributions
that are not aligned to this Code of Conduct.
Project maintainers who do not follow the Code of Conduct may be removed from the project team.

Instances of abusive, harassing, or otherwise unacceptable behavior
may be reported by opening an issue or contacting one or more of the project maintainers.

This Code of Conduct is adapted from
the [Contributor Covenant][contrib-covenant] Version 1.0.0.

[contrib-covenant]: http://contributor-covenant.org/
83 changes: 83 additions & 0 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
---
layout: page
title: "Licenses"
permalink: /license/
---
## Instructional Material

All Software Carpentry and Data Carpentry instructional material is
made available under the [Creative Commons Attribution
license][cc-by-human]. The following is a human-readable summary of
(and not a substitute for) the [full legal text of the CC BY 4.0
license][cc-by-legal].

You are free:

* to **Share**---copy and redistribute the material in any medium or format
* to **Adapt**---remix, transform, and build upon the material

for any purpose, even commercially.

The licensor cannot revoke these freedoms as long as you follow the
license terms.

Under the following terms:

* **Attribution**---You must give appropriate credit (mentioning that
your work is derived from work that is Copyright © Software
Carpentry and, where practical, linking to
http://software-carpentry.org/), provide a [link to the
license][cc-by-human], and indicate if changes were made. You may do
so in any reasonable manner, but not in any way that suggests the
licensor endorses you or your use.

**No additional restrictions**---You may not apply legal terms or
technological measures that legally restrict others from doing
anything the license permits. With the understanding that:

Notices:

* You do not have to comply with the license for elements of the
material in the public domain or where your use is permitted by an
applicable exception or limitation.
* No warranties are given. The license may not give you all of the
permissions necessary for your intended use. For example, other
rights such as publicity, privacy, or moral rights may limit how you
use the material.

## Software

Except where otherwise noted, the example programs and other software
provided by Software Carpentry and Data Carpentry are made available under the
[OSI][osi]-approved
[MIT license][mit-license].

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

## Trademark

"Software Carpentry" an "Data Carpentry" and their respective logos
are registered trademarks of [NumFOCUS][numfocus].

[cc-by-human]: https://creativecommons.org/licenses/by/4.0/
[cc-by-legal]: https://creativecommons.org/licenses/by/4.0/legalcode
[mit-license]: http://opensource.org/licenses/mit-license.html
[numfocus]: http://numfocus.org/
[osi]: http://opensource.org
92 changes: 92 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
## ========================================
## Commands for both workshop and lesson websites.

# Settings
MAKEFILES=Makefile $(wildcard *.mk)
JEKYLL=jekyll
DST=_site

# Controls
.PHONY : commands clean files
all : commands

## commands : show all commands.
commands :
@grep -h -E '^##' ${MAKEFILES} | sed -e 's/## //g'

## serve : run a local server.
serve :
${JEKYLL} serve --config _config.yml,_config_dev.yml

## site : build files but do not run a server.
site :
${JEKYLL} build --config _config.yml,_config_dev.yml

## figures : re-generate inclusion displaying all figures.
figures :
@bin/extract_figures.py -s _episodes -p bin/markdown-ast.rb > _includes/all_figures.html

## clean : clean up junk files.
clean :
@rm -rf ${DST}
@rm -rf .sass-cache
@rm -rf bin/__pycache__
@find . -name .DS_Store -exec rm {} \;
@find . -name '*~' -exec rm {} \;
@find . -name '*.pyc' -exec rm {} \;

## ----------------------------------------
## Commands specific to workshop websites.

.PHONY : workshop-check

## workshop-check : check workshop homepage.
workshop-check :
@bin/workshop_check.py .

## ----------------------------------------
## Commands specific to lesson websites.

.PHONY : lesson-check lesson-files lesson-fixme lesson-single

# Lesson source files in the order they appear in the navigation menu.
SRC_FILES = \
index.md \
CONDUCT.md \
setup.md \
$(wildcard _episodes/*.md) \
reference.md \
$(wildcard _extras/*.md) \
LICENSE.md

# Generated lesson files in the order they appear in the navigation menu.
HTML_FILES = \
${DST}/index.html \
${DST}/conduct/index.html \
${DST}/setup/index.html \
$(patsubst _episodes/%.md,${DST}/%/index.html,$(wildcard _episodes/*.md)) \
${DST}/reference/index.html \
$(patsubst _extras/%.md,${DST}/%/index.html,$(wildcard _extras/*.md)) \
${DST}/license/index.html

## lesson-check : validate lesson Markdown.
lesson-check :
@bin/lesson_check.py -s . -p bin/markdown-ast.rb

unittest :
python bin/test_lesson_check.py

## lesson-files : show expected names of generated files for debugging.
lesson-files :
@echo 'source:' ${SRC_FILES}
@echo 'generated:' ${HTML_FILES}

## lesson-fixme : show FIXME markers embedded in source files.
lesson-fixme :
@fgrep -i -n FIXME ${SRC_FILES} || true

#-------------------------------------------------------------------------------
# Include extra commands if available.
#-------------------------------------------------------------------------------

-include commands.mk
14 changes: 14 additions & 0 deletions _config_dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#------------------------------------------------------------
# This config-file is only needed for development. Instead of changing
# the url everytime you work locally on the project, run a server with
# both configuration files:
#
# jekyll serve --config _config.yml,_config_dev.yml
#------------------------------------------------------------

# Is this production or development? (Overrides _config.yml.)
is_production: false

# Override root so that CSS and other resources will load locally.
github:
url: http://0.0.0.0:4000
Empty file added _episodes/.gitkeep
Empty file.
Empty file added _extras/.gitkeep
Empty file.
22 changes: 22 additions & 0 deletions _includes/all_keypoints.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{% comment %}
Display key points of all episodes for reference.
{% endcomment %}
<h2>Key Points</h2>
<table class="table table-striped">
{% for episode in site.episodes %}
{% unless episode.break %}
<tr>
<td class="col-md-3">
<a href="{{ site.github.url }}{{ episode.url }}">{{ episode.title }}</a>
</td>
<td class="col-md-9">
<ul>
{% for keypoint in episode.keypoints %}
<li>{{ keypoint }}</li>
{% endfor %}
</ul>
</td>
</tr>
{% endunless %}
{% endfor %}
</table>
27 changes: 27 additions & 0 deletions _includes/carpentries.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<div class="row">
<div class="col-md-2" align="center">
<a href="{{ site.swc_site }}"><img src="{{ site.github.url }}/assets/img/swc-icon-blue.svg" alt="Software Carpentry logo" /></a>
</div>
<div class="col-md-8">
Since 1998,
<a href="{{ site.swc_site }}">Software Carpentry</a>
has been teaching researchers in science, engineering, medicine, and related disciplines
the computing skills they need to get more done in less time and with less pain.
Its volunteer instructors have run hundreds of events
for thousands of learners in the past two and a half years.
</div>
</div>
<br/>
<div class="row">
<div class="col-md-2" align="center">
<a href="{{ site.dc_site }}"><img src="{{ site.github.url }}/assets/img/dc-icon-black.svg" alt="Data Carpentry logo" /></a>
</div>
<div class="col-md-8">
<a href="{{ site.dc_site }}">Data Carpentry</a> develops and teaches workshops on the fundamental data skills needed to conduct research.
Its target audience is researchers who have little to no prior computational experience,
and its lessons are domain specific,
building on learners' existing knowledge to enable them to quickly apply skills learned to their own research.
</div>
</div>


4 changes: 4 additions & 0 deletions _includes/episode_break.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{% comment %}
Display information about a break.
{% endcomment %}
<p>Break: {{page.break}} min</p>
14 changes: 14 additions & 0 deletions _includes/episode_find_prev_next.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{% comment %}
Find previous and next episodes (if any).
{% endcomment %}
{% for episode in site.episodes %}
{% if episode.url == page.url %}
{% unless forloop.first %}
{% assign prev_episode = prev %}
{% endunless %}
{% unless forloop.last %}
{% assign next_episode = site.episodes[forloop.index] %}
{% endunless %}
{% endif %}
{% assign prev = episode %}
{% endfor %}
8 changes: 8 additions & 0 deletions _includes/episode_keypoints.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<blockquote class="keypoints">
<h2>Key Points</h2>
<ul>
{% for keypoint in page.keypoints %}
<li>{{ keypoint }}</li>
{% endfor %}
</ul>
</blockquote>
36 changes: 36 additions & 0 deletions _includes/episode_overview.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{% comment %}
Display an episode's timings and learning objectives.
{% endcomment %}
<blockquote class="objectives">
<h2>Overview</h2>

<div class="row">
<div class="col-md-3">
<strong>Teaching:</strong> {{ page.teaching }} min
</br>
<strong>Exercises:</strong> {{ page.exercises }} min
</div>
<div class="col-md-9">
<strong>Questions</strong>
<ul>
{% for question in page.questions %}
<li>{{ question }}</li>
{% endfor %}
</ul>
</div>
</div>

<div class="row">
<div class="col-md-3">
</div>
<div class="col-md-9">
<strong>Objectives</strong>
<ul>
{% for objective in page.objectives %}
<li>{{ objective }}</li>
{% endfor %}
</ul>
</div>
</div>

</blockquote>
25 changes: 25 additions & 0 deletions _includes/episode_title.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{% include episode_find_prev_next.html %}
<div class="row">
<div class="col-md-1">
<h3>
{% if prev_episode %}
<a href="{{ site.github.url }}{{ prev_episode.url }}"><span class="glyphicon glyphicon-menu-left"></span></a>
{% else %}
<a href="{{ site.github.url }}"><span class="glyphicon glyphicon-menu-up"></span></a>
{% endif %}
</h3>
</div>
<div class="col-md-10">
<h3 class="maintitle"><a href="{{ site.github.url }}/">{{ site.title }}</a></h3>
<h1 class="maintitle">{{ page.title }}</h1>
</div>
<div class="col-md-1">
<h3>
{% if next_episode %}
<a href="{{ site.github.url }}{{ next_episode.url }}"><span class="glyphicon glyphicon-menu-right"></span></a>
{% else %}
<a href="{{ site.github.url }}"><span class="glyphicon glyphicon-menu-up"></span></a>
{% endif %}
</h3>
</div>
</div>
Loading

0 comments on commit 9c447b8

Please sign in to comment.