Ideally refactor this function because it scores C (19) on cyclomatic complexity. Pylint does not like it either:
R0914: Too many local variables (23/15) (too-many-locals)
Currently this function only handles presentations E & K, and a course duration of six months. Ideally it should handle any month code, and duration should be an argument to the function with a default value of six months.
Currently, the output csv table had one row per day with posts. Possibly extend
this script to write another output csv table along the lines of
track_classified_posts.write_counts()
so that days without posts also
recorded in the csv table, with zeroes.
General review and refactor?
Examples:
filter_forum()
in filter_posts.py
is really filter_forum()
and write_posts()
, even so its cyclomatic
complexity is still A (5).trace_userids()
in trace_userids.py
could use a NamedTuple.Nothing planned currently, other than a possible review and refactor inline with changes arising from Student Assessments.
To be confirmed once Gerald has provided more sample documents.
Currently all scripts are run from the command line, and any changes to their input and output directories required editing of the script. The scripts could benefit from being rewritten to accept command line arguments at the very least. It might even be desirable, after consultation with the project team members, to write a GUI front-end to the framework.