From 65838c9868510b75834c3d65102a1d5b7f993919 Mon Sep 17 00:00:00 2001 From: mikrise2 Date: Fri, 1 Mar 2024 11:40:25 +0100 Subject: [PATCH] fix comments --- jba/README.md | 14 +++++++------- jba/src/processing/tasktracker_edu_validation.py | 8 ++++---- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/jba/README.md b/jba/README.md index 1d90323..95bd489 100644 --- a/jba/README.md +++ b/jba/README.md @@ -117,7 +117,7 @@ docker run hyperstyle-analysis-prod: poetry run tasktracker_content_col - `course_sources_path` — Path to course sources to extract course structure. - `destination_path` — Path to directory where yaml file will be created. -4.[tasktracker_task_filter.py](src/processing/tasktracker_task_filter.py) filtering data by the start research date. +4. [tasktracker_task_filter.py](src/processing/tasktracker_task_filter.py) filtering data by the start research date. Grouping by package name. ### Usage @@ -140,7 +140,7 @@ docker run hyperstyle-analysis-prod: poetry run tasktracker_task_filter - `destination_path` — Path of the file to save filtered data. - `start_date` — Start of the research in the DD.MM.YYYY format. -5.[tasktracker_edu_validation.py](src/processing/tasktracker_edu_validation.py) Divide filtered tasktracker file to 2 +5. [tasktracker_edu_validation.py](src/processing/tasktracker_edu_validation.py) Divide filtered tasktracker file to 2 files - the first with emails that have been presented in the edu csv file, and the second file without them. ### Usage @@ -192,7 +192,7 @@ docker run hyperstyle-analysis-prod: poetry run tasktracker_edu_validat Optional arguments: | Argument | Description | - |-------------------------------------|---------------------------------------------| + |-------------------------------------|---------------------------------------------| | **‑‑course‑name** | Name of the course to display on the chart. | @@ -218,7 +218,7 @@ docker run hyperstyle-analysis-prod: poetry run tasktracker_edu_validat **Optional arguments**: | Argument | Description | - |-------------------------------------|---------------------------------------------| + |-------------------------------------|---------------------------------------------| | **‑‑course‑name** | Name of the course to display on the chart. | 3. [task_duplicates.py](src/plots/task_duplicates.py) allows you to plot line charts how many duplicate submissions @@ -243,7 +243,7 @@ docker run hyperstyle-analysis-prod: poetry run tasktracker_edu_validat **Optional arguments**: | Argument | Description | - |-------------------------------------|---------------------------------------------| + |-------------------------------------|---------------------------------------------| | **‑‑course‑name** | Name of the course to display on the chart. | Charts plotted with this module can be found in [this section](#visualization). @@ -280,7 +280,7 @@ then your module should be named `Introduction-LastPush-CompleteTheProject` **Optional arguments**: | Argument | Description | - |--------------------------------------------------|-----------------------------------------------------------------------------| + |--------------------------------------------------|-----------------------------------------------------------------------------| | **‑‑timeout** | Timeout in seconds for subprocess to be executed. | | **‑‑n‑cpu** | Number of CPUs to use for parallel execution. | | **‑‑force‑ignore‑tests** | Force to ignore substitution of test files if they are visible to the user. | @@ -328,7 +328,7 @@ then your module should be named `Introduction-LastPush-CompleteTheProject` **Optional arguments**: | Argument | Description | - |-------------------------|------------------------------| + |-------------------------|------------------------------| | **‑‑debug** | Run the script in debug mode | Charts plotted with this module can be found in [this section](#visualization). diff --git a/jba/src/processing/tasktracker_edu_validation.py b/jba/src/processing/tasktracker_edu_validation.py index d80a88a..96482f9 100644 --- a/jba/src/processing/tasktracker_edu_validation.py +++ b/jba/src/processing/tasktracker_edu_validation.py @@ -1,6 +1,6 @@ import argparse from pathlib import Path -from typing import Dict +from typing import Dict, Tuple import pandas as pd @@ -54,8 +54,8 @@ def research_to_email(users_path: Path, researches_path: Path) -> Dict[str, str] EMAIL_COLUMN].to_dict() -def split_dataframe(filtered_df: pd.DataFrame, edu_df: pd.DataFrame, res_to_email: Dict[str, str]) -> ( # noqa: WPS320 - pd.DataFrame, pd.DataFrame): +def split_dataframe(filtered_df: pd.DataFrame, edu_df: pd.DataFrame, res_to_email: Dict[str, str]) \ + -> Tuple[pd.DataFrame, pd.DataFrame]: filtered_df[EMAIL_COLUMN] = filtered_df[RESEARCH_ID_COLUMN].map(res_to_email) edu_emails = edu_df[EMAIL_COLUMN].unique() df_in_edu = filtered_df[filtered_df[EMAIL_COLUMN].isin(edu_emails)] @@ -63,7 +63,7 @@ def split_dataframe(filtered_df: pd.DataFrame, edu_df: pd.DataFrame, res_to_emai return df_in_edu, df_not_in_edu -def validate(filtered_data: Path, edu_file: Path, destination_path: Path, res_to_email: Dict[str, str]) -> None: +def validate(filtered_data: Path, edu_file: Path, destination_path: Path, res_to_email: Dict[str, str]): filtered_df = read_df(filtered_data) edu_df = read_df(edu_file) df_in_edu, df_not_in_edu = split_dataframe(filtered_df, edu_df, res_to_email)