Skip to content

Conversation

@AnaKanzaTariq
Copy link
Owner

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

  • I can confirm that my changes are working as intended

Copy link

@github-actions github-actions bot left a 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.

@AnaKanzaTariq
Copy link
Owner Author

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

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/

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

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

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

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

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

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

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

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.

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.

Copy link

@github-actions github-actions bot left a 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.

@AnaKanzaTariq
Copy link
Owner Author

AnaKanzaTariq commented Oct 15, 2025

Hello @danielrazavi,

Thanks again for your comprehensive feedback and your explanation regarding relative paths.
I did what I could with relative paths and went through on git bash code by code (I changed the location of the unzip command because it wouldn't work at it's original location).
Again, everything is correct in my computer and not for autograder. Apologies, could you have a look again at the code?
Additionally, can I get partial completion in an assignment and still pass it?

Best regards,

Kanza Tariq.

@AnaKanzaTariq
Copy link
Owner Author

AnaKanzaTariq commented Oct 15, 2025

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

assignment sh (vs code) assignment sh (gitbash)

@AnaKanzaTariq
Copy link
Owner Author

the following are if I change the location of the code
assignment sh (gitbash1)
assignment sh (gitbash2)
assignment sh (gitbash3)
assignment sh (vscode)

@AnaKanzaTariq
Copy link
Owner Author

AnaKanzaTariq commented Oct 15, 2025

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

Copy link

@github-actions github-actions bot left a 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

@AnaKanzaTariq
Copy link
Owner Author

AnaKanzaTariq commented Oct 15, 2025

Hello,

I only changed the location of the unzip command to earlier than where it was originally and the autograder marked it correct this time.

image

@danielrazavi
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants