-
Notifications
You must be signed in to change notification settings - Fork 25
Formative feedback #5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
…from paste() so we need to use paste0()
…ts arent working now
…res but there are still errors
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is an odd commit! Seems to have deleted the whole file and then replaced it with one extra line...Check what is to be commit with git diff and unwind if needed.
R/todo.R
Outdated
|
|
||
| tasks <- readLines(TASK_FILE) | ||
| } | ||
| print(tasks) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Try not to commit testing chnages
R/todo.R
Outdated
|
|
||
| #remember to change where .tasks is going | ||
| list_tasks <- function() { | ||
| counter <- 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
R/todo.R
Outdated
| tasks <- readLines(TASK_FILE) | ||
| for (item in tasks) { | ||
| output_string <- paste(output_string, counter, item) | ||
| output_string <- paste(output_string, counter, item, "\n" ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't match the commit message...
| counter <- 1 | ||
| output_string <- "" | ||
| tasks <- readLines(TASK_FILE) | ||
| num_tasks <- length(tasks) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good. Make the commit message something more like "List_tasks function complete and passing test", as the current message is vague
R/todo.R
Outdated
| remove_task <- function(index) { | ||
|
|
||
| tasks <- readLines(TASK_FILE) | ||
| task_removed <- tasks[-1] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't commit temporary stuff unless you're switching computers and need to push
R/todo.R
Outdated
|
|
||
|
|
||
| main <- function(args) { | ||
| #main <- function(args) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't commit commented out code, even temporarily.
| tasks <- readLines(TASK_FILE) | ||
| if (index < length(tasks)) | ||
| tasks <- tasks[-index] | ||
| if (length(tasks) == 0) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good!
| library(argparse) | ||
| }) | ||
|
|
||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use # nolint to not lint a line (e.g. line 14). You should be able to return null or NA
|
@kkx504 COmmetns above and inline. Nice work! |
Nice work! The code is easy to read and understandable with good comments.
To improve further:
Great stuff, well done.