diff --git a/.Rhistory b/.Rhistory deleted file mode 100644 index e69de29bb..000000000 diff --git a/.editorconfig b/.editorconfig deleted file mode 100644 index 5bf4860b1..000000000 --- a/.editorconfig +++ /dev/null @@ -1,26 +0,0 @@ -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! -trim_trailing_whitespace = false # keep trailing spaces in markdown - 2+ spaces are translated to a hard break (
) - -[*.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 diff --git a/.github/workflows/README.md b/.github/workflows/README.md deleted file mode 100755 index 7076ddd9f..000000000 --- a/.github/workflows/README.md +++ /dev/null @@ -1,198 +0,0 @@ -# Carpentries Workflows - -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-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 -R console: - -```r -# Install/Update sandpaper -options(repos = c(carpentries = "https://carpentries.r-universe.dev/", - CRAN = "https://cloud.r-project.org")) -install.packages("sandpaper") - -# update the workflows in your lesson -library("sandpaper") -update_github_workflows() -``` - -Inside this folder, you will find a file called `sandpaper-version.txt`, which -will contain a version number for sandpaper. This will be used in the future to -alert you if a workflow update is needed. - -What follows are the descriptions of the workflow files: - -## Deployment - -### 01 Build and Deploy (sandpaper-main.yaml) - -This is the main driver that will only act on the main branch of the repository. -This workflow does the following: - - 1. checks out the lesson - 2. provisions the following resources - - R - - pandoc - - lesson infrastructure (stored in a cache) - - lesson dependencies if needed (stored in a cache) - 3. builds the lesson via `sandpaper:::ci_deploy()` - -#### Caching - -This workflow has two caches; one cache is for the lesson infrastructure and -the other is for the the lesson dependencies if the lesson contains rendered -content. These caches are invalidated by new versions of the infrastructure and -the `renv.lock` file, respectively. If there is a problem with the cache, -manual invaliation is necessary. You will need maintain access to the repository -and you can either go to the actions tab and [click on the caches button to find -and invalidate the failing cache](https://github.blog/changelog/2022-10-20-manage-caches-in-your-actions-workflows-from-web-interface/) -or by setting the `CACHE_VERSION` secret to the current date (which will -invalidate all of the caches). - -## Updates - -### Setup Information - -These workflows run on a schedule and at the maintainer's request. Because they -create pull requests that update workflows/require the downstream actions to run, -they need a special repository/organization secret token called -`SANDPAPER_WORKFLOW` and it must have the `public_repo` and `workflow` scope. - -This can be an individual user token, OR it can be a trusted bot account. If you -have a repository in one of the official Carpentries accounts, then you do not -need to worry about this token being present because the Carpentries Core Team -will take care of supplying this token. - -If you want to use your personal account: you can go to - -to create a token. Once you have created your token, you should copy it to your -clipboard and then go to your repository's settings > secrets > actions and -create or edit the `SANDPAPER_WORKFLOW` secret, pasting in the generated token. - -If you do not specify your token correctly, the runs will not fail and they will -give you instructions to provide the token for your repository. - -### 02 Maintain: Update Workflow Files (update-workflow.yaml) - -The {sandpaper} repository was designed to do as much as possible to separate -the tools from the content. For local builds, this is absolutely true, but -there is a minor issue when it comes to workflow files: they must live inside -the repository. - -This workflow ensures that the workflow files are up-to-date. The way it work is -to download the update-workflows.sh script from GitHub and run it. The script -will do the following: - -1. check the recorded version of sandpaper against the current version on github -2. update the files if there is a difference in versions - -After the files are updated, if there are any changes, they are pushed to a -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. - -### 03 Maintain: Update Package Cache (update-cache.yaml) - -For lessons that have generated content, we use {renv} to ensure that the output -is stable. This is controlled by a single lockfile which documents the packages -needed for the lesson and the version numbers. This workflow is skipped in -lessons that do not have generated content. - -Because the lessons need to remain current with the package ecosystem, it's a -good idea to make sure these packages can be updated periodically. The -update cache workflow will do this by checking for updates, applying them in a -branch called `updates/packages` and creating a pull request with _only the -lockfile changed_. - -From here, the markdown documents will be rebuilt and you can inspect what has -changed based on how the packages have updated. - -## Pull Request and Review Management - -Because our lessons execute code, pull requests are a secruity risk for any -lesson and thus have security measures associted with them. **Do not merge any -pull requests that do not pass checks and do not have bots commented on them.** - -This series of workflows all go together and are described in the following -diagram and the below sections: - -![Graph representation of a pull request](https://carpentries.github.io/sandpaper/articles/img/pr-flow.dot.svg) - -### Pre Flight Pull Request Validation (pr-preflight.yaml) - -This workflow runs every time a pull request is created and its purpose is to -validate that the pull request is okay to run. This means the following things: - -1. The pull request does not contain modified workflow files -2. If the pull request contains modified workflow files, it does not contain - modified content files (such as a situation where @carpentries-bot will - make an automated pull request) -3. The pull request does not contain an invalid commit hash (e.g. from a fork - that was made before a lesson was transitioned from styles to use the - workbench). - -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. - -### 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 -priviledges in the repository, but we have taken precautions to protect against -spoofing. - -This workflow is triggered with every push to a pull request. If this workflow -is already running and a new push is sent to the pull request, the workflow -running from the previous push will be cancelled and a new workflow run will be -started. - -The first step of this workflow is to check if it is valid (e.g. that no -workflow files have been modified). If there are workflow files that have been -modified, a comment is made that indicates that the workflow is not run. If -both a workflow file and lesson content is modified, an error will occurr. - -The second step (if valid) is to build the generated content from the pull -request. This builds the content and uploads three artifacts: - -1. The pull request number (pr) -2. A summary of changes after the rendering process (diff) -3. The rendered files (build) - -Because this workflow builds generated content, it follows the same general -process as the `sandpaper-main` workflow with the same caching mechanisms. - -The artifacts produced are used by the next workflow. - -### Comment on Pull Request (pr-comment.yaml) - -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 - pull request. -2. If it is valid: create an orphan branch with two commits: the current state - of the repository and the proposed changes. -3. If it is valid: update the pull request comment with the summary of changes - -Importantly: if the pull request is invalid, the branch is not created so any -malicious code is not published. - -From here, the maintainer can request changes from the author and eventually -either merge or reject the PR. When this happens, if the PR was valid, the -preview branch needs to be deleted. - -### Send Close PR Signal (pr-close-signal.yaml) - -Triggered any time a pull request is closed. This emits an artifact that is the -pull request number for the next action - -### Remove Pull Request Branch (pr-post-remove-branch.yaml) - -Tiggered by `pr-close-signal.yaml`. This removes the temporary branch associated with -the pull request (if it was created). diff --git a/.github/workflows/pr-close-signal.yaml b/.github/workflows/pr-close-signal.yaml deleted file mode 100644 index b1303c261..000000000 --- a/.github/workflows/pr-close-signal.yaml +++ /dev/null @@ -1,22 +0,0 @@ -name: "Bot: Send Close Pull Request Signal" - -on: - pull_request: - types: - [closed] - -jobs: - send-close-signal: - name: "Send closing signal" - runs-on: ubuntu-22.04 - if: ${{ github.event.action == 'closed' }} - steps: - - name: "Create PRtifact" - run: | - mkdir -p ./pr - printf ${{ github.event.number }} > ./pr/NUM - - name: Upload Diff - uses: actions/upload-artifact@v4 - with: - name: pr - path: ./pr diff --git a/.github/workflows/pr-comment.yaml b/.github/workflows/pr-comment.yaml deleted file mode 100644 index f80d9d0c0..000000000 --- a/.github/workflows/pr-comment.yaml +++ /dev/null @@ -1,184 +0,0 @@ -name: "Bot: Comment on the Pull Request" - -# read-write repo token -# access to secrets -on: - workflow_run: - workflows: ["Receive Pull Request"] - types: - - completed - -concurrency: - group: pr-${{ github.event.workflow_run.pull_requests[0].number }} - cancel-in-progress: true - - -jobs: - # Pull requests are valid if: - # - they match the sha of the workflow run head commit - # - they are open - # - no .github files were committed - test-pr: - name: "Test if pull request is valid" - runs-on: ubuntu-22.04 - if: > - github.event.workflow_run.event == 'pull_request' && - github.event.workflow_run.conclusion == 'success' - outputs: - is_valid: ${{ steps.check-pr.outputs.VALID }} - payload: ${{ steps.check-pr.outputs.payload }} - number: ${{ steps.get-pr.outputs.NUM }} - msg: ${{ steps.check-pr.outputs.MSG }} - steps: - - name: 'Download PR artifact' - id: dl - uses: carpentries/actions/download-workflow-artifact@main - with: - run: ${{ github.event.workflow_run.id }} - name: 'pr' - - - name: "Get PR Number" - if: ${{ steps.dl.outputs.success == 'true' }} - id: get-pr - run: | - unzip pr.zip - echo "NUM=$(<./NR)" >> $GITHUB_OUTPUT - - - name: "Fail if PR number was not present" - id: bad-pr - if: ${{ steps.dl.outputs.success != 'true' }} - run: | - echo '::error::A pull request number was not recorded. The pull request that triggered this workflow is likely malicious.' - exit 1 - - name: "Get Invalid Hashes File" - id: hash - run: | - echo "json<> $GITHUB_OUTPUT - - name: "Check PR" - id: check-pr - if: ${{ steps.dl.outputs.success == 'true' }} - uses: carpentries/actions/check-valid-pr@main - with: - pr: ${{ steps.get-pr.outputs.NUM }} - sha: ${{ github.event.workflow_run.head_sha }} - headroom: 3 # if it's within the last three commits, we can keep going, because it's likely rapid-fire - invalid: ${{ fromJSON(steps.hash.outputs.json)[github.repository] }} - fail_on_error: true - - # Create an orphan branch on this repository with two commits - # - the current HEAD of the md-outputs branch - # - the output from running the current HEAD of the pull request through - # the md generator - create-branch: - name: "Create Git Branch" - needs: test-pr - runs-on: ubuntu-22.04 - if: ${{ needs.test-pr.outputs.is_valid == 'true' }} - env: - NR: ${{ needs.test-pr.outputs.number }} - permissions: - contents: write - steps: - - name: 'Checkout md outputs' - uses: actions/checkout@v4 - with: - ref: md-outputs - path: built - fetch-depth: 1 - - - name: 'Download built markdown' - id: dl - uses: carpentries/actions/download-workflow-artifact@main - with: - run: ${{ github.event.workflow_run.id }} - name: 'built' - - - if: ${{ steps.dl.outputs.success == 'true' }} - run: unzip built.zip - - - name: "Create orphan and push" - if: ${{ steps.dl.outputs.success == 'true' }} - run: | - cd built/ - git config --local user.email "actions@github.com" - git config --local user.name "GitHub Actions" - CURR_HEAD=$(git rev-parse HEAD) - git checkout --orphan md-outputs-PR-${NR} - git add -A - git commit -m "source commit: ${CURR_HEAD}" - ls -A | grep -v '^.git$' | xargs -I _ rm -r '_' - cd .. - unzip -o -d built built.zip - cd built - git add -A - git commit --allow-empty -m "differences for PR #${NR}" - git push -u --force --set-upstream origin md-outputs-PR-${NR} - - # Comment on the Pull Request with a link to the branch and the diff - comment-pr: - name: "Comment on Pull Request" - needs: [test-pr, create-branch] - runs-on: ubuntu-22.04 - if: ${{ needs.test-pr.outputs.is_valid == 'true' }} - env: - NR: ${{ needs.test-pr.outputs.number }} - permissions: - pull-requests: write - steps: - - name: 'Download comment artifact' - id: dl - uses: carpentries/actions/download-workflow-artifact@main - with: - run: ${{ github.event.workflow_run.id }} - name: 'diff' - - - if: ${{ steps.dl.outputs.success == 'true' }} - run: unzip ${{ github.workspace }}/diff.zip - - - name: "Comment on PR" - id: comment-diff - if: ${{ steps.dl.outputs.success == 'true' }} - uses: carpentries/actions/comment-diff@main - with: - pr: ${{ env.NR }} - path: ${{ github.workspace }}/diff.md - - # Comment if the PR is open and matches the SHA, but the workflow files have - # changed - comment-changed-workflow: - name: "Comment if workflow files have changed" - needs: test-pr - runs-on: ubuntu-22.04 - if: ${{ always() && needs.test-pr.outputs.is_valid == 'false' }} - env: - NR: ${{ github.event.workflow_run.pull_requests[0].number }} - body: ${{ needs.test-pr.outputs.msg }} - permissions: - pull-requests: write - steps: - - name: 'Check for spoofing' - id: dl - uses: carpentries/actions/download-workflow-artifact@main - with: - run: ${{ github.event.workflow_run.id }} - name: 'built' - - - name: 'Alert if spoofed' - id: spoof - if: ${{ steps.dl.outputs.success == 'true' }} - run: | - echo 'body<> $GITHUB_ENV - echo '' >> $GITHUB_ENV - echo '## :x: DANGER :x:' >> $GITHUB_ENV - echo 'This pull request has modified workflows that created output. Close this now.' >> $GITHUB_ENV - echo '' >> $GITHUB_ENV - echo 'EOF' >> $GITHUB_ENV - - - name: "Comment on PR" - id: comment-diff - uses: carpentries/actions/comment-diff@main - with: - pr: ${{ env.NR }} - body: ${{ env.body }} diff --git a/.github/workflows/pr-post-remove-branch.yaml b/.github/workflows/pr-post-remove-branch.yaml deleted file mode 100644 index 9419e2be7..000000000 --- a/.github/workflows/pr-post-remove-branch.yaml +++ /dev/null @@ -1,32 +0,0 @@ -name: "Bot: Remove Temporary PR Branch" - -on: - workflow_run: - workflows: ["Bot: Send Close Pull Request Signal"] - types: - - completed - -jobs: - delete: - name: "Delete branch from Pull Request" - runs-on: ubuntu-22.04 - if: > - github.event.workflow_run.event == 'pull_request' && - github.event.workflow_run.conclusion == 'success' - permissions: - contents: write - steps: - - name: 'Download artifact' - uses: carpentries/actions/download-workflow-artifact@main - with: - run: ${{ github.event.workflow_run.id }} - name: pr - - name: "Get PR Number" - id: get-pr - run: | - unzip pr.zip - echo "NUM=$(<./NUM)" >> $GITHUB_OUTPUT - - name: 'Remove branch' - uses: carpentries/actions/remove-branch@main - with: - pr: ${{ steps.get-pr.outputs.NUM }} diff --git a/.github/workflows/pr-preflight.yaml b/.github/workflows/pr-preflight.yaml deleted file mode 100644 index 34ad7aed0..000000000 --- a/.github/workflows/pr-preflight.yaml +++ /dev/null @@ -1,39 +0,0 @@ -name: "Pull Request Preflight Check" - -on: - pull_request_target: - branches: - ["main"] - types: - ["opened", "synchronize", "reopened"] - -jobs: - test-pr: - name: "Test if pull request is valid" - if: ${{ github.event.action != 'closed' }} - runs-on: ubuntu-22.04 - outputs: - is_valid: ${{ steps.check-pr.outputs.VALID }} - permissions: - pull-requests: write - steps: - - name: "Get Invalid Hashes File" - id: hash - run: | - echo "json<> $GITHUB_OUTPUT - - name: "Check PR" - id: check-pr - uses: carpentries/actions/check-valid-pr@main - with: - pr: ${{ github.event.number }} - invalid: ${{ fromJSON(steps.hash.outputs.json)[github.repository] }} - fail_on_error: true - - name: "Comment result of validation" - id: comment-diff - if: ${{ always() }} - uses: carpentries/actions/comment-diff@main - with: - pr: ${{ github.event.number }} - body: ${{ steps.check-pr.outputs.MSG }} diff --git a/.github/workflows/pr-receive.yaml b/.github/workflows/pr-receive.yaml deleted file mode 100644 index 7fbff6cdd..000000000 --- a/.github/workflows/pr-receive.yaml +++ /dev/null @@ -1,132 +0,0 @@ -name: "Receive Pull Request" - -on: - pull_request: - types: - [opened, synchronize, reopened] - -concurrency: - group: ${{ github.ref }} - cancel-in-progress: true - -jobs: - test-pr: - name: "Record PR number" - if: ${{ github.event.action != 'closed' }} - runs-on: ubuntu-22.04 - outputs: - is_valid: ${{ steps.check-pr.outputs.VALID }} - steps: - - name: "Record PR number" - id: record - if: ${{ always() }} - run: | - echo ${{ github.event.number }} > ${{ github.workspace }}/NR # 2022-03-02: artifact name fixed to be NR - - name: "Upload PR number" - id: upload - if: ${{ always() }} - uses: actions/upload-artifact@v4 - with: - name: pr - path: ${{ github.workspace }}/NR - - name: "Get Invalid Hashes File" - id: hash - run: | - echo "json<> $GITHUB_OUTPUT - - name: "echo output" - run: | - echo "${{ steps.hash.outputs.json }}" - - name: "Check PR" - id: check-pr - uses: carpentries/actions/check-valid-pr@main - with: - pr: ${{ github.event.number }} - invalid: ${{ fromJSON(steps.hash.outputs.json)[github.repository] }} - - build-md-source: - name: "Build markdown source files if valid" - needs: test-pr - runs-on: ubuntu-22.04 - if: ${{ needs.test-pr.outputs.is_valid == 'true' }} - env: - GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} - RENV_PATHS_ROOT: ~/.local/share/renv/ - CHIVE: ${{ github.workspace }}/site/chive - PR: ${{ github.workspace }}/site/pr - MD: ${{ github.workspace }}/site/built - steps: - - name: "Check Out Main Branch" - uses: actions/checkout@v4 - - - name: "Check Out Staging Branch" - uses: actions/checkout@v4 - with: - ref: md-outputs - path: ${{ env.MD }} - - - name: "Set up R" - uses: r-lib/actions/setup-r@v2 - with: - use-public-rspm: true - install-r: false - - - name: "Set up Pandoc" - uses: r-lib/actions/setup-pandoc@v2 - - - name: "Setup Lesson Engine" - uses: carpentries/actions/setup-sandpaper@main - with: - cache-version: ${{ secrets.CACHE_VERSION }} - - - name: "Setup Package Cache" - uses: carpentries/actions/setup-lesson-deps@main - with: - cache-version: ${{ secrets.CACHE_VERSION }} - - - name: "Validate and Build Markdown" - id: build-site - run: | - sandpaper::package_cache_trigger(TRUE) - sandpaper::validate_lesson(path = '${{ github.workspace }}') - sandpaper:::build_markdown(path = '${{ github.workspace }}', quiet = FALSE) - shell: Rscript {0} - - - name: "Generate Artifacts" - id: generate-artifacts - run: | - sandpaper:::ci_bundle_pr_artifacts( - repo = '${{ github.repository }}', - pr_number = '${{ github.event.number }}', - path_md = '${{ env.MD }}', - path_pr = '${{ env.PR }}', - path_archive = '${{ env.CHIVE }}', - branch = 'md-outputs' - ) - shell: Rscript {0} - - - name: "Upload PR" - uses: actions/upload-artifact@v4 - with: - name: pr - path: ${{ env.PR }} - overwrite: true - - - name: "Upload Diff" - uses: actions/upload-artifact@v4 - with: - name: diff - path: ${{ env.CHIVE }} - retention-days: 1 - - - name: "Upload Build" - uses: actions/upload-artifact@v4 - with: - name: built - path: ${{ env.MD }} - retention-days: 1 - - - name: "Teardown" - run: sandpaper::reset_site() - shell: Rscript {0} diff --git a/.github/workflows/sandpaper-main.yaml b/.github/workflows/sandpaper-main.yaml deleted file mode 100644 index b3d1de8c8..000000000 --- a/.github/workflows/sandpaper-main.yaml +++ /dev/null @@ -1,64 +0,0 @@ -name: "01 Build and Deploy Site" - -on: - push: - branches: - - main - - master - schedule: - - cron: '0 0 * * 2' - workflow_dispatch: - inputs: - name: - description: 'Who triggered this build?' - required: true - default: 'Maintainer (via GitHub)' - reset: - description: 'Reset cached markdown files' - required: false - default: false - type: boolean -jobs: - full-build: - name: "Build Full Site" - - # 2024-10-01: ubuntu-latest is now 24.04 and R is not installed by default in the runner image - # pin to 22.04 for now - runs-on: ubuntu-22.04 - permissions: - checks: write - contents: write - pages: write - env: - GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} - RENV_PATHS_ROOT: ~/.local/share/renv/ - steps: - - - name: "Checkout Lesson" - uses: actions/checkout@v4 - - - name: "Set up R" - uses: r-lib/actions/setup-r@v2 - with: - use-public-rspm: true - install-r: false - - - name: "Set up Pandoc" - uses: r-lib/actions/setup-pandoc@v2 - - - name: "Setup Lesson Engine" - uses: carpentries/actions/setup-sandpaper@main - with: - cache-version: ${{ secrets.CACHE_VERSION }} - - - name: "Setup Package Cache" - uses: carpentries/actions/setup-lesson-deps@main - with: - cache-version: ${{ secrets.CACHE_VERSION }} - - - name: "Deploy Site" - run: | - reset <- "${{ github.event.inputs.reset }}" == "true" - sandpaper::package_cache_trigger(TRUE) - sandpaper:::ci_deploy(reset = reset) - shell: Rscript {0} diff --git a/.github/workflows/sandpaper-version.txt b/.github/workflows/sandpaper-version.txt deleted file mode 100644 index 084c7bd08..000000000 --- a/.github/workflows/sandpaper-version.txt +++ /dev/null @@ -1 +0,0 @@ -0.16.10 diff --git a/.github/workflows/update-cache.yaml b/.github/workflows/update-cache.yaml deleted file mode 100644 index a011c0c06..000000000 --- a/.github/workflows/update-cache.yaml +++ /dev/null @@ -1,125 +0,0 @@ -name: "03 Maintain: Update Package Cache" - -on: - workflow_dispatch: - inputs: - name: - description: 'Who triggered this build (enter github username to tag yourself)?' - required: true - default: 'monthly run' - schedule: - # Run every tuesday - - cron: '0 0 * * 2' - -jobs: - preflight: - name: "Preflight Check" - runs-on: ubuntu-22.04 - outputs: - ok: ${{ steps.check.outputs.ok }} - steps: - - id: check - run: | - if [[ ${{ github.event_name }} == 'workflow_dispatch' ]]; then - echo "ok=true" >> $GITHUB_OUTPUT - echo "Running on request" - # using single brackets here to avoid 08 being interpreted as octal - # https://github.com/carpentries/sandpaper/issues/250 - elif [ `date +%d` -le 7 ]; then - # If the Tuesday lands in the first week of the month, run it - echo "ok=true" >> $GITHUB_OUTPUT - echo "Running on schedule" - else - echo "ok=false" >> $GITHUB_OUTPUT - echo "Not Running Today" - fi - - check_renv: - name: "Check if We Need {renv}" - runs-on: ubuntu-22.04 - needs: preflight - if: ${{ needs.preflight.outputs.ok == 'true'}} - outputs: - needed: ${{ steps.renv.outputs.exists }} - steps: - - name: "Checkout Lesson" - uses: actions/checkout@v4 - - id: renv - run: | - if [[ -d renv ]]; then - echo "exists=true" >> $GITHUB_OUTPUT - fi - - check_token: - name: "Check SANDPAPER_WORKFLOW token" - runs-on: ubuntu-22.04 - needs: check_renv - if: ${{ needs.check_renv.outputs.needed == 'true' }} - outputs: - workflow: ${{ steps.validate.outputs.wf }} - repo: ${{ steps.validate.outputs.repo }} - steps: - - name: "validate token" - id: validate - uses: carpentries/actions/check-valid-credentials@main - with: - token: ${{ secrets.SANDPAPER_WORKFLOW }} - - update_cache: - name: "Update Package Cache" - needs: check_token - if: ${{ needs.check_token.outputs.repo== 'true' }} - runs-on: ubuntu-22.04 - env: - GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} - RENV_PATHS_ROOT: ~/.local/share/renv/ - steps: - - - name: "Checkout Lesson" - uses: actions/checkout@v4 - - - name: "Set up R" - uses: r-lib/actions/setup-r@v2 - with: - use-public-rspm: true - install-r: false - - - name: "Update {renv} deps and determine if a PR is needed" - id: update - uses: carpentries/actions/update-lockfile@main - with: - cache-version: ${{ secrets.CACHE_VERSION }} - - - name: Create Pull Request - id: cpr - if: ${{ steps.update.outputs.n > 0 }} - uses: carpentries/create-pull-request@main - with: - token: ${{ secrets.SANDPAPER_WORKFLOW }} - delete-branch: true - branch: "update/packages" - commit-message: "[actions] update ${{ steps.update.outputs.n }} packages" - title: "Update ${{ steps.update.outputs.n }} packages" - body: | - :robot: This is an automated build - - This will update ${{ steps.update.outputs.n }} packages in your lesson with the following versions: - - ``` - ${{ steps.update.outputs.report }} - ``` - - :stopwatch: In a few minutes, a comment will appear that will show you how the output has changed based on these updates. - - If you want to inspect these changes locally, you can use the following code to check out a new branch: - - ```bash - git fetch origin update/packages - git checkout update/packages - ``` - - - Auto-generated by [create-pull-request][1] on ${{ steps.update.outputs.date }} - - [1]: https://github.com/carpentries/create-pull-request/tree/main - labels: "type: package cache" - draft: false diff --git a/.github/workflows/update-workflows.yaml b/.github/workflows/update-workflows.yaml deleted file mode 100644 index 6414cf287..000000000 --- a/.github/workflows/update-workflows.yaml +++ /dev/null @@ -1,66 +0,0 @@ -name: "02 Maintain: Update Workflow Files" - -on: - workflow_dispatch: - inputs: - name: - description: 'Who triggered this build (enter github username to tag yourself)?' - required: true - default: 'weekly run' - clean: - description: 'Workflow files/file extensions to clean (no wildcards, enter "" for none)' - required: false - default: '.yaml' - schedule: - # Run every Tuesday - - cron: '0 0 * * 2' - -jobs: - check_token: - name: "Check SANDPAPER_WORKFLOW token" - runs-on: ubuntu-22.04 - outputs: - workflow: ${{ steps.validate.outputs.wf }} - repo: ${{ steps.validate.outputs.repo }} - steps: - - name: "validate token" - id: validate - uses: carpentries/actions/check-valid-credentials@main - with: - token: ${{ secrets.SANDPAPER_WORKFLOW }} - - update_workflow: - name: "Update Workflow" - runs-on: ubuntu-22.04 - needs: check_token - if: ${{ needs.check_token.outputs.workflow == 'true' }} - steps: - - name: "Checkout Repository" - uses: actions/checkout@v4 - - - name: Update Workflows - id: update - uses: carpentries/actions/update-workflows@main - with: - clean: ${{ github.event.inputs.clean }} - - - name: Create Pull Request - id: cpr - if: "${{ steps.update.outputs.new }}" - uses: carpentries/create-pull-request@main - with: - token: ${{ secrets.SANDPAPER_WORKFLOW }} - delete-branch: true - branch: "update/workflows" - commit-message: "[actions] update sandpaper workflow to version ${{ steps.update.outputs.new }}" - title: "Update Workflows to Version ${{ steps.update.outputs.new }}" - body: | - :robot: This is an automated build - - Update Workflows from sandpaper version ${{ steps.update.outputs.old }} -> ${{ steps.update.outputs.new }} - - - Auto-generated by [create-pull-request][1] on ${{ steps.update.outputs.date }} - - [1]: https://github.com/carpentries/create-pull-request/tree/main - labels: "type: template and tools" - draft: false diff --git a/.gitignore b/.gitignore deleted file mode 100644 index 34293534a..000000000 --- a/.gitignore +++ /dev/null @@ -1,56 +0,0 @@ -# sandpaper files -episodes/*html -site/* -!site/README.md - -# History files -.Rhistory -.Rapp.history -# Session Data files -.RData -# User-specific files -.Ruserdata -# Example code in package build process -*-Ex.R -# Output files from R CMD build -/*.tar.gz -# Output files from R CMD check -/*.Rcheck/ -# RStudio files -.Rproj.user/ -# produced vignettes -vignettes/*.html -vignettes/*.pdf -# OAuth2 token, see https://github.com/hadley/httr/releases/tag/v0.3 -.httr-oauth -# knitr and R markdown default cache directories -*_cache/ -/cache/ -# Temporary files created by R markdown -*.utf8.md -*.knit.md -# R Environment Variables -.Renviron -# pkgdown site -docs/ -# translation temp files -po/*~ -# renv detritus -renv/sandbox/ -*.pyc -*~ -.DS_Store -.ipynb_checkpoints -.sass-cache -.jekyll-cache/ -.jekyll-metadata -__pycache__ -_site -.Rproj.user -.bundle/ -.vendor/ -vendor/ -.docker-vendor/ -Gemfile.lock -.*history -.vscode/* diff --git a/.zenodo.json b/.zenodo.json deleted file mode 100644 index 47df82a33..000000000 --- a/.zenodo.json +++ /dev/null @@ -1,61 +0,0 @@ -{ - "contributors": [ - { - "type": "Editor", - "name": "Toby Hodges", - "orcid": "0000-0003-1766-456X" - }, - { - "type": "Editor", - "name": "Ulf Schiller", - "orcid": "0000-0001-8941-1284" - }, - { - "type": "Editor", - "name": "Robert Turner" - }, - { - "type": "Editor", - "name": "David Palmquist" - }, - { - "type": "Editor", - "name": "Kimberly Meechan", - "orcid": "0000-0003-4939-4170" - } - ], - "creators": [ - { - "name": "Ulf Schiller", - "orcid": "0000-0001-8941-1284" - }, - { - "name": "Robert Turner" - }, - { - "name": "Candace Makeda Moore" - }, - { - "name": "Marianne Corvellec", - "orcid": "0000-0002-1994-3581" - }, - { - "name": "Toby Hodges", - "orcid": "0000-0003-1766-456X" - }, - { - "name": "govekk" - }, - { - "name": " Ruobin Qi", - "orcid": "0000-0001-9072-9484" - }, - { - "name": "Marco Dalla Vecchia", - "orcid": "0000-0002-0192-8439" - } - ], - "license": { - "id": "CC-BY-4.0" - } -} diff --git a/episodes/01-introduction.md b/01-introduction.md similarity index 100% rename from episodes/01-introduction.md rename to 01-introduction.md diff --git a/episodes/02-image-basics.md b/02-image-basics.md similarity index 100% rename from episodes/02-image-basics.md rename to 02-image-basics.md diff --git a/episodes/03-skimage-images.md b/03-skimage-images.md similarity index 100% rename from episodes/03-skimage-images.md rename to 03-skimage-images.md diff --git a/episodes/04-drawing.md b/04-drawing.md similarity index 100% rename from episodes/04-drawing.md rename to 04-drawing.md diff --git a/episodes/05-creating-histograms.md b/05-creating-histograms.md similarity index 100% rename from episodes/05-creating-histograms.md rename to 05-creating-histograms.md diff --git a/episodes/06-blurring.md b/06-blurring.md similarity index 100% rename from episodes/06-blurring.md rename to 06-blurring.md diff --git a/episodes/07-thresholding.md b/07-thresholding.md similarity index 100% rename from episodes/07-thresholding.md rename to 07-thresholding.md diff --git a/episodes/08-connected-components.md b/08-connected-components.md similarity index 100% rename from episodes/08-connected-components.md rename to 08-connected-components.md diff --git a/episodes/09-challenges.md b/09-challenges.md similarity index 100% rename from episodes/09-challenges.md rename to 09-challenges.md diff --git a/AUTHORS b/AUTHORS deleted file mode 100644 index d59d5b86c..000000000 --- a/AUTHORS +++ /dev/null @@ -1 +0,0 @@ -Mark Meysenburg, mark.meysenburg@donae.edu diff --git a/CITATION b/CITATION deleted file mode 100644 index b638e5db3..000000000 --- a/CITATION +++ /dev/null @@ -1 +0,0 @@ -Image Processing workshop citation diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md deleted file mode 100644 index c46743eb7..000000000 --- a/CONTRIBUTING.md +++ /dev/null @@ -1,121 +0,0 @@ -## Contributing - -[The Carpentries][cp-site] ([Software Carpentry][swc-site], [Data -Carpentry][dc-site], and [Library Carpentry][lc-site]) are open source -projects, and we welcome contributions of all kinds: new lessons, fixes to -existing material, bug reports, and reviews of proposed changes are all -welcome. - -### Contributor Agreement - -By contributing, you agree that we may redistribute your work under [our -license](LICENSE.md). In exchange, we will address your issues and/or assess -your change proposal as promptly as we can, and help you become a member of our -community. Everyone involved in [The Carpentries][cp-site] agrees to abide by -our [code of conduct](CODE_OF_CONDUCT.md). - -### How to Contribute - -The easiest way to get started is to file an issue to tell us about a spelling -mistake, some awkward wording, or a factual error. This is a good way to -introduce yourself and to meet some of our community members. - -1. If you do not have a [GitHub][github] account, you can [send us comments by - email][contact]. However, we will be able to respond more quickly if you use - one of the other methods described below. - -2. If you have a [GitHub][github] account, or are willing to [create - one][github-join], but do not know how to use Git, you can report problems - or suggest improvements by [creating an issue][issues]. This allows us to - assign the item to someone and to respond to it in a threaded discussion. - -3. If you are comfortable with Git, and would like to add or change material, - you can submit a pull request (PR). Instructions for doing this are - [included below](#using-github). - -Note: if you want to build the website locally, please refer to [The Workbench -documentation][template-doc]. - -### Where to Contribute - -1. If you wish to change this lesson, add issues and pull requests here. -2. If you wish to change the template used for workshop websites, please refer - to [The Workbench documentation][template-doc]. - - -### What to Contribute - -There are many ways to contribute, from writing new exercises and improving -existing ones to updating or filling in the documentation and submitting [bug -reports][issues] about things that do not work, are not clear, or are missing. -If you are looking for ideas, please see [the list of issues for this -repository][repo], or the issues for [Data Carpentry][dc-issues], [Library -Carpentry][lc-issues], and [Software Carpentry][swc-issues] projects. - -Comments on issues and reviews of pull requests are just as welcome: we are -smarter together than we are on our own. **Reviews from novices and newcomers -are particularly valuable**: it's easy for people who have been using these -lessons for a while to forget how impenetrable some of this material can be, so -fresh eyes are always welcome. - -### What *Not* to Contribute - -Our lessons already contain more material than we can cover in a typical -workshop, so we are usually *not* looking for more concepts or tools to add to -them. As a rule, if you want to introduce a new idea, you must (a) estimate how -long it will take to teach and (b) explain what you would take out to make room -for it. The first encourages contributors to be honest about requirements; the -second, to think hard about priorities. - -We are also not looking for exercises or other material that only run on one -platform. Our workshops typically contain a mixture of Windows, macOS, and -Linux users; in order to be usable, our lessons must run equally well on all -three. - -### Using GitHub - -If you choose to contribute via GitHub, you may want to look at [How to -Contribute to an Open Source Project on GitHub][how-contribute]. In brief, we -use [GitHub flow][github-flow] to manage changes: - -1. Create a new branch in your desktop copy of this repository for each - significant change. -2. Commit the change in that branch. -3. Push that branch to your fork of this repository on GitHub. -4. Submit a pull request from that branch to the [upstream repository][repo]. -5. If you receive feedback, make changes on your desktop and push to your - branch on GitHub: the pull request will update automatically. - -NB: The published copy of the lesson is usually in the `main` branch. - -Each lesson has a team of maintainers who review issues and pull requests or -encourage others to do so. The maintainers are community volunteers, and have -final say over what gets merged into the lesson. - -### Other Resources - -The Carpentries is a global organisation with volunteers and learners all over -the world. We share values of inclusivity and a passion for sharing knowledge, -teaching and learning. There are several ways to connect with The Carpentries -community listed at including via social -media, slack, newsletters, and email lists. You can also [reach us by -email][contact]. - -[repo]: https://github.com/datacarpentry/image-processing -[contact]: mailto:team@carpentries.org -[cp-site]: https://carpentries.org/ -[dc-issues]: https://github.com/issues?q=user%3Adatacarpentry -[dc-lessons]: https://datacarpentry.org/lessons/ -[dc-site]: https://datacarpentry.org/ -[discuss-list]: https://lists.software-carpentry.org/listinfo/discuss -[github]: https://github.com -[github-flow]: https://guides.github.com/introduction/flow/ -[github-join]: https://github.com/join -[how-contribute]: https://egghead.io/courses/how-to-contribute-to-an-open-source-project-on-github -[issues]: https://carpentries.org/help-wanted-issues/ -[lc-issues]: https://github.com/issues?q=user%3ALibraryCarpentry -[swc-issues]: https://github.com/issues?q=user%3Aswcarpentry -[swc-lessons]: https://software-carpentry.org/lessons/ -[swc-site]: https://software-carpentry.org/ -[lc-site]: https://librarycarpentry.org/ -[template-doc]: https://carpentries.github.io/workbench/ diff --git a/README.md b/README.md deleted file mode 100644 index 0ee26a82f..000000000 --- a/README.md +++ /dev/null @@ -1,31 +0,0 @@ -[![Create a Slack Account with us](https://img.shields.io/badge/Create_Slack_Account-The_Carpentries-071159.svg)](https://slack-invite.carpentries.org/) -[![Slack Status](https://img.shields.io/badge/Slack_Channel-dc--image--processing-E01563.svg)](https://carpentries.slack.com/archives/C027H977ZGU) - -# Image Processing with Python - -A lesson teaching foundational image processing skills with Python and [scikit-image](https://scikit-image.org/). - -## Lesson Content - -This lesson introduces fundamental concepts in image handling and processing. Learners will gain the skills needed to load images into Python, to select, summarise, and modify specific regions in these image, and to identify and extract objects within an image for further analysis. - -The lesson assumes a working knowledge of Python and some previous exposure to the Bash shell. -A detailed list of prerequisites can be found in [`learners/prereqs.md`](learners/prereqs.md). - -## Contribution - -- Make a suggestion or correct an error by [raising an Issue](https://github.com/datacarpentry/image-processing/issues). - -## Code of Conduct - -All participants should agree to abide by the [The Carpentries Code of Conduct](https://docs.carpentries.org/topic_folders/policies/code-of-conduct.html). - -## Lesson Maintainers - -The Image Processing with Python lesson is currently being maintained by: - -- [Jacob Deppen](https://github.com/deppen8) -- [Kimberly Meechan](https://github.com/K-Meech) -- [Ulf Schiller](https://github.com/uschille) - -The lesson is built on content originally developed by [Mark Meysenburg](https://github.com/mmeysenburg), [Tessa Durham Brooks](https://github.com/tessalea), [Dominik Kutra](https://github.com/k-dominik), [Constantin Pape](https://github.com/constantinpape), and [Erin Becker](https://github.com/ebecker). diff --git a/episodes/data/beads.jpg b/data/beads.jpg similarity index 100% rename from episodes/data/beads.jpg rename to data/beads.jpg diff --git a/episodes/data/board.jpg b/data/board.jpg similarity index 100% rename from episodes/data/board.jpg rename to data/board.jpg diff --git a/episodes/data/centers.txt b/data/centers.txt similarity index 100% rename from episodes/data/centers.txt rename to data/centers.txt diff --git a/episodes/data/chair.jpg b/data/chair.jpg similarity index 100% rename from episodes/data/chair.jpg rename to data/chair.jpg diff --git a/episodes/data/colonies-01.tif b/data/colonies-01.tif similarity index 100% rename from episodes/data/colonies-01.tif rename to data/colonies-01.tif diff --git a/episodes/data/colonies-02.tif b/data/colonies-02.tif similarity index 100% rename from episodes/data/colonies-02.tif rename to data/colonies-02.tif diff --git a/episodes/data/colonies-03.tif b/data/colonies-03.tif similarity index 100% rename from episodes/data/colonies-03.tif rename to data/colonies-03.tif diff --git a/episodes/data/eight.tif b/data/eight.tif similarity index 100% rename from episodes/data/eight.tif rename to data/eight.tif diff --git a/episodes/data/gaussian-original.png b/data/gaussian-original.png similarity index 100% rename from episodes/data/gaussian-original.png rename to data/gaussian-original.png diff --git a/episodes/data/maize-root-cluster.jpg b/data/maize-root-cluster.jpg similarity index 100% rename from episodes/data/maize-root-cluster.jpg rename to data/maize-root-cluster.jpg diff --git a/episodes/data/maize-roots-grayscale.jpg b/data/maize-roots-grayscale.jpg similarity index 100% rename from episodes/data/maize-roots-grayscale.jpg rename to data/maize-roots-grayscale.jpg diff --git a/episodes/data/maize-seedlings.tif b/data/maize-seedlings.tif similarity index 100% rename from episodes/data/maize-seedlings.tif rename to data/maize-seedlings.tif diff --git a/episodes/data/plant-seedling.jpg b/data/plant-seedling.jpg similarity index 100% rename from episodes/data/plant-seedling.jpg rename to data/plant-seedling.jpg diff --git a/episodes/data/remote-control.jpg b/data/remote-control.jpg similarity index 100% rename from episodes/data/remote-control.jpg rename to data/remote-control.jpg diff --git a/episodes/data/shapes-01.jpg b/data/shapes-01.jpg similarity index 100% rename from episodes/data/shapes-01.jpg rename to data/shapes-01.jpg diff --git a/episodes/data/shapes-02.jpg b/data/shapes-02.jpg similarity index 100% rename from episodes/data/shapes-02.jpg rename to data/shapes-02.jpg diff --git a/episodes/data/sudoku.png b/data/sudoku.png similarity index 100% rename from episodes/data/sudoku.png rename to data/sudoku.png diff --git a/episodes/data/tree.jpg b/data/tree.jpg similarity index 100% rename from episodes/data/tree.jpg rename to data/tree.jpg diff --git a/episodes/data/trial-016.jpg b/data/trial-016.jpg similarity index 100% rename from episodes/data/trial-016.jpg rename to data/trial-016.jpg diff --git a/episodes/data/trial-020.jpg b/data/trial-020.jpg similarity index 100% rename from episodes/data/trial-020.jpg rename to data/trial-020.jpg diff --git a/episodes/data/trial-216.jpg b/data/trial-216.jpg similarity index 100% rename from episodes/data/trial-216.jpg rename to data/trial-216.jpg diff --git a/episodes/data/trial-293.jpg b/data/trial-293.jpg similarity index 100% rename from episodes/data/trial-293.jpg rename to data/trial-293.jpg diff --git a/episodes/data/wellplate-01.jpg b/data/wellplate-01.jpg similarity index 100% rename from episodes/data/wellplate-01.jpg rename to data/wellplate-01.jpg diff --git a/episodes/data/wellplate-02.tif b/data/wellplate-02.tif similarity index 100% rename from episodes/data/wellplate-02.tif rename to data/wellplate-02.tif diff --git a/learners/discuss.md b/discuss.md similarity index 100% rename from learners/discuss.md rename to discuss.md diff --git a/learners/edge-detection.md b/edge-detection.md similarity index 100% rename from learners/edge-detection.md rename to edge-detection.md diff --git a/episodes/fig/3D_petri_after_blurring.png b/fig/3D_petri_after_blurring.png similarity index 100% rename from episodes/fig/3D_petri_after_blurring.png rename to fig/3D_petri_after_blurring.png diff --git a/episodes/fig/3D_petri_before_blurring.png b/fig/3D_petri_before_blurring.png similarity index 100% rename from episodes/fig/3D_petri_before_blurring.png rename to fig/3D_petri_before_blurring.png diff --git a/episodes/fig/Gaussian_2D.png b/fig/Gaussian_2D.png similarity index 100% rename from episodes/fig/Gaussian_2D.png rename to fig/Gaussian_2D.png diff --git a/episodes/fig/Normal_Distribution_PDF.svg b/fig/Normal_Distribution_PDF.svg similarity index 100% rename from episodes/fig/Normal_Distribution_PDF.svg rename to fig/Normal_Distribution_PDF.svg diff --git a/episodes/fig/beads-canny-ui.png b/fig/beads-canny-ui.png similarity index 100% rename from episodes/fig/beads-canny-ui.png rename to fig/beads-canny-ui.png diff --git a/episodes/fig/beads-out.png b/fig/beads-out.png similarity index 100% rename from episodes/fig/beads-out.png rename to fig/beads-out.png diff --git a/episodes/fig/black-and-white-edge-pixels.jpg b/fig/black-and-white-edge-pixels.jpg similarity index 100% rename from episodes/fig/black-and-white-edge-pixels.jpg rename to fig/black-and-white-edge-pixels.jpg diff --git a/episodes/fig/black-and-white-gradient.png b/fig/black-and-white-gradient.png similarity index 100% rename from episodes/fig/black-and-white-gradient.png rename to fig/black-and-white-gradient.png diff --git a/episodes/fig/black-and-white.jpg b/fig/black-and-white.jpg similarity index 100% rename from episodes/fig/black-and-white.jpg rename to fig/black-and-white.jpg diff --git a/episodes/fig/blur-demo.gif b/fig/blur-demo.gif similarity index 100% rename from episodes/fig/blur-demo.gif rename to fig/blur-demo.gif diff --git a/episodes/fig/board-coordinates.jpg b/fig/board-coordinates.jpg similarity index 100% rename from episodes/fig/board-coordinates.jpg rename to fig/board-coordinates.jpg diff --git a/episodes/fig/board-final.jpg b/fig/board-final.jpg similarity index 100% rename from episodes/fig/board-final.jpg rename to fig/board-final.jpg diff --git a/episodes/fig/cartesian-coordinates.png b/fig/cartesian-coordinates.png similarity index 100% rename from episodes/fig/cartesian-coordinates.png rename to fig/cartesian-coordinates.png diff --git a/episodes/fig/cat-corner-blue.png b/fig/cat-corner-blue.png similarity index 100% rename from episodes/fig/cat-corner-blue.png rename to fig/cat-corner-blue.png diff --git a/episodes/fig/cat-eye-pixels.jpg b/fig/cat-eye-pixels.jpg similarity index 100% rename from episodes/fig/cat-eye-pixels.jpg rename to fig/cat-eye-pixels.jpg diff --git a/episodes/fig/cat.jpg b/fig/cat.jpg similarity index 100% rename from episodes/fig/cat.jpg rename to fig/cat.jpg diff --git a/episodes/fig/chair-layers-rgb.png b/fig/chair-layers-rgb.png similarity index 100% rename from episodes/fig/chair-layers-rgb.png rename to fig/chair-layers-rgb.png diff --git a/episodes/fig/chair-original.jpg b/fig/chair-original.jpg similarity index 100% rename from episodes/fig/chair-original.jpg rename to fig/chair-original.jpg diff --git a/episodes/fig/checkerboard-blue-channel.png b/fig/checkerboard-blue-channel.png similarity index 100% rename from episodes/fig/checkerboard-blue-channel.png rename to fig/checkerboard-blue-channel.png diff --git a/episodes/fig/checkerboard-green-channel.png b/fig/checkerboard-green-channel.png similarity index 100% rename from episodes/fig/checkerboard-green-channel.png rename to fig/checkerboard-green-channel.png diff --git a/episodes/fig/checkerboard-red-channel.png b/fig/checkerboard-red-channel.png similarity index 100% rename from episodes/fig/checkerboard-red-channel.png rename to fig/checkerboard-red-channel.png diff --git a/episodes/fig/checkerboard.png b/fig/checkerboard.png similarity index 100% rename from episodes/fig/checkerboard.png rename to fig/checkerboard.png diff --git a/episodes/fig/colonies-01-gray.png b/fig/colonies-01-gray.png similarity index 100% rename from episodes/fig/colonies-01-gray.png rename to fig/colonies-01-gray.png diff --git a/episodes/fig/colonies-01-histogram.png b/fig/colonies-01-histogram.png similarity index 100% rename from episodes/fig/colonies-01-histogram.png rename to fig/colonies-01-histogram.png diff --git a/episodes/fig/colonies-01-mask.png b/fig/colonies-01-mask.png similarity index 100% rename from episodes/fig/colonies-01-mask.png rename to fig/colonies-01-mask.png diff --git a/episodes/fig/colonies-01-summary.png b/fig/colonies-01-summary.png similarity index 100% rename from episodes/fig/colonies-01-summary.png rename to fig/colonies-01-summary.png diff --git a/episodes/fig/colonies-01.jpg b/fig/colonies-01.jpg similarity index 100% rename from episodes/fig/colonies-01.jpg rename to fig/colonies-01.jpg diff --git a/episodes/fig/colonies-02-summary.png b/fig/colonies-02-summary.png similarity index 100% rename from episodes/fig/colonies-02-summary.png rename to fig/colonies-02-summary.png diff --git a/episodes/fig/colonies-02.jpg b/fig/colonies-02.jpg similarity index 100% rename from episodes/fig/colonies-02.jpg rename to fig/colonies-02.jpg diff --git a/episodes/fig/colonies-03-summary.png b/fig/colonies-03-summary.png similarity index 100% rename from episodes/fig/colonies-03-summary.png rename to fig/colonies-03-summary.png diff --git a/episodes/fig/colonies-03.jpg b/fig/colonies-03.jpg similarity index 100% rename from episodes/fig/colonies-03.jpg rename to fig/colonies-03.jpg diff --git a/episodes/fig/colonies01.png b/fig/colonies01.png similarity index 100% rename from episodes/fig/colonies01.png rename to fig/colonies01.png diff --git a/episodes/fig/colony-mask.png b/fig/colony-mask.png similarity index 100% rename from episodes/fig/colony-mask.png rename to fig/colony-mask.png diff --git a/episodes/fig/colour-table.png b/fig/colour-table.png similarity index 100% rename from episodes/fig/colour-table.png rename to fig/colour-table.png diff --git a/episodes/fig/combination.png b/fig/combination.png similarity index 100% rename from episodes/fig/combination.png rename to fig/combination.png diff --git a/episodes/fig/drawing-practice.jpg b/fig/drawing-practice.jpg similarity index 100% rename from episodes/fig/drawing-practice.jpg rename to fig/drawing-practice.jpg diff --git a/episodes/fig/eight.png b/fig/eight.png similarity index 100% rename from episodes/fig/eight.png rename to fig/eight.png diff --git a/episodes/fig/five.png b/fig/five.png similarity index 100% rename from episodes/fig/five.png rename to fig/five.png diff --git a/episodes/fig/four-maize-roots-binary-improved.jpg b/fig/four-maize-roots-binary-improved.jpg similarity index 100% rename from episodes/fig/four-maize-roots-binary-improved.jpg rename to fig/four-maize-roots-binary-improved.jpg diff --git a/episodes/fig/four-maize-roots-binary.jpg b/fig/four-maize-roots-binary.jpg similarity index 100% rename from episodes/fig/four-maize-roots-binary.jpg rename to fig/four-maize-roots-binary.jpg diff --git a/episodes/fig/four-maize-roots.jpg b/fig/four-maize-roots.jpg similarity index 100% rename from episodes/fig/four-maize-roots.jpg rename to fig/four-maize-roots.jpg diff --git a/episodes/fig/gaussian-blurred.png b/fig/gaussian-blurred.png similarity index 100% rename from episodes/fig/gaussian-blurred.png rename to fig/gaussian-blurred.png diff --git a/episodes/fig/gaussian-kernel.png b/fig/gaussian-kernel.png similarity index 100% rename from episodes/fig/gaussian-kernel.png rename to fig/gaussian-kernel.png diff --git a/episodes/fig/grayscale.png b/fig/grayscale.png similarity index 100% rename from episodes/fig/grayscale.png rename to fig/grayscale.png diff --git a/episodes/fig/image-coordinates.png b/fig/image-coordinates.png similarity index 100% rename from episodes/fig/image-coordinates.png rename to fig/image-coordinates.png diff --git a/episodes/fig/jupyter_overview.png b/fig/jupyter_overview.png similarity index 100% rename from episodes/fig/jupyter_overview.png rename to fig/jupyter_overview.png diff --git a/episodes/fig/left-hand-coordinates.png b/fig/left-hand-coordinates.png similarity index 100% rename from episodes/fig/left-hand-coordinates.png rename to fig/left-hand-coordinates.png diff --git a/episodes/fig/maize-root-cluster-histogram.png b/fig/maize-root-cluster-histogram.png similarity index 100% rename from episodes/fig/maize-root-cluster-histogram.png rename to fig/maize-root-cluster-histogram.png diff --git a/episodes/fig/maize-root-cluster-mask.png b/fig/maize-root-cluster-mask.png similarity index 100% rename from episodes/fig/maize-root-cluster-mask.png rename to fig/maize-root-cluster-mask.png diff --git a/episodes/fig/maize-root-cluster-selected.png b/fig/maize-root-cluster-selected.png similarity index 100% rename from episodes/fig/maize-root-cluster-selected.png rename to fig/maize-root-cluster-selected.png diff --git a/episodes/fig/maize-root-cluster-threshold.jpg b/fig/maize-root-cluster-threshold.jpg similarity index 100% rename from episodes/fig/maize-root-cluster-threshold.jpg rename to fig/maize-root-cluster-threshold.jpg diff --git a/episodes/fig/maize-roots-threshold.png b/fig/maize-roots-threshold.png similarity index 100% rename from episodes/fig/maize-roots-threshold.png rename to fig/maize-roots-threshold.png diff --git a/episodes/fig/maize-seedling-enlarged.jpg b/fig/maize-seedling-enlarged.jpg similarity index 100% rename from episodes/fig/maize-seedling-enlarged.jpg rename to fig/maize-seedling-enlarged.jpg diff --git a/episodes/fig/maize-seedling-original.jpg b/fig/maize-seedling-original.jpg similarity index 100% rename from episodes/fig/maize-seedling-original.jpg rename to fig/maize-seedling-original.jpg diff --git a/episodes/fig/maize-seedlings-mask.png b/fig/maize-seedlings-mask.png similarity index 100% rename from episodes/fig/maize-seedlings-mask.png rename to fig/maize-seedlings-mask.png diff --git a/episodes/fig/maize-seedlings-masked.jpg b/fig/maize-seedlings-masked.jpg similarity index 100% rename from episodes/fig/maize-seedlings-masked.jpg rename to fig/maize-seedlings-masked.jpg diff --git a/episodes/fig/maize-seedlings.jpg b/fig/maize-seedlings.jpg similarity index 100% rename from episodes/fig/maize-seedlings.jpg rename to fig/maize-seedlings.jpg diff --git a/episodes/fig/petri-blurred-intensities-plot.png b/fig/petri-blurred-intensities-plot.png similarity index 100% rename from episodes/fig/petri-blurred-intensities-plot.png rename to fig/petri-blurred-intensities-plot.png diff --git a/episodes/fig/petri-dish.png b/fig/petri-dish.png similarity index 100% rename from episodes/fig/petri-dish.png rename to fig/petri-dish.png diff --git a/episodes/fig/petri-original-intensities-plot.png b/fig/petri-original-intensities-plot.png similarity index 100% rename from episodes/fig/petri-original-intensities-plot.png rename to fig/petri-original-intensities-plot.png diff --git a/episodes/fig/petri-selected-pixels-marker.png b/fig/petri-selected-pixels-marker.png similarity index 100% rename from episodes/fig/petri-selected-pixels-marker.png rename to fig/petri-selected-pixels-marker.png diff --git a/episodes/fig/plant-seedling-colour-histogram.png b/fig/plant-seedling-colour-histogram.png similarity index 100% rename from episodes/fig/plant-seedling-colour-histogram.png rename to fig/plant-seedling-colour-histogram.png diff --git a/episodes/fig/plant-seedling-grayscale-histogram-mask.png b/fig/plant-seedling-grayscale-histogram-mask.png similarity index 100% rename from episodes/fig/plant-seedling-grayscale-histogram-mask.png rename to fig/plant-seedling-grayscale-histogram-mask.png diff --git a/episodes/fig/plant-seedling-grayscale-histogram.png b/fig/plant-seedling-grayscale-histogram.png similarity index 100% rename from episodes/fig/plant-seedling-grayscale-histogram.png rename to fig/plant-seedling-grayscale-histogram.png diff --git a/episodes/fig/plant-seedling-grayscale.png b/fig/plant-seedling-grayscale.png similarity index 100% rename from episodes/fig/plant-seedling-grayscale.png rename to fig/plant-seedling-grayscale.png diff --git a/episodes/fig/quality-histogram.jpg b/fig/quality-histogram.jpg similarity index 100% rename from episodes/fig/quality-histogram.jpg rename to fig/quality-histogram.jpg diff --git a/episodes/fig/quality-jpg.jpg b/fig/quality-jpg.jpg similarity index 100% rename from episodes/fig/quality-jpg.jpg rename to fig/quality-jpg.jpg diff --git a/episodes/fig/quality-original.jpg b/fig/quality-original.jpg similarity index 100% rename from episodes/fig/quality-original.jpg rename to fig/quality-original.jpg diff --git a/episodes/fig/quality-tif.jpg b/fig/quality-tif.jpg similarity index 100% rename from episodes/fig/quality-tif.jpg rename to fig/quality-tif.jpg diff --git a/episodes/fig/rectangle-gaussian-blurred.png b/fig/rectangle-gaussian-blurred.png similarity index 100% rename from episodes/fig/rectangle-gaussian-blurred.png rename to fig/rectangle-gaussian-blurred.png diff --git a/episodes/fig/remote-control-masked.jpg b/fig/remote-control-masked.jpg similarity index 100% rename from episodes/fig/remote-control-masked.jpg rename to fig/remote-control-masked.jpg diff --git a/episodes/fig/shapes-01-areas-histogram.png b/fig/shapes-01-areas-histogram.png similarity index 100% rename from episodes/fig/shapes-01-areas-histogram.png rename to fig/shapes-01-areas-histogram.png diff --git a/episodes/fig/shapes-01-canny-edge-output.png b/fig/shapes-01-canny-edge-output.png similarity index 100% rename from episodes/fig/shapes-01-canny-edge-output.png rename to fig/shapes-01-canny-edge-output.png diff --git a/episodes/fig/shapes-01-canny-edges.png b/fig/shapes-01-canny-edges.png similarity index 100% rename from episodes/fig/shapes-01-canny-edges.png rename to fig/shapes-01-canny-edges.png diff --git a/episodes/fig/shapes-01-canny-track-edges.png b/fig/shapes-01-canny-track-edges.png similarity index 100% rename from episodes/fig/shapes-01-canny-track-edges.png rename to fig/shapes-01-canny-track-edges.png diff --git a/episodes/fig/shapes-01-cca-detail.png b/fig/shapes-01-cca-detail.png similarity index 100% rename from episodes/fig/shapes-01-cca-detail.png rename to fig/shapes-01-cca-detail.png diff --git a/episodes/fig/shapes-01-filtered-objects.png b/fig/shapes-01-filtered-objects.png similarity index 100% rename from episodes/fig/shapes-01-filtered-objects.png rename to fig/shapes-01-filtered-objects.png diff --git a/episodes/fig/shapes-01-grayscale.png b/fig/shapes-01-grayscale.png similarity index 100% rename from episodes/fig/shapes-01-grayscale.png rename to fig/shapes-01-grayscale.png diff --git a/episodes/fig/shapes-01-histogram.png b/fig/shapes-01-histogram.png similarity index 100% rename from episodes/fig/shapes-01-histogram.png rename to fig/shapes-01-histogram.png diff --git a/episodes/fig/shapes-01-labeled.png b/fig/shapes-01-labeled.png similarity index 100% rename from episodes/fig/shapes-01-labeled.png rename to fig/shapes-01-labeled.png diff --git a/episodes/fig/shapes-01-mask.png b/fig/shapes-01-mask.png similarity index 100% rename from episodes/fig/shapes-01-mask.png rename to fig/shapes-01-mask.png diff --git a/episodes/fig/shapes-01-objects-coloured-by-area.png b/fig/shapes-01-objects-coloured-by-area.png similarity index 100% rename from episodes/fig/shapes-01-objects-coloured-by-area.png rename to fig/shapes-01-objects-coloured-by-area.png diff --git a/episodes/fig/shapes-01-selected.png b/fig/shapes-01-selected.png similarity index 100% rename from episodes/fig/shapes-01-selected.png rename to fig/shapes-01-selected.png diff --git a/episodes/fig/shapes-02-histogram.png b/fig/shapes-02-histogram.png similarity index 100% rename from episodes/fig/shapes-02-histogram.png rename to fig/shapes-02-histogram.png diff --git a/episodes/fig/shapes-02-mask.png b/fig/shapes-02-mask.png similarity index 100% rename from episodes/fig/shapes-02-mask.png rename to fig/shapes-02-mask.png diff --git a/episodes/fig/shapes-02-selected.png b/fig/shapes-02-selected.png similarity index 100% rename from episodes/fig/shapes-02-selected.png rename to fig/shapes-02-selected.png diff --git a/episodes/fig/sudoku-gray.png b/fig/sudoku-gray.png similarity index 100% rename from episodes/fig/sudoku-gray.png rename to fig/sudoku-gray.png diff --git a/episodes/fig/three-colours.png b/fig/three-colours.png similarity index 100% rename from episodes/fig/three-colours.png rename to fig/three-colours.png diff --git a/episodes/fig/wellplate-01-masked.jpg b/fig/wellplate-01-masked.jpg similarity index 100% rename from episodes/fig/wellplate-01-masked.jpg rename to fig/wellplate-01-masked.jpg diff --git a/episodes/fig/wellplate-02-histogram.png b/fig/wellplate-02-histogram.png similarity index 100% rename from episodes/fig/wellplate-02-histogram.png rename to fig/wellplate-02-histogram.png diff --git a/episodes/fig/wellplate-02-masked.jpg b/fig/wellplate-02-masked.jpg similarity index 100% rename from episodes/fig/wellplate-02-masked.jpg rename to fig/wellplate-02-masked.jpg diff --git a/episodes/fig/wellplate-02.jpg b/fig/wellplate-02.jpg similarity index 100% rename from episodes/fig/wellplate-02.jpg rename to fig/wellplate-02.jpg diff --git a/episodes/fig/zero.png b/fig/zero.png similarity index 100% rename from episodes/fig/zero.png rename to fig/zero.png diff --git a/files/assets/dc-logo-white.svg b/files/assets/dc-logo-white.svg new file mode 100644 index 000000000..7336a5d28 --- /dev/null +++ b/files/assets/dc-logo-white.svg @@ -0,0 +1,34 @@ + + + + diff --git a/files/assets/fixed_cells_masked.png b/files/assets/fixed_cells_masked.png new file mode 100644 index 000000000..fc7272a3c Binary files /dev/null and b/files/assets/fixed_cells_masked.png differ diff --git a/episodes/files/cheatsheet.html b/files/cheatsheet.html similarity index 100% rename from episodes/files/cheatsheet.html rename to files/cheatsheet.html diff --git a/episodes/files/cheatsheet.pdf b/files/cheatsheet.pdf similarity index 100% rename from episodes/files/cheatsheet.pdf rename to files/cheatsheet.pdf diff --git a/image-processing.Rproj b/image-processing.Rproj deleted file mode 100644 index aecd28b8b..000000000 --- a/image-processing.Rproj +++ /dev/null @@ -1,18 +0,0 @@ -Version: 1.0 - -RestoreWorkspace: Default -SaveWorkspace: Default -AlwaysSaveHistory: Default - -EnableCodeIndexing: Yes -UseSpacesForTab: Yes -NumSpacesForTab: 2 -Encoding: UTF-8 - -RnwWeave: Sweave -LaTeX: pdfLaTeX - -AutoAppendNewline: Yes -StripTrailingWhitespace: Yes - -BuildType: Website diff --git a/instructors/instructor-notes.md b/instructor-notes.md similarity index 100% rename from instructors/instructor-notes.md rename to instructor-notes.md diff --git a/profiles/learner-profiles.md b/learner-profiles.md similarity index 100% rename from profiles/learner-profiles.md rename to learner-profiles.md diff --git a/md5sum.txt b/md5sum.txt new file mode 100644 index 000000000..afd622fc8 --- /dev/null +++ b/md5sum.txt @@ -0,0 +1,21 @@ +"file" "checksum" "built" "date" +"CODE_OF_CONDUCT.md" "c93c83c630db2fe2462240bf72552548" "site/built/CODE_OF_CONDUCT.md" "2023-04-25" +"LICENSE.md" "b24ebbb41b14ca25cf6b8216dda83e5f" "site/built/LICENSE.md" "2023-04-25" +"config.yaml" "101b3ac4b679126bb1f437306eb1b836" "site/built/config.yaml" "2023-04-25" +"index.md" "6e80c662708984307918adfad711e15f" "site/built/index.md" "2023-07-26" +"episodes/01-introduction.md" "4fe9db38f75f93b3ffbdb3115d36b802" "site/built/01-introduction.md" "2024-11-28" +"episodes/02-image-basics.md" "e96045fe38777bd24cf11b76464f2eca" "site/built/02-image-basics.md" "2024-12-01" +"episodes/03-skimage-images.md" "d7890de460222e8cdf461c76cba37692" "site/built/03-skimage-images.md" "2024-06-07" +"episodes/04-drawing.md" "48b42ee384b5b907d9f9b93ad0e98ce8" "site/built/04-drawing.md" "2024-06-07" +"episodes/05-creating-histograms.md" "4abbd123ba97d63c795398be6f6b7621" "site/built/05-creating-histograms.md" "2024-03-14" +"episodes/06-blurring.md" "894ff33379584a8ee777f779564d5b01" "site/built/06-blurring.md" "2024-06-18" +"episodes/07-thresholding.md" "4d34b89c8cd33cb6bb54103f805a39b9" "site/built/07-thresholding.md" "2024-03-12" +"episodes/08-connected-components.md" "f599af69b770c7234a4e7d4a06a7f6dd" "site/built/08-connected-components.md" "2024-11-13" +"episodes/09-challenges.md" "3e95485b1bae2c37538830225ea26598" "site/built/09-challenges.md" "2024-03-12" +"instructors/instructor-notes.md" "e8e378a5dfaec7b2873d788be85003ce" "site/built/instructor-notes.md" "2024-06-18" +"learners/discuss.md" "ad762c335f99400dc2cd1a8aad36bdbd" "site/built/discuss.md" "2023-07-26" +"learners/edge-detection.md" "fdbcee7436e104e6587e1cb40cd37d18" "site/built/edge-detection.md" "2023-08-16" +"learners/prereqs.md" "7ca883d3d01d18c98ce7524ed297e56c" "site/built/prereqs.md" "2023-07-26" +"learners/reference.md" "7ae9deea84007c6ed1339955ac23f4b7" "site/built/reference.md" "2023-04-26" +"learners/setup.md" "7edbbef5b2cb020d40d88c9cb0dcd98f" "site/built/setup.md" "2023-12-19" +"profiles/learner-profiles.md" "60b93493cf1da06dfd63255d73854461" "site/built/learner-profiles.md" "2023-04-25" diff --git a/learners/prereqs.md b/prereqs.md similarity index 100% rename from learners/prereqs.md rename to prereqs.md diff --git a/learners/reference.md b/reference.md similarity index 100% rename from learners/reference.md rename to reference.md diff --git a/learners/setup.md b/setup.md similarity index 100% rename from learners/setup.md rename to setup.md diff --git a/site/README.md b/site/README.md deleted file mode 100644 index 42997e3d0..000000000 --- a/site/README.md +++ /dev/null @@ -1,2 +0,0 @@ -This directory contains rendered lesson materials. Please do not edit files -here.