-
Notifications
You must be signed in to change notification settings - Fork 0
Assignment #7
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?
Assignment #7
Conversation
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.
Autograder results
| question | status | comment |
|---|---|---|
| Part 1 - Q1 | ✅ | |
| Part 1 - Q2 | ❌ | rawdata not moved to data/raw |
| Part 1 - Q3 | ✅ | |
| Part 1 - Q4 | ✅ | |
| Part 1 - Q5 | ❌ | No server log files in data/raw |
| Part 1 - Q6 | ❌ | No user log files in data/raw; No event log files in data/raw |
| Part 1 - Q7 | ✅ | |
| Part 1 - Q8 | ❌ | data/inventory.txt does not exist |
| Part 2 | ✅ |
Please address the issues listed above.
|
Hello, everything that the Autograder is marking as incorrect is present within the code and is happening in the folder. I've added a lot of extra commands in just to make it clear as possible but the Autograder isn't registering textfiles of directories that are there. |
| cd data | ||
| mkdir raw | ||
| cd ~/Desktop/DSI_assignment1/shell/02_activities/assignments | ||
| unzip -q rawdata.zip |
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.
Line 26 already unzips the rawdata.zip file, you don't need to do it again.
| cd ~/Desktop/DSI_assignment1/shell/02_activities/assignments | ||
| unzip -q rawdata.zip | ||
| mv ./rawdata/* ./newproject/data/raw/ | ||
| mv ./rawdata/ ./newproject/data/raw/ |
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.
In line number 38, you moved the contents of rawdata into raw, which makes sense, but in line 39 now you moved the newly emptied out folder "rawdata" into the "raw" folder which is the reason behind the missing point.
|
|
||
| cd data | ||
| mkdir raw | ||
| cd ~/Desktop/DSI_assignment1/shell/02_activities/assignments |
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 will not work on github, since this is a file path that is from your computer. In GitHub there is no DSI_assignment1 folder, so this command will break. Why not use, relative paths instead?
for example
cd ../
since this line of code doesn't work, the other ones will fail like a domino effect.
| mkdir server_logs user_logs event_logs | ||
| # 5. Copy all server log files (files with "server" in the name AND a .log extension) from ./data/raw to ./data/processed/server_logs | ||
|
|
||
| cd ~/Desktop/DSI_assignment1/shell/02_activities/assignments/newproject/data/raw |
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 line will also not work, please use relative paths.
| # 5. Copy all server log files (files with "server" in the name AND a .log extension) from ./data/raw to ./data/processed/server_logs | ||
|
|
||
| cd ~/Desktop/DSI_assignment1/shell/02_activities/assignments/newproject/data/raw | ||
| cp *server*.log ~/Desktop/DSI_assignment1/shell/02_activities/assignments/newproject/data/processed/server_logs |
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 line will also not work, please use relative paths.
| cp *event*.log ~/Desktop/DSI_assignment1/shell/02_activities/assignments/newproject/data/processed/event_logs | ||
| # 7. For user privacy, remove all files containing IP addresses (files with "ipaddr" in the filename) from ./data/raw and ./data/processed/user_logs | ||
|
|
||
| cd ~/Desktop/DSI_assignment1/shell/02_activities/assignments/newproject/data/raw |
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 line will also not work, please use relative paths.
|
|
||
| cd ~/Desktop/DSI_assignment1/shell/02_activities/assignments/newproject/data/raw | ||
| rm *ipaddr* | ||
| cd ~/Desktop/DSI_assignment1/shell/02_activities/assignments/newproject/data/processed/user_logs |
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 line will also not work, please use relative paths.
| cd ~/Desktop/DSI_assignment1/shell/02_activities/assignments/newproject/data/processed/user_logs | ||
| rm *ipaddr* | ||
| # 8. Create a file named ./data/inventory.txt that lists all the files in the subfolders of ./data/processed | ||
| cd ~/Desktop/DSI_assignment1/shell/02_activities/assignments/newproject/data |
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 line will also not work, please use relative paths.
| # 8. Create a file named ./data/inventory.txt that lists all the files in the subfolders of ./data/processed | ||
| cd ~/Desktop/DSI_assignment1/shell/02_activities/assignments/newproject/data | ||
| touch inventory.txt | ||
| find ~/Desktop/DSI_assignment1/shell/02_activities/assignments/newproject/data/processed -type f > ~/Desktop/DSI_assignment1/shell/02_activities/assignments/newproject/data/inventory.txt |
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 line will also not work, please use relative paths.
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.
You have the right idea on what commands to use and how they work, the only issue is that the auto grader that we have built doesn't have the same file system as your computer, so it doesn't know some of these folder structures you're mentioning. The code works on your computer, but just your computer. You need to use relative paths. Once you do that, I'm certain, no issues should persist.
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.
Autograder results
| question | status | comment |
|---|---|---|
| Part 1 - Q1 | ✅ | |
| Part 1 - Q2 | ✅ | |
| Part 1 - Q3 | ✅ | |
| Part 1 - Q4 | ✅ | |
| Part 1 - Q5 | ❌ | No server log files in data/raw |
| Part 1 - Q6 | ❌ | No user log files in data/raw; No event log files in data/raw |
| Part 1 - Q7 | ✅ | |
| Part 1 - Q8 | ✅ | |
| Part 2 | ✅ |
Please address the issues listed above.
|
Hello @danielrazavi, Thanks again for your comprehensive feedback and your explanation regarding relative paths. Best regards, Kanza Tariq. |
|
Hello @danielrazavi, Thanks again for your reply. I put the unzip command in the original location and I'm attaching response from gitbash. the folder does not unzip
|
|
it's very difficult to correct something that's performing as it's meant to in my system and the autograder is marking wrong. i'll try a little bit more, but I won't have time to work on it much. I'd appreciate if i could have a partial mark |
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.
Autograder results
| question | status |
|---|---|
| Part 1 - Q1 | ✅ |
| Part 1 - Q2 | ✅ |
| Part 1 - Q3 | ✅ |
| Part 1 - Q4 | ✅ |
| Part 1 - Q5 | ✅ |
| Part 1 - Q6 | ✅ |
| Part 1 - Q7 | ✅ |
| Part 1 - Q8 | ✅ |
| Part 2 | ✅ |
|
Great! I'm happy to see it checked all green. As a note, you've cded into newproject twice, and the second one isn't needed as I mentioned before. Regardless. This looks good to me. |







What changes are you trying to make? (e.g. Adding or removing code, refactoring existing code, adding reports)
Move contents of ./rawdata into raw folder folders
What did you learn from the changes you have made?
the assignment wording was may not 100% correspond with what the autograder is checking
Was there another approach you were thinking about making? If so, what approach(es) were you thinking of?
no
Were there any challenges? If so, what issue(s) did you face? How did you overcome it?
difficulty with folder addresses, wrote full folder addresses
How were these changes tested?
in git bash to see whether raw data ended up in the correct folder
A reference to a related issue in your repository (if applicable)
Checklist