Skip to content

Commit 2c6b97e

Browse files
committed
Merge branch 'gh-pages' of github.com:carpentries/styles into gh-pages
2 parents a7566a9 + 53e9913 commit 2c6b97e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

65 files changed

+2136
-988
lines changed

.editorconfig

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
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+
13+
[*.r]
14+
max_line_length = 80
15+
16+
[*.py]
17+
indent_size = 4
18+
indent_style = space
19+
max_line_length = 79
20+
21+
[*.sh]
22+
end_of_line = lf
23+
24+
[Makefile]
25+
indent_style = tab

.github/FUNDING.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
github: [carpentries, swcarpentry, datacarpentry, librarycarpentry]
2+
custom: ["https://carpentries.wedid.it"]

.github/ISSUE_TEMPLATE.md

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,21 @@
1-
Please delete the text below before submitting your contribution.
1+
<details>
2+
<summary><strong>Instructions</strong></summary>
23

3-
---
4+
Thanks for contributing! :heart:
45

5-
Thanks for contributing! If this contribution is for instructor training, please send an email to checkout@carpentries.org with a link to this contribution so we can record your progress. You’ve completed your contribution step for instructor checkout just by submitting this contribution.
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!
69

7-
Please keep in mind that lesson maintainers are volunteers and it may be some time before they can 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 Kate Hertweck (k8hertweck@gmail.com).
10+
If this issue is about a specific episode within a lesson, please provide its link or filename.
811

9-
---
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+
</details>

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,19 @@
1-
Please delete the text below before submitting your contribution.
1+
<details>
2+
<summary><strong>Instructions</strong></summary>
23

3-
---
4+
Thanks for contributing! :heart:
45

5-
Thanks for contributing! If this contribution is for instructor training, please send an email to checkout@carpentries.org with a link to this contribution so we can record your progress. You’ve completed your contribution step for instructor checkout just by submitting this contribution.
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!
69

7-
Please keep in mind that lesson maintainers are volunteers and it may be some time before they can 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 Kate Hertweck (k8hertweck@gmail.com).
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.
815

9-
---
16+
You may delete these instructions from your comment.
17+
18+
\- The Carpentries
19+
</details>

.github/workflows/template.yml

Lines changed: 131 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,131 @@
1+
name: Test template
2+
on:
3+
push:
4+
branches: gh-pages
5+
pull_request:
6+
jobs:
7+
check-template:
8+
name: ${{ matrix.lesson-name }} (${{ matrix.os-name }})
9+
if: github.repository == 'carpentries/styles'
10+
runs-on: ${{ matrix.os }}
11+
strategy:
12+
fail-fast: false
13+
matrix:
14+
lesson: [swcarpentry/shell-novice, datacarpentry/r-intro-geospatial, librarycarpentry/lc-git]
15+
os: [ubuntu-latest, macos-latest, windows-latest]
16+
include:
17+
- os: ubuntu-latest
18+
os-name: Ubuntu
19+
- os: macos-latest
20+
os-name: macOS
21+
- os: windows-latest
22+
os-name: Windows
23+
- lesson: swcarpentry/shell-novice
24+
lesson-name: (SWC) Shell novice
25+
- lesson: datacarpentry/r-intro-geospatial
26+
lesson-name: (DC) R Intro Geospatial
27+
- lesson: librarycarpentry/lc-git
28+
lesson-name: (LC) Intro to Git
29+
defaults:
30+
run:
31+
shell: bash # forces 'Git for Windows' on Windows
32+
env:
33+
RSPM: 'https://packagemanager.rstudio.com/cran/__linux__/bionic/latest'
34+
steps:
35+
- name: Set up Ruby
36+
uses: actions/setup-ruby@main
37+
with:
38+
ruby-version: '2.7.1'
39+
40+
- name: Set up Python
41+
uses: actions/setup-python@v2
42+
with:
43+
python-version: '3.x'
44+
45+
- name: Install GitHub Pages, Bundler, and kramdown gems
46+
run: |
47+
gem install github-pages bundler kramdown
48+
49+
- name: Install Python modules
50+
run: |
51+
if [[ $RUNNER_OS == macOS || $RUNNER_OS == Linux ]]; then
52+
python3 -m pip install --upgrade pip setuptools wheel pyyaml==5.3.1 requests
53+
elif [[ $RUNNER_OS == Windows ]]; then
54+
python -m pip install --upgrade pip setuptools wheel pyyaml==5.3.1 requests
55+
fi
56+
57+
- name: Checkout the ${{ matrix.lesson }} lesson
58+
uses: actions/checkout@master
59+
with:
60+
repository: ${{ matrix.lesson }}
61+
path: lesson
62+
fetch-depth: 0
63+
64+
- name: Determine the proper reference to use
65+
id: styles-ref
66+
run: |
67+
if [[ -n "${{ github.event.pull_request.number }}" ]]; then
68+
echo "::set-output name=ref::refs/pull/${{ github.event.pull_request.number }}/head"
69+
else
70+
echo "::set-output name=ref::gh-pages"
71+
fi
72+
73+
- name: Sync lesson with carpentries/styles
74+
working-directory: lesson
75+
run: |
76+
git config --global user.email "team@carpentries.org"
77+
git config --global user.name "The Carpentries Bot"
78+
git remote add styles https://github.com/carpentries/styles.git
79+
git config --local remote.styles.tagOpt --no-tags
80+
git fetch styles ${{ steps.styles-ref.outputs.ref }}:styles-ref
81+
git merge -s recursive -Xtheirs --no-commit styles-ref
82+
git commit -m "Sync lesson with carpentries/styles"
83+
84+
- name: Look for R-markdown files
85+
id: check-rmd
86+
working-directory: lesson
87+
run: |
88+
echo "::set-output name=count::$(shopt -s nullglob; files=($(find . -iname '*.Rmd')); echo ${#files[@]})"
89+
90+
- name: Set up R
91+
if: steps.check-rmd.outputs.count != 0
92+
uses: r-lib/actions/setup-r@master
93+
with:
94+
r-version: 'release'
95+
96+
- name: Install needed packages
97+
if: steps.check-rmd.outputs.count != 0
98+
run: |
99+
install.packages(c('remotes', 'rprojroot', 'renv', 'desc', 'rmarkdown', 'knitr'))
100+
shell: Rscript {0}
101+
102+
- name: Query dependencies
103+
if: steps.check-rmd.outputs.count != 0
104+
working-directory: lesson
105+
run: |
106+
source('bin/dependencies.R')
107+
deps <- identify_dependencies()
108+
create_description(deps)
109+
saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2)
110+
writeLines(sprintf("R-%i.%i", getRversion()$major, getRversion()$minor), ".github/R-version")
111+
shell: Rscript {0}
112+
113+
- name: Cache R packages
114+
if: runner.os != 'Windows' && steps.check-rmd.outputs.count != 0
115+
uses: actions/cache@v1
116+
with:
117+
path: ${{ env.R_LIBS_USER }}
118+
key: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-${{ hashFiles('.github/depends.Rds') }}
119+
restore-keys: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-
120+
121+
- name: Install system dependencies for R packages
122+
if: runner.os == 'Linux' && steps.check-rmd.outputs.count != 0
123+
working-directory: lesson
124+
run: |
125+
while read -r cmd
126+
do
127+
eval sudo $cmd
128+
done < <(Rscript -e 'cat(remotes::system_requirements("ubuntu", "18.04"), sep = "\n")')
129+
130+
- run: make site
131+
working-directory: lesson

.github/workflows/website.yml

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
name: Website
2+
on:
3+
push:
4+
branches: gh-pages
5+
pull_request: []
6+
jobs:
7+
build-website:
8+
if: github.repository != 'carpentries/styles' && (github.repository_owner == 'swcarpentry' || github.repository_owner == 'datacarpentry' || github.repository_owner == 'librarycarpentry' || github.repository_owner == 'carpentries')
9+
runs-on: ubuntu-latest
10+
defaults:
11+
run:
12+
shell: bash
13+
steps:
14+
- name: Set up Ruby
15+
uses: actions/setup-ruby@main
16+
with:
17+
ruby-version: '2.7.1'
18+
19+
- name: Set up Python
20+
uses: actions/setup-python@v2
21+
with:
22+
python-version: '3.x'
23+
24+
- name: Install GitHub Pages, Bundler, and kramdown gems
25+
run: |
26+
gem install github-pages bundler kramdown
27+
28+
- name: Install Python modules
29+
run: |
30+
python3 -m pip install --upgrade pip setuptools wheel pyyaml==5.3.1 requests
31+
32+
- name: Checkout the lesson
33+
uses: actions/checkout@master
34+
with:
35+
fetch-depth: 0
36+
ref: ${{ github.event.pull_request.head.sha }}
37+
38+
- name: Look for R-markdown files
39+
id: check-rmd
40+
run: |
41+
echo "::set-output name=count::$(shopt -s nullglob; files=($(find . -iname '*.Rmd')); echo ${#files[@]})"
42+
43+
- name: Set up R
44+
if: steps.check-rmd.outputs.count != 0
45+
uses: r-lib/actions/setup-r@master
46+
with:
47+
r-version: 'release'
48+
49+
- name: Install needed packages
50+
if: steps.check-rmd.outputs.count != 0
51+
run: |
52+
install.packages(c('remotes', 'rprojroot', 'renv', 'desc', 'rmarkdown', 'knitr'))
53+
shell: Rscript {0}
54+
55+
- name: Query dependencies
56+
if: steps.check-rmd.outputs.count != 0
57+
run: |
58+
source('bin/dependencies.R')
59+
deps <- identify_dependencies()
60+
create_description(deps)
61+
saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2)
62+
writeLines(sprintf("R-%i.%i", getRversion()$major, getRversion()$minor), ".github/R-version")
63+
shell: Rscript {0}
64+
65+
- name: Cache R packages
66+
if: steps.check-rmd.outputs.count != 0
67+
uses: actions/cache@v1
68+
with:
69+
path: ${{ env.R_LIBS_USER }}
70+
key: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-${{ hashFiles('.github/depends.Rds') }}
71+
restore-keys: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-
72+
73+
- name: Install system dependencies for R packages
74+
if: steps.check-rmd.outputs.count != 0
75+
run: |
76+
while read -r cmd
77+
do
78+
eval sudo $cmd
79+
done < <(Rscript -e 'cat(remotes::system_requirements("ubuntu", "18.04"), sep = "\n")')
80+
81+
- run: make site
82+
- run: make lesson-check
83+
if: always()
84+
- run: make lesson-check-all
85+
if: always()

.gitignore

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,15 @@
33
.DS_Store
44
.ipynb_checkpoints
55
.sass-cache
6+
.jekyll-cache/
67
__pycache__
78
_site
89
.Rproj.user
910
.Rhistory
1011
.RData
11-
12+
.bundle/
13+
.vendor/
14+
vendor/
15+
.docker-vendor/
16+
Gemfile.lock
17+
.*history

Gemfile

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# frozen_string_literal: true
2+
3+
source 'https://rubygems.org'
4+
5+
git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }
6+
7+
# Synchronize with https://pages.github.com/versions
8+
ruby '>=2.5.8'
9+
10+
gem 'github-pages', group: :jekyll_plugins

LICENSE.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ root: .
55
---
66
### Material didáctico
77

8-
Todo el material de instrucción de Software Carpentry and Data Carpentry está
8+
Todo el material de instrucción de Software Carpentry, Data Carpentry y Library Carpentry está
99
disponible bajo la licencia [Creative Commons Attribution][cc-por-humano]. El siguiente es un resumen de licencia
1010
(y no un sustituto) del [texto legal completo de CC BY 4.0
1111
licencia][cc-by-legal].
@@ -26,17 +26,17 @@ Bajo los siguientes términos:
2626
  su trabajo se deriva del trabajo que es Copyright de © Software
2727
  Carpentry y, donde sea práctico, agrega un enlace a
2828
  http://software-carpentry.org/), proporciona un [enlace a la
29-
  licencia][cc-por-humano], e indica si se realizaron cambios. Puedes hacerlo en cualquier forma razonable,
30-
pero no de forma tal que sugiera que tú o el uso del material derivado tienen el respaldo del licenciante.
29+
  licencia][cc-por-humano], e indica si se realizaron cambios. Puedes hacerlo en cualquier forma razonable,
30+
pero no de forma tal que sugiera que tú o el uso del material derivado tienen el respaldo del licenciante.
3131

3232
**Sin restricciones adicionales** --- No puedes aplicar términos legales o
3333
medidas tecnológicas que restrinjan a otros hacer
34-
todo lo que la licencia permite.
34+
todo lo que la licencia permite.
3535

3636
Avisos:
3737

38-
* No tiene que cumplir con la licencia con los materiales que estén en el dominio público
39-
o cuando su uso esté permitido por una excepción o limitación aplicable.
38+
* No tiene que cumplir con la licencia con los materiales que estén en el dominio público
39+
o cuando su uso esté permitido por una excepción o limitación aplicable.
4040
* No se dan garantías. La licencia puede no darle todos los
4141
  permisos necesarios para su uso previsto. Por ejemplo, otros
4242
  derechos como la publicidad, la privacidad, o los derechos morales pueden limitar la forma en que

0 commit comments

Comments
 (0)