Skip to content

Commit

Permalink
Merge branch 'gh-pages' of github.com:carpentries/styles into gh-pages
Browse files Browse the repository at this point in the history
  • Loading branch information
fmichonneau committed Oct 20, 2020
2 parents a7566a9 + 53e9913 commit 2c6b97e
Show file tree
Hide file tree
Showing 65 changed files with 2,136 additions and 988 deletions.
25 changes: 25 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
root = true

[*]
charset = utf-8
insert_final_newline = true
trim_trailing_whitespace = true

[*.md]
indent_size = 2
indent_style = space
max_line_length = 100 # Please keep this in sync with bin/lesson_check.py!

[*.r]
max_line_length = 80

[*.py]
indent_size = 4
indent_style = space
max_line_length = 79

[*.sh]
end_of_line = lf

[Makefile]
indent_style = tab
2 changes: 2 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
github: [carpentries, swcarpentry, datacarpentry, librarycarpentry]
custom: ["https://carpentries.wedid.it"]
22 changes: 17 additions & 5 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,21 @@
Please delete the text below before submitting your contribution.
<details>
<summary><strong>Instructions</strong></summary>

---
Thanks for contributing! :heart:

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.
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!

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).
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.

You may delete these instructions from your comment.

\- The Carpentries
</details>
20 changes: 15 additions & 5 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,19 @@
Please delete the text below before submitting your contribution.
<details>
<summary><strong>Instructions</strong></summary>

---
Thanks for contributing! :heart:

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.
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!

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).
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.

---
You may delete these instructions from your comment.

\- The Carpentries
</details>
131 changes: 131 additions & 0 deletions .github/workflows/template.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,131 @@
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 }}
strategy:
fail-fast: false
matrix:
lesson: [swcarpentry/shell-novice, datacarpentry/r-intro-geospatial, librarycarpentry/lc-git]
os: [ubuntu-latest, macos-latest, windows-latest]
include:
- os: ubuntu-latest
os-name: Ubuntu
- 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
defaults:
run:
shell: bash # forces 'Git for Windows' on Windows
env:
RSPM: 'https://packagemanager.rstudio.com/cran/__linux__/bionic/latest'
steps:
- name: Set up Ruby
uses: actions/setup-ruby@main
with:
ruby-version: '2.7.1'

- 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
- 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: Determine the proper reference to use
id: styles-ref
run: |
if [[ -n "${{ github.event.pull_request.number }}" ]]; then
echo "::set-output name=ref::refs/pull/${{ github.event.pull_request.number }}/head"
else
echo "::set-output name=ref::gh-pages"
fi
- name: Sync lesson with carpentries/styles
working-directory: lesson
run: |
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 config --local remote.styles.tagOpt --no-tags
git fetch styles ${{ steps.styles-ref.outputs.ref }}:styles-ref
git merge -s recursive -Xtheirs --no-commit styles-ref
git commit -m "Sync lesson with carpentries/styles"
- name: Look for R-markdown files
id: check-rmd
working-directory: lesson
run: |
echo "::set-output name=count::$(shopt -s nullglob; files=($(find . -iname '*.Rmd')); echo ${#files[@]})"
- name: Set up R
if: steps.check-rmd.outputs.count != 0
uses: r-lib/actions/setup-r@master
with:
r-version: 'release'

- name: Install needed packages
if: steps.check-rmd.outputs.count != 0
run: |
install.packages(c('remotes', 'rprojroot', 'renv', 'desc', 'rmarkdown', 'knitr'))
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)
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: Cache R packages
if: runner.os != 'Windows' && steps.check-rmd.outputs.count != 0
uses: actions/cache@v1
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 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
done < <(Rscript -e 'cat(remotes::system_requirements("ubuntu", "18.04"), sep = "\n")')
- run: make site
working-directory: lesson
85 changes: 85 additions & 0 deletions .github/workflows/website.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
name: Website
on:
push:
branches: gh-pages
pull_request: []
jobs:
build-website:
if: github.repository != 'carpentries/styles' && (github.repository_owner == 'swcarpentry' || github.repository_owner == 'datacarpentry' || github.repository_owner == 'librarycarpentry' || github.repository_owner == 'carpentries')
runs-on: ubuntu-latest
defaults:
run:
shell: bash
steps:
- name: Set up Ruby
uses: actions/setup-ruby@main
with:
ruby-version: '2.7.1'

- 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
- name: Install Python modules
run: |
python3 -m pip install --upgrade pip setuptools wheel pyyaml==5.3.1 requests
- name: Checkout the lesson
uses: actions/checkout@master
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.sha }}

- name: Look for R-markdown files
id: check-rmd
run: |
echo "::set-output name=count::$(shopt -s nullglob; files=($(find . -iname '*.Rmd')); echo ${#files[@]})"
- name: Set up R
if: steps.check-rmd.outputs.count != 0
uses: r-lib/actions/setup-r@master
with:
r-version: 'release'

- name: Install needed packages
if: steps.check-rmd.outputs.count != 0
run: |
install.packages(c('remotes', 'rprojroot', 'renv', 'desc', 'rmarkdown', 'knitr'))
shell: Rscript {0}

- name: Query dependencies
if: steps.check-rmd.outputs.count != 0
run: |
source('bin/dependencies.R')
deps <- identify_dependencies()
create_description(deps)
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: Cache R packages
if: steps.check-rmd.outputs.count != 0
uses: actions/cache@v1
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 system dependencies for R packages
if: steps.check-rmd.outputs.count != 0
run: |
while read -r cmd
do
eval sudo $cmd
done < <(Rscript -e 'cat(remotes::system_requirements("ubuntu", "18.04"), sep = "\n")')
- run: make site
- run: make lesson-check
if: always()
- run: make lesson-check-all
if: always()
8 changes: 7 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,15 @@
.DS_Store
.ipynb_checkpoints
.sass-cache
.jekyll-cache/
__pycache__
_site
.Rproj.user
.Rhistory
.RData

.bundle/
.vendor/
vendor/
.docker-vendor/
Gemfile.lock
.*history
10 changes: 10 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# frozen_string_literal: true

source 'https://rubygems.org'

git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }

# Synchronize with https://pages.github.com/versions
ruby '>=2.5.8'

gem 'github-pages', group: :jekyll_plugins
12 changes: 6 additions & 6 deletions LICENSE.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ root: .
---
### Material didáctico

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

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

Avisos:

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

0 comments on commit 2c6b97e

Please sign in to comment.