diff --git a/.all-contributorsrc b/.all-contributorsrc index 6002cfcb..2964db2d 100644 --- a/.all-contributorsrc +++ b/.all-contributorsrc @@ -42,7 +42,7 @@ }, { "login": "JessicaS11", - "name": "Jessica", + "name": "Jessica Scheick", "avatar_url": "https://avatars.githubusercontent.com/u/11756442?v=4", "profile": "https://github.com/JessicaS11", "contributions": [ diff --git a/.github/actions/README.md b/.github/actions/README.md index b4af2de7..fc6d1fe8 100644 --- a/.github/actions/README.md +++ b/.github/actions/README.md @@ -20,6 +20,9 @@ The `workflows/` subfolder contains continuous integration workflows #### [binder-badge.yaml](../workflows/binder-badge.yaml) Create [binder](https://mybinder.readthedocs.io/en/latest/howto/gh-actions-badges.html) badges with links to test tutorial notebooks +#### [build-website.yaml](../workflows/build-website.yaml) +Build the websites (JupyterBook and front page). Run on Pull Requests against every commit and via a 'cron' schedule to maintain caching [since otherwise the cache expires if untouched in 7 days](https://docs.github.com/en/actions/advanced-guides/caching-dependencies-to-speed-up-workflows#usage-limits-and-eviction-policy) + #### [deploy.yaml](../workflows/deploy.yaml) Render and publish the websites (JupyterBook and landing page) to GitHub Pages @@ -35,8 +38,12 @@ Quality assessment and quality control. Standardizes formatting including spell #### [repo2docker.yaml](../workflows/repo2docker.yaml) [Build a Docker image](https://github.com/jupyterhub/repo2docker-action) for JupyterHub/BinderHub -#### [test.yaml](../workflows/test.yaml) -Build the websites (JupyterBook and front page). Run on Pull Requests against every commit and via a 'cron' schedule to maintain caching [since otherwise the cache expires if untouched in 7 days](https://docs.github.com/en/actions/advanced-guides/caching-dependencies-to-speed-up-workflows#usage-limits-and-eviction-policy) +#### [template-sync.yaml](../workflows/template-sync.yaml) +Open a PR to update the templated repo to incorporate changes made to the +[template repo](https://github.com/uwhackweek/jupyterbook-template). +Template users should fill out the [.templatesyncignore](../../../.templatesyncignore) +to specify which files they do not want updated from the template. + ## Security diff --git a/.github/actions/buildresources/action.yaml b/.github/actions/buildresources/action.yaml index 6e11aa0e..e7278a56 100644 --- a/.github/actions/buildresources/action.yaml +++ b/.github/actions/buildresources/action.yaml @@ -21,7 +21,7 @@ runs: steps: - name: Setup JupyterBook Cache if: inputs.jb-cache == 'true' - uses: actions/cache@v2 + uses: actions/cache@v4 with: path: ./book/_build # NOTE: change key to "jupyterbook-N+1" to force rebuilding cache @@ -52,8 +52,8 @@ runs: - name: Save Build if: ${{ always() && inputs.jb-save == 'true'}} - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: - name: build + name: build-${{ inputs.os }} path: book/_build/ diff --git a/.github/workflows/binder-badge.yaml b/.github/workflows/binder-badge.yaml deleted file mode 100644 index dec4ac29..00000000 --- a/.github/workflows/binder-badge.yaml +++ /dev/null @@ -1,38 +0,0 @@ -name: AddBinderBadge -# https://github.com/jupyterhub/repo2docker-action#cache-builds-on-mybinderorg-and-provide-a-link -on: - pull_request: - types: [opened, reopened] - paths: - - 'book/tutorials/**' - - '.github/workflows/binder-badge.yml' - - 'conda/**' -jobs: - add-badge: - runs-on: ubuntu-20.04 - steps: - - name: Checkout PR - uses: actions/checkout@v2 - - - name: cache binder build on mybinder.org - uses: jupyterhub/repo2docker-action@master - with: - NO_PUSH: true - MYBINDERORG_TAG: ${{ github.event.pull_request.head.ref }} - - - name: Comment on PR with Binder link - uses: actions/github-script@v3 - env: - BRANCH_NAME: ${{ github.event.pull_request.head.ref }} - CONTENT_REPO: ${{github.event.pull_request.head.repo.full_name}} - with: - github-token: ${{secrets.GITHUB_TOKEN}} - script: | - var BRANCH_NAME = process.env.BRANCH_NAME; - var CONTENT_REPO = process.env.CONTENT_REPO; - github.issues.createComment({ - issue_number: context.issue.number, - owner: context.repo.owner, - repo: context.repo.repo, - body: `[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/${context.repo.owner}/${context.repo.repo}/${BRANCH_NAME}) :point_left: Launch a binder notebook on this branch` - }) diff --git a/.github/workflows/build_website.yaml b/.github/workflows/build_website.yaml index 3c47cfe6..8217154a 100644 --- a/.github/workflows/build_website.yaml +++ b/.github/workflows/build_website.yaml @@ -8,9 +8,9 @@ on: pull_request_target: types: [labeled, synchronize] paths: - - '.github/**' + - '.github/**/*' - '{{ cookiecutter.repo_directory }}/**' - - 'book/**' + - 'book/**/*' - 'conda/**' - 'scripts/**' - 'cookiecutter.yaml' @@ -31,7 +31,7 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: ref: ${{ github.event.pull_request.head.sha }} @@ -49,3 +49,4 @@ jobs: jb-cache: false publish-to-gh: false jb-save: true + os: ${{ matrix.os }} diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index 90e29d1d..49345571 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -7,7 +7,6 @@ on: - '{{ cookiecutter.repo_directory }}/**' - 'scripts/**' - '.github/workflows/deploy.yaml' - - '.github/actions/**' - 'cookiecutter.yaml' branches: @@ -15,11 +14,11 @@ on: jobs: build-and-deploy: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Configure NASA Earthdata Login continue-on-error: true diff --git a/.github/workflows/manual.yaml b/.github/workflows/manual.yaml index 65d088f0..64ef007c 100644 --- a/.github/workflows/manual.yaml +++ b/.github/workflows/manual.yaml @@ -5,12 +5,12 @@ on: jobs: build-and-test: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest steps: - name: Checkout repository - uses: actions/checkout@v2 - + uses: actions/checkout@v4 + - name: Configure NASA Earthdata Login continue-on-error: true env: @@ -19,7 +19,7 @@ jobs: run: | echo "machine urs.earthdata.nasa.gov login $EARTHDATA_USER password $EARTHDATA_PASS" > ~/.netrc chmod 0600 ~/.netrc - + - uses: ./.github/actions/buildresources with: jb-cache: false diff --git a/.github/workflows/netlifypreview.yaml b/.github/workflows/netlifypreview.yaml index 09b381a3..3f9eea57 100644 --- a/.github/workflows/netlifypreview.yaml +++ b/.github/workflows/netlifypreview.yaml @@ -6,14 +6,14 @@ on: jobs: add-preview: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest # This workflow accesses secrets and checks out a PR, so only run if labelled # https://securitylab.github.com/research/github-actions-preventing-pwn-requests/ if: contains(github.event.pull_request.labels.*.name, 'preview') steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: ref: ${{ github.event.pull_request.head.sha }} @@ -34,7 +34,7 @@ jobs: - name: Deploy Website Preview if: always() - uses: nwtgck/actions-netlify@v2.0 + uses: nwtgck/actions-netlify@v3.0 with: publish-dir: './book/_build/html' production-deploy: false diff --git a/.github/workflows/qaqc.yaml b/.github/workflows/qaqc.yaml index fcb703e8..87d01605 100644 --- a/.github/workflows/qaqc.yaml +++ b/.github/workflows/qaqc.yaml @@ -7,7 +7,7 @@ on: jobs: quality-control: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest defaults: run: shell: bash -l {0} @@ -31,7 +31,7 @@ jobs: uses: codespell-project/actions-codespell@master with: check_filenames: true - skip: '*.js,qaqc.yml,*.geojson' + skip: '*.js,*.css,qaqc.yml,*.geojson' ignore_words_file: .codespellignore only_warn: 1 diff --git a/.github/workflows/repo2docker-PR.yaml b/.github/workflows/repo2docker-PR.yaml deleted file mode 100644 index 44f5a35e..00000000 --- a/.github/workflows/repo2docker-PR.yaml +++ /dev/null @@ -1,30 +0,0 @@ -name: Repo2DockerPR -on: - pull_request: - branches: - - main - paths: - - 'conda/**' - -jobs: - build-image: - runs-on: ubuntu-20.04 - steps: - - name: Checkout Repo - uses: actions/checkout@v2 - - - name: Get CalenderVersion UTC Date - id: calver - run: echo "::set-output name=version::$(date +'%Y.%m.%d')" - - - name: Repo2Docker - uses: jupyterhub/repo2docker-action@master - with: - NO_PUSH: true - IMAGE_NAME: pull-request - - - name: Report Image Size and Conda Packages - if: always() - run: | - docker images - docker run ${{secrets.DOCKER_IMAGE}}:latest conda list --export diff --git a/.github/workflows/repo2docker.yaml b/.github/workflows/repo2docker.yaml deleted file mode 100644 index f4655b24..00000000 --- a/.github/workflows/repo2docker.yaml +++ /dev/null @@ -1,46 +0,0 @@ -name: Repo2Docker -on: - push: - branches: - - main - paths: - - 'conda/**' - -jobs: - build-image-and-push: - runs-on: ubuntu-20.04 - steps: - - name: Checkout Repo - uses: actions/checkout@v2 - - - name: Get CalenderVersion UTC Date - id: calver - run: echo "::set-output name=version::$(date +'%Y.%m.%d')" - - - name: Build and Push to DockerHub - uses: jupyterhub/repo2docker-action@master - with: - DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} - DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} - IMAGE_NAME: ${{ secrets.DOCKER_IMAGE }} - ADDITIONAL_TAG: ${{ steps.calver.outputs.version }} - MYBINDERORG_TAG: ${{ github.event.ref }} # This builds the container on mybinder.org - - - name: Also Push To quay.io - id: push-to-quay - uses: redhat-actions/push-to-registry@v2 - with: - image: ${{ secrets.DOCKER_IMAGE }} - tags: ${{ steps.calver.outputs.version }} - registry: quay.io - username: ${{ secrets.QUAY_USERNAME }} - password: ${{ secrets.QUAY_PASSWORD }} - - - name: Print image url - run: echo "Image pushed to ${{ steps.push-to-quay.outputs.registry-paths }}" - - - name: Report Image Size and Conda Packages - if: always() - run: | - docker images - docker run ${{secrets.DOCKER_IMAGE}}:latest conda list --export diff --git a/.github/workflows/template-sync.yaml b/.github/workflows/template-sync.yaml new file mode 100644 index 00000000..6a6f9b92 --- /dev/null +++ b/.github/workflows/template-sync.yaml @@ -0,0 +1,33 @@ +name: 'Sync to Template' +description: 'Get updates to the Jupyterbook from the template repo' + +on: + # cronjob trigger (minute, hour, day, month, day-of-week; here 1st of month) + # schedule: + # - cron: "0 0 1 * *" + # manual trigger + workflow_dispatch: + +jobs: + repo-sync: + runs-on: ubuntu-latest + # https://docs.github.com/en/actions/using-jobs/assigning-permissions-to-jobs + permissions: + contents: write + pull-requests: write + + steps: + # To use this repository's private action, you must check out the repository + - name: Checkout + uses: actions/checkout@v4 + # https://github.com/actions/checkout#usage + # uncomment if you use submodules within the source repository + # with: + # submodules: true + + - name: actions-template-sync + uses: AndreasAugustin/actions-template-sync@v1 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + source_repo_path: uwhackweek/jupyterbook-template + upstream_branch: main # defaults to main \ No newline at end of file diff --git a/.templatesyncignore b/.templatesyncignore new file mode 100644 index 00000000..b34136d7 --- /dev/null +++ b/.templatesyncignore @@ -0,0 +1,15 @@ +# THIS FILE CANNOT BE SYNCED +# use glob patterns as in .gitignore +# recommend listing non-basics tutorial directories here + +# configuration files +cookiecutter.yaml + +# environment lock files +./conda/*lock.yml + +# book files (configuration, usage-specific) +./book/_config.yml +./book/team.yaml + +# event-specific tutorials diff --git a/README.md b/README.md index 27e807cb..51c32dc1 100644 --- a/README.md +++ b/README.md @@ -14,8 +14,8 @@ We've found that every hackweek benefits from a single-page website to get peopl We've used this template for the following events: -* ICESat-2 Hackweek 2022: https://icesat-2.hackweek.io -* SnowEx Hackweek 2021: https://snowex-hackweek.github.io/website/intro.html +* ICESat-2 Hackweek 2022 + 2023: https://icesat-2.hackweek.io +* SnowEx Hackweeks (2021, 2022): https://snowex.hackweek.io ## How to use this template diff --git a/book/projects/project_roadmap.md b/book/projects/project_roadmap.md index 0fa398f2..95fe3536 100644 --- a/book/projects/project_roadmap.md +++ b/book/projects/project_roadmap.md @@ -1,6 +1,6 @@ # Project Roadmap -Each project will progress through these stages: +Each project will progress through these stages: ```{image} ../img/project-timeline.png :alt: flowchart of typical hackweek project timelines @@ -36,15 +36,15 @@ We facilitate a project team formation session at the end of the first day of th ## **Teamwork** * kick-off meeting focuses on hearing from each team member: - * What are your unique learning goals? + * What are your unique learning goals? * How do you work best? What level of group interaction works for you? * What skills and background are you most excited to share with the team? * When are you available to meet? -* set up team computing infrastructure on Slack and GitHub ([Project Initiallization](project_initialization)) +* set up team computing infrastructure on Slack and GitHub ([Project Initialization](project_initialization)) * project work begins and teams have regular check-ins to chart progress * project outputs are recorded in a GitHub repository -## **Presentations** +## **Presentations** * each team has 15 minutes to share what was learned, what challenges arose, what might be worth trying next * individual contributions to the group effort are recognized and celebrated @@ -54,7 +54,7 @@ We facilitate a project team formation session at the end of the first day of th * We aspire to keep projects going after the hackweek! This is an optional (ideal) outcome of hackweek project work. * Project leads/helpers will transition to longer-term engagement via mentorship role (optional/with support). * Additional people join a growing Community of Practice (for example, centered on a community software library). -* software, research results are packaged and shared/published. +* software, research results are packaged and shared/published. diff --git a/book/team.yaml b/book/team.yaml index daf04535..0ad65a36 100644 --- a/book/team.yaml +++ b/book/team.yaml @@ -153,12 +153,12 @@ people: # ============= - title: Joachim Meyer avatar: https://avatars.githubusercontent.com/u/178649?v=4 - role: Graduate Student + role: Senior Research Scholar organizations: - - name: University of Utah + - name: Boise State University bio: > - Joe is a graduate student at the University of Utah with a research focus - on snow hydrology and closing the gap between research and operations. + Joe is a research scientist at Boise State University with a focus + on physical based snow modeling development and operational application. He has a background in software development and would love to see more software development best practices, open source software, and open science principles being adapted throughout the research community. diff --git a/{{ cookiecutter.repo_directory }}/index.html b/{{ cookiecutter.repo_directory }}/index.html index a99d7b7c..29f118e5 100644 --- a/{{ cookiecutter.repo_directory }}/index.html +++ b/{{ cookiecutter.repo_directory }}/index.html @@ -10,7 +10,7 @@ - + - {%- if cookiecutter.apply %} + {%- if 'apply' in cookiecutter %}