diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md index 077de4cf..5bdd267d 100644 --- a/.github/ISSUE_TEMPLATE.md +++ b/.github/ISSUE_TEMPLATE.md @@ -3,17 +3,12 @@ Thanks for contributing! :heart: -If this contribution is for instructor training, please email the link to this contribution to -checkout@carpentries.org so we can record your progress. You've completed your contribution -step for instructor checkout by submitting this contribution! +If this contribution is for Instructor training, please email the link to this contribution to checkout@carpentries.org so we can record your progress. +You've completed your contribution step for Instructor checkout by submitting this contribution! -If this issue is about a specific episode within a lesson, please provide its link or filename. - -Keep in mind that **lesson maintainers are volunteers** and it may take them some time to -respond to your contribution. Although not all contributions can be incorporated into the lesson -materials, we appreciate your time and effort to improve the curriculum. If you have any questions -about the lesson maintenance process or would like to volunteer your time as a contribution -reviewer, please contact The Carpentries Team at team@carpentries.org. +Keep in mind that **maintainers are volunteers** and it may take them some time to respond to your contribution. +Although not all contributions can be incorporated, we appreciate your time and effort to improve the Carpentries resources. +If you have any questions about the maintenance process or would like to volunteer your time as a contribution reviewer, please contact The Carpentries Team at team@carpentries.org. You may delete these instructions from your comment. diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index d3368998..5bdd267d 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -3,15 +3,12 @@ Thanks for contributing! :heart: -If this contribution is for instructor training, please email the link to this contribution to -instructor.training@carpentries.org so we can record your progress. You've completed your contribution -step for instructor checkout by submitting this contribution! +If this contribution is for Instructor training, please email the link to this contribution to checkout@carpentries.org so we can record your progress. +You've completed your contribution step for Instructor checkout by submitting this contribution! -Keep in mind that **lesson maintainers are volunteers** and it may take them some time to -respond to your contribution. Although not all contributions can be incorporated into the lesson -materials, we appreciate your time and effort to improve the curriculum. If you have any questions -about the lesson maintenance process or would like to volunteer your time as a contribution -reviewer, please contact The Carpentries Team at team@carpentries.org. +Keep in mind that **maintainers are volunteers** and it may take them some time to respond to your contribution. +Although not all contributions can be incorporated, we appreciate your time and effort to improve the Carpentries resources. +If you have any questions about the maintenance process or would like to volunteer your time as a contribution reviewer, please contact The Carpentries Team at team@carpentries.org. You may delete these instructions from your comment. diff --git a/.github/workflows/template.yml b/.github/workflows/template.yml deleted file mode 100644 index 23d05a8a..00000000 --- a/.github/workflows/template.yml +++ /dev/null @@ -1,185 +0,0 @@ -name: Test template -on: - push: - branches: gh-pages - pull_request: -jobs: - check-template: - name: ${{ matrix.lesson-name }} (${{ matrix.os-name }}) - if: github.repository == 'carpentries/styles' - runs-on: ${{ matrix.os }} - continue-on-error: ${{ matrix.experimental }} - strategy: - fail-fast: false - matrix: - lesson: [swcarpentry/shell-novice, datacarpentry/r-intro-geospatial, librarycarpentry/lc-git] - os: [ubuntu-22.04, macos-latest, windows-latest] - experimental: [false] - include: - - os: ubuntu-22.04 - os-name: Linux - - os: macos-latest - os-name: macOS - - os: windows-latest - os-name: Windows - - lesson: swcarpentry/shell-novice - lesson-name: (SWC) Shell novice - - lesson: datacarpentry/r-intro-geospatial - lesson-name: (DC) R Intro Geospatial - - lesson: librarycarpentry/lc-git - lesson-name: (LC) Intro to Git - - lesson: datacarpentry/astronomy-python - lesson-name: (DC) Foundations of Astronomical Data Science - experimental: true - os: ubuntu-22.04 - os-name: Linux - - lesson: carpentries/lesson-example - lesson-name: (CP) Lesson Example - experimental: false - os: ubuntu-22.04 - os-name: Linux - defaults: - run: - shell: bash # forces 'Git for Windows' on Windows - env: - RSPM: 'https://packagemanager.rstudio.com/cran/__linux__/jammy/latest' - steps: - - name: Set up Ruby - uses: ruby/setup-ruby@v1 - with: - ruby-version: '3.0' - bundler-cache: true - - - name: Set up Python - uses: actions/setup-python@v2 - with: - python-version: '3.x' - - - name: Install GitHub Pages, Bundler, and kramdown gems - run: | - gem install github-pages bundler kramdown kramdown-parser-gfm - - - name: Install Python modules - run: | - if [[ $RUNNER_OS == macOS || $RUNNER_OS == Linux ]]; then - python3 -m pip install --upgrade pip setuptools wheel pyyaml==5.3.1 requests - elif [[ $RUNNER_OS == Windows ]]; then - python -m pip install --upgrade pip setuptools wheel pyyaml==5.3.1 requests - fi - - - name: Checkout the ${{ matrix.lesson }} lesson - uses: actions/checkout@master - with: - repository: ${{ matrix.lesson }} - path: lesson - fetch-depth: 0 - - - name: Sync lesson with carpentries/styles - working-directory: lesson - run: | - echo "::group::Fetch Styles" - if [[ -n "${{ github.event.pull_request.number }}" ]] - then - ref="refs/pull/${{ github.event.pull_request.number }}/head" - else - ref="gh-pages" - fi - - git config --global user.email "team@carpentries.org" - git config --global user.name "The Carpentries Bot" - - git remote add styles https://github.com/carpentries/styles.git - git fetch styles $ref:styles-ref - echo "::endgroup::" - echo "::group::Synchronize Styles" - # Sync up only if necessary - if [[ $(git rev-list --count HEAD..styles-ref) != 0 ]] - then - - # The merge command below might fail for lessons that use remote theme - # https://github.com/carpentries/carpentries-theme - echo "Testing merge using recursive strategy, accepting upstream changes without committing" - if ! git merge -s recursive -Xtheirs --no-commit styles-ref - then - - # Remove "deleted by us, unmerged" files from the staging area. - # these are the files that were removed from the lesson - # but are still present in the carpentries/styles repo - echo "Removing previously deleted files" - git rm $(git diff --name-only --diff-filter=DU) - - # If there are still "unmerged" files, - # let's raise an error and look into this more closely - if [[ -n $(git diff --name-only --diff-filter=U) ]] - then - echo "There were unmerged files in ${{ matrix.lesson-name }}:" - echo "$(git diff --compact-summary --diff-filter=U)" - exit 1 - fi - fi - - echo "Committing changes" - git commit -m "Sync lesson with carpentries/styles" - fi - echo "::endgroup::" - - - name: Look for R-markdown files - id: check-rmd - working-directory: lesson - run: | - echo "count=$(shopt -s nullglob; files=($(find . -iname '*.Rmd')); echo ${#files[@]})" >> $GITHUB_OUTPUT - - - name: Set up R - if: steps.check-rmd.outputs.count != 0 - uses: r-lib/actions/setup-r@v2 - with: - use-public-rspm: true - install-r: false - - - name: Install needed packages - if: steps.check-rmd.outputs.count != 0 - working-directory: lesson - run: | - source('bin/dependencies.R') - install_required_packages(.libPaths()[1]) - shell: Rscript {0} - - - name: Query dependencies - if: steps.check-rmd.outputs.count != 0 - working-directory: lesson - run: | - source('bin/dependencies.R') - deps <- identify_dependencies() - create_description(deps) - use_bioc_repos() - saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2) - writeLines(sprintf("R-%i.%i", getRversion()$major, getRversion()$minor), ".github/R-version") - shell: Rscript {0} - - - name: Restore Package Cache - if: runner.os != 'Windows' && steps.check-rmd.outputs.count != 0 - uses: actions/cache@v2 - with: - path: ${{ env.R_LIBS_USER }} - key: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-${{ hashFiles('.github/depends.Rds') }} - restore-keys: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1- - - - name: Install stringi from source - if: runner.os == 'Linux' && steps.check-rmd.outputs.count != 0 - run: install.packages('stringi', repos='https://cloud.r-project.org') - shell: Rscript {0} - - - name: Install system dependencies for R packages - if: runner.os == 'Linux' && steps.check-rmd.outputs.count != 0 - working-directory: lesson - run: | - while read -r cmd - do - eval sudo $cmd || echo "Nothing to update" - done < <(Rscript -e 'cat(remotes::system_requirements("ubuntu", "22.04"), sep = "\n")') - - - run: make site - working-directory: lesson - - - run: make lesson-check-all - working-directory: lesson diff --git a/.github/workflows/website.yml b/.github/workflows/website.yml index 94986a4b..d8955b02 100644 --- a/.github/workflows/website.yml +++ b/.github/workflows/website.yml @@ -1,4 +1,4 @@ -name: Website +name: Workshop Website on: push: branches: @@ -9,9 +9,8 @@ on: jobs: build-website: if: ${{ !endsWith(github.repository, '/styles') }} - runs-on: ubuntu-22.04 + runs-on: ubuntu-latest env: - RSPM: "https://packagemanager.rstudio.com/cran/__linux__/jammy/latest" GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} defaults: run: @@ -37,63 +36,17 @@ jobs: python3 -m pip install --upgrade pip setuptools wheel pyyaml==5.3.1 requests - name: Checkout the lesson - uses: actions/checkout@master + uses: actions/checkout@v7 with: fetch-depth: 0 ref: ${{ github.event.pull_request.head.sha }} - - name: Look for R-markdown files - id: check-rmd - run: | - echo "count=$(shopt -s nullglob; files=($(find . -iname '*.Rmd')); echo ${#files[@]})" >> $GITHUB_OUTPUT - - - name: Set up R - if: steps.check-rmd.outputs.count != 0 - uses: r-lib/actions/setup-r@v2 - with: - use-public-rspm: true - install-r: false - - - name: Restore R Cache - if: steps.check-rmd.outputs.count != 0 - uses: actions/cache@v4 - with: - path: ${{ env.R_LIBS_USER }} - key: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-${{ hashFiles('.github/depends.Rds') }} - restore-keys: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1- - - - name: Install needed packages - if: steps.check-rmd.outputs.count != 0 - run: | - source('bin/dependencies.R') - install_required_packages() - shell: Rscript {0} - - - name: Query dependencies - if: steps.check-rmd.outputs.count != 0 - run: | - source('bin/dependencies.R') - deps <- identify_dependencies() - create_description(deps) - use_bioc_repos() - saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2) - writeLines(sprintf("R-%i.%i", getRversion()$major, getRversion()$minor), ".github/R-version") - shell: Rscript {0} - - - name: Install system dependencies for R packages - if: steps.check-rmd.outputs.count != 0 - run: | - while read -r cmd - do - eval sudo $cmd || echo "Nothing to update" - done < <(Rscript -e 'cat(remotes::system_requirements("ubuntu", "22.04"), sep = "\n")') - - name: Render the markdown and confirm that the site can be built run: make site - name: Checkout github pages if: ${{ github.event_name == 'push' && steps.check-rmd.outputs.count != 0 && github.ref != 'refs/heads/gh-pages'}} - uses: actions/checkout@master + uses: actions/checkout@v7 with: ref: gh-pages path: gh-pages diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 59a7e951..00000000 --- a/.travis.yml +++ /dev/null @@ -1,18 +0,0 @@ -language: python -python: - - "3.6" -# Remember that the code is running on a 14.04 machine. -# - "3.4" -# command to install dependencies -install: - - pip install -r requirements.txt - # as per https://docs.travis-ci.com/user/installing-dependencies/ -# command to run tests -before_script: - - "python bin/_travis.py" -script: - - python bin/workshop_check.py . - - python -m unittest bin/_test/bs4test.py -branches: - only: - - gh-pages diff --git a/404.md b/404.md index c1cf9dd4..f667dbe7 100644 --- a/404.md +++ b/404.md @@ -12,14 +12,7 @@ title: "Page not found" > > We cannot seem to find the page you are looking for. > Try going back to the previous page or -> navigate to any other page using the navigation bar above -> {%- if site.kind == "lesson" -%} or the schedule below {%- endif -%}. -> If you got here by clicking on a link in the -> {%- if site.kind == "lesson" -%} lesson {%- else -%} workshop {%- endif -%}, -> please report this link to the -> {%- if site.kind == "lesson" -%} lesson developers {%- else -%} workshop organizers {%- endif -%}. +> navigate to any other page using the navigation bar above. +> If you got here by clicking on a link in the workshop, +> please report this link to the workshop organizers. {: .caution} - -{% if site.kind == "lesson" %} - {% include syllabus.html %} -{% endif%} diff --git a/AUTHORS b/AUTHORS index 58daf281..0a901199 100644 --- a/AUTHORS +++ b/AUTHORS @@ -12,6 +12,7 @@ Amy Brown C. Titus Brown Greg Caporaso Sarah Clayton +Robert Davey Matt Davis Neal Davis Jonah Duckles diff --git a/CITATION b/CITATION index 95fbcfde..9bc061c5 100644 --- a/CITATION +++ b/CITATION @@ -1,5 +1,8 @@ Please cite as: +Robert Davey (ed): "The Carpentries: Workshop Template." Version +2026.07, June 2026, https://github.com/carpentries/workshop-template. + Greg Wilson (ed): "Software Carpentry: Workshop Template." Version 2016.06, June 2016, https://github.com/carpentries/workshop-template, 10.5281/zenodo.58156. diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md index 67cb5c1a..c48a6bfa 100644 --- a/CODE_OF_CONDUCT.md +++ b/CODE_OF_CONDUCT.md @@ -2,11 +2,9 @@ layout: page title: "Contributor Code of Conduct" --- -As contributors and maintainers of this project, -we pledge to follow the [Carpentry Code of Conduct][coc]. +As contributors and maintainers of this project, we pledge to follow the [Carpentry Code of Conduct][coc]. -Instances of abusive, harassing, or otherwise unacceptable behavior -may be reported by following our [reporting guidelines][coc-reporting]. +Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by following our [reporting guidelines][coc-reporting]. [coc]: https://docs.carpentries.org/policies/coc/ [coc-reporting]: https://docs.carpentries.org/policies/coc/incident-reporting.html diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index fdb9a0ad..a0e82bda 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,6 +1,6 @@ # Contributing -[Software Carpentry][swc-site], [Data Carpentry][dc-site] and [Library Carpentry][lc-site] are open source projects, +[Software Carpentry][swc-site], [Data Carpentry][dc-site], [Library Carpentry][lc-site] and [High Performance Computing Carpentry][hpcc-site] are open source projects, and we welcome contributions of all kinds: new lessons, fixes to existing material, @@ -14,8 +14,8 @@ you agree that we may redistribute your work under [our license](LICENSE.md). In exchange, we will address your issues and/or assess your change proposal as promptly as we can, and help you become a member of our community. -Everyone involved in [Software Carpentry][swc-site], [Data Carpentry][dc-site] and [Library Carpentry][lc-site] -agrees to abide by our [code of conduct](CONDUCT.md). +Everyone involved in [Software Carpentry][swc-site], [Data Carpentry][dc-site], [Library Carpentry][lc-site] and +[High Performance Computing Carpentry][hpcc-site] agrees to abide by our [code of conduct](CONDUCT.md). ## How to Contribute @@ -45,15 +45,8 @@ and to meet some of our community members. ## Where to Contribute -1. If you wish to change the template used for workshop websites, - please work in . - The home page of that repository explains how to set up workshop websites, - while the extra pages in - provide more background on our design choices. - -2. If you wish to change CSS style files, tools, - or HTML boilerplate for lessons or workshops stored in `_includes` or `_layouts`, - please work in . +If you wish to change this template used for workshop websites, +please work in the workshop template repository at . ## What to Contribute @@ -64,7 +57,7 @@ and submitting [bug reports][issues] about things that don't work, aren't clear, or are missing. If you are looking for ideas, please see [the list of issues for this repository][issues], -or the issues for [Software Carpentry][swc-site], [Data Carpentry][dc-site] and [Library Carpentry][lc-site] projects. +or the issues for [Software Carpentry][swc-site], [Data Carpentry][dc-site], [Library Carpentry][lc-site] and [High Performance Computing Carpentry][hpcc-site] projects. Comments on issues and reviews of pull requests are just as welcome: we are smarter together than we are on our own. @@ -113,33 +106,36 @@ In brief: make changes on your desktop and push to your branch on GitHub: the pull request will update automatically. -Each lesson has two maintainers who review issues and pull requests -or encourage others to do so. -The maintainers are community volunteers, -and have final say over what gets merged into the lesson. +Most Carpentries resources have maintainers who review issues and pull requests or encourage others to do so. +The maintainers are community volunteers, and have final say over what gets merged into the lesson. + +**All contributions to our repositories must be made in alignment with our [Generative AI Contributions policy](https://docs.carpentries.org/policies/genai-policy.html).** ## Other Resources -General discussion of [Software Carpentry][swc-site], [Data Carpentry][dc-site] and [Library Carpentry][lc-site] +General discussion of [Software Carpentry][swc-site], [Data Carpentry][dc-site], [Library Carpentry][lc-site] and [][] happens in the `#lessons` channel on The Carpentries [Slack channel][slack], or on the [discussion mailing list][discuss-list], which everyone is welcome to join. You can also [reach us by email][contact]. [contact]: mailto:team@carpentries.org [dc-issues]: https://github.com/issues?q=user%3Adatacarpentry -[dc-lessons]: http://datacarpentry.org/lessons/ -[dc-site]: http://datacarpentry.org/ -[discuss-list]: http://lists.software-carpentry.org/listinfo/discuss -[github]: http://github.com +[dc-lessons]: https://datacarpentry.org/lessons/ +[dc-site]: https://datacarpentry.org/ +[discuss-list]: https://lists.software-carpentry.org/listinfo/discuss +[github]: https://github.com [github-flow]: https://guides.github.com/introduction/flow/ [github-join]: https://github.com/join [how-contribute]: https://egghead.io/courses/how-to-contribute-to-an-open-source-project-on-github [issues]: https://github.com/carpentries/workshop-template/issues/ [repo]: https://github.com/carpentries/workshop-template/ [swc-issues]: https://github.com/issues?q=user%3Aswcarpentry -[swc-lessons]: http://software-carpentry.org/lessons/ -[swc-site]: http://software-carpentry.org/ +[swc-lessons]: https://software-carpentry.org/lessons/ +[swc-site]: https://software-carpentry.org/ [lc-issues]: https://github.com/issues?q=user%3Alibrarycarpentry -[lc-lessons]: http://librarycarpentry.org/lessons/ -[lc-site]: http://librarycarpentry.org/ +[lc-lessons]: https://librarycarpentry.org/lessons/ +[lc-site]: https://librarycarpentry.org/ +[hpcc-issues]: https://github.com/issues?q=user%3Ahpccarpentry +[hpcc-lessons]: https://hpc-carpentry.org/lessons/ +[hpcc-site]: https://hpc-carpentry.org/ [slack]: https://slack-invite.carpentries.org/ diff --git a/LICENSE.md b/LICENSE.md index 7ef907b4..52c8ab18 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -1,10 +1,10 @@ --- layout: page -title: "Licenses" +title: "Licences" --- ## Instructional Material -All Software Carpentry, Data Carpentry, and Library Carpentry instructional material is +All Software Carpentry, Data Carpentry, Library Carpentry and High Performance Computing 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 @@ -24,10 +24,9 @@ Under the following terms: * **Attribution**---You must give appropriate credit by: - mentioning that your work is derived from work that is - Copyright © Software Carpentry, Data Carpentry, Library Carpentry, - or The Carpentries. + Copyright © Software Carpentry, Data Carpentry, Library Carpentry, High Performance Computing Carpentry, or The Carpentries. - where practical, linking to the respective lesson program website - (https://software-carpentry.org/, https://datacarpentry.org, https://librarycarpentry.org, or + (https://software-carpentry.org/, https://datacarpentry.org, https://librarycarpentry.org, https://hpc-carpentry.org, or https://carpentries.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. @@ -49,9 +48,8 @@ Notices: ## 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]. +provided by Software Carpentry, Data Carpentry, Library Carpentry and High Performance Computing 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 @@ -74,7 +72,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ## Trademark -"The Carpentries", "Software Carpentry", "Library Carpentry", "Data Carpentry" and their respective logos are +"The Carpentries", "Software Carpentry", "Library Carpentry", "Data Carpentry", "HPC Carpentry" and their respective logos are registered trademarks of [The Carpentries Inc][the-carpentries]. [cc-by-human]: https://creativecommons.org/licenses/by/4.0/ diff --git a/Makefile b/Makefile index 6bf02c6d..91f4cf40 100644 --- a/Makefile +++ b/Makefile @@ -7,9 +7,6 @@ JEKYLL=bundle config set --local path .vendor/bundle && bundle install && bundle PARSER=bin/markdown_ast.rb DST=_site -# Find Docker -DOCKER := $(shell which docker 2>/dev/null) - # Check Python 3 is installed and determine if it's called via python3 or python # (https://stackoverflow.com/a/4933395) PYTHON3_EXE := $(shell which python3 2>/dev/null) @@ -41,35 +38,16 @@ endif ## I. Commands for both workshop and lesson websites ## ================================================= -.PHONY: site docker-serve repo-check clean clean-rmd +.PHONY: site clean ## * serve : render website and run a local server -serve : lesson-md index.md +serve : index.md ${JEKYLL} serve ## * site : build website but do not run a server -site : lesson-md index.md +site : index.md ${JEKYLL} build -## * docker-serve : use Docker to serve the site -docker-serve : -ifeq (, $(DOCKER)) - $(error Your system does not appear to have Docker installed) -else - @$(DOCKER) pull carpentries/lesson-docker:latest - @$(DOCKER) run --rm -it \ - -v $${PWD}:/home/rstudio \ - -p 4000:4000 \ - -p 8787:8787 \ - -e USERID=$$(id -u) \ - -e GROUPID=$$(id -g) \ - carpentries/lesson-docker:latest -endif - -## * repo-check : check repository settings -repo-check : python - @${PYTHON} bin/repo_check.py -s . - ## * clean : clean up junk files clean : @rm -rf ${DST} @@ -82,11 +60,6 @@ clean : @find . -name '*~' -exec rm {} \; @find . -name '*.pyc' -exec rm {} \; -## * clean-rmd : clean intermediate R files (that need to be committed to the repo) -clean-rmd : - @rm -rf ${RMD_DST} - @rm -rf fig/rmd-* - ## ## II. Commands specific to workshop websites @@ -98,71 +71,40 @@ clean-rmd : workshop-check : python @${PYTHON} bin/workshop_check.py . - ## ## III. Commands specific to lesson websites ## ================================================= -.PHONY : lesson-check lesson-md lesson-files lesson-fixme install-rmd-deps - -# RMarkdown files -RMD_SRC = $(wildcard _episodes_rmd/*.Rmd) -RMD_DST = $(patsubst _episodes_rmd/%.Rmd,_episodes/%.md,$(RMD_SRC)) +.PHONY : workshop-files -# Lesson source files in the order they appear in the navigation menu. +# Workshop source files in the order they appear in the navigation menu. MARKDOWN_SRC = \ index.md \ CODE_OF_CONDUCT.md \ setup.md \ - $(sort $(wildcard _episodes/*.md)) \ reference.md \ $(sort $(wildcard _extras/*.md)) \ LICENSE.md -# Generated lesson files in the order they appear in the navigation menu. +# Generated workshop files in the order they appear in the navigation menu. HTML_DST = \ ${DST}/index.html \ ${DST}/conduct/index.html \ ${DST}/setup/index.html \ - $(patsubst _episodes/%.md,${DST}/%/index.html,$(sort $(wildcard _episodes/*.md))) \ ${DST}/reference.html \ $(patsubst _extras/%.md,${DST}/%/index.html,$(sort $(wildcard _extras/*.md))) \ ${DST}/license/index.html -## * install-rmd-deps : Install R packages dependencies to build the RMarkdown lesson -install-rmd-deps: - @${SHELL} bin/install_r_deps.sh - -## * lesson-md : convert Rmarkdown files to markdown -lesson-md : ${RMD_DST} - -_episodes/%.md: _episodes_rmd/%.Rmd install-rmd-deps - @mkdir -p _episodes - @$(SHELL) bin/knit_lessons.sh $< $@ - -## * lesson-check : validate lesson Markdown -lesson-check : python lesson-fixme - @${PYTHON} bin/lesson_check.py -s . -p ${PARSER} -r _includes/links.md - -## * lesson-check-all : validate lesson Markdown, checking line lengths and trailing whitespace -lesson-check-all : python - @${PYTHON} bin/lesson_check.py -s . -p ${PARSER} -r _includes/links.md -l -w --permissive - -## * unittest : run unit tests on checking tools -unittest : python - @${PYTHON} bin/test_lesson_check.py - -## * lesson-files : show expected names of generated files for debugging -lesson-files : - @echo 'RMD_SRC:' ${RMD_SRC} - @echo 'RMD_DST:' ${RMD_DST} +## * workshop-files : show expected names of generated files for debugging +workshop-files : @echo 'MARKDOWN_SRC:' ${MARKDOWN_SRC} @echo 'HTML_DST:' ${HTML_DST} -## * lesson-fixme : show FIXME markers embedded in source files -lesson-fixme : +## * workshop-fixme : show FIXME markers embedded in source files +workshop-fixme : @grep --fixed-strings --word-regexp --line-number --no-messages FIXME ${MARKDOWN_SRC} || true + ## ## IV. Auxililary (plumbing) commands ## ================================================= diff --git a/README.md b/README.md index 2bc2c9fc..c7536ad3 100644 --- a/README.md +++ b/README.md @@ -2,8 +2,7 @@ # The Carpentries Workshop Template -This repository is The Carpentries' ([Software Carpentry][swc-site], [Data Carpentry][dc-site], and -[Library Carpentry][lc-site]'s) template for creating websites for workshops. +This repository is The Carpentries' ([Software Carpentry][swc-site], [Data Carpentry][dc-site], [Library Carpentry][lc-site], [High Performance Computing Carpentry][hpcc-site]) template for creating websites for workshops. 1. **Please _do not fork this repository directly on GitHub._** Instead, please use GitHub's "template" function following [the instructions below](#creating-a-repository) to copy this @@ -22,12 +21,9 @@ This repository is The Carpentries' ([Software Carpentry][swc-site], [Data Carpe If you run into problems, or have ideas about how to make this process simpler, please [get in touch](#getting-and-giving-help). -The pages on [customizing your website][customization], -the [FAQ][faq], -and the [design notes][design] have more detail on what we do and why. -And please note: -if you are teaching Git, -please [create a separate repository](#setting-up-a-separate-repository-for-learners) +For more information, please read the pages on [customizing your website][customization] and the [FAQ][faq]. +And please note: if you are teaching Git, please +[create a separate repository](#setting-up-a-separate-repository-for-learners) for your learners to practice in. ## Video Tutorial @@ -174,24 +170,8 @@ so that it contains a short description of your workshop and a link to the works please do all of your work in your repository's `gh-pages` branch, since [GitHub automatically publishes that as a website][github-project-pages]. -**Note:** -this template includes some files and directories that most workshops do not need, -but which provide a standard place to put extra content if desired. -See the [design notes][design] for more information about these. - Further instructions are available in [the customization instructions][customization]. -This [FAQ][faq] includes a few extra tips (additions are always welcome) -and these notes on [the background and design][design] of this template may help as well. - - -## Creating Extra Pages - -In rare cases, -you may want to add extra pages to your workshop website. -You can do this by putting either Markdown or HTML pages in the website's root directory -and styling them according to the instructions give in -[the lesson template][lesson-example]. - +This [FAQ][faq] includes a few extra tips (additions are always welcome). ## Installing Software @@ -232,3 +212,4 @@ or [mail us][email]. [self-organized-workshop-form]: https://amy.carpentries.org/forms/self-organised/ [swc-site]: https://software-carpentry.org [lc-site]: https://librarycarpentry.org +[hpcc-site]: https://hpc-carpentry.org diff --git a/_config.yml b/_config.yml index 0f47a3e1..74ba3264 100644 --- a/_config.yml +++ b/_config.yml @@ -122,26 +122,17 @@ hpcc_post_survey: "https://carpentries.typeform.com/to/UVy0uF8B?slug=" # Start time in minutes (0 to be clock-independent, 540 to show a start at 09:00 am). start_time: 0 -# Specify that things in the episodes collection should be output. +# Specify that things in the extras collection should be output. collections: - episodes: - output: true - permalink: /:path/index.html extras: output: true permalink: /:path/index.html -# Set the default layout for things in the episodes collection. +# Set the default layout for things in the extras collection. defaults: - values: root: . layout: page - - scope: - path: "" - type: episodes - values: - root: .. - layout: episode - scope: path: "" type: extras diff --git a/_episodes/.gitkeep b/_episodes/.gitkeep deleted file mode 100644 index e69de29b..00000000 diff --git a/_episodes_rmd/.gitkeep b/_episodes_rmd/.gitkeep deleted file mode 100644 index e69de29b..00000000 diff --git a/_episodes_rmd/data/.gitkeep b/_episodes_rmd/data/.gitkeep deleted file mode 100644 index e69de29b..00000000 diff --git a/_extras/design.md b/_extras/design.md deleted file mode 100644 index b7a378d5..00000000 --- a/_extras/design.md +++ /dev/null @@ -1,113 +0,0 @@ ---- -layout: page -title: Background and Design -permalink: /design/ ---- -There are a few things you need to know in order to understand why we -do things the way we do. Some of them are specific to GitHub, rather -than Git itself. - -1. Git uses the term "clone" to mean "a copy of a repository". - GitHub uses the term "fork" to mean, "a copy of a GitHub-hosted - repo that is also hosted on GitHub", and the term "clone" to mean - "a copy of a GitHub-hosted repo that's located on someone else's - machine". In both cases, the duplicate has a remote called - `origin` that points to the original repo; other remotes can be - added manually. - -2. A user on GitHub can only have one fork of a particular repo. - This is a problem for us because an instructor may be involved in - several workshops, each of which has its own website repo. To avoid - this issue, we use the template functionality (you could also use the - `import.github.com` functionality). - -3. If a repository has a file called `README.md` in its root - directory, GitHub displays the contents of that file on the - repository's home page. - -4. If a repository has a branch called `gh-pages` (which stands for - "GitHub pages"), then GitHub uses the HTML and Markdown files in - that branch to create a website for the repository. If the - repository's URL is `http://github.com/darwin/finches`, the URL - for the website is `http://darwin.github.io/finches`. - -5. If an HTML or Markdown file has a header consisting of three - dashes, some data about the page, and three more dashes: - - ```yaml - --- - key: value - other_key: other_value - --- - content of the page - ``` - - then GitHub doesn't just copy the file over verbatim. Instead, it - runs the file through a translator called [Jekyll][jekyll] that - looks for specially-formatted commands embedded in the file and - uses them to fill in the page. - -6. Commands can be embedded in the body of a page. One is - `{% raw %}{% include something.html %}{% endraw %}`, which tells - Jekyll to copy the contents of `something.html` into the file - being translated; this is used to create standard headers and - footers for pages. Another is `{% raw %}{{variable}}{% endraw %}`: when Jekyll sees - this, it replaces it with the value of `variable`. This is used - to insert things like a contact email address and the URL for our - Twitter account. - -7. Jekyll gets variables from two places: a file called `_config.yml` - located in the repo's root directory, and the header of each - individual page. Variables from `_config.yml` are put in an - object called `site`, and referred to as `site.variable`, so that - (for example) `{% raw %}{{site.swc_site}}{% endraw %}` in a page is replaced by the URL - of the main Software Carpentry web site ({{site.swc_site}}). Variables from the - page's header are put in an object called `page`, and referred to - as `page.variable`, so if a page's header defines a variable - called `venue`, `{% raw %}{{page.venue}}{% endraw %}` is replaced by "Euphoric State - University" (or whatever value the variable has). - -8. If a page uses `{% raw %}{% include something.html %}{% endraw %}` - to include a snippet of HTML, Jekyll looks in a directory called - `_includes` to find `something.html`. It always looks there, and - nowhere else, so anything we want people to be able to include in - their pages has to be stored in `_includes`. - -9. A repository can have another special directory called `_layouts`. - If a page like `index.html` has a variable called `layout`, and - that variable's value is `standard.html`, Jekyll loads the file - `_layouts/standard.html` and copies the content of `index.html` - into it, then expands the result. This is used to give the pages - in a site a uniform appearance. - We have created two layouts for workshop pages: - - * `workshop.html` is used for workshops' home pages, and is the - layout for the `index.html` page in your repo's root directory. - That `index.html` page's header must define several variables as - specified in the the customization instructions in order for - your workshop to be included in our main website. - - * `page.html` is used for any other pages you want to create. - **Note:** if you create extra pages, you *must* edit the values - in the top section of `_config.yml` as described in - [the lesson template documentation]({{ site.example_site }}). - -## Extra Directories - -This workshop template shares resources with the template used for -Carpentry lessons. As a result, your workshop website's repository -contains directories that most workshops don't need, but which can be -used to store extra material when necessary: - -* `_extras/`: extra pages (like this one). -* `_episodes/`: lesson episodes (which workshops usually don't have). -* `_episodes_rmd/`: R Markdown lesson episodes (if any). -* `code/`: for code samples. -* `data/`: for data files. -* `fig/`: for figures and other images. -* `files/`: for miscellaneous files. - -For more information on these, please see [the documentation for the -lesson template]({{ site.example_site }}). - -[jekyll]: https://jekyllrb.com/ diff --git a/_includes/aio-script.md b/_includes/aio-script.md deleted file mode 100644 index d90e6d68..00000000 --- a/_includes/aio-script.md +++ /dev/null @@ -1,25 +0,0 @@ -{% comment %} -As a maintainer, you don't need to edit this file. -If you notice that something doesn't work, please -open an issue: https://github.com/carpentries/styles/issues/new -{% endcomment %} - -{% include manual_episode_order.html %} - -{% for lesson_episode in lesson_episodes %} - -{% if site.episode_order %} - {% assign e = site.episodes | where: "slug", lesson_episode | first %} -{% else %} - {% assign e = lesson_episode %} -{% endif %} - -

{{ e.title }}

- -{% include episode_overview.html teaching_time=e.teaching exercise_time=e.exercises episode_questions=e.questions episode_objectives=e.objectives %} - -{{ e.content }} - -{% include episode_keypoints.html episode_keypoints=e.keypoints %} -
-{% endfor %} diff --git a/_includes/all_keypoints.html b/_includes/all_keypoints.html deleted file mode 100644 index f0abd251..00000000 --- a/_includes/all_keypoints.html +++ /dev/null @@ -1,31 +0,0 @@ -{% comment %} - Display key points of all episodes for reference. -{% endcomment %} - -{% include base_path.html %} -{% include manual_episode_order.html %} - -

Key Points

- -{% for lesson_episode in lesson_episodes %} - {% if site.episode_order %} - {% assign episode = site.episodes | where: "slug", lesson_episode | first %} - {% else %} - {% assign episode = lesson_episode %} - {% endif %} - {% unless episode.break %} - - - - - {% endunless %} -{% endfor %} -
- {{ episode.title }} - -
    - {% for keypoint in episode.keypoints %} -
  • {{ keypoint|markdownify }}
  • - {% endfor %} -
-
diff --git a/_includes/carpentries.html b/_includes/carpentries.html index 051bb097..dfcdc1be 100644 --- a/_includes/carpentries.html +++ b/_includes/carpentries.html @@ -1,5 +1,5 @@ {% comment %} - General description of Software, Data, and Library Carpentry. + General description of Software, Data, Library and High Performance Computing Carpentry. {% endcomment %} {% include base_path.html %} @@ -10,14 +10,14 @@

The Carpentries comprises - Software Carpentry, Data Carpentry, and Library Carpentry communities of Instructors, Trainers, - Maintainers, helpers, and supporters who share a mission to teach - foundational coding and data science skills to researchers and people - working in library- and information-related roles. In January, - 2018, The Carpentries was formed by the merger of Software Carpentry and - Data Carpentry. Library Carpentry became an official Carpentries Lesson Program - in November 2018.

- + Software Carpentry, Data Carpentry, Library Carpentry, and High Performance Computing Carpentry + communities of Instructors, Trainers, Maintainers, helpers, and supporters + who share a mission to teach foundational coding and data science skills to + researchers and people working in library- and information-related roles. + In January, 2018, The Carpentries was formed by the merger of Software Carpentry and + Data Carpentry. Library Carpentry became an official Carpentries Lesson Program + in November 2018. High Performance Computing Carpentry became an official + Carpentries Lesson Program in 2026.

While individual lessons and workshops continue to be run under each lesson project, The Carpentries provide overall staffing and governance, as diff --git a/_includes/check_transition_variables.html b/_includes/check_transition_variables.html deleted file mode 100644 index 71d48268..00000000 --- a/_includes/check_transition_variables.html +++ /dev/null @@ -1,22 +0,0 @@ -{% assign date = include.need_transition_date %} - -{% if date == "true" %} -{% unless site.transition_date_prebeta %} -

- you need to specify the variable transition_date_prebeta - in _config.yml. -
-{% endunless %} -{% unless site.transition_date_beta %} -
- you need to specify the variable transition_date_beta - in _config.yml. -
-{% endunless %} -{% unless site.transition_date_prerelease %} -
- you need to specify the variable transition_date_prerelease - in _config.yml. -
-{% endunless %} -{% endif %} diff --git a/_includes/episode_break.html b/_includes/episode_break.html deleted file mode 100644 index 36d2d2fa..00000000 --- a/_includes/episode_break.html +++ /dev/null @@ -1,15 +0,0 @@ -{% comment %} - Display a break's timings in a box similar to a learning episode's. -{% endcomment %} -
-

Overview

- -
-
- Break: {{ page.break }} min -
-
-
-
- -
diff --git a/_includes/episode_keypoints.html b/_includes/episode_keypoints.html deleted file mode 100644 index 5c283ea8..00000000 --- a/_includes/episode_keypoints.html +++ /dev/null @@ -1,18 +0,0 @@ -{% comment %} - Display key points for an episode. -{% endcomment %} - -{% if page.keypoints == nil %} -{% assign episode_keypoints = include.episode_keypoints %} -{% else %} -{% assign episode_keypoints = page.keypoints %} -{% endif %} - -
-

Key Points

-
    - {% for keypoint in episode_keypoints %} -
  • {{ keypoint|markdownify }}
  • - {% endfor %} -
-
diff --git a/_includes/episode_navbar.html b/_includes/episode_navbar.html deleted file mode 100644 index 5abf86f2..00000000 --- a/_includes/episode_navbar.html +++ /dev/null @@ -1,42 +0,0 @@ -{% comment %} -For some reason, the relative_root_path seems out of scope in this file, so we -need to re-assign it here -{% endcomment %} - -{% include base_path.html %} - -{% comment %} - Navigation bar for an episode. -{% endcomment %} - -{% include manual_episode_order.html %} -{% comment %} - 'previous_episode' and 'next_episodes' are defined in 'manual_episode_order.html'. - These replace 'page.previous' and 'page.next' objects, correspondingly. -{% endcomment %} - -
-
-

- {% if previous_episode %} - previous episode - {% else %} - lesson home - {% endif %} -

-
-
- {% if include.episode_navbar_title %} -

{{ site.title }}

- {% endif %} -
-
-

- {% if next_episode %} - next episode - {% else %} - lesson home - {% endif %} -

-
-
diff --git a/_includes/episode_overview.html b/_includes/episode_overview.html deleted file mode 100644 index 169ab26b..00000000 --- a/_includes/episode_overview.html +++ /dev/null @@ -1,76 +0,0 @@ -{% comment %} - Display episode's timings and learning objectives. - - Regarding the `if page.*** == nil` below: - all-in-one page combines all episodes into one. - It, therefore, does not define its own objectives, exercises, - and questions, which 'normal' episodes define in the front matter. - - To display episodes' teaching and exercise times, as well as episode - questions and objectives, we pass them as parameters to the Liquid's - `include` statement when we generate the page: - - include episode_overview.html teaching_time=e.teaching ... - - Here we obtain the information we need either from the episode itself or - from the parameters passed in. -{% endcomment %} - -{% if page.teaching == nil %} -{% assign teaching_time = include.teaching_time %} -{% else %} -{% assign teaching_time = page.teaching %} -{% endif %} - -{% if page.exercises == nil %} -{% assign exercise_time = include.exercise_time %} -{% else %} -{% assign exercise_time = page.exercises %} -{% endif %} - -{% if page.questions == nil %} -{% assign episode_questions = include.episode_questions %} -{% else %} -{% assign episode_questions = page.questions %} -{% endif %} - -{% if page.objectives == nil %} -{% assign episode_objectives = include.episode_objectives %} -{% else %} -{% assign episode_objectives = page.objectives %} -{% endif %} - - -
-

Overview

- -
-
- Teaching: {{ teaching_time }} min -
- Exercises: {{ exercise_time }} min -
-
- Questions -
    - {% for question in episode_questions %} -
  • {{ question|markdownify }}
  • - {% endfor %} -
-
-
- -
-
-
-
- Objectives -
    - {% for objective in episode_objectives %} -
  • {{ objective|markdownify }}
  • - {% endfor %} -
-
-
- -
diff --git a/_includes/episode_title.html b/_includes/episode_title.html deleted file mode 100644 index d0abc654..00000000 --- a/_includes/episode_title.html +++ /dev/null @@ -1,9 +0,0 @@ -
-
-
-
-

{{ page.title }}

-
-
-
-
diff --git a/_includes/javascript.html b/_includes/javascript.html index e43087bb..d6e2e0d2 100644 --- a/_includes/javascript.html +++ b/_includes/javascript.html @@ -57,27 +57,6 @@ } }); -{% if site.kind == "lesson" %} - - - -{% endif %} {% if page.math %} diff --git a/_includes/lesson_footer.html b/_includes/lesson_footer.html deleted file mode 100644 index b74e448a..00000000 --- a/_includes/lesson_footer.html +++ /dev/null @@ -1,54 +0,0 @@ -{% comment %} - Footer for lesson pages. -{% endcomment %} - -{% include gh_variables.html %} - - diff --git a/_includes/main_title.html b/_includes/main_title.html index 7d17317f..de7dcb59 100644 --- a/_includes/main_title.html +++ b/_includes/main_title.html @@ -4,11 +4,4 @@ {% include base_path.html %} -{% if site.kind == "lesson" %} -

{{ site.title }}{% if page.title %}: {{ page.title }}{% endif %}

- -{% else %} -

{{ page.title }}

- -{% endif %} diff --git a/_includes/manual_episode_order.html b/_includes/manual_episode_order.html deleted file mode 100644 index ccc34570..00000000 --- a/_includes/manual_episode_order.html +++ /dev/null @@ -1,116 +0,0 @@ -{% comment %} - This file enables manual episode ordering until - GitHub Pages switches to Jekyll that supports it - without any major hackery. Note, some logic will - be required even when this transition happens - but it will not be as involved as what we have to do - in this file. - - To order lesson episodes or extras manually - (instead of the default alpha-numerical order), - create array variables 'episode_order' and - 'extras_order' in `_config.yml` like so: - - episode_order: - - episodeA - - episodeB - - extras_order: - - extraA - - extraB - - Note that "Reference" page is currently always - added to "Extras" as the first item. - - The main outcomes of the code in this file are: - - 'lesson_episodes' variable that replaces - 'site.episodes' variable when manual episode - order is defined. - - 'lesson_extras' variable that replaces - 'site.extras' variable when manual ordering of - files in '_extras' is used - - 'previous_episode' and 'next_episode' objects - that replace 'page.previous' and 'page.next' variables, - correspondingly, and that have such properties - as 'url' and 'title' and that are used in - 'episode_navbar.html'. - - When episode order is specified manually, the 'lesson_episodes' - variable contains a list of episode names ("slugs", to be precise; - "slug" is the episode name without '.md'). Therefore, when we - iterate over 'lesson_episodes' (in navbar.html) , - we have to check whether we use manual episode ordering and, if so, - find the corresponding episode object. This is what we do with the - following code in every loop over 'lesson_episodes': - - {% if site.episode_order %} - {% assign episode = site.episodes | where: "slug", lesson_episode | first %} - {% else %} - {% assign episode = lesson_episode %} - {% endif %} -{% endcomment %} - -{% comment %} -Manual ordering of Episodes begins here -{% endcomment %} - -{% if site.episode_order %} - {% assign lesson_episodes = site.episode_order %} -{% else %} - {% assign lesson_episodes = site.episodes %} -{% endif %} - - -{% comment %} - If 'episode_order' is defined, we need to determine - - previous episode object ('previous_episode') - - and next episode object ('next_episode') -{% endcomment %} - - -{% if site.episode_order %} - {% for lesson_episode in lesson_episodes %} - - {% comment %} - We iterate over the specified lesson episodes using - a 'for' loop because we can use - 'forloop.first', 'forloop.last', and 'forloop.index0'. - {% endcomment %} - - {% unless lesson_episode == page.slug %} {% continue %} {% endunless %} - - {% if forloop.first %} - {% assign previous_episode = nil %} - {% else %} - {% assign p_idx = forloop.index0 | minus: 1 %} - {% assign p_name = lesson_episodes[p_idx] %} - {% assign previous_episode = site.episodes | where: "slug", p_name | first %} - {% endif %} - - {% if forloop.last == true %} - {% assign next_episode = nil %} - {% else %} - {% assign n_idx = forloop.index0 | plus: 1 %} - {% assign n_name = lesson_episodes[n_idx] %} - {% assign next_episode = site.episodes | where: "slug", n_name | first %} - {% endif %} - {% endfor %} -{% else %} - {% assign previous_episode = page.previous %} - {% assign next_episode = page.next %} -{% endif %} - - -{% comment %} -Manual ordering of Extras begins here -{% endcomment %} - -{% if site.extras_order %} - {% assign lesson_extras = site.extras_order %} -{% else %} - {% assign lesson_extras = site.extras %} -{% endif %} - -{% comment %} - We do not need to determine "previous" or "next" extra. -{% endcomment %} diff --git a/_includes/navbar.html b/_includes/navbar.html index 047760c1..d74ad8de 100644 --- a/_includes/navbar.html +++ b/_includes/navbar.html @@ -1,9 +1,9 @@ {% comment %} - Lesson navigation bar. + Workshop navigation bar. {% endcomment %} {% include gh_variables.html %} -{% include manual_episode_order.html %} +{% assign workshop_extras = site.extras %}