Open main menu

CDOT Wiki β

Changes

OPS435 Assignment 1 for Section C

343 bytes added, 16:37, 1 February 2021
no edit summary
** Your dictionary values should be a number of bytes.
** Again, test using your Python interpreter.
 
== Minimum Viable Product ==
Once you have achieved the Milestones, you will have to do the following to get a minimum viable product:
* In your <code>if __name__ == '__main__'</code> block, you will have to check command line arguments.
** If the user has entered no command line argument, use the current directory.
** If the user has entered more than one argument, or their argument isn't a valid directory, print an error message.
** Otherwise, the argument will be your target directory.
* Call <code>call_du_sub</code> with the target directory.
* Pass the return value from that function to <code>create_dir_dict</code>
* You may wish to create one or more functions to do the following:
** Use the total size of the target directory to calculate percentage.
** For each subdirectory of target directory, you will need to calculate a percentage, using the total of the target directory.
** Once you've calculated percentage, call <code>percent_to_graph</code> with a max_size of your choice.
** For every subdirectory, print <i>at least</i> the percent, the bar graph, and the name of the subdirectory.
** The target directory <b>should not</b> have a bar graph.
== Additional Features ==
After completing the above, you are expected to add some additional (two or more) functions providing useful informationfeatures. Some programs improvements you might want to look at could make are: * [https://https://ostechnix.com/neofetch-display-linux-systems-information/ screenfetch/neofetch]* [https://htop.dev/ top/htop/Bashtop] It is expected that the additional features you provided should be useful, non-trivial, they should not require super-user privileges and should not require the installation of additional modules or packages.<b>In this part of the assignment, it is better to try for something useful and fail than it is to implement something trivial! I am looking for evidence that you have worked with Linux machines and know what kinds of information are useful to see at a glance.</b>
You might consider:* Network information/IP addressesFormat the output in a way that is easy to read.* The state of some important daemons/systemd servicesAdd colour to the output.* process informationAdd more error checking, print a usage message to the user.* information about online usersConvert bytes to a human-readable format. NOTE: This doesn't have to be 100% accurate to get marks.* number of packages installedAccept more options from the user.* cpu loadSort the output by percentage, or by filename.
You may even choose to make It is expected that the output more attractive/colourful etc. If soadditional features you provided should be useful, you <i>are permitted to use more modules</i> than those specified abovenon-trivial, but make sure that they should not require super-user privileges and should not require the required functions still succeed as they areinstallation of additional packages to work. You may want (ie: I shouldn't have to look into default arguments, ask me for clarification if you're interestedrun pip to make your assignment work).
== The Assignment (due March 7, 11:59pm) ==
* As stated before, Be sure to make your code will be inside the file "assignment1.py". Begin by completing the required functions, committing your changes as you go. Complete and test each function final commit before moving to the nextdeadline. * When you have completed Then, copy the task, make sure that all contents of your changes have been committed and pushed to GitHub<b>duim. py</b>In additionfile into a Word document, you will and submit <code>assignment1it to Blackboard.py</codei> I will use GitHub to evaluate your deadline, but submitting to Blackboardtells me that you wish to be evaluated.</bi>
= Rubric =
| Program Authorship Declaration || 5 ||
|-
| Check script passed required functions design || 20 5 |||-| required functions readability || 5 ||
|-
| given functions main loop design || 5 10 ||
|-
| df/free filtering functions design main loop readability || 10 ||
|-
| additional features appropriate output function design || 10 5 ||
|-
| additional features implemented output function readability || 10 5 ||
|-
| docstrings additional features implemented || 5 20 ||
|-
| in-line docstrings and comments || 5 ||
|-
| First Milestone ||10||
|-
| Debrief Second Milestone || 10 ||
|-
| github.com repository: Commit messages and use || 10 ||
Please submit the following files by the due date:
* [ ] your algorithm document, named as 'algorithm.txt', in your GitHub repo, by October 19.* [ ] your python script, named as 'assignment1duim.py', in your repository, and also '''submitted to Blackboard''', by November 2 March 7 at 11:59pm.* [ ] your debrief answers should be submitted as issues to GitHub by November 24.