10 |
--------------------------------------------------------------------------------
/bin/knit_lessons.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | # Only try running R to translate files if there are some files present.
4 | # The Makefile passes in the names of files.
5 |
6 | if [ $# -eq 2 ] ; then
7 | Rscript -e "source('bin/generate_md_episodes.R')" "$@"
8 | fi
9 |
--------------------------------------------------------------------------------
/_includes/swc/who.html:
--------------------------------------------------------------------------------
1 |
2 | Who:
3 | The course is aimed at graduate students and other researchers.
4 |
5 | You don't need to have any previous knowledge of the tools
6 | that will be presented at the workshop.
7 |
8 |
2 | Who:
3 | The course is for people working in library- and information-related roles.
4 |
5 | You don't need to have any previous knowledge of the tools that
6 | will be presented at the workshop.
7 |
8 |
3 | Unrecognized value for variable flavor set in
4 | _config.yml. Valid values are "r" and
5 | "python", currently set to {{ site.flavor }}.
6 |
7 |
8 |
--------------------------------------------------------------------------------
/_layouts/episode.html:
--------------------------------------------------------------------------------
1 | ---
2 | layout: base
3 | ---
4 | {% include episode_navbar.html episode_navbar_title=true %}
5 |
6 | {% include episode_title.html %}
7 | {% include episode_overview.html %}
8 | {{content}}
9 | {% include episode_keypoints.html %}
10 |
11 | {% include episode_navbar.html episode_navbar_title=false %}
12 |
--------------------------------------------------------------------------------
/bin/boilerplate/_episodes/01-introduction.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: "Introduction"
3 | teaching: 0
4 | exercises: 0
5 | questions:
6 | - "Key question (FIXME)"
7 | objectives:
8 | - "First learning objective. (FIXME)"
9 | keypoints:
10 | - "First key point. Brief Answer to questions. (FIXME)"
11 | ---
12 | FIXME
13 |
14 | {% include links.md %}
15 |
16 |
--------------------------------------------------------------------------------
/aio.md:
--------------------------------------------------------------------------------
1 | ---
2 | permalink: /aio/index.html
3 | ---
4 |
5 | {% comment %}
6 | As a maintainer, you do not need to edit this file.
7 | If you notice that something does not work, please
8 | open an issue: https://github.com/carpentries/styles/issues/new
9 | {% endcomment %}
10 |
11 | {% include base_path.html %}
12 |
13 | {% include aio-script.md %}
14 |
--------------------------------------------------------------------------------
/_includes/warning-curriculum.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | Unrecognized value for variable curriculum set in
4 | _config.yml. Currently the variable is set to:
5 | {{ site.curriculum }}. Check the values of
6 | carpentry and curriculum in the
7 | _config.yml file.
8 |
13 |
14 | {% endif %}
15 |
--------------------------------------------------------------------------------
/bin/boilerplate/index.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: lesson
3 | root: . # Is the only page that doesn't follow the pattern /:path/index.html
4 | permalink: index.html # Is the only page that doesn't follow the pattern /:path/index.html
5 | ---
6 | FIXME: home page introduction
7 |
8 |
9 |
10 | {% comment %} This is a comment in Liquid {% endcomment %}
11 |
12 | > ## Prerequisites
13 | >
14 | > FIXME
15 | {: .prereq}
16 |
17 | {% include links.md %}
18 |
--------------------------------------------------------------------------------
/_includes/episode_keypoints.html:
--------------------------------------------------------------------------------
1 | {% comment %}
2 | Display key points for an episode.
3 | {% endcomment %}
4 |
5 | {% if page.keypoints == nil %}
6 | {% assign episode_keypoints = include.episode_keypoints %}
7 | {% else %}
8 | {% assign episode_keypoints = page.keypoints %}
9 | {% endif %}
10 |
11 |
12 |
Key Points
13 |
14 | {% for keypoint in episode_keypoints %}
15 |
{{ keypoint|markdownify }}
16 | {% endfor %}
17 |
18 |
19 |
--------------------------------------------------------------------------------
/.travis.yml:
--------------------------------------------------------------------------------
1 | language: python
2 | python:
3 | - "3.6"
4 | # Remember that the code is running on a 14.04 machine.
5 | # - "3.4"
6 | # command to install dependencies
7 | install:
8 | - pip install -r requirements.txt
9 | # as per https://docs.travis-ci.com/user/installing-dependencies/
10 | # command to run tests
11 | before_script:
12 | - "python bin/_travis.py"
13 | script:
14 | - python bin/workshop_check.py .
15 | - python -m unittest bin/_test/bs4test.py
16 | branches:
17 | only:
18 | - gh-pages
19 |
--------------------------------------------------------------------------------
/CODE_OF_CONDUCT.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: page
3 | title: "Contributor Code of Conduct"
4 | ---
5 | As contributors and maintainers of this project,
6 | we pledge to follow the [Carpentry Code of Conduct][coc].
7 |
8 | Instances of abusive, harassing, or otherwise unacceptable behavior
9 | may be reported by following our [reporting guidelines][coc-reporting].
10 |
11 | [coc]: https://docs.carpentries.org/topic_folders/policies/code-of-conduct.html
12 | [coc-reporting]: https://docs.carpentries.org/topic_folders/policies/incident-reporting.html
13 |
--------------------------------------------------------------------------------
/.editorconfig:
--------------------------------------------------------------------------------
1 | root = true
2 |
3 | [*]
4 | charset = utf-8
5 | insert_final_newline = true
6 | trim_trailing_whitespace = true
7 |
8 | [*.md]
9 | indent_size = 2
10 | indent_style = space
11 | max_line_length = 100 # Please keep this in sync with bin/lesson_check.py!
12 | trim_trailing_whitespace = false # keep trailing spaces in markdown - 2+ spaces are translated to a hard break ( )
13 |
14 | [*.r]
15 | max_line_length = 80
16 |
17 | [*.py]
18 | indent_size = 4
19 | indent_style = space
20 | max_line_length = 79
21 |
22 | [*.sh]
23 | end_of_line = lf
24 |
25 | [Makefile]
26 | indent_style = tab
27 |
--------------------------------------------------------------------------------
/bin/test_lesson_check.py:
--------------------------------------------------------------------------------
1 | import unittest
2 |
3 | import lesson_check
4 | import reporter
5 |
6 |
7 | class TestFileList(unittest.TestCase):
8 | def setUp(self):
9 | self.reporter = reporter.Reporter() # TODO: refactor reporter class.
10 |
11 | def test_file_list_has_expected_entries(self):
12 | # For first pass, simply assume that all required files are present
13 |
14 | lesson_check.check_fileset('', self.reporter, lesson_check.REQUIRED_FILES)
15 | self.assertEqual(len(self.reporter.messages), 0)
16 |
17 |
18 | if __name__ == "__main__":
19 | unittest.main()
20 |
--------------------------------------------------------------------------------
/files/etherpad.txt:
--------------------------------------------------------------------------------
1 | Welcome to Software Carpentry
2 |
3 | We will use this Etherpad to share links and snippets of code, take notes, ask and answer questions, and whatever else comes to mind.
4 | The page displays a screen with three major parts:
5 |
6 | * The left side holds today's notes: please edit these as we go along.
7 | * The top right side shows the names of users who are logged in: please add your name and pick the color that best reflects your mood and personality.
8 | * The bottom right is a real time chat window for asking questions of the instructor and your fellow learners.
9 |
10 | To start, please add yourself to the attendee list below:
11 |
12 | * Instructor (discipline, institution)
13 |
--------------------------------------------------------------------------------
/getsql.sh:
--------------------------------------------------------------------------------
1 | set -euo pipefail
2 |
3 | if command -v apt-get >/dev/null 2>&1 ; then
4 | sudo apt-get install sqlite3
5 | elif command -v unzip >/dev/null 2>^1 ; then
6 | mkdir -p ~/bin
7 | curl https://www.sqlite.org/2019/sqlite-tools-win32-x86-3270200.zip > sql.zip
8 | unzip sql.zip
9 | mv sqlite-tools-win32-x86-3270200/* ~/bin/
10 | rm -rf sqlite-tools-win32-x86-3270200
11 | echo 'export PATH="$PATH:$HOME/bin"' >> .bash_profile
12 | echo 'alias sqlite3="winpty sqlite3"' >> .bash_profile
13 | source .bash_profile
14 | sqlite3 --version
15 | # 3.27.2 2019-02-25 16:06:06 bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0f6d7
16 | else
17 | echo "I cannot find apt or unzip. Please ask an instructor for help."
18 | fi
19 |
--------------------------------------------------------------------------------
/_includes/swc/intro.html:
--------------------------------------------------------------------------------
1 |
2 | Software Carpentry
3 | aims to help researchers get their work done
4 | in less time and with less pain
5 | by teaching them basic research computing skills.
6 | This hands-on workshop will cover basic concepts and tools,
7 | including program design, version control, data management,
8 | and task automation.
9 | Participants will be encouraged to help one another
10 | and to apply what they have learned to their own research problems.
11 |
2 | Data Carpentry develops and teaches workshops on the fundamental data skills needed to conduct
3 | research. Its target audience is researchers who have little to no prior computational experience,
4 | and its lessons are domain specific, building on learners' existing knowledge to enable them to quickly
5 | apply skills learned to their own research.
6 | Participants will be encouraged to help one another
7 | and to apply what they have learned to their own research problems.
8 |
2 | Library Carpentry
3 | is made by people working in library- and information-related roles to help you:
4 |
5 |
6 |
automate repetitive, boring, error-prone tasks
7 |
create, maintain and analyze sustainable and reusable data
8 |
work effectively with IT and systems colleagues
9 |
better understand the use of software in research
10 |
and much more...
11 |
12 |
13 |
14 | Library Carpentry introduces you to the fundamentals of computing
15 | and provides you with a platform for further self-directed learning.
16 | For more information on what we teach and why, please see our paper
17 | "Library Carpentry: software skills training for library professionals".
18 |
19 |
20 |
--------------------------------------------------------------------------------
/_includes/all_keypoints.html:
--------------------------------------------------------------------------------
1 | {% comment %}
2 | Display key points of all episodes for reference.
3 | {% endcomment %}
4 |
5 | {% include base_path.html %}
6 | {% include manual_episode_order.html %}
7 |
8 |
32 |
--------------------------------------------------------------------------------
/.github/PULL_REQUEST_TEMPLATE.md:
--------------------------------------------------------------------------------
1 |
2 | Instructions
3 |
4 | Thanks for contributing! :heart:
5 |
6 | If this contribution is for instructor training, please email the link to this contribution to
7 | instructor.training@carpentries.org so we can record your progress. You've completed your contribution
8 | step for instructor checkout by submitting this contribution!
9 |
10 | Keep in mind that **lesson maintainers are volunteers** and it may take them some time to
11 | respond to your contribution. Although not all contributions can be incorporated into the lesson
12 | materials, we appreciate your time and effort to improve the curriculum. If you have any questions
13 | about the lesson maintenance process or would like to volunteer your time as a contribution
14 | reviewer, please contact The Carpentries Team at team@carpentries.org.
15 |
16 | You may delete these instructions from your comment.
17 |
18 | \- The Carpentries
19 |
20 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE.md:
--------------------------------------------------------------------------------
1 |
2 | Instructions
3 |
4 | Thanks for contributing! :heart:
5 |
6 | If this contribution is for instructor training, please email the link to this contribution to
7 | checkout@carpentries.org so we can record your progress. You've completed your contribution
8 | step for instructor checkout by submitting this contribution!
9 |
10 | If this issue is about a specific episode within a lesson, please provide its link or filename.
11 |
12 | Keep in mind that **lesson maintainers are volunteers** and it may take them some time to
13 | respond to your contribution. Although not all contributions can be incorporated into the lesson
14 | materials, we appreciate your time and effort to improve the curriculum. If you have any questions
15 | about the lesson maintenance process or would like to volunteer your time as a contribution
16 | reviewer, please contact The Carpentries Team at team@carpentries.org.
17 |
18 | You may delete these instructions from your comment.
19 |
20 | \- The Carpentries
21 |
22 |
--------------------------------------------------------------------------------
/bin/_test/bs4test.py:
--------------------------------------------------------------------------------
1 | import unittest
2 | from bs4 import BeautifulSoup
3 | import os
4 | from pathlib import Path
5 | from git_root import git_root
6 |
7 | class beautifulSoupTests(unittest.TestCase):
8 | """
9 | This test sets up a bs4 (https://www.crummy.com/software/BeautifulSoup/bs4/doc/#installing-beautiful-soup)
10 | runner for tests of index.md that do not require a web browser.
11 | """
12 |
13 | #https://github.com/jtilly/git_root
14 | soup = BeautifulSoup("", 'html.parser')
15 | def setUp(self):
16 | with open(Path(git_root()) / 'index.md', "r") as index:
17 | indexpage = index.read()
18 | self.soup = BeautifulSoup(indexpage , 'html.parser')
19 |
20 | def test_for_active_css_in_tabs(self):
21 | """
22 | As per https://github.com/carpentries/workshop-template/pull/573/files
23 | all tab divs need to have the active class in index.md
24 | """
25 | for article in self.soup.find_all("article"):
26 | self.assertIn('active', article['class'])
27 | self.assertIn('tab-pane', article['class'])
28 |
29 |
30 | if __name__ == '__main__':
31 | unittest.main()
--------------------------------------------------------------------------------
/_includes/swc/setup.html:
--------------------------------------------------------------------------------
1 | {% assign curricula = "swc-gapminder|swc-inflammation" | split: "|" %}
2 | {% unless curricula contains site.curriculum %}
3 | {% include warning-curriculum.html %}
4 | {% endunless %}
5 |
6 | {% include install_instructions/shell.html %}
7 | {% include install_instructions/git.html %}
8 | {% include install_instructions/editor.html %}
9 |
10 | {% if site.flavor == "r" %}
11 | {% include install_instructions/r.html %}
12 | {% elsif site.flavor == "python" %}
13 | {% include install_instructions/python.html %}
14 | {% elsif site.flavor == "FIXME" %}
15 | {% include install_instructions/r.html %}
16 | {% include install_instructions/python.html %}
17 | {% else %}
18 | {% include warning-flavor.html %}
19 | {% endif %}
20 |
21 | {% comment %}
22 | The following setup instructions are commented out because Carpentries workshops
23 | cover the these topics less frequently. Please uncomment the lines that
24 | correspond to the topics covered in your workshop.
25 |
26 | {% include install_instructions/sql.html %}
27 | {% include install_instructions/openrefine.html %}
28 | {% endcomment %}
29 |
--------------------------------------------------------------------------------
/_includes/bioc/intro.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Bioconductor Carpentries develops and teaches
6 | workshops on the fundamental data skills needed to conduct omics
7 | data analysis. Its target audience is experimental researchers who
8 | have little to no prior computational experience, and its lessons
9 | are domain specific, building on learners' existing knowledge to
10 | enable them to quickly apply skills learned to their own research.
11 | Participants will be encouraged to help one another and to apply
12 | what they have learned to their own research problems.
13 |
21 |
--------------------------------------------------------------------------------
/_extras/helpers.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: Information for Helpers
3 | ---
4 |
5 | The role of Helpers is defined on the [Helper Checklist page](https://docs.carpentries.org/topic_folders/hosts_instructors/hosts_instructors_checklist.html#helper-checklist). Please review this information.
6 |
7 | The Carpentries aims to create an inclusive environment so the [Code of Conduct](https://docs.carpentries.org/topic_folders/policies/code-of-conduct.html) is very important.
8 |
9 | Please also familiarize yourself with the [key points](https://carpentries.github.io/instructor-training/reference.html) summary of the Carpentries Instructor training to get an idea of the values and strategies we aim to use in Carpentries workshops. Feel free to poke around the rest of the material if you wish, but those key points are what is important in how we work with the learners.
10 |
11 | We maintain a list of common issues that occur during installation as a reference that may be useful in preparation and the day of the workshop on the
12 | [Configuration Problems and Solutions wiki page]({{site.swc_github}}/workshop-template/wiki/Configuration-Problems-and-Solutions).
13 |
--------------------------------------------------------------------------------
/assets/img/cp-logo-blue.svg:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/bin/_travis.py:
--------------------------------------------------------------------------------
1 | import yaml
2 | import datetime
3 | # We need to split the incoming file
4 | with open("index.md", 'r') as reader:
5 | # There are multiple yaml documents in the index.md
6 |
7 | blankbit, yaml_to_load, text = reader.read().split("---")
8 |
9 | yaml_data = yaml.load(yaml_to_load, Loader=yaml.Loader) # To deal with depreciation warnings, we need Loader=Loader
10 |
11 |
12 | yaml_data['venue']="Foo"
13 | yaml_data['address']="Room 123"
14 | yaml_data['country']="us"
15 | yaml_data['language']="en"
16 | yaml_data['latitude']="0"
17 | yaml_data['longitude']="0"
18 | yaml_data['humandate']="Jan 01-02, 2020"
19 | yaml_data['humantime']="9:00 am - 4:30 pm"
20 | yaml_data['startdate']= datetime.datetime.today()
21 | yaml_data['enddate']= datetime.datetime.today()
22 | yaml_data['instructor']=["Foo"]
23 | yaml_data['helper']=["Foo"]
24 | yaml_data['email']=["foo@bar.com"]
25 | yaml_data['collaborative_notes'] = "http://foo.bar"
26 | yaml_data['eventbrite']="1234567890AB"
27 |
28 | with open("index.md", "w") as writer:
29 | writer.write("---\n") #blankbit is technically a yaml document
30 | yaml.dump(yaml_data, writer)
31 | writer.write("---\n")
32 | writer.write(text)
33 |
--------------------------------------------------------------------------------
/bin/lesson_initialize.py:
--------------------------------------------------------------------------------
1 | """Initialize a newly-created repository."""
2 |
3 |
4 | import sys
5 | import os
6 | import shutil
7 |
8 |
9 | BOILERPLATE = (
10 | 'AUTHORS',
11 | 'CITATION',
12 | 'CONTRIBUTING.md',
13 | 'README.md',
14 | '_config.yml',
15 | os.path.join('_episodes', '01-introduction.md'),
16 | os.path.join('_extras', 'about.md'),
17 | os.path.join('_extras', 'discuss.md'),
18 | os.path.join('_extras', 'figures.md'),
19 | os.path.join('_extras', 'guide.md'),
20 | 'index.md',
21 | 'reference.md',
22 | 'setup.md',
23 | )
24 |
25 |
26 | def main():
27 | """Check for collisions, then create."""
28 |
29 | # Check.
30 | errors = False
31 | for path in BOILERPLATE:
32 | if os.path.exists(path):
33 | print('Warning: {0} already exists.'.format(path), file=sys.stderr)
34 | errors = True
35 | if errors:
36 | print('**Exiting without creating files.**', file=sys.stderr)
37 | sys.exit(1)
38 |
39 | # Create.
40 | for path in BOILERPLATE:
41 | shutil.copyfile(
42 | os.path.join('bin', 'boilerplate', path),
43 | path
44 | )
45 |
46 |
47 | if __name__ == '__main__':
48 | main()
49 |
--------------------------------------------------------------------------------
/AUTHORS:
--------------------------------------------------------------------------------
1 | Aron Ahmadia
2 | Phillip Alderman
3 | James Allen
4 | Piotr Banaszkiewicz
5 | Pauline Barmby
6 | Radovan Bast
7 | John Blischak
8 | Olga Botvinnik
9 | Andy Boughton
10 | Erik M. Bray
11 | Amy Brown
12 | C. Titus Brown
13 | Greg Caporaso
14 | Sarah Clayton
15 | Matt Davis
16 | Neal Davis
17 | Jonah Duckles
18 | Marianna Foos
19 | Yashasvi Girdhar
20 | Ivan Gonzalez
21 | John Gosset
22 | Alistair Grant
23 | Thomas Guignard
24 | Konrad Hinsen
25 | Xavier Ho
26 | Damien Irving
27 | Mike Jackson
28 | Ben Jolly
29 | Jan T. Kim
30 | W. Trevor King
31 | David LeBauer
32 | Joona Lehtomäki
33 | Kunal Marwaha
34 | Sheldon McKay
35 | Lauren Michael
36 | François Michonneau
37 | Lex Nederbragt
38 | Aleksandra Nenadic
39 | Jeramia Ory
40 | Fernando Perez
41 | Leighton Pritchard
42 | Andrey Prokopenko
43 | Scott Ritchie
44 | Maneesha Sane
45 | Raniere Silva
46 | Arfon Smith
47 | Ashwin Srinath
48 | Sarah Stevens
49 | Julia Stewart Lowndes
50 | Tracy Teal
51 | Stefan Topfstedt
52 | Olav Vahtras
53 | Philipp Von Bieberstein
54 | Andrew Walker
55 | Ben Waugh
56 | Lukas Weber
57 | Ethan White
58 | Jason Williams
59 | Carol Willing
60 | Greg Wilson
61 | Tom Wright
62 | Andrea Zonca
63 | Alex Thompson
64 | Jonathan Cooper
65 | Marcel Stimberg
66 | Mark A. Matienzo
67 | Steve Moss
68 |
--------------------------------------------------------------------------------
/bin/generate_md_episodes.R:
--------------------------------------------------------------------------------
1 | generate_md_episodes <- function() {
2 |
3 | # avoid ansi color characters from being printed in the output
4 | op <- options()
5 | on.exit(options(op), add = TRUE)
6 | options(crayon.enabled = FALSE)
7 | ## get the Rmd file to process from the command line, and generate the path
8 | ## for their respective outputs
9 | args <- commandArgs(trailingOnly = TRUE)
10 | if (!identical(length(args), 2L)) {
11 | stop("input and output file must be passed to the script")
12 | }
13 |
14 | src_rmd <- args[1]
15 | dest_md <- args[2]
16 |
17 | ## knit the Rmd into markdown
18 | knitr::knit(src_rmd, output = dest_md)
19 |
20 | # Read the generated md files and add comments advising not to edit them
21 | add_no_edit_comment <- function(y) {
22 | con <- file(y)
23 | mdfile <- readLines(con)
24 | if (mdfile[1] != "---")
25 | stop("Input file does not have a valid header")
26 | mdfile <- append(
27 | mdfile,
28 | "# Please do not edit this file directly; it is auto generated.",
29 | after = 1
30 | )
31 | mdfile <- append(
32 | mdfile,
33 | paste("# Instead, please edit", basename(y), "in _episodes_rmd/"),
34 | after = 2
35 | )
36 | writeLines(mdfile, con)
37 | close(con)
38 | return(paste("Warning added to YAML header of", y))
39 | }
40 |
41 | vapply(dest_md, add_no_edit_comment, character(1))
42 | }
43 |
44 | generate_md_episodes()
45 |
--------------------------------------------------------------------------------
/CONDUCT.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: page
3 | title: "Contributor Code of Conduct"
4 | ---
5 | As contributors and maintainers of this project,
6 | we pledge to respect all people who contribute through reporting issues,
7 | posting feature requests,
8 | updating documentation,
9 | submitting pull requests or patches,
10 | and other activities.
11 |
12 | We are committed to making participation in this project a harassment-free experience for everyone,
13 | regardless of level of experience,
14 | gender,
15 | gender identity and expression,
16 | sexual orientation,
17 | disability,
18 | personal appearance,
19 | body size,
20 | race,
21 | ethnicity,
22 | age,
23 | or religion.
24 |
25 | Examples of unacceptable behavior by participants include the use of sexual language or imagery,
26 | derogatory comments or personal attacks,
27 | trolling,
28 | public or private harassment,
29 | insults,
30 | or other unprofessional conduct.
31 |
32 | Project maintainers have the right and responsibility to remove, edit, or reject
33 | comments, commits, code, wiki edits, issues, and other contributions
34 | that are not aligned to our [Code of Conduct][coc].
35 | Project maintainers who do not follow the Code of Conduct may be removed from the project team.
36 |
37 | Instances of abusive, harassing, or otherwise unacceptable behavior
38 | may be reported by following our [reporting guidelines][coc-reporting].
39 |
40 |
41 | - [Software and Data Carpentry Code of Conduct][coc]
42 | - [Code of Conduct Reporting Guide][coc-reporting]
43 |
44 | {% include links.md %}
45 |
--------------------------------------------------------------------------------
/_includes/dc/who.html:
--------------------------------------------------------------------------------
1 | {% comment %}
2 | Astronomy workshops
3 | {% endcomment %}
4 |
5 |
6 | {% if site.curriculum == "dc-astronomy" %}
7 |
8 |
9 | Who:
10 | This lesson assumes you have a working knowledge of Python and some previous exposure to the Bash shell.
11 | These requirements can be fulfilled by:
12 | a) completing a Software Carpentry Python workshop or
13 | b) completing a Data Carpentry Ecology workshop (with Python) and a Data Carpentry Genomics workshop or
14 | c) independent exposure to both Python and the Bash shell.
15 |
16 | If you’re unsure whether you have enough experience to participate in this workshop, please read over
17 | this detailed list,
18 | which gives all of the functions, operators, and other concepts you will need to be familiar with.
19 |
20 | In addition, this lesson assumes that learners have some familiarity with astronomical concepts,
21 | including reference frames, proper motion, color-magnitude diagrams, globular clusters, and isochrones.
22 | Participants should bring their own laptops and plan to participate actively.
23 |
32 | Who:
33 | The course is aimed at graduate students and other researchers.
34 |
35 | You don't need to have any previous knowledge of the tools
36 | that will be presented at the workshop.
37 |
38 |
9 | Who:
10 | This lesson assumes you have a working knowledge of Python and some previous exposure to the Bash shell.
11 | These requirements can be fulfilled by:
12 | a) completing a Software Carpentry Python workshop or
13 | b) completing a Data Carpentry Ecology workshop (with Python) and a Data Carpentry Genomics workshop or
14 | c) independent exposure to both Python and the Bash shell.
15 |
16 | If you’re unsure whether you have enough experience to participate in this workshop, please read over
17 | this detailed list,
18 | which gives all of the functions, operators, and other concepts you will need to be familiar with.
19 |
20 | In addition, this lesson assumes that learners have some familiarity with astronomical concepts,
21 | including reference frames, proper motion, color-magnitude diagrams, globular clusters, and isochrones.
22 | Participants should bring their own laptops and plan to participate actively.
23 |
32 | Who:
33 | The course is aimed at graduate students and other researchers.
34 |
35 | You don't need to have any previous knowledge of the tools
36 | that will be presented at the workshop.
37 |
38 |
28 |
--------------------------------------------------------------------------------
/bin/boilerplate/README.md:
--------------------------------------------------------------------------------
1 | # FIXME Lesson title
2 |
3 | [](https://swc-slack-invite.herokuapp.com/)
4 |
5 | This repository generates the corresponding lesson website from [The Carpentries](https://carpentries.org/) repertoire of lessons.
6 |
7 | ## Contributing
8 |
9 | We welcome all contributions to improve the lesson! Maintainers will do their best to help you if you have any
10 | questions, concerns, or experience any difficulties along the way.
11 |
12 | We'd like to ask you to familiarize yourself with our [Contribution Guide](CONTRIBUTING.md) and have a look at
13 | the [more detailed guidelines][lesson-example] on proper formatting, ways to render the lesson locally, and even
14 | how to write new episodes.
15 |
16 | Please see the current list of [issues][FIXME] for ideas for contributing to this
17 | repository. For making your contribution, we use the GitHub flow, which is
18 | nicely explained in the chapter [Contributing to a Project](http://git-scm.com/book/en/v2/GitHub-Contributing-to-a-Project) in Pro Git
19 | by Scott Chacon.
20 | Look for the tag . This indicates that the maintainers will welcome a pull request fixing this issue.
21 |
22 |
23 | ## Maintainer(s)
24 |
25 | Current maintainers of this lesson are
26 |
27 | * FIXME
28 | * FIXME
29 | * FIXME
30 |
31 |
32 | ## Authors
33 |
34 | A list of contributors to the lesson can be found in [AUTHORS](AUTHORS)
35 |
36 | ## Citation
37 |
38 | To cite this lesson, please consult with [CITATION](CITATION)
39 |
40 | [lesson-example]: https://carpentries.github.io/lesson-example
41 |
--------------------------------------------------------------------------------
/_includes/base_path.html:
--------------------------------------------------------------------------------
1 | {%- comment -%}
2 | When the website is built by GitHub Pages,
3 | 'site.url' is set to 'https://username.github.io'
4 | 'site.baseurl' is set to '/lesson-name'
5 |
6 | When we start a local server using `jekyll serve`,
7 | 'site.url' is set to 'http://localhost:4000' and
8 | 'site.baseurl' is empty.
9 |
10 | In both of the above cases we set 'relative_root_path' to 'site.baseurl'.
11 |
12 | When we build a website locally with `jekyll build`,
13 | both 'site.url' and 'site.baseurl' are empty.
14 | This case is handled by the last 'else' in the code below.
15 | The logic there follows the (adapted) instructions found at:
16 | https://ricostacruz.com/til/relative-paths-in-jekyll
17 |
18 | `page.url` gives the URL of the current page with a leading /:
19 |
20 | - when the URL ends with an extension (e.g., /foo/bar.html),
21 | we can get the 'depth' of the page by counting the number of
22 | forward slashes ('/') and subtracting 1
23 | - when the URL ends with a forward slash (e.g. /foo/bar/),
24 | we can get the depth of the page by counting the number of /
25 | {%- endcomment -%}
26 |
27 | {% if site.url %}
28 | {% assign relative_root_path = site.baseurl %}
29 | {% else %}
30 | {% assign last_char = page.url | slice: -1 %}
31 | {% if last_char == "/" %}
32 | {% assign offset = 0 %}
33 | {% else %}
34 | {% assign offset = 1 %}
35 | {% endif %}
36 | {% assign depth = page.url | split: '/' | size | minus: offset %}
37 | {% if depth <= 1 %}{% assign relative_root_path = '.' %}
38 | {% elsif depth == 2 %}{% assign relative_root_path = '..' %}
39 | {% else %}{% capture relative_root_path %}..{% for i in (3..depth) %}/..{% endfor %}{% endcapture %}
40 | {% endif %}
41 | {% endif %}
42 |
--------------------------------------------------------------------------------
/setup/swc-installation-test-1.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python
2 |
3 | """Test script to check required Python version.
4 |
5 | Execute this code at the command line by typing:
6 |
7 | python swc-installation-test-1.py
8 |
9 | How to get a command line:
10 |
11 | - On OSX run this with the Terminal application.
12 |
13 | - On Windows, go to the Start menu, select 'Run' and type 'cmd'
14 | (without the quotes) to run the 'cmd.exe' Windows Command Prompt.
15 |
16 | - On Linux, either use your login shell directly, or run one of a
17 | number of graphical terminals (e.g. 'xterm', 'gnome-terminal', ...).
18 |
19 | For some screen shots, see:
20 |
21 | http://software-carpentry.org/setup/terminal.html
22 |
23 | Run the script and follow the instructions it prints at the end. If
24 | you see an error saying that the 'python' command was not found, than
25 | you may not have any version of Python installed. See:
26 |
27 | http://www.python.org/download/releases/2.7.3/#download
28 |
29 | for installation instructions.
30 |
31 | This test is separate to avoid Python syntax errors parsing the more
32 | elaborate `swc-installation-test-2.py`.
33 | """
34 |
35 | import sys as _sys
36 |
37 |
38 | __version__ = '0.2'
39 |
40 |
41 | def check():
42 | if _sys.version_info < (3, 3):
43 | print('check for Python version (python):')
44 | print('outdated version of Python: ' + _sys.version)
45 | return False
46 | return True
47 |
48 |
49 | if __name__ == '__main__':
50 | if check():
51 | print('Passed')
52 | print('version of Python: ' + _sys.version)
53 | else:
54 | print('Failed')
55 | print('Install a current version of Python 3!')
56 | print('http://continuum.io/downloads')
57 | _sys.exit(1)
58 |
--------------------------------------------------------------------------------
/_includes/episode_navbar.html:
--------------------------------------------------------------------------------
1 | {% comment %}
2 | For some reason, the relative_root_path seems out of scope in this file, so we
3 | need to re-assign it here
4 | {% endcomment %}
5 |
6 | {% include base_path.html %}
7 |
8 | {% comment %}
9 | Navigation bar for an episode.
10 | {% endcomment %}
11 |
12 | {% include manual_episode_order.html %}
13 | {% comment %}
14 | 'previous_episode' and 'next_episodes' are defined in 'manual_episode_order.html'.
15 | These replace 'page.previous' and 'page.next' objects, correspondingly.
16 | {% endcomment %}
17 |
18 |
4 | Bash is a commonly-used shell that gives you the power to do simple tasks
5 | more quickly. Please find setup instructions in
6 | the lesson.
7 |
8 |
9 |
10 |
11 |
OpenRefine
12 |
13 | OpenRefine is a tool to clean up and organize messy data. Please find instructions to install it and the data used in the lesson in the lesson.
14 |
15 |
16 |
17 |
{% comment %} Start of 'Git' section. GitHub browser compatibility
18 | is given at https://help.github.com/articles/supported-browsers/{% endcomment %}
19 |
Git
20 |
21 | Git is a version control system that lets you track who made changes
22 | to what when and has options for easily updating a shared or public
23 | version of your code
24 | on https://github.com.
25 |
26 |
27 | Follow the instructions on
28 | the lesson to
29 | install Git on your system.
30 |
31 |
32 | You will need an account at github.com
33 | for parts of the Git lesson. Basic GitHub accounts are free. We encourage
34 | you to create a GitHub account if you don't have one already.
35 | Please consider what personal information you'd like to reveal. For
36 | example, you may want to review these
37 | instructions
38 | for keeping your email address private provided at GitHub. You will
39 | need a
40 | supported
41 | web browser.
42 |
3 |
4 | {% comment %}
5 | Replace the paragraph below with the relevant installation instructions
6 | if you do not use Zoom
7 | {% endcomment %}
8 |
9 | If you haven't used Zoom before, go to the
10 | official website
11 | to download and install the Zoom client for your computer.
12 |
13 |
14 |
15 |
Set up your workspace
16 |
17 |
18 | Like other Carpentries workshops,
19 | you will be learning by "coding along" with the Instructors.
20 | To do this, you will need to have both the window for the tool
21 | you will be learning about (a terminal, RStudio, your web browser, etc..)
22 | and the window for the Zoom video conference client open.
23 | In order to see both at once,
24 | we recommend using one of the following set up options:
25 |
26 |
Two monitors: If you have two monitors,
27 | plan to have the tool you are learning up on one monitor and
28 | the video conferencing software on the other.
29 |
Two devices: If you don't have two monitors,
30 | do you have another device (tablet, smartphone) with a medium to large
31 | sized screen? If so, try using the smaller device as your video
32 | conference connection and your larger device (laptop or desktop)
33 | to follow along with the tool you will be learning about.
34 |
Divide your screen: If you only have one device
35 | and one screen, practice having two windows
36 | (the video conference program and one of the tools you will be using
37 | at the workshop) open together.
38 | How can you best fit both on your screen?
39 | Will it work better for you to toggle between them
40 | using a keyboard shortcut?
41 | Try it out in advance to decide what will work best for you.
42 |
43 | This blog post includes detailed information on how to set up your screen to follow along during the workshop.
44 |
45 |
--------------------------------------------------------------------------------
/_includes/episode_overview.html:
--------------------------------------------------------------------------------
1 | {% comment %}
2 | Display episode's timings and learning objectives.
3 |
4 | Regarding the `if page.*** == nil` below:
5 | all-in-one page combines all episodes into one.
6 | It, therefore, does not define its own objectives, exercises,
7 | and questions, which 'normal' episodes define in the front matter.
8 |
9 | To display episodes' teaching and exercise times, as well as episode
10 | questions and objectives, we pass them as parameters to the Liquid's
11 | `include` statement when we generate the page:
12 |
13 | include episode_overview.html teaching_time=e.teaching ...
14 |
15 | Here we obtain the information we need either from the episode itself or
16 | from the parameters passed in.
17 | {% endcomment %}
18 |
19 | {% if page.teaching == nil %}
20 | {% assign teaching_time = include.teaching_time %}
21 | {% else %}
22 | {% assign teaching_time = page.teaching %}
23 | {% endif %}
24 |
25 | {% if page.exercises == nil %}
26 | {% assign exercise_time = include.exercise_time %}
27 | {% else %}
28 | {% assign exercise_time = page.exercises %}
29 | {% endif %}
30 |
31 | {% if page.questions == nil %}
32 | {% assign episode_questions = include.episode_questions %}
33 | {% else %}
34 | {% assign episode_questions = page.questions %}
35 | {% endif %}
36 |
37 | {% if page.objectives == nil %}
38 | {% assign episode_objectives = include.episode_objectives %}
39 | {% else %}
40 | {% assign episode_objectives = page.objectives %}
41 | {% endif %}
42 |
43 |
44 |
45 |
Overview
46 |
47 |
48 |
49 | Teaching: {{ teaching_time }} min
50 |
51 | Exercises: {{ exercise_time }} min
52 |
53 |
54 | Questions
55 |
56 | {% for question in episode_questions %}
57 |
{{ question|markdownify }}
58 | {% endfor %}
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 | Objectives
68 |
69 | {% for objective in episode_objectives %}
70 |
5 | When you're writing code, it's nice to have a text editor that is
6 | optimized for writing code, with features like automatic
7 | color-coding of key words. The default text editor on macOS and
8 | Linux is usually set to Vim, which is not famous for being
9 | intuitive. If you accidentally find yourself stuck in it, hit
10 | the Esc key, followed by :+Q+!
11 | (colon, lower-case 'q', exclamation mark), then hitting Return to
12 | return to the shell.
13 |
25 | nano is a basic editor and the default that instructors use in the workshop.
26 | It is installed along with Git.
27 |
28 |
29 |
30 |
31 | nano is a basic editor and the default that instructors use in the workshop.
32 | See the Git installation video tutorial
33 | for an example on how to open nano.
34 | It should be pre-installed.
35 |
36 |
Video Tutorial
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 | nano is a basic editor and the default that instructors use in the workshop.
46 | It should be pre-installed.
47 |
48 |
49 |
50 |
51 |
52 |
--------------------------------------------------------------------------------
/bin/chunk-options.R:
--------------------------------------------------------------------------------
1 | # These settings control the behavior of all chunks in the novice R materials.
2 | # For example, to generate the lessons with all the output hidden, simply change
3 | # `results` from "markup" to "hide".
4 | # For more information on available chunk options, see
5 | # http://yihui.name/knitr/options#chunk_options
6 |
7 | library("knitr")
8 |
9 | fix_fig_path <- function(pth) file.path("..", pth)
10 |
11 |
12 | ## We set the path for the figures globally below, so if we want to
13 | ## customize it for individual episodes, we can append a prefix to the
14 | ## global path. For instance, if we call knitr_fig_path("01-") in the
15 | ## first episode of the lesson, it will generate the figures in
16 | ## `fig/rmd-01-`
17 | knitr_fig_path <- function(prefix) {
18 | new_path <- paste0(opts_chunk$get("fig.path"),
19 | prefix)
20 | opts_chunk$set(fig.path = new_path)
21 | }
22 |
23 | ## We use the rmd- prefix for the figures generated by the lessons so
24 | ## they can be easily identified and deleted by `make clean-rmd`. The
25 | ## working directory when the lessons are generated is the root so the
26 | ## figures need to be saved in fig/, but when the site is generated,
27 | ## the episodes will be one level down. We fix the path using the
28 | ## `fig.process` option.
29 |
30 | opts_chunk$set(tidy = FALSE, results = "markup", comment = NA,
31 | fig.align = "center", fig.path = "fig/rmd-",
32 | fig.process = fix_fig_path,
33 | fig.width = 8.5, fig.height = 8.5,
34 | fig.retina = 2)
35 |
36 | # The hooks below add html tags to the code chunks and their output so that they
37 | # are properly formatted when the site is built.
38 |
39 | hook_in <- function(x, options) {
40 | lg <- tolower(options$engine)
41 | style <- paste0(".language-", lg)
42 |
43 | stringr::str_c("\n\n~~~\n",
44 | paste0(x, collapse="\n"),
45 | "\n~~~\n{: ", style, "}\n\n")
46 | }
47 |
48 | hook_out <- function(x, options) {
49 | x <- gsub("\n$", "", x)
50 | stringr::str_c("\n\n~~~\n",
51 | paste0(x, collapse="\n"),
52 | "\n~~~\n{: .output}\n\n")
53 | }
54 |
55 | hook_error <- function(x, options) {
56 | x <- gsub("\n$", "", x)
57 | stringr::str_c("\n\n~~~\n",
58 | paste0(x, collapse="\n"),
59 | "\n~~~\n{: .error}\n\n")
60 | }
61 |
62 | hook_warning <- function(x, options) {
63 | x <- gsub("\n$", "", x)
64 | stringr::str_c("\n\n~~~\n",
65 | paste0(x, collapse = "\n"),
66 | "\n~~~\n{: .warning}\n\n")
67 | }
68 |
69 | knit_hooks$set(source = hook_in, output = hook_out, warning = hook_warning,
70 | error = hook_error, message = hook_out)
71 |
--------------------------------------------------------------------------------
/_includes/custom-schedule.html:
--------------------------------------------------------------------------------
1 |
Copy the following curl -fsSL {{site.url}}{{site.baseurl}}/getsql.sh | bash
22 |
Paste it into the window that Git Bash opened. If you're unsure, ask an instructor for help
23 |
You should see something like 3.27.2 2019-02-25 16:06:06 ...
24 |
25 |
26 |
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.
5 | R is a programming language
6 | that is especially powerful for data exploration, visualization, and
7 | statistical analysis. To interact with R, we use
8 | RStudio.
9 |
21 | Install R by downloading and running
22 | this .exe file
23 | from CRAN.
24 | Also, please install the
25 | RStudio IDE.
26 | Note that if you have separate user and admin accounts, you should run the
27 | installers as administrator (right-click on .exe file and select "Run as
28 | administrator" instead of double-clicking). Otherwise problems may occur later,
29 | for example when installing R packages.
30 |
31 |
Video Tutorial
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 | Install R by downloading and running
41 | this .pkg file
42 | from CRAN.
43 | Also, please install the
44 | RStudio IDE.
45 |
46 |
Video Tutorial
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 | Instructions for R installation on various Linux platforms (debian,
56 | fedora, redhat, and ubuntu) can be found at
57 | . These will instruct you to
58 | use your package manager (e.g. for Fedora run
59 | sudo dnf install R and for Debian/Ubuntu, add a ppa
60 | repository and then run sudo apt-get install r-base).
61 | Also, please install the
62 | RStudio IDE.
63 |
64 |
65 |
66 |
67 |
68 |
--------------------------------------------------------------------------------
/_includes/carpentries.html:
--------------------------------------------------------------------------------
1 | {% comment %}
2 | General description of Software, Data, and Library Carpentry.
3 | {% endcomment %}
4 |
5 | {% include base_path.html %}
6 |
7 |
8 |
9 |
10 |
11 |
12 |
The Carpentries comprises
13 | Software Carpentry, Data Carpentry, and Library Carpentry communities of Instructors, Trainers,
14 | Maintainers, helpers, and supporters who share a mission to teach
15 | foundational coding and data science skills to researchers and people
16 | working in library- and information-related roles. In January,
17 | 2018, The Carpentries was formed by the merger of Software Carpentry and
18 | Data Carpentry. Library Carpentry became an official Carpentries Lesson Program
19 | in November 2018.
20 |
21 |
22 |
While individual lessons and workshops continue to be run under each
23 | lesson project, The Carpentries provide overall staffing and governance, as
24 | well as support for assessment, instructor training and mentoring.
25 | Memberships are joint, and the Carpentries project maintains a shared Code
26 | of Conduct. The Carpentries is a fiscally sponsored project of Community
27 | Initiatives, a registered 501(c)3 non-profit based in California, USA.
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
Since 1998, Software Carpentry has
36 | been teaching researchers across all disciplines the foundational coding
37 | skills they need to get more done in less time and with less pain. Its
38 | volunteer instructors have run hundreds of events for thousands of learners
39 | around the world. Now that all research involves some degree of
40 | computational work, whether with big data, cloud computing, or simple task
41 | automation, these skills are needed more than ever.
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
Data Carpentry develops and teaches
51 | workshops on the fundamental data skills needed to conduct research. Its
52 | target audience is researchers who have little to no prior computational
53 | experience, and its lessons are domain specific, building on learners'
54 | existing knowledge to enable them to quickly apply skills learned to their
55 | own research. Data Carpentry workshops take researchers through the entire
56 | data life cycle.
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
Library Carpentry develops lessons and
66 | teaches workshops for and with people working in library- and
67 | information-related roles. Its goal is to create an on-ramp to empower this
68 | community to use software and data in their own work, as well as be
69 | advocates for and train others in efficient, effective and reproducible data
70 | and software practices.
9 | Git is a version control system that lets you track who made changes
10 | to what when and has options for easily updating a shared or public
11 | version of your code
12 | on github.com. You will need a
13 | supported
14 | web browser.
15 |
16 |
17 | You will need an account at github.com
18 | for parts of the Git lesson. Basic GitHub accounts are free. We encourage
19 | you to create a GitHub account if you don't have one already.
20 | Please consider what personal information you'd like to reveal. For
21 | example, you may want to review these
22 | instructions
23 | for keeping your email address private provided at GitHub.
24 |
36 | Git should be installed on your computer as part of your Bash
37 | install (see the
38 | Shell installation instructions).
39 |
40 |
41 |
42 |
43 | For macOS, install Git for Mac
44 | by downloading and running the most recent "mavericks" installer from
45 | this list.
46 | Because this installer is not signed by the developer, you may have to
47 | right click (control click) on the .pkg file, click Open, and click
48 | Open on the pop up window.
49 | After installing Git, there will not be anything in your /Applications folder,
50 | as Git is a command line program.
51 | For older versions of OS X (10.5-10.8) use the
52 | most recent available installer labelled "snow-leopard"
53 | available here.
54 |
55 |
Video Tutorial
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 | If Git is not already available on your machine you can try to
65 | install it via your distro's package manager. For Debian/Ubuntu run
66 | sudo apt-get install git and for Fedora run
67 | sudo dnf install git.
68 |
24 | This lesson is being piloted (Beta version)
25 |
26 |
27 |
28 | {% elsif site.life_cycle == "stable" %}
29 |
30 | {% comment %}
31 | We do not do anything special for lessons in stable
32 | {% endcomment %}
33 |
34 |
35 | {% comment %}
36 | Below we cover the 2 phases of lesson transition towards the Carpentries Workbench:
37 | Variables needed:
38 | - transition_date_prebeta: the date of the prebeta stage
39 | - transition_date_beta: the date of the beta stage
40 | - transition_date_prerelease: the date of the prerelease stage
41 |
42 | - transition-step-1: We notify that there is a snapshot of the lesson available for testing, and that it will supersede this version.
43 | - transition-step-2 We indicate that this version of the lesson is a snapshot and a new version of the lesson is avaiable and will supersede this version at a given date.
44 | {% endcomment %}
45 |
46 | {% elsif site.life_cycle == "transition-step-1" %}
47 | {% include check_transition_variables.html need_transition_date = 'true' %}
48 |
49 |
50 | A snapshot of this lesson from {{ site.transition_date_prebeta }} is being tested on
51 | The Carpentries Workbench:
52 | https://preview.carpentries.org/{{ repo_name }}.
53 |
54 | The Workbench version of this lesson will become default on {{ site.transition_date_prerelease }}.
55 |
58 |
64 | This lesson is a snapshot from {{ site.transition_date_beta }}.
65 | A newer version is being tested on The Carpentries Workbench:
66 | https://preview.carpentries.org/{{ repo_name }}.
67 |
68 | The Workbench version of this lesson will become default on {{ site.transition_date_prerelease }}.
69 |
72 |
73 |
74 | {% endif %}
75 |
76 |
77 |
78 | {% comment %}
79 | For Carpentries Lab lessons we add a banner about the review status
80 | {% endcomment %}
81 |
82 | {% if site.carpentry == "lab" %}
83 | {% if site.doi contains "zenodo" %}{% assign listing=" on Zenodo" %}
84 | {% elsif site.doi contains "jose" %}{% assign listing=" in JOSE" %}
85 | {% else %}{% assign listing="none" %}
86 | {% endif %}
87 |
88 |
93 | {% endif %}
94 |
--------------------------------------------------------------------------------
/_includes/javascript.html:
--------------------------------------------------------------------------------
1 | {% comment %}
2 | JavaScript used in lesson and workshop pages.
3 | {% endcomment %}
4 |
5 |
6 |
7 |
8 |
73 |
74 | {% endif %}
75 |
76 | {% if page.math %}
77 |
78 |
89 |
90 | {% endif %}
91 |
92 | {%- comment -%}
93 | AnchorJS: A JavaScript utility for adding deep anchor links
94 | https://github.com/bryanbraun/anchorjs
95 | https://cdn.jsdelivr.net/npm/anchor-js/anchor.min.js
96 | {%- endcomment -%}
97 |
98 |
99 |
102 |
--------------------------------------------------------------------------------
/_includes/manual_episode_order.html:
--------------------------------------------------------------------------------
1 | {% comment %}
2 | This file enables manual episode ordering until
3 | GitHub Pages switches to Jekyll that supports it
4 | without any major hackery. Note, some logic will
5 | be required even when this transition happens
6 | but it will not be as involved as what we have to do
7 | in this file.
8 |
9 | To order lesson episodes or extras manually
10 | (instead of the default alpha-numerical order),
11 | create array variables 'episode_order' and
12 | 'extras_order' in `_config.yml` like so:
13 |
14 | episode_order:
15 | - episodeA
16 | - episodeB
17 |
18 | extras_order:
19 | - extraA
20 | - extraB
21 |
22 | Note that "Reference" page is currently always
23 | added to "Extras" as the first item.
24 |
25 | The main outcomes of the code in this file are:
26 | - 'lesson_episodes' variable that replaces
27 | 'site.episodes' variable when manual episode
28 | order is defined.
29 | - 'lesson_extras' variable that replaces
30 | 'site.extras' variable when manual ordering of
31 | files in '_extras' is used
32 | - 'previous_episode' and 'next_episode' objects
33 | that replace 'page.previous' and 'page.next' variables,
34 | correspondingly, and that have such properties
35 | as 'url' and 'title' and that are used in
36 | 'episode_navbar.html'.
37 |
38 | When episode order is specified manually, the 'lesson_episodes'
39 | variable contains a list of episode names ("slugs", to be precise;
40 | "slug" is the episode name without '.md'). Therefore, when we
41 | iterate over 'lesson_episodes' (in navbar.html) ,
42 | we have to check whether we use manual episode ordering and, if so,
43 | find the corresponding episode object. This is what we do with the
44 | following code in every loop over 'lesson_episodes':
45 |
46 | {% if site.episode_order %}
47 | {% assign episode = site.episodes | where: "slug", lesson_episode | first %}
48 | {% else %}
49 | {% assign episode = lesson_episode %}
50 | {% endif %}
51 | {% endcomment %}
52 |
53 | {% comment %}
54 | Manual ordering of Episodes begins here
55 | {% endcomment %}
56 |
57 | {% if site.episode_order %}
58 | {% assign lesson_episodes = site.episode_order %}
59 | {% else %}
60 | {% assign lesson_episodes = site.episodes %}
61 | {% endif %}
62 |
63 |
64 | {% comment %}
65 | If 'episode_order' is defined, we need to determine
66 | - previous episode object ('previous_episode')
67 | - and next episode object ('next_episode')
68 | {% endcomment %}
69 |
70 |
71 | {% if site.episode_order %}
72 | {% for lesson_episode in lesson_episodes %}
73 |
74 | {% comment %}
75 | We iterate over the specified lesson episodes using
76 | a 'for' loop because we can use
77 | 'forloop.first', 'forloop.last', and 'forloop.index0'.
78 | {% endcomment %}
79 |
80 | {% unless lesson_episode == page.slug %} {% continue %} {% endunless %}
81 |
82 | {% if forloop.first %}
83 | {% assign previous_episode = nil %}
84 | {% else %}
85 | {% assign p_idx = forloop.index0 | minus: 1 %}
86 | {% assign p_name = lesson_episodes[p_idx] %}
87 | {% assign previous_episode = site.episodes | where: "slug", p_name | first %}
88 | {% endif %}
89 |
90 | {% if forloop.last == true %}
91 | {% assign next_episode = nil %}
92 | {% else %}
93 | {% assign n_idx = forloop.index0 | plus: 1 %}
94 | {% assign n_name = lesson_episodes[n_idx] %}
95 | {% assign next_episode = site.episodes | where: "slug", n_name | first %}
96 | {% endif %}
97 | {% endfor %}
98 | {% else %}
99 | {% assign previous_episode = page.previous %}
100 | {% assign next_episode = page.next %}
101 | {% endif %}
102 |
103 |
104 | {% comment %}
105 | Manual ordering of Extras begins here
106 | {% endcomment %}
107 |
108 | {% if site.extras_order %}
109 | {% assign lesson_extras = site.extras_order %}
110 | {% else %}
111 | {% assign lesson_extras = site.extras %}
112 | {% endif %}
113 |
114 | {% comment %}
115 | We do not need to determine "previous" or "next" extra.
116 | {% endcomment %}
117 |
--------------------------------------------------------------------------------
/_includes/install_instructions/openrefine.html:
--------------------------------------------------------------------------------
1 |
2 |
OpenRefine
3 |
4 | For this lesson you will need OpenRefine and a
5 | web browser. Note: this is a Java program that runs on your machine (not in the cloud).
6 | It runs inside a web browser, but no web connection is needed.
7 |
20 | Check that you have either the Firefox or the Chrome browser installed and set as your default browser.
21 | OpenRefine runs in your default browser.
22 | It will not run correctly in Internet Explorer.
23 |
Unzip the downloaded file into the OpenRefine directory by right-clicking and selecting "Extract ...".
27 |
Go to your newly created OpenRefine directory.
28 |
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).
29 |
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.
30 |
31 |
32 |
33 |
34 |
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.
Unzip the downloaded file into the OpenRefine directory by double-clicking it.
38 |
Go to your newly created OpenRefine directory.
39 |
Launch OpenRefine by dragging the icon into the Applications folder.
40 |
Use Ctrl-click/Open ... to launch it.
41 |
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.
42 |
43 |
44 |
45 |
46 |
Check that you have either the Firefox or the Chrome browser installed and set as your default browser. OpenRefine runs in your default browser.
Unzip the downloaded file into the OpenRefine directory.
50 |
Go to your newly created OpenRefine directory.
51 |
Launch OpenRefine by entering ./refine into the terminal within the OpenRefine directory.
52 |
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.
53 |
54 |
55 |
56 |
57 |
58 |
--------------------------------------------------------------------------------
/assets/css/syntax.css:
--------------------------------------------------------------------------------
1 | .highlight .hll { background-color: #ffffcc }
2 | .highlight { background: #f8f8f8; }
3 | .highlight .c { color: #387d7d; font-style: italic } /* Comment */
4 | .highlight .err { border: 1px solid #FF0000 } /* Error */
5 | .highlight .k { color: #008000; font-weight: bold } /* Keyword */
6 | .highlight .o { color: #666666 } /* Operator */
7 | .highlight .ch { color: #387d7d; font-style: italic } /* Comment.Hashbang */
8 | .highlight .cm { color: #387d7d; font-style: italic } /* Comment.Multiline */
9 | .highlight .cp { color: #BC7A00 } /* Comment.Preproc */
10 | .highlight .cpf { color: #387d7d; font-style: italic } /* Comment.PreprocFile */
11 | .highlight .c1 { color: #387d7d; font-style: italic } /* Comment.Single */
12 | .highlight .cs { color: #387d7d; font-style: italic } /* Comment.Special */
13 | .highlight .gd { color: #A00000 } /* Generic.Deleted */
14 | .highlight .ge { font-style: italic } /* Generic.Emph */
15 | .highlight .gr { color: #FF0000 } /* Generic.Error */
16 | .highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */
17 | .highlight .gi { color: #00A000 } /* Generic.Inserted */
18 | .highlight .go { color: #888888 } /* Generic.Output */
19 | .highlight .gp { color: #000080; font-weight: bold } /* Generic.Prompt */
20 | .highlight .gs { font-weight: bold } /* Generic.Strong */
21 | .highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */
22 | .highlight .gt { color: #0044DD } /* Generic.Traceback */
23 | .highlight .kc { color: #008000; font-weight: bold } /* Keyword.Constant */
24 | .highlight .kd { color: #008000; font-weight: bold } /* Keyword.Declaration */
25 | .highlight .kn { color: #008000; font-weight: bold } /* Keyword.Namespace */
26 | .highlight .kp { color: #008000 } /* Keyword.Pseudo */
27 | .highlight .kr { color: #008000; font-weight: bold } /* Keyword.Reserved */
28 | .highlight .kt { color: #B00040 } /* Keyword.Type */
29 | .highlight .m { color: #666666 } /* Literal.Number */
30 | .highlight .s { color: #BA2121 } /* Literal.String */
31 | .highlight .na { color: #7D9029 } /* Name.Attribute */
32 | .highlight .nb { color: #008000 } /* Name.Builtin */
33 | .highlight .nc { color: #0000FF; font-weight: bold } /* Name.Class */
34 | .highlight .no { color: #880000 } /* Name.Constant */
35 | .highlight .nd { color: #AA22FF } /* Name.Decorator */
36 | .highlight .ni { color: #999999; font-weight: bold } /* Name.Entity */
37 | .highlight .ne { color: #D2413A; font-weight: bold } /* Name.Exception */
38 | .highlight .nf { color: #0000FF } /* Name.Function */
39 | .highlight .nl { color: #A0A000 } /* Name.Label */
40 | .highlight .nn { color: #0000FF; font-weight: bold } /* Name.Namespace */
41 | .highlight .nt { color: #008000; font-weight: bold } /* Name.Tag */
42 | .highlight .nv { color: #19177C } /* Name.Variable */
43 | .highlight .ow { color: #AA22FF; font-weight: bold } /* Operator.Word */
44 | .highlight .w { color: #bbbbbb } /* Text.Whitespace */
45 | .highlight .mb { color: #666666 } /* Literal.Number.Bin */
46 | .highlight .mf { color: #666666 } /* Literal.Number.Float */
47 | .highlight .mh { color: #666666 } /* Literal.Number.Hex */
48 | .highlight .mi { color: #666666 } /* Literal.Number.Integer */
49 | .highlight .mo { color: #666666 } /* Literal.Number.Oct */
50 | .highlight .sa { color: #BA2121 } /* Literal.String.Affix */
51 | .highlight .sb { color: #BA2121 } /* Literal.String.Backtick */
52 | .highlight .sc { color: #BA2121 } /* Literal.String.Char */
53 | .highlight .dl { color: #BA2121 } /* Literal.String.Delimiter */
54 | .highlight .sd { color: #BA2121; font-style: italic } /* Literal.String.Doc */
55 | .highlight .s2 { color: #BA2121 } /* Literal.String.Double */
56 | .highlight .se { color: #BB6622; font-weight: bold } /* Literal.String.Escape */
57 | .highlight .sh { color: #BA2121 } /* Literal.String.Heredoc */
58 | .highlight .si { color: #BB6688; font-weight: bold } /* Literal.String.Interpol */
59 | .highlight .sx { color: #008000 } /* Literal.String.Other */
60 | .highlight .sr { color: #BB6688 } /* Literal.String.Regex */
61 | .highlight .s1 { color: #BA2121 } /* Literal.String.Single */
62 | .highlight .ss { color: #19177C } /* Literal.String.Symbol */
63 | .highlight .bp { color: #008000 } /* Name.Builtin.Pseudo */
64 | .highlight .fm { color: #0000FF } /* Name.Function.Magic */
65 | .highlight .vc { color: #19177C } /* Name.Variable.Class */
66 | .highlight .vg { color: #19177C } /* Name.Variable.Global */
67 | .highlight .vi { color: #19177C } /* Name.Variable.Instance */
68 | .highlight .vm { color: #19177C } /* Name.Variable.Magic */
69 | .highlight .il { color: #666666 } /* Literal.Number.Integer.Long */
70 |
--------------------------------------------------------------------------------
/bin/boilerplate/_config.yml:
--------------------------------------------------------------------------------
1 | #------------------------------------------------------------
2 | # Values for this lesson.
3 | #------------------------------------------------------------
4 |
5 | # Which carpentry is this ("swc", "dc", "lc", or "cp")?
6 | # swc: Software Carpentry
7 | # dc: Data Carpentry
8 | # lc: Library Carpentry
9 | # cp: Carpentries (to use for instructor traning for instance)
10 | # incubator: Carpentries Incubator
11 | carpentry: "swc"
12 |
13 | # Overall title for pages.
14 | title: "Lesson Title"
15 |
16 | # Life cycle stage of the lesson
17 | # See this page for more details: https://cdh.carpentries.org/the-lesson-life-cycle.html
18 | # Possible values: "pre-alpha", "alpha", "beta", "stable"
19 | #
20 | # Lessons that are going through the transition to the
21 | # Carpentries Workbench will go through 3 steps:
22 | # 'transition-step-1': notice indicating a new version
23 | # 'transition-step-2': notice encouraging to use new version
24 | # 'transition-step-3': notice indicating the lesson is deprecated,
25 | # with automated redirect
26 | life_cycle: "pre-alpha"
27 |
28 | # For lessons in the life stages in 'transition-step-1' or later:
29 | # - 'transition_url' holds the URL for the version of the lesson that
30 | # uses the Workbench (needed for all 3 steps)
31 | # - 'transition_date' (in yyyy-mm-dd format) is the date when the lesson
32 | # will transition to being deprecated. The date only needs to be decided
33 | # when the lesson is in 'transition-step-2'.
34 | transition_url:
35 | transition_date:
36 |
37 | #------------------------------------------------------------
38 | # Generic settings (should not need to change).
39 | #------------------------------------------------------------
40 |
41 | # What kind of thing is this ("workshop" or "lesson")?
42 | kind: "lesson"
43 |
44 | # Magic to make URLs resolve both locally and on GitHub.
45 | # See https://help.github.com/articles/repository-metadata-on-github-pages/.
46 | # Please don't change it: / is correct.
47 | repository: /
48 |
49 | # Email address, no mailto:
50 | email: "team@carpentries.org"
51 |
52 | # Sites.
53 | coc: "https://docs.carpentries.org/topic_folders/policies/code-of-conduct.html"
54 | amy_site: "https://amy.carpentries.org/"
55 | carpentries_github: "https://github.com/carpentries"
56 | carpentries_pages: "https://carpentries.github.io"
57 | carpentries_site: "https://carpentries.org/"
58 | dc_site: "https://datacarpentry.org"
59 | example_repo: "https://github.com/carpentries/lesson-example"
60 | example_site: "https://carpentries.github.io/lesson-example"
61 | lc_site: "https://librarycarpentry.org/"
62 | swc_github: "https://github.com/swcarpentry"
63 | swc_pages: "https://swcarpentry.github.io"
64 | swc_site: "https://software-carpentry.org"
65 | template_repo: "https://github.com/carpentries/styles"
66 | training_site: "https://carpentries.github.io/instructor-training"
67 | workshop_repo: "https://github.com/carpentries/workshop-template"
68 | workshop_site: "https://carpentries.github.io/workshop-template"
69 | cc_by_human: "https://creativecommons.org/licenses/by/4.0/"
70 |
71 | # Surveys.
72 | pre_survey: "https://carpentries.typeform.com/to/wi32rS#slug="
73 | post_survey: "https://carpentries.typeform.com/to/UgVdRQ#slug="
74 | instructor_pre_survey: "https://carpentries.typeform.com/to/QVOarK#slug="
75 | instructor_post_survey: "https://carpentries.typeform.com/to/cjJ9UP#slug="
76 |
77 | # Set to 'true' for instructor training websites only.
78 | instructor_training: false
79 |
80 | # Start time in minutes (0 to be clock-independent, 540 to show a start at 09:00 am).
81 | start_time: 0
82 |
83 | # Specify that things in the episodes collection should be output.
84 | collections:
85 | episodes:
86 | output: true
87 | permalink: /:path/index.html
88 | extras:
89 | output: true
90 | permalink: /:path/index.html
91 |
92 | # Set the default layout for things in the episodes collection.
93 | defaults:
94 | - values:
95 | root: .
96 | layout: page
97 | - scope:
98 | path: ""
99 | type: episodes
100 | values:
101 | root: ..
102 | layout: episode
103 | - scope:
104 | path: ""
105 | type: extras
106 | values:
107 | root: ..
108 | layout: page
109 |
110 | # Files and directories that are not to be copied.
111 | exclude:
112 | - Makefile
113 | - bin/
114 | - .Rproj.user/
115 | - .vendor/
116 | - vendor/
117 | - .docker-vendor/
118 |
119 | # Turn on built-in syntax highlighting.
120 | highlighter: rouge
121 |
--------------------------------------------------------------------------------
/.github/workflows/website.yml:
--------------------------------------------------------------------------------
1 | name: Website
2 | on:
3 | push:
4 | branches:
5 | - gh-pages
6 | - main
7 | pull_request: []
8 | jobs:
9 | build-website:
10 | if: ${{ !endsWith(github.repository, '/styles') }}
11 | runs-on: ubuntu-20.04
12 | env:
13 | RSPM: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"
14 | GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
15 | defaults:
16 | run:
17 | shell: bash
18 | steps:
19 | - name: Set up Ruby
20 | uses: ruby/setup-ruby@v1
21 | with:
22 | ruby-version: '2.7'
23 | bundler-cache: true
24 |
25 | - name: Set up Python
26 | uses: actions/setup-python@v2
27 | with:
28 | python-version: '3.x'
29 |
30 | - name: Install GitHub Pages, Bundler, and kramdown gems
31 | run: |
32 | gem install github-pages bundler kramdown kramdown-parser-gfm
33 |
34 | - name: Install Python modules
35 | run: |
36 | python3 -m pip install --upgrade pip setuptools wheel pyyaml==5.3.1 requests
37 |
38 | - name: Checkout the lesson
39 | uses: actions/checkout@master
40 | with:
41 | fetch-depth: 0
42 | ref: ${{ github.event.pull_request.head.sha }}
43 |
44 | - name: Look for R-markdown files
45 | id: check-rmd
46 | run: |
47 | echo "count=$(shopt -s nullglob; files=($(find . -iname '*.Rmd')); echo ${#files[@]})" >> $GITHUB_OUTPUT
48 |
49 | - name: Set up R
50 | if: steps.check-rmd.outputs.count != 0
51 | uses: r-lib/actions/setup-r@v2
52 | with:
53 | use-public-rspm: true
54 | install-r: false
55 |
56 | - name: Restore R Cache
57 | if: steps.check-rmd.outputs.count != 0
58 | uses: actions/cache@v2
59 | with:
60 | path: ${{ env.R_LIBS_USER }}
61 | key: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-${{ hashFiles('.github/depends.Rds') }}
62 | restore-keys: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-
63 |
64 | - name: Install needed packages
65 | if: steps.check-rmd.outputs.count != 0
66 | run: |
67 | source('bin/dependencies.R')
68 | install_required_packages()
69 | shell: Rscript {0}
70 |
71 | - name: Query dependencies
72 | if: steps.check-rmd.outputs.count != 0
73 | run: |
74 | source('bin/dependencies.R')
75 | deps <- identify_dependencies()
76 | create_description(deps)
77 | use_bioc_repos()
78 | saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2)
79 | writeLines(sprintf("R-%i.%i", getRversion()$major, getRversion()$minor), ".github/R-version")
80 | shell: Rscript {0}
81 |
82 |
83 | - name: Install system dependencies for R packages
84 | if: steps.check-rmd.outputs.count != 0
85 | run: |
86 | while read -r cmd
87 | do
88 | eval sudo $cmd || echo "Nothing to update"
89 | done < <(Rscript -e 'cat(remotes::system_requirements("ubuntu", "20.04"), sep = "\n")')
90 |
91 | - name: Render the markdown and confirm that the site can be built
92 | run: make site
93 |
94 | - name: Checkout github pages
95 | if: ${{ github.event_name == 'push' && steps.check-rmd.outputs.count != 0 && github.ref != 'refs/heads/gh-pages'}}
96 | uses: actions/checkout@master
97 | with:
98 | ref: gh-pages
99 | path: gh-pages
100 |
101 | - name: Commit and Push
102 | if: ${{ github.event_name == 'push' && steps.check-rmd.outputs.count != 0 && github.ref != 'refs/heads/gh-pages'}}
103 | run: |
104 | # clean up gh-pages
105 | cd gh-pages
106 | git rm -rf . # remove all previous files
107 | git restore --staged . # remove things from the stage
108 | cd ..
109 | # copy everything into gh-pages site
110 | cp -r `ls -A | grep -v 'gh-pages' | grep -v '.git' | grep -v '.bundle/' | grep -v '_site'` gh-pages
111 | # move into gh-pages, add, commit, and push
112 | cd gh-pages
113 | # setup git
114 | git config --local user.email "actions@github.com"
115 | git config --local user.name "GitHub Actions"
116 | git add -A .
117 | git commit --allow-empty -m "[Github Actions] render website (via ${{ github.sha }})"
118 | git push origin gh-pages
119 | # return
120 | cd ..
121 |
122 | # waiting for https://github.com/carpentries/styles/issues/551
123 | # to be addressed
124 | # - run: make lesson-check-all
125 | # if: always()
126 |
--------------------------------------------------------------------------------
/assets/img/incubator-logo-blue.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
92 |
--------------------------------------------------------------------------------
/assets/img/swc-icon-blue.svg:
--------------------------------------------------------------------------------
1 |
2 |
71 |
--------------------------------------------------------------------------------
/_extras/design.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: page
3 | title: Background and Design
4 | permalink: /design/
5 | ---
6 | There are a few things you need to know in order to understand why we
7 | do things the way we do. Some of them are specific to GitHub, rather
8 | than Git itself.
9 |
10 | 1. Git uses the term "clone" to mean "a copy of a repository".
11 | GitHub uses the term "fork" to mean, "a copy of a GitHub-hosted
12 | repo that is also hosted on GitHub", and the term "clone" to mean
13 | "a copy of a GitHub-hosted repo that's located on someone else's
14 | machine". In both cases, the duplicate has a remote called
15 | `origin` that points to the original repo; other remotes can be
16 | added manually.
17 |
18 | 2. A user on GitHub can only have one fork of a particular repo.
19 | This is a problem for us because an instructor may be involved in
20 | several workshops, each of which has its own website repo. To avoid
21 | this issue, we use the template functionality (you could also use the
22 | `import.github.com` functionality).
23 |
24 | 3. If a repository has a file called `README.md` in its root
25 | directory, GitHub displays the contents of that file on the
26 | repository's home page.
27 |
28 | 4. If a repository has a branch called `gh-pages` (which stands for
29 | "GitHub pages"), then GitHub uses the HTML and Markdown files in
30 | that branch to create a website for the repository. If the
31 | repository's URL is `http://github.com/darwin/finches`, the URL
32 | for the website is `http://darwin.github.io/finches`.
33 |
34 | 5. If an HTML or Markdown file has a header consisting of three
35 | dashes, some data about the page, and three more dashes:
36 |
37 | ```yaml
38 | ---
39 | key: value
40 | other_key: other_value
41 | ---
42 | content of the page
43 | ```
44 |
45 | then GitHub doesn't just copy the file over verbatim. Instead, it
46 | runs the file through a translator called [Jekyll][jekyll] that
47 | looks for specially-formatted commands embedded in the file and
48 | uses them to fill in the page.
49 |
50 | 6. Commands can be embedded in the body of a page. One is
51 | `{% raw %}{% include something.html %}{% endraw %}`, which tells
52 | Jekyll to copy the contents of `something.html` into the file
53 | being translated; this is used to create standard headers and
54 | footers for pages. Another is `{% raw %}{{variable}}{% endraw %}`: when Jekyll sees
55 | this, it replaces it with the value of `variable`. This is used
56 | to insert things like a contact email address and the URL for our
57 | Twitter account.
58 |
59 | 7. Jekyll gets variables from two places: a file called `_config.yml`
60 | located in the repo's root directory, and the header of each
61 | individual page. Variables from `_config.yml` are put in an
62 | object called `site`, and referred to as `site.variable`, so that
63 | (for example) `{% raw %}{{site.swc_site}}{% endraw %}` in a page is replaced by the URL
64 | of the main Software Carpentry web site ({{site.swc_site}}). Variables from the
65 | page's header are put in an object called `page`, and referred to
66 | as `page.variable`, so if a page's header defines a variable
67 | called `venue`, `{% raw %}{{page.venue}}{% endraw %}` is replaced by "Euphoric State
68 | University" (or whatever value the variable has).
69 |
70 | 8. If a page uses `{% raw %}{% include something.html %}{% endraw %}`
71 | to include a snippet of HTML, Jekyll looks in a directory called
72 | `_includes` to find `something.html`. It always looks there, and
73 | nowhere else, so anything we want people to be able to include in
74 | their pages has to be stored in `_includes`.
75 |
76 | 9. A repository can have another special directory called `_layouts`.
77 | If a page like `index.html` has a variable called `layout`, and
78 | that variable's value is `standard.html`, Jekyll loads the file
79 | `_layouts/standard.html` and copies the content of `index.html`
80 | into it, then expands the result. This is used to give the pages
81 | in a site a uniform appearance.
82 | We have created two layouts for workshop pages:
83 |
84 | * `workshop.html` is used for workshops' home pages, and is the
85 | layout for the `index.html` page in your repo's root directory.
86 | That `index.html` page's header must define several variables as
87 | specified in the the customization instructions in order for
88 | your workshop to be included in our main website.
89 |
90 | * `page.html` is used for any other pages you want to create.
91 | **Note:** if you create extra pages, you *must* edit the values
92 | in the top section of `_config.yml` as described in
93 | [the lesson template documentation]({{ site.example_site }}).
94 |
95 | ## Extra Directories
96 |
97 | This workshop template shares resources with the template used for
98 | Carpentry lessons. As a result, your workshop website's repository
99 | contains directories that most workshops don't need, but which can be
100 | used to store extra material when necessary:
101 |
102 | * `_extras/`: extra pages (like this one).
103 | * `_episodes/`: lesson episodes (which workshops usually don't have).
104 | * `_episodes_rmd/`: R Markdown lesson episodes (if any).
105 | * `code/`: for code samples.
106 | * `data/`: for data files.
107 | * `fig/`: for figures and other images.
108 | * `files/`: for miscellaneous files.
109 |
110 | For more information on these, please see [the documentation for the
111 | lesson template]({{ site.example_site }}).
112 |
113 | [jekyll]: https://jekyllrb.com/
114 |
--------------------------------------------------------------------------------
/assets/js/anchor.min.js:
--------------------------------------------------------------------------------
1 | // @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt Expat
2 | //
3 | // AnchorJS - v4.3.1 - 2021-04-17
4 | // https://www.bryanbraun.com/anchorjs/
5 | // Copyright (c) 2021 Bryan Braun; Licensed MIT
6 | //
7 | // @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt Expat
8 | !function(A,e){"use strict";"function"==typeof define&&define.amd?define([],e):"object"==typeof module&&module.exports?module.exports=e():(A.AnchorJS=e(),A.anchors=new A.AnchorJS)}(this,function(){"use strict";return function(A){function d(A){A.icon=Object.prototype.hasOwnProperty.call(A,"icon")?A.icon:"",A.visible=Object.prototype.hasOwnProperty.call(A,"visible")?A.visible:"hover",A.placement=Object.prototype.hasOwnProperty.call(A,"placement")?A.placement:"right",A.ariaLabel=Object.prototype.hasOwnProperty.call(A,"ariaLabel")?A.ariaLabel:"Anchor",A.class=Object.prototype.hasOwnProperty.call(A,"class")?A.class:"",A.base=Object.prototype.hasOwnProperty.call(A,"base")?A.base:"",A.truncate=Object.prototype.hasOwnProperty.call(A,"truncate")?Math.floor(A.truncate):64,A.titleText=Object.prototype.hasOwnProperty.call(A,"titleText")?A.titleText:""}function w(A){var e;if("string"==typeof A||A instanceof String)e=[].slice.call(document.querySelectorAll(A));else{if(!(Array.isArray(A)||A instanceof NodeList))throw new TypeError("The selector provided to AnchorJS was invalid.");e=[].slice.call(A)}return e}this.options=A||{},this.elements=[],d(this.options),this.isTouchDevice=function(){return Boolean("ontouchstart"in window||window.TouchEvent||window.DocumentTouch&&document instanceof DocumentTouch)},this.add=function(A){var e,t,o,i,n,s,a,c,r,l,h,u,p=[];if(d(this.options),"touch"===(l=this.options.visible)&&(l=this.isTouchDevice()?"always":"hover"),0===(e=w(A=A||"h2, h3, h4, h5, h6")).length)return this;for(null===document.head.querySelector("style.anchorjs")&&((u=document.createElement("style")).className="anchorjs",u.appendChild(document.createTextNode("")),void 0===(A=document.head.querySelector('[rel="stylesheet"],style'))?document.head.appendChild(u):document.head.insertBefore(u,A),u.sheet.insertRule(".anchorjs-link{opacity:0;text-decoration:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}",u.sheet.cssRules.length),u.sheet.insertRule(":hover>.anchorjs-link,.anchorjs-link:focus{opacity:1}",u.sheet.cssRules.length),u.sheet.insertRule("[data-anchorjs-icon]::after{content:attr(data-anchorjs-icon)}",u.sheet.cssRules.length),u.sheet.insertRule('@font-face{font-family:anchorjs-icons;src:url(data:n/a;base64,AAEAAAALAIAAAwAwT1MvMg8yG2cAAAE4AAAAYGNtYXDp3gC3AAABpAAAAExnYXNwAAAAEAAAA9wAAAAIZ2x5ZlQCcfwAAAH4AAABCGhlYWQHFvHyAAAAvAAAADZoaGVhBnACFwAAAPQAAAAkaG10eASAADEAAAGYAAAADGxvY2EACACEAAAB8AAAAAhtYXhwAAYAVwAAARgAAAAgbmFtZQGOH9cAAAMAAAAAunBvc3QAAwAAAAADvAAAACAAAQAAAAEAAHzE2p9fDzz1AAkEAAAAAADRecUWAAAAANQA6R8AAAAAAoACwAAAAAgAAgAAAAAAAAABAAADwP/AAAACgAAA/9MCrQABAAAAAAAAAAAAAAAAAAAAAwABAAAAAwBVAAIAAAAAAAIAAAAAAAAAAAAAAAAAAAAAAAMCQAGQAAUAAAKZAswAAACPApkCzAAAAesAMwEJAAAAAAAAAAAAAAAAAAAAARAAAAAAAAAAAAAAAAAAAAAAQAAg//0DwP/AAEADwABAAAAAAQAAAAAAAAAAAAAAIAAAAAAAAAIAAAACgAAxAAAAAwAAAAMAAAAcAAEAAwAAABwAAwABAAAAHAAEADAAAAAIAAgAAgAAACDpy//9//8AAAAg6cv//f///+EWNwADAAEAAAAAAAAAAAAAAAAACACEAAEAAAAAAAAAAAAAAAAxAAACAAQARAKAAsAAKwBUAAABIiYnJjQ3NzY2MzIWFxYUBwcGIicmNDc3NjQnJiYjIgYHBwYUFxYUBwYGIwciJicmNDc3NjIXFhQHBwYUFxYWMzI2Nzc2NCcmNDc2MhcWFAcHBgYjARQGDAUtLXoWOR8fORYtLTgKGwoKCjgaGg0gEhIgDXoaGgkJBQwHdR85Fi0tOAobCgoKOBoaDSASEiANehoaCQkKGwotLXoWOR8BMwUFLYEuehYXFxYugC44CQkKGwo4GkoaDQ0NDXoaShoKGwoFBe8XFi6ALjgJCQobCjgaShoNDQ0NehpKGgobCgoKLYEuehYXAAAADACWAAEAAAAAAAEACAAAAAEAAAAAAAIAAwAIAAEAAAAAAAMACAAAAAEAAAAAAAQACAAAAAEAAAAAAAUAAQALAAEAAAAAAAYACAAAAAMAAQQJAAEAEAAMAAMAAQQJAAIABgAcAAMAAQQJAAMAEAAMAAMAAQQJAAQAEAAMAAMAAQQJAAUAAgAiAAMAAQQJAAYAEAAMYW5jaG9yanM0MDBAAGEAbgBjAGgAbwByAGoAcwA0ADAAMABAAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAH//wAP) format("truetype")}',u.sheet.cssRules.length)),u=document.querySelectorAll("[id]"),t=[].map.call(u,function(A){return A.id}),i=0;i\]./()*\\\n\t\b\v\u00A0]/g,"-").replace(/-{2,}/g,"-").substring(0,this.options.truncate).replace(/^-+|-+$/gm,"").toLowerCase()},this.hasAnchorJSLink=function(A){var e=A.firstChild&&-1<(" "+A.firstChild.className+" ").indexOf(" anchorjs-link "),A=A.lastChild&&-1<(" "+A.lastChild.className+" ").indexOf(" anchorjs-link ");return e||A||!1}}});
9 | // @license-end
--------------------------------------------------------------------------------
/assets/img/dc-icon-black.svg:
--------------------------------------------------------------------------------
1 |
2 |
75 |
--------------------------------------------------------------------------------
/assets/img/dc-logo-black.svg:
--------------------------------------------------------------------------------
1 |
2 |
75 |
--------------------------------------------------------------------------------