Skip to content

Commit

Permalink
Merge pull request #4 from hschellman/Dec2024
Browse files Browse the repository at this point in the history
Merge new format changes in.  A few bug fixes as well.
  • Loading branch information
hschellman authored Nov 11, 2024
2 parents a35ac9e + 63dfd3e commit 07c17ca
Show file tree
Hide file tree
Showing 67 changed files with 1,537 additions and 447 deletions.
19 changes: 11 additions & 8 deletions .github/workflows/template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:
- name: Set up Ruby
uses: ruby/setup-ruby@v2
with:
ruby-version: '2.7'
ruby-version: '3.0'
bundler-cache: true

- name: Set up Python
Expand Down Expand Up @@ -127,19 +127,21 @@ jobs:
id: check-rmd
working-directory: lesson
run: |
echo "::set-output name=count::$(shopt -s nullglob; files=($(find . -iname '*.Rmd')); echo ${#files[@]})"
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@master
uses: r-lib/actions/setup-r@v2
with:
r-version: 'release'
use-public-rspm: true
install-r: false

- name: Install needed packages
if: steps.check-rmd.outputs.count != 0
working-directory: lesson
run: |
packages = setdiff(c('remotes', 'rprojroot', 'renv', 'desc', 'rmarkdown', 'knitr'), rownames(installed.packages()))
install.packages(packages, repo="https://cran.rstudio.com/")
source('bin/dependencies.R')
install_required_packages(.libPaths()[1])
shell: Rscript {0}

- name: Query dependencies
Expand All @@ -149,11 +151,12 @@ jobs:
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: Cache R packages
- name: Restore Package Cache
if: runner.os != 'Windows' && steps.check-rmd.outputs.count != 0
uses: actions/cache@v2
with:
Expand All @@ -172,7 +175,7 @@ jobs:
run: |
while read -r cmd
do
eval sudo $cmd
eval sudo $cmd || echo "Nothing to update"
done < <(Rscript -e 'cat(remotes::system_requirements("ubuntu", "20.04"), sep = "\n")')
- run: make site
Expand Down
18 changes: 10 additions & 8 deletions .github/workflows/website.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
- name: Set up Ruby
uses: ruby/setup-ruby@v2
with:
ruby-version: '2.7'
ruby-version: '3.0'
bundler-cache: true

- name: Set up Python
Expand All @@ -44,15 +44,16 @@ jobs:
- name: Look for R-markdown files
id: check-rmd
run: |
echo "::set-output name=count::$(shopt -s nullglob; files=($(find . -iname '*.Rmd')); echo ${#files[@]})"
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@master
uses: r-lib/actions/setup-r@v2
with:
r-version: 'release'
use-public-rspm: true
install-r: false

- name: Cache R packages
- name: Restore R Cache
if: steps.check-rmd.outputs.count != 0
uses: actions/cache@v2
with:
Expand All @@ -63,8 +64,8 @@ jobs:
- name: Install needed packages
if: steps.check-rmd.outputs.count != 0
run: |
packages = setdiff(c('remotes', 'rprojroot', 'renv', 'desc', 'rmarkdown', 'knitr'), rownames(installed.packages()))
install.packages(packages, repo="https://cran.rstudio.com/")
source('bin/dependencies.R')
install_required_packages()
shell: Rscript {0}

- name: Query dependencies
Expand All @@ -73,6 +74,7 @@ jobs:
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}
Expand All @@ -83,7 +85,7 @@ jobs:
run: |
while read -r cmd
do
eval sudo $cmd
eval sudo $cmd || echo "Nothing to update"
done < <(Rscript -e 'cat(remotes::system_requirements("ubuntu", "20.04"), sep = "\n")')
- name: Render the markdown and confirm that the site can be built
Expand Down
4 changes: 2 additions & 2 deletions 404.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ permalink: 404.html
title: "Page not found"
---

# Oops! We can't find that page.
# Oops! We cannot find that page.
{: style="text-align: center;"}

> ## Our apologies!
>
> We can't seem to find the page you're looking for.
> We cannot seem to find the page you are looking for.
> Try going back to the <a href="javascript:history.back()">previous page</a> or
> navigate to any other page using the navigation bar above
> {%- if site.kind == "lesson" -%} or the schedule below {%- endif -%}.
Expand Down
52 changes: 49 additions & 3 deletions LICENSE.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,52 @@ root: .
---
## Instructional Material

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

You are free:

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

for any purpose, even commercially.

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

Under the following terms:

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

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

Notices:

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

## Templates and Framework from software carpentries

This lesson is built on a framework developed by Software Carpentry. Below is their license:

### Instructional material

All Software Carpentry, Data Carpentry, and Library Carpentry instructional material is
made available under the [Creative Commons Attribution
license][cc-by-human]. The following is a human-readable summary of
Expand All @@ -26,7 +72,7 @@ Under the following terms:
* **Attribution**---You must give appropriate credit (mentioning that
your work is derived from work that is Copyright © Software
Carpentry and, where practical, linking to
http://software-carpentry.org/), provide a [link to the
<http://software-carpentry.org/>), provide a [link to the
license][cc-by-human], and indicate if changes were made. You may do
so in any reasonable manner, but not in any way that suggests the
licensor endorses you or your use.
Expand All @@ -45,7 +91,7 @@ Notices:
rights such as publicity, privacy, or moral rights may limit how you
use the material.

## Software
### Software

Except where otherwise noted, the example programs and other software
provided by Software Carpentry and Data Carpentry are made available under the
Expand All @@ -71,7 +117,7 @@ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

## Trademark
### Trademark

"Software Carpentry" and "Data Carpentry" and their respective logos
are registered trademarks of [Community Initiatives][CI].
Expand Down
22 changes: 18 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ 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)
Expand Down Expand Up @@ -41,23 +44,27 @@ endif
.PHONY: site docker-serve repo-check clean clean-rmd

## * serve : render website and run a local server
serve : lesson-md
serve : lesson-md index.md
${JEKYLL} serve

## * site : build website but do not run a server
site : lesson-md
site : lesson-md index.md
${JEKYLL} build

## * docker-serve : use Docker to serve the site
docker-serve :
@docker pull carpentries/lesson-docker:latest
@docker run --rm -it \
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
Expand Down Expand Up @@ -172,3 +179,10 @@ ifeq (, $(PYTHON))
else
@:
endif

index.md :
ifeq (, $(wildcard index.md))
$(error index.md not found)
else
@:
endif
43 changes: 30 additions & 13 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,32 @@
# dc: Data Carpentry
# lc: Library Carpentry
# cp: Carpentries (to use for instructor traning for instance)
carpentry: "incubator"
# incubator: Carpentries Incubator
carpentry: "dune"

# Overall title for pages.
title: "DUNE Computing Training 2024 Online Update" # FIXME
title: "Computing Basics for DUNE - Late 2024 edition"

# Life cycle stage of the lesson
# See this page for more details: https://cdh.carpentries.org/the-lesson-life-cycle.html
# Possible values: "pre-alpha", "alpha", "beta", "stable"
life_cycle: "beta"
#
# Lessons that are going through the transition to the
# Carpentries Workbench will go through 3 steps:
# 'transition-step-1': notice indicating a new version
# 'transition-step-2': notice encouraging to use new version
# 'transition-step-3': notice indicating the lesson is deprecated,
# with automated redirect
life_cycle: "pre-alpha"

# For lessons in the life stages in 'transition-step-1' or later:
# - 'transition_url' holds the URL for the version of the lesson that
# uses the Workbench (needed for all 3 steps)
# - 'transition_date' (in yyyy-mm-dd format) is the date when the lesson
# will transition to being deprecated. The date only needs to be decided
# when the lesson is in 'transition-step-2'.
transition_url:
transition_date:

#------------------------------------------------------------
# Generic settings (should not need to change).
Expand All @@ -30,9 +47,10 @@ kind: "lesson"
repository: <USERNAME>/<PROJECT>

# Email address, no mailto:
email: "dune-computing-training@fnal.gov" # FIXME
email: "dune-computing-training@fnal.gov"

# Sites.
coc: "https://docs.carpentries.org/topic_folders/policies/code-of-conduct.html"
amy_site: "https://amy.carpentries.org/"
carpentries_github: "https://github.com/carpentries"
carpentries_pages: "https://carpentries.github.io"
Expand All @@ -44,18 +62,22 @@ lc_site: "https://librarycarpentry.org/"
swc_github: "https://github.com/swcarpentry"
swc_pages: "https://swcarpentry.github.io"
swc_site: "https://software-carpentry.org"
dune_site: "https://dunescience.org"
dune_github: "https://github.com/DUNE"
template_repo: "https://github.com/carpentries/styles"
training_site: "https://carpentries.github.io/instructor-training"
workshop_repo: "https://github.com/carpentries/workshop-template"
workshop_site: "https://carpentries.github.io/workshop-template"
cc_by_human: "https://creativecommons.org/licenses/by/4.0/"

# Surveys.
pre_survey: "https://carpentries.typeform.com/to/wi32rS?slug="
post_survey: "https://carpentries.typeform.com/to/UgVdRQ?slug="
instructor_pre_survey: "https://www.surveymonkey.com/r/instructor_training_pre_survey?workshop_id="
instructor_post_survey: "https://www.surveymonkey.com/r/instructor_training_post_survey?workshop_id="
pre_survey: "https://carpentries.typeform.com/to/wi32rS#slug="
post_survey: "https://carpentries.typeform.com/to/UgVdRQ#slug="
instructor_pre_survey: "https://carpentries.typeform.com/to/QVOarK#slug="
instructor_post_survey: "https://carpentries.typeform.com/to/cjJ9UP#slug="

# Set to 'true' for instructor training websites only.
instructor_training: false

# Start time in minutes (0 to be clock-independent, 540 to show a start at 09:00 am).
start_time: 0
Expand Down Expand Up @@ -98,8 +120,3 @@ exclude:

# Turn on built-in syntax highlighting.
highlighter: rouge


# Remote theme
remote_theme: carpentries/carpentries-theme
#remote_theme: pages-themes/leap-day@v0.2.0
23 changes: 22 additions & 1 deletion _episodes/02-storage-spaces.md
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,6 @@ The eXtended ROOT daemon is software framework designed for accessing data from
XRootD is most suitable for read-only data access.
[XRootD Man pages](https://xrootd.slac.stanford.edu/docs.html)


Issue the following command. Please look at the input and output of the command, and recognize that this is a listing of /pnfs/dune/scratch/users/${USER}/DUNE_tutorial_2024. Try and understand how the translation between a NFS path and an xrootd URI could be done by hand if you needed to do so.

~~~
Expand Down Expand Up @@ -290,6 +289,28 @@ xrdfs root://fndca1.fnal.gov:1094/ ls /pnfs/fnal.gov/usr/dune/tape_backed/dunepr
~~~
{: .language-bash}


> ## Is my file available or stuck on tape?
> /tape_backed/ storage at Fermilab is migrated to tape and may not be on disk?
> You can check this by doing the following **in an AL9 window**
> ~~~
> gfal-xattr <xrootpath> user.status
> ~~~
> {: .language-bash}
> if it is on disk you get
> ~~~
> ONLINE
> ~~~
> {: .output}
> if it is only on tape you get
> ~~~
> NEARLINE
> ~~~
> {: .output}
> (This command doesn't work on SL7 so use an AL9 window)
{: .challenge}


### The df command

To find out what types of volumes are available on a node can be achieved with the command `df`. The `-h` is for _human readable format_. It will list a lot of information about each volume (total size, available size, mount point, device location).
Expand Down
Loading

0 comments on commit 07c17ca

Please sign in to comment.