Skip to content

Commit

Permalink
Merge pull request #28 from czi-catalystproject/episode-4-exercises
Browse files Browse the repository at this point in the history
Add Episode 4 exercises after review
  • Loading branch information
jnywong authored Feb 14, 2024
2 parents b445099 + 3b10899 commit 8adfd4a
Show file tree
Hide file tree
Showing 3 changed files with 62 additions and 3 deletions.
1 change: 1 addition & 0 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ parse:
- replacements
- smartquotes
- substitution
- tasklist

sphinx:
extra_extensions:
Expand Down
64 changes: 61 additions & 3 deletions episodes/transfer_data.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,71 @@ Objectives

## Exercises

::::{dropdown} Challenge Title
::::{dropdown} What should you store in your home directory?
:open:

Challenge content
Select all that apply:

- [ ] Notebooks
- [ ] Code
- [ ] Large and/or shared datasets with read-write permissions
- [ ] Text files
- [ ] Small datasets
- [ ] Configuration files
- [ ] Read-only datasets, e.g for teaching
- [ ] Temporary data, e.g. intermediate results from a calculation

:::{dropdown} Solution

- [x] Notebooks
- [x] Code
- [ ] Large and/or shared datasets with read-write permissions – *consider using Cloud Object Storage or other cloud-native storage solutions*
- [x] Text files
- [x] Small datasets
- [x] Configuration files
- [ ] Read-only datasets, e.g for teaching – *consider placing these files in the `~/shared` directory*
- [ ] Temporary data, e.g. intermediate results from a calculation – *consider using the `/tmp` directory*

:::

::::

:::{dropdown} Data requirements
:open:

Think about the data that you or your community require for your/their work.

- What type of data is it? E.g. tabular data (.csv, .xls), images (.png, .jpg, .bmp), other scientific data formats (.h5, .nc, .fastq)
- How large is a typical dataset?
- Where is the data stored?
- Is the same dataset used by a group of collaborators?

Write up your thoughts in our shared collaborative document.

:::

::::{dropdown} Push GitHub code
:open:

You use the Git JupyterLab extension to push code to a remote repository on GitHub and the following box opens:

:::{image} ../media/episodes/transfer_data/gh-credentials.png
:alt: Information box asking for GitHub credentials such as username and Personal Access Token.
:width: 80%
:align: center

:::

<br>

What should you do?

1. Enter your GitHub username and Personal Access Token as requested, then click *Save my login temporarily*
1. Click *Cancel*, open a Terminal, enter the command `gh-scoped-creds` and follow the prompt

:::{dropdown} Solution
Solution content

The correct answer is 2 – never enter your GitHub credentials (GitHub password, personal access tokens or otherwise) on any kind of shared infrastructure (e.g. private and public cloud, HPC, any remote machine) as this information will be at risk.

:::

Expand Down
Binary file added media/episodes/transfer_data/gh-credentials.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 8adfd4a

Please sign in to comment.