-
Due Tuesday 1/26 midnight.
-
Follow the link in Canvas to set up your HW2 repository.
-
git cloneyour repository to your laptop. -
Read the instructions (assignment_02.md) in your text editor or through GitHub.
-
Work through the problem, check in your changes into your repository (
git add,git commit), andgit pushyour changes to the remote repository on GitHub.
Tests and Autograding: You can check that your answer is correct by running the following command from the top of your working directory:
pytest
These tests are also ran automatically as soon as you push changes to GitHub. Open "pull request 1" (the Feedback pull request) in your repository on GitHub to see results.
Work through the Copy, rename, delete:
Activity
but work with the PHY494 directory in this repository, i.e, you
will work under hw02-USERNAME/PHY494 where USERNAME is your GitHub
username. Some files and directories under PHY494 are already
present in the hw02 repository.
To be clear, all steps that are needed to complete the homework are shown here:
-
Make a backup (call it
TODO.bak) of theTODOlist with thecpcommand (in the same directory as the originalTODOfile). -
Rename
TODOtoTODO.txtwith themvcommand. -
Make a directory
notesunder thedatadirectory: You should now have a directory tree similar tohw02-USERNAME/PHY494/01_shell/ Documents/ work/ TODO.txt TODO.bak data/ notes/Check with
ls -R. -
Put a copy of
TODO.txtinto thenotesdirectory (usingcp). -
Create a new text file
data/notes/hints.txtand write any hints for possible rebel bases into this file. -
Open
notes/TODO.txtin your editor (e.g.,atom) and add a note to item 1 too look in the hints.txt file. Save and exit. -
Make a copy of your
notesdirectory in yourDocuments/workdirectory:hw02-USERNAME/PHY494/01_shell/ Documents/ work/ TODO.txt TODO.bak notes/ TODO.txt hints.txt data/ notes/ TODO.txt hints.txt -
Remove
data/notes/hints.txtwithrm. -
Remove
data/noteswithrmdir. (Hint: Read the error message!) -
Move
work/notes/hints.txtinto theworkdirectory. -
Remove the useless
work/notesdirectory withrm -r(careful !)
After you completed the activity you should end up with a specific
directory structure under ./hw02-USERBAME/PHY494/01_shell, which will be
tested.
(Skim)read Neal Stephenson’s In the Beginning... was the Command Line from 1999 (PDF). What are the advantages and disadvantages of using the command line instead of a graphical user interface?