1,760
edits
Changes
no edit summary
Disconnecting from myvmlab.senecacollege.ca:7598... done.
</pre>
== Suggested work-flow for this assignment ==
=== create a <font color="blue">private</font> repository on github ===
* Use the same github account you used for your assignment 1 repository.
* Create a private repository named "ops435-a2r" for this assignment.
* Populate your private repository with appropriate files. Please check out the sample repository <b><font color='blue'>[https://github.com/rayfreeping/ops435-a2 here]</font></b>
=== Add collaborator to your ops435-a2r private repository ===
* Add your professor's github account as one of the collaborators to your ops435-a2r private repository. This will allow your professor to pull the contents of your ops435-a2r repository and also to review and suggest changes and fixes to your algorithm and/or python script.
* <b><font color='blue'>Make sure that your professor accepted your invitation from github.com.</font></b>
=== Detail Algorithm Document ===
Follow the standard computation procedure: input - process - ouput when creating the algorithm document for this assignment.
==== input ====
* get data (command line arguments/options) from the user using the functions provided by the argparse module
* according to the arguments/options given at the command line, take appropriate processing action.
==== processing ====
* based on the file(s) specified, read the contents of each file and use appropriate objects to store it
* based on the command line arguments/options, process the data accordingly, which includes
** data preprocessing (split a multi-day record into single day record)
** record processing (preform required computation)
==== output ====
* output the required report based on the processed data
==== identify and select appropriate python objects and functions ====
The following python functions (to be created, you may have more) are useful in handling the following sub-tasks:
* reads login records from files and filters out unwanted records
* convert login records into proper python object type so that it can be processed using as much built-in functions as possible
* create function which generates daily usage reports by user and/or by remote host
* create function which generates weekly usage reports by user and/or by remote host
To help you with this assignment, you can use the ur_template.py in the sample ops435-a2 repository as a starting point in designing your own Python Usage Report script.
<font color='blue'><b>If you don't have enough time to create all the functions for the data processing steps, you should study the functions in the ur_funcs.py (provided by your teacher), pick and use the one that may help. </b></font>
=== Python script coding and debugging ===
For each function, identify what type of objects should be passed to the function, and what type of objects should be returned to the caller.
Once you have finished coding a function, you should start a Python3 interactive shell, import your functions and manually test each function and verify its correctness.
=== Final Test===
Once you have all the individual function tested and that each is working properly, perform the final test with test data provided by your professor and verify that your script produces the correct results before submitting your python program on Blackboard. Upload all the files for this assignment 2 to your vm in myvmlab and perform the final test.
== Sample login/logout records file and sample test run results==
* can be found from the sample repository github.com/rayfreeping/ops435-a2
== Rubric ==
{| class="wikitable" border="1"
! Task !! Maximum mark !! Actual mark
|-
| User Requirement Document||20 ||
|-
| Program usage and Options || 20 ||
|-
| Generate user name list || 10 ||
|-
| Generate remote host IP list|| 10 ||
|-
| Daily Usage Report by User || 10 ||
|-
| Daily Usage Report by Remote Host || 10 ||
|-
| Weekly Usage Report by User || 10 ||
|-
| Weekly Usage Report by Remote Host || 10 ||
|-
| '''Total''' || 100 ||
|}
== Submission ==
* Stage 1: upload your algorithm document file to your ops435-a2r repository in github.com by November 25, 2020
* Stage 2: upload your python script for this assignment to your ops435-a2r repository in github.com and to your vm in myvmlab by Dec 2, 2020
* Stage 3: After fully tested and debugged your python script for this assignment, update your algorithm, your python script, and your est results to your ops435-a2r repository in github.com. Also submit the algorithm document, the python script and final test result to blackboard by Dec 4, 2020