Skip to content

Commit

Permalink
markdown source builds
Browse files Browse the repository at this point in the history
Auto-generated via {sandpaper}
Source  : 91116c2
Branch  : main
Author  : Alexis Lucattini <[email protected]>
Time    : 2024-05-08 22:35:30 +0000
Message : Merge pull request #26 from umccr/enhancement/add-github-section

Added setup section on using github
  • Loading branch information
actions-user committed May 8, 2024
1 parent 2bee07c commit 4838fcf
Show file tree
Hide file tree
Showing 4 changed files with 200 additions and 9 deletions.
35 changes: 31 additions & 4 deletions files/data_setup.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,34 @@ You will need to download some example files for this lesson. In this tutorial w
### Setting up a practice Git repository

For this tutorial some existing tools are needed to build the workflow. These existing tools will be imported via GitHub.
First we need to create an empty git repository for all our files. To do this, use this command:


#### Make a repository on GitHub.com

Head to [github.com/new][github_new_repo] and create a new repository.

Name it `novice-tutorial-exercises`.

Make sure the repository is `public`.

Check 'Add a README file', and choose `GNU General Public License v3.0` as your license.

#### Clone the repository

```bash
git init novice-tutorial-exercises
git clone [email protected]/YOUR_GITHUB_USERNAME/novice-tutorial-exercises
```

Next, we need to move into our empty git repo:
Next, we need to move into our git repo:

```bash
cd novice-tutorial-exercises
```

<br>

#### Add in bio-cwl-tools as a submodule

Then import bio-cwl-tools with this command:

```bash
Expand All @@ -25,6 +41,7 @@ git submodule add https://github.com/common-workflow-library/bio-cwl-tools.git

<br>


### Downloading sample and reference data

Create a new directory inside the `novice-tutorial-exercises` directory and download the data:
Expand Down Expand Up @@ -61,6 +78,16 @@ We should exclude the rnaseq folder from being tracked in this repository.
echo 'rnaseq/' >> .gitignore
```

### Add .gitignore to git

`.gitignore` is a file that is tracked like all other GitHub commands.

```
git add .gitignore
git commit -m "Don't track files in the rnaseq directory"
git push
```

<br>

### STAR Genome index
Expand Down Expand Up @@ -303,4 +330,4 @@ Then retry the `md5sum` command

[dos2unix]: https://phoenixnap.com/kb/convert-dos-to-unix
[checksum_wiki]: https://en.wikipedia.org/wiki/Checksum

[github_new_repo]: https://github.com/new
67 changes: 67 additions & 0 deletions files/github.Rmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
## GitHub Requirements

This part assumes you have a GitHub.com account.

If you do not have a GitHub.com account you can create one [here][github_signup]

The following steps will take you through the process of creating a SSH key pair to
connect your terminal to GitHub. If you already have this set up, you may skip this part.


:::::::::::::::::: callout


### Opening files from the terminal

Whenever you are required to open a file from the terminal, you may type `code /path/to/file`.

This will also create the file if it does not yet exist.

::::::::::::::::::


### SSH Key

After generating an account you will need to generate an SSH Key so that you can pull and push code from your terminal to GitHub.

In your terminal run the following command

```
# Create the .ssh directory
mkdir -p --mode 700 ~/.ssh
ssh-keygen -f ~/.ssh/github -t ed25519 -q -N ""
```

### Add your public key to GitHub

Head to [GitHub SSH and GPG keys][github_settings].

Click `New SSH key`.
set the title as the name of your computer (this can be anything), and under the 'Key',
copy the contents of `~/.ssh/github.pub` from your terminal.

### Setting your SSH Config

Open up `~/.ssh/config` and add in the following code chunk:

```
Host github.com
IdentityFile /home/YOUR_USER_NAME/.ssh/github
User git
```

### Test your connection

```
ssh -T [email protected]
```

You should see a message like so

```
Hi alexiswl! You've successfully authenticated, but GitHub does not provide shell access.
```

[github_signup]: https://github.com/signup
[github_settings]: https://github.com/settings/keys
2 changes: 1 addition & 1 deletion md5sum.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"episodes/addendum-01-debug.Rmd" "3ce548abd8cb1934aa12b16cd62104e3" "site/built/addendum-01-debug.md" "2024-05-08"
"episodes/more_info.md" "b97f3b7186f568f33352041b7e2449ff" "site/built/more_info.md" "2024-05-08"
"instructors/instructor-notes.md" "cae72b6712578d74a49fea7513099f8c" "site/built/instructor-notes.md" "2024-05-08"
"learners/setup.Rmd" "cd2c452313fbbb2db56ed77768f8f2a8" "site/built/setup.md" "2024-05-08"
"learners/setup.Rmd" "6020a6e393ac568a958d4a536d063984" "site/built/setup.md" "2024-05-08"
"old_carpentries_incubator/404.md" "5e864846045fca3e8d82fa69eaefa5f0" "site/built/404.md" "2024-05-08"
"old_carpentries_incubator/aio.md" "18553f83976668567aa30777afd7c719" "site/built/aio.md" "2024-05-08"
"old_carpentries_incubator/reference.md" "0e582dab8c7f586fb96bb1dcf1ca6b4c" "site/built/reference.md" "2024-05-08"
Expand Down
105 changes: 101 additions & 4 deletions setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -501,25 +501,111 @@ docker pull quay.io/biocontainers/subread:2.0.6--he4a0461_0
```



## GitHub Requirements

This part assumes you have a GitHub.com account.

If you do not have a GitHub.com account you can create one [here][github_signup]

The following steps will take you through the process of creating a SSH key pair to
connect your terminal to GitHub. If you already have this set up, you may skip this part.


:::::::::::::::::: callout


### Opening files from the terminal

Whenever you are required to open a file from the terminal, you may type `code /path/to/file`.

This will also create the file if it does not yet exist.

::::::::::::::::::


### SSH Key

After generating an account you will need to generate an SSH Key so that you can pull and push code from your terminal to GitHub.

In your terminal run the following command

```
# Create the .ssh directory
mkdir -p --mode 700 ~/.ssh
ssh-keygen -f ~/.ssh/github -t ed25519 -q -N ""
```

### Add your public key to GitHub

Head to [GitHub SSH and GPG keys][github_settings].

Click `New SSH key`.
set the title as the name of your computer (this can be anything), and under the 'Key',
copy the contents of `~/.ssh/github.pub` from your terminal.

### Setting your SSH Config

Open up `~/.ssh/config` and add in the following code chunk:

```
Host github.com
IdentityFile /home/YOUR_USER_NAME/.ssh/github
User git
```

### Test your connection

```
ssh -T [email protected]
```

You should see a message like so

```
Hi alexiswl! You've successfully authenticated, but GitHub does not provide shell access.
```

[github_signup]: https://github.com/signup
[github_settings]: https://github.com/settings/keys


## Data Requirements

You will need to download some example files for this lesson. In this tutorial we will use RNA sequencing data.

### Setting up a practice Git repository

For this tutorial some existing tools are needed to build the workflow. These existing tools will be imported via GitHub.
First we need to create an empty git repository for all our files. To do this, use this command:


#### Make a repository on GitHub.com

Head to [github.com/new][github_new_repo] and create a new repository.

Name it `novice-tutorial-exercises`.

Make sure the repository is `public`.

Check 'Add a README file', and choose `GNU General Public License v3.0` as your license.

#### Clone the repository

```bash
git init novice-tutorial-exercises
git clone [email protected]/YOUR_GITHUB_USERNAME/novice-tutorial-exercises
```

Next, we need to move into our empty git repo:
Next, we need to move into our git repo:

```bash
cd novice-tutorial-exercises
```

<br>

#### Add in bio-cwl-tools as a submodule

Then import bio-cwl-tools with this command:

```bash
Expand All @@ -528,6 +614,7 @@ git submodule add https://github.com/common-workflow-library/bio-cwl-tools.git

<br>


### Downloading sample and reference data

Create a new directory inside the `novice-tutorial-exercises` directory and download the data:
Expand Down Expand Up @@ -564,6 +651,16 @@ We should exclude the rnaseq folder from being tracked in this repository.
echo 'rnaseq/' >> .gitignore
```

### Add .gitignore to git

`.gitignore` is a file that is tracked like all other GitHub commands.

```
git add .gitignore
git commit -m "Don't track files in the rnaseq directory"
git push
```

<br>

### STAR Genome index
Expand Down Expand Up @@ -806,4 +903,4 @@ Then retry the `md5sum` command

[dos2unix]: https://phoenixnap.com/kb/convert-dos-to-unix
[checksum_wiki]: https://en.wikipedia.org/wiki/Checksum

[github_new_repo]: https://github.com/new

0 comments on commit 4838fcf

Please sign in to comment.