Skip to content

Commit

Permalink
Merge branch 'main' into 37-vector-cf
Browse files Browse the repository at this point in the history
  • Loading branch information
cforgaci authored Oct 8, 2024
2 parents c4cee6f + 243e4bd commit c6cb570
Show file tree
Hide file tree
Showing 57 changed files with 3,975 additions and 285 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

This directory contains workflows to be used for Lessons using the {sandpaper}
lesson infrastructure. Two of these workflows require R (`sandpaper-main.yaml`
and `pr-recieve.yaml`) and the rest are bots to handle pull request management.
and `pr-receive.yaml`) and the rest are bots to handle pull request management.

These workflows will likely change as {sandpaper} evolves, so it is important to
keep them up-to-date. To do this in your lesson you can do the following in your
Expand Down Expand Up @@ -94,7 +94,7 @@ branch called `update/workflows` and a pull request is created. Maintainers are
encouraged to review the changes and accept the pull request if the outputs
are okay.

This update is run ~~weekly or~~ on demand.
This update is run weekly or on demand.

### 03 Maintain: Update Package Cache (update-cache.yaml)

Expand Down Expand Up @@ -140,7 +140,7 @@ Once the checks are finished, a comment is issued to the pull request, which
will allow maintainers to determine if it is safe to run the
"Receive Pull Request" workflow from new contributors.

### Recieve Pull Request (pr-recieve.yaml)
### Receive Pull Request (pr-receive.yaml)

**Note of caution:** This workflow runs arbitrary code by anyone who creates a
pull request. GitHub has safeguarded the token used in this workflow to have no
Expand Down Expand Up @@ -171,7 +171,7 @@ The artifacts produced are used by the next workflow.

### Comment on Pull Request (pr-comment.yaml)

This workflow is triggered if the `pr-recieve.yaml` workflow is successful.
This workflow is triggered if the `pr-receive.yaml` workflow is successful.
The steps in this workflow are:

1. Test if the workflow is valid and comment the validity of the workflow to the
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pr-close-signal.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
mkdir -p ./pr
printf ${{ github.event.number }} > ./pr/NUM
- name: Upload Diff
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: pr
path: ./pr
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pr-comment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ jobs:
contents: write
steps:
- name: 'Checkout md outputs'
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
ref: md-outputs
path: built
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/pr-receive.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
- name: "Upload PR number"
id: upload
if: ${{ always() }}
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: pr
path: ${{ github.workspace }}/NR
Expand Down Expand Up @@ -58,10 +58,10 @@ jobs:
MD: ${{ github.workspace }}/site/built
steps:
- name: "Check Out Main Branch"
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: "Check Out Staging Branch"
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
ref: md-outputs
path: ${{ env.MD }}
Expand Down Expand Up @@ -107,20 +107,20 @@ jobs:
shell: Rscript {0}

- name: "Upload PR"
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: pr
path: ${{ env.PR }}

- name: "Upload Diff"
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: diff
path: ${{ env.CHIVE }}
retention-days: 1

- name: "Upload Build"
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: built
path: ${{ env.MD }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/sandpaper-main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
steps:

- name: "Checkout Lesson"
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: "Set up R"
uses: r-lib/actions/setup-r@v2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/sandpaper-version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.16.2
0.16.6
4 changes: 2 additions & 2 deletions .github/workflows/update-cache.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
needed: ${{ steps.renv.outputs.exists }}
steps:
- name: "Checkout Lesson"
uses: actions/checkout@v3
uses: actions/checkout@v4
- id: renv
run: |
if [[ -d renv ]]; then
Expand Down Expand Up @@ -76,7 +76,7 @@ jobs:
steps:

- name: "Checkout Lesson"
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: "Set up R"
uses: r-lib/actions/setup-r@v2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/update-workflows.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
if: ${{ needs.check_token.outputs.workflow == 'true' }}
steps:
- name: "Checkout Repository"
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Update Workflows
id: update
Expand Down
59 changes: 59 additions & 0 deletions .github/workflows/workshop-setup.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# A workflow for testing the workshop setup in different operating systems

name: Test Workshop Setup

# Controls when the action will run. Workflow runs when manually triggered using the UI
on:
workflow_dispatch:

jobs:
workshop_setup:
runs-on: ${{matrix.os}}
strategy:
matrix:
# list of Os's
R: ['4.4.0']
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- uses: actions/checkout@v4
- name: Setup R
uses: r-lib/actions/setup-r@v2
with:
r-version: ${{matrix.R}}
rtools-version: '44'
- run: Rscript -e 'print("R was installed successfully")'
- name: Install GDAL, GEOS, and PROJ.4 (macOS)
if: matrix.os == 'macos-latest'
run: |
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
brew update
brew tap osgeo/osgeo4mac && brew tap --repair
brew install proj
brew install geos
brew install gdal
shell: bash
- name: Install GDAL, GEOS, and PROJ.4 (Ubuntu)
if: matrix.os == 'ubuntu-latest'
run: |
sudo add-apt-repository ppa:ubuntugis -y
sudo apt-get update
sudo apt-get install libgdal-dev libgeos-dev libproj-dev -y
shell: bash
# Include Fedora and Arch?
- name: UDUNITS
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt-get install libudunits2-dev -y
shell: bash
- name: Geospatial Packages
uses: r-lib/actions/setup-r-dependencies@v2
with:
cache-version: 2
packages: |
any::sessioninfo
any::tidyverse
any::terra
any::sf
- name: Test Lessons
run: |
Rscript -e 'nc <- sf::st_read(system.file("shape/nc.shp", package="sf"), quiet = TRUE); if (sf::st_crs(sf::st_transform(nc, 4326))$epsg == 4326) print("`sf` works as expected"); if (nrow(dplyr::filter(nc, AREA > 0.2)) == 11) print("`tidyverse` works as expected")'
Binary file added episodes/.DS_Store
Binary file not shown.
Loading

0 comments on commit c6cb570

Please sign in to comment.