robota_common_errors package

Submodules

robota_common_errors.analysis module

An example of a simple data analysis script that might be run on the JSON output of common_error_collection.py.

robota_common_errors.analysis.main(file_name: str)[source]
robota_common_errors.analysis.read_json(file_path: pathlib.Path)pandas.core.frame.DataFrame[source]

robota_common_errors.common_error_collection module

class robota_common_errors.common_error_collection.CommonErrorReport(course: str, year: str, team_name: str, error_name: str, detail_titles: List[str], error_details: List[List[str]], num_occurrences: int)[source]

Bases: object

course: str
detail_titles: List[str]
error_details: List[List[str]]
error_name: str
num_occurrences: int
team_name: str
year: str
robota_common_errors.common_error_collection.main(config_path: str, output_name: str)[source]
robota_common_errors.common_error_collection.output_to_json(file_name: str, common_error_reports: List[robota_common_errors.common_error_collection.CommonErrorReport])[source]

robota_common_errors.common_error_functions module

These functions specifically test the common errors.

robota_common_errors.common_error_functions.commit_unnecessary_files(data_source: robota_core.data_server.DataServer, common_error: robota_common_errors.common_errors.CommonError)robota_common_errors.common_errors.CommonError[source]

Certain files shouldn’t be committed to a Git repo, and should probably be specified in a .gitignore file

robota_common_errors.common_error_functions.committing_comments(data_source: robota_core.data_server.DataServer, common_error: robota_common_errors.common_errors.CommonError)robota_common_errors.common_errors.CommonError[source]

Students often commit commented out code which is bad. This function checks the diffs for any java style commenting syntax.

robota_common_errors.common_error_functions.committing_conflict_markup(data_source: robota_core.data_server.DataServer, common_error: robota_common_errors.common_errors.CommonError)robota_common_errors.common_errors.CommonError[source]

Conflicts should be resolved before committing. Any commit conflict markup which gets committed shows that the conflict has not been properly resolved.

robota_common_errors.common_error_functions.confusing_branch_names(data_source: robota_core.data_server.DataServer, common_error: robota_common_errors.common_errors.CommonError)robota_common_errors.common_errors.CommonError[source]

Some branch names are obviously confusing and should be avoided. e.g. a local branch called origin/branch would have a remote tracking branch called origin/origin/branch

robota_common_errors.common_error_functions.merge_remote_branch(data_source: robota_core.data_server.DataServer, common_error: robota_common_errors.common_errors.CommonError)robota_common_errors.common_errors.CommonError[source]

Identify cases where students have merged a remote tracking branch. They should be pulling before making local commits or rebasing their local branch onto the remote branch.

robota_common_errors.common_error_functions.repeated_revert(data_source: robota_core.data_server.DataServer, common_error: robota_common_errors.common_errors.CommonError)robota_common_errors.common_errors.CommonError[source]

Identify cases where students have repeatedly attempted to revert commits. This is often because they think that a commit revert is like an undo command.

robota_common_errors.common_error_functions.wrong_use_of_estimate(data_source: robota_core.data_server.DataServer, common_error: robota_common_errors.common_errors.CommonError)robota_common_errors.common_errors.CommonError[source]

Identify cases where students have misused the /estimate command when trying to record time estimates for a gitlab issue.

robota_common_errors.common_error_functions.wrong_use_of_spend(data_source: robota_core.data_server.DataServer, common_error: robota_common_errors.common_errors.CommonError)robota_common_errors.common_errors.CommonError[source]

Identify cases where students have misused the /spend command when trying to record time spent working on a gitlab issue.

robota_common_errors.common_error_functions.wrong_way_merge(data_source: robota_core.data_server.DataServer, common_error: robota_common_errors.common_errors.CommonError)robota_common_errors.common_errors.CommonError[source]

Identify cases where students have merged develop into their feature branch rather than the feature branch into master.

robota_common_errors.common_errors module

Common errors are suboptimal student behaviors that occur regularly. If a common error is identified, feedback is given on how to correct it or avoid it in future.

Common errors are much like Tasks except they are not assigned any credit.

class robota_common_errors.common_errors.CommonError(common_error: dict)[source]

Bases: object

Representation of a common error that could be identified

Variables
  • name – The name of the common error.

  • marking_function – The name of the function used to assess the common error.

  • description – A textual description of the common error.

  • detail_titles – Titles of a table to be printed on the marking report.

  • error_details – Rows of a table to be printed on the marking report.

add_feedback(feedback: List[List[str]])[source]
add_feedback_titles(feedback_titles: List[str])[source]
count_errors()int[source]

Sum the occurrences of this error by checking error details.

robota_common_errors.common_errors.assess_common_errors(data_source: robota_core.data_server.DataServer, common_errors: List[robota_common_errors.common_errors.CommonError])List[robota_common_errors.common_errors.CommonError][source]

Go through all of the possible common errors, running the assessment function for each one.

robota_common_errors.common_errors.get_error_descriptions(robota_config: dict)List[robota_common_errors.common_errors.CommonError][source]

Get the textual description of common errors to identify.

robota_common_errors.common_errors.validate_data_sources(data_source: robota_core.data_server.DataServer, common_error: robota_common_errors.common_errors.CommonError)[source]

Check the data sources that are available from the DataServer.

robota_common_errors.report module

Generates a HTML report of common errors for a git repo.

robota_common_errors.report.count_errors(common_errors: List[robota_common_errors.common_errors.CommonError])int[source]

Count how many different common error types were detected.

robota_common_errors.report.identify_common_errors(robota_config: dict, start: datetime.datetime, end: datetime.datetime)List[robota_common_errors.common_errors.CommonError][source]

The main function which gets the common errors.

robota_common_errors.report.output_html_report(common_errors: List[robota_common_errors.common_errors.CommonError], data_source_info: dict, common_error_summary: dict, output_dir: str)[source]
robota_common_errors.report.run_html_error_report(start: str, end: str, config_path: str, output_dir: str, substitution_variables: dict)[source]

Get common errors and output them in the form of a HTML report.

robota_common_errors.report.summarise_common_errors(common_errors: List[robota_common_errors.common_errors.CommonError])[source]
robota_common_errors.report.summarise_data_sources(robota_config: dict, start: datetime.datetime, end: datetime.datetime)dict[source]
robota_common_errors.report.update_template(common_errors: List[robota_common_errors.common_errors.CommonError], data_source_info: dict, common_error_summary: dict)[source]

Produce the HTML report by writing the marking results to a HTML template. :param common_errors: A list of common errors and feedback on them. :param data_source_info: A dictionary of information about the data sources that were used. :param common_error_summary: A dictionary of stats about the common errors that is printed in

the report.

Module contents