-
Notifications
You must be signed in to change notification settings - Fork 5
/
README.qmd
125 lines (94 loc) · 4.14 KB
/
README.qmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
---
format: gfm
embed-resources: true
---
# PHS 7045: Advanced Programming
Welcome to Advanced Programming in R and HPC! You can find the syllabus [here](https://github.com/UofUEpiBio/PHS7045-advanced-programming/tree/main/syllabus.md). Readings for the week can be found in the GitHub issues associated with them.
## Contents
```{r}
#| echo: false
#| warning: false
#| results: "asis"
library(data.table)
dat <- fread("pages.csv")
urlgit <- "https://github.com/UofUEpiBio/PHS7045-advanced-programming/"
urlraw <- "https://UofUEpiBio.github.io/PHS7045-advanced-programming"
dat[, has_lecture := file.exists(sprintf("%s/slides.html", id))]
dat[, has_lecture_source := file.exists(sprintf("%s/slides.qmd", id))]
dat[, has_lab := file.exists(sprintf("%s/lab.html", id))]
dat[, has_lab_source := file.exists(sprintf("%s/lab.qmd", id))]
# Iterating through the weeks
weeks <- sort(unique(dat$week))
tab <- NULL
for (i in 1:nrow(dat)) {
# Adding the entry to the table
tab <- rbind(
tab,
with(dat[i,,drop=FALSE], data.frame(
Week = date,
# Title of the week
Title = fifelse(
!is.na(issue),
sprintf(
"%s (Issue [%i](%s/issues/%i))",
name, issue, urlgit, issue
),
sprintf("%s", name)
),
# Lecture links
Lecture = if (has_lecture & has_lecture_source) {
sprintf(
"[slides](%s/%s/slides.html) ([source](%s/tree/main/%s/slides.qmd))",
urlraw, id, urlgit, id
)
} else {""},
# Lab links
Lab = if (has_lab & has_lab_source) {
sprintf(
"[lab](%s/%s/lab.html) ([source](%s/tree/main/%s/lab.qmd))",
urlraw, id, urlgit, id
)
} else {""}
)
))
if (!is.na(dat[i,,drop=FALSE]$extra) && (dat[i,,drop=FALSE]$extra != ""))
tab[nrow(tab),]$Title <- paste(
tab[nrow(tab),]$Title,
dat[i,,drop=FALSE]$extra
)
}
knitr::kable(tab, row.names = FALSE)
```
## Assignment workflow
Assignment materials will be distributed in a single compressed file (usually zip) for each assignment. Once the assignment materials are
available, the students are required to do the following:
1. Download the compressed file and extract its contents into an empty folder.
2. Initialize the folder as a git repository, add its contents, and make
the first commit.
3. Create a new repository in Github.com (under your account) and push your local repo into it. The name of the repository should be [name of the compressed file]-[your GitHub username]
You can start working on your assignment! We recommend pushing your changes as much as possible (it is good practice). As soon as you finish your assignment, you will have to ping one of the instructors in your commit message, for example:
```sh
git commit -a -m "Assignment done @gvegayon and @chipmanj"
```
This way @gvegayon and @chipmanj will receive a notification about this assignment. Furthermore, we encourage you to use other GitHub resources, such as adding the URL of [GitHub issue]() regarding that assignment, for example, if you include the following link in your commit message:
```
git commit -a -m "Assignment done https://github.com/UofUEpiBio/PHS7045-advanced-programming/issues/17"
```
Issue #17 in the PHS7045 website will now include a link to your commit. A similar thing can be done by cross-referencing an issue; this is, if you create a new issue in your repository and include the same link (https://github.com/UofUEpiBio/PM566/issues/17), the issue will be shown in #17 as cross-referenced.
## Example
For week #3, we will distribute a zip file named `week3-assignment.zip`. Using the command line, you can do all the previous steps as follows:
```sh
cd ~
wget github.com/UofUEpiBio/PHS7045-advanced-programming/raw/master/assignments/week3-assignment.zip
unzip week3-assignment.zip -d week3-assignment-gvegayon
cd week3-assignment-gvegayon
git init
git add .
git commit -a -m "Initial commit"
```
You still need to go to Github.com to create the new repository. Assuming you do that successfully, we continue:
```sh
git remote add origin git@github.com:gvegayon/week3-assignment-gvegayon.git
git push -u origin master
```
And you are done!