From 4852abd7dfe105813054676ccd1aa5f0587245c6 Mon Sep 17 00:00:00 2001 From: Tchaps Dev Date: Sat, 20 May 2023 04:40:07 -0400 Subject: [PATCH 01/17] use autopep8 to formats Python code to conform to the PEP 8 style guide --- travo/assignment.py | 20 ++-- travo/course.py | 61 ++++++----- travo/dashboards.py | 130 ++++++++++++++--------- travo/gitlab.py | 228 ++++++++++++++++++++++------------------ travo/homework.py | 44 ++++---- travo/jupyter_course.py | 52 +++++---- travo/nbgrader_utils.py | 44 +++++--- travo/utils.py | 14 ++- 8 files changed, 345 insertions(+), 248 deletions(-) diff --git a/travo/assignment.py b/travo/assignment.py index 0dafd3a4..5788f7ab 100644 --- a/travo/assignment.py +++ b/travo/assignment.py @@ -151,7 +151,6 @@ class Assignment: else: return project.namespace.path - ########################################################################## def personal_repo(self) -> Project: @@ -248,7 +247,8 @@ Il sera reconstruit lors du prochain dépôt""") expires_at=self.expires_at) self.log.debug("- Configuration badge:") - artifacts_url = self.forge.base_url+'/%{project_path}/-/jobs/artifacts/%{default_branch}/' + artifacts_url = self.forge.base_url + \ + '/%{project_path}/-/jobs/artifacts/%{default_branch}/' link_url = artifacts_url + 'file/feedback/scores.html?job=autograde' image_url = artifacts_url + 'raw/feedback/scores.svg?job=autograde' @@ -260,7 +260,7 @@ Il sera reconstruit lors du prochain dépôt""") self.log.info(f" {my_repo.web_url}") return my_repo - def remove_personal_repo(self, force: bool=False) -> None: + def remove_personal_repo(self, force: bool = False) -> None: """ Remove the users' personal repository for this assignment """ @@ -471,6 +471,7 @@ Déplacez ou supprimez le """ self.forge.login(anonymous_ok=True) user = self.forge.get_current_user() + def git(args: List[str], **kwargs: Any) -> subprocess.CompletedProcess: return self.forge.git(args, cwd=assignment_dir, **kwargs) @@ -508,7 +509,8 @@ Déplacez ou supprimez le os.rename(assignment_dir, backup_dir) self.fetch(assignment_dir) else: - self.log.error("- La mise à jour n'a pas pu se faire du fait d'un conflit.") + self.log.error( + "- La mise à jour n'a pas pu se faire du fait d'un conflit.") self.log.info(f""" Pour renommer votre devoir local et forcer la mise à jour, utilisez l'option force; en ligne de commande: @@ -520,7 +522,8 @@ Déplacez ou supprimez le # fetch_branch may require a commit which require git to be configured # we could try harder if there is a use case for it self.fetch_branch(assignment_dir, branch=None, content=_("updates")) - self.fetch_branch(assignment_dir, branch="errata", content=_("erratas"), on_failure='warning') + self.fetch_branch(assignment_dir, branch="errata", + content=_("erratas"), on_failure='warning') def submit(self, assignment_dir: Optional[str] = None, @@ -681,7 +684,7 @@ class Submission: repo = self.repo try: branch = repo.get_branch(repo.default_branch) - except Exception: # would be nicer with a ResourceNotFoundError + except Exception: # would be nicer with a ResourceNotFoundError # This can actually fail with an empty repository return None @@ -758,7 +761,8 @@ class Submission: progress_bar.desc = pipeline['status'] progress_bar.update() time.sleep(1) - pipeline = forge.get_json(f"/projects/{repo.id}/pipelines/{pipeline['id']}") + pipeline = forge.get_json( + f"/projects/{repo.id}/pipelines/{pipeline['id']}") job, = forge.get_json( f"/projects/{repo.id}/pipelines/{pipeline['id']}/jobs") @@ -860,4 +864,4 @@ class Submission: autograde_job=autograde_job, status=status, submission=self, - ) + ) diff --git a/travo/course.py b/travo/course.py index 5f0badbf..399de2c0 100644 --- a/travo/course.py +++ b/travo/course.py @@ -114,7 +114,6 @@ class CourseAssignment(Assignment): repo = self.forge.get_project(path) return (repo, 1) - def get_submission_username(self, project: Project) -> Optional[str]: """Return the username for the given submission @@ -362,7 +361,7 @@ class Course: 'TestCourse/2020-2021/Subcourse/MI1/Assignment1' """ result = [self.assignments_group_path] - dirname = os.path.dirname(assignment) + dirname = os.path.dirname(assignment) assignment = os.path.basename(assignment) if dirname: result.append(dirname) @@ -424,20 +423,20 @@ class Course: self.check_student_group(student_group, none_ok=True) return self.Assignment( - forge=self.forge, - course=self, - log=self.log, - name=assignment_name, - instructors_path=self.assignments_group_path, - script=self.script, - expires_at=self.expires_at, - repo_path=repo_path, - student_group=student_group, - leader_name=leader_name, - username=username, - assignment_dir=self.work_dir(assignment_name), - jobs_enabled_for_students=self.jobs_enabled_for_students, - ) + forge=self.forge, + course=self, + log=self.log, + name=assignment_name, + instructors_path=self.assignments_group_path, + script=self.script, + expires_at=self.expires_at, + repo_path=repo_path, + student_group=student_group, + leader_name=leader_name, + username=username, + assignment_dir=self.work_dir(assignment_name), + jobs_enabled_for_students=self.jobs_enabled_for_students, + ) @deprecated(deprecated_in="0.2", removed_in="1.0", current_version=__version__, @@ -489,12 +488,14 @@ class Course: def share_with(self, assignment_name: str, username: str, - access_level: Union[int, Resource.AccessLevels] = Resource.AccessLevels.DEVELOPER, + access_level: Union[int, + Resource.AccessLevels] = Resource.AccessLevels.DEVELOPER, ) -> None: try: repo = self.assignment(assignment_name).personal_repo() except ResourceNotFoundError: - raise RuntimeError(_("no submission; please submit", assignment_name=assignment_name)) + raise RuntimeError(_("no submission; please submit", + assignment_name=assignment_name)) user = self.forge.get_user(username) repo.share_with(user, access=access_level) @@ -521,17 +522,18 @@ class Course: """ self.check_assignment(assignment) - self.log.info(f"Publish the assignment {assignment} with visibility {visibility}.") + self.log.info( + f"Publish the assignment {assignment} with visibility {visibility}.") # travo_gitlab_remove_project "${repo}" attributes = dict( - visibility = visibility, - issues_enabled = False, - merge_requests_enabled = False, - container_registry_enabled = False, - wiki_enabled = False, - snippets_enabled = False, - lfs_enabled = False, + visibility=visibility, + issues_enabled=False, + merge_requests_enabled=False, + container_registry_enabled=False, + wiki_enabled=False, + snippets_enabled=False, + lfs_enabled=False, ) path = self.assignment_repo_path(assignment) @@ -550,7 +552,8 @@ class Course: for student_group in self.student_groups: path = self.assignment_repo_path(assignment, student_group=student_group) name = self.assignment_repo_name(assignment) - self.log.info(f"- Publishing to the student group {student_group}' fork {path}.") + self.log.info( + f"- Publishing to the student group {student_group}' fork {path}.") self.forge.ensure_group(os.path.dirname(path), name=student_group, visibility="public") @@ -620,8 +623,8 @@ class Course: date=date) def ensure_instructor_access(self, - assignment: str, - student_group: Optional[str] = None) -> None: + assignment: str, + student_group: Optional[str] = None) -> None: """ Ensure instructor access to the student repositories. diff --git a/travo/dashboards.py b/travo/dashboards.py index 28d3d77a..bdd820eb 100644 --- a/travo/dashboards.py +++ b/travo/dashboards.py @@ -80,8 +80,10 @@ class AuthenticationWidget(VBox): forge.on_missing_credentials = self.on_missing_credentials self.forge = forge title = Label(_("authentication widget title", url=forge.base_url)) - self.usernameUI = Text(description=_("username"), layout={'width': 'fit-content'}) - self.passwordUI = Password(description=_("password"), layout={'width': 'fit-content'}) + self.usernameUI = Text(description=_("username"), + layout={'width': 'fit-content'}) + self.passwordUI = Password(description=_("password"), + layout={'width': 'fit-content'}) self.button = Button(description=_("sign in"), button_style="primary" ) @@ -509,13 +511,13 @@ class CourseStudentDashboard(VBox): self.grid.children = [ Label(label) for j, label in enumerate( - [_('assignment'), - '', - _('work directory'), - '', - _('submission'), - _('score'), - ]) + [_('assignment'), + '', + _('work directory'), + '', + _('submission'), + _('score'), + ]) ] + [widget for assignment in self.assignments for widget in self.assignment_dashboards[assignment].children] @@ -587,7 +589,8 @@ class AssignmentInstructorDashboard(HBox): disabled=False, ) self.collectButton.on_click(lambda event: self.collect()) - self.collectStatus = Textarea(self.count_submissions_cmd(submitted_directory="submitted"), layout=layout) + self.collectStatus = Textarea(self.count_submissions_cmd( + submitted_directory="submitted"), layout=layout) self.collectUI = VBox([self.collectButton, self.collectStatus]) self.formgraderButton = Button( @@ -612,7 +615,8 @@ class AssignmentInstructorDashboard(HBox): disabled=False, ) self.feedbackButton.on_click(lambda event: self.feedback()) - self.feedbackStatus = Textarea(self.release_feedback_status_cmd(self.student_group), layout=layout) + self.feedbackStatus = Textarea( + self.release_feedback_status_cmd(self.student_group), layout=layout) self.feedbackUI = VBox([self.feedbackButton, self.feedbackStatus]) HBox.__init__( @@ -660,7 +664,8 @@ class AssignmentInstructorDashboard(HBox): self.feedbackButton.disabled = False self.formgraderButton.disabled = False - self.collectStatus.value = self.count_submissions_cmd(submitted_directory="submitted") + self.collectStatus.value = self.count_submissions_cmd( + submitted_directory="submitted") self.formgraderStatus.value = self.count_submissions_need_manual_grade_cmd() self.feedbackStatus.value = self.release_feedback_status_cmd(self.student_group) @@ -719,10 +724,12 @@ class AssignmentInstructorDashboard(HBox): if self.student_group is None: self.course.log.error("Must choose a student_group value.") return - self.course.collect_for_nbgrader(assignment_name=self.name, student_group=self.student_group) + self.course.collect_for_nbgrader( + assignment_name=self.name, student_group=self.student_group) self.course.ensure_autograded(assignment_name=self.name, student_group=self.student_group, force_autograde=self.force_autograding) - self.course.collect_autograded(assignment_name=self.name, student_group=self.student_group) + self.course.collect_autograded( + assignment_name=self.name, student_group=self.student_group) self.course.merge_autograded_db(assignment_name=os.path.basename(self.name), on_inconsistency="WARNING", back=False, new_score_policy=self.new_score_policy) self.course.clear_needs_manual_grade(os.path.basename(self.name)) @@ -743,14 +750,17 @@ class AssignmentInstructorDashboard(HBox): # if self.assignment.assignment_dir is None: # raise ValueError("Can't open work dir if assignment_dir is not set") - path = os.path.dirname(self.jupyter_front_end.sessions.current_session['path']) - file = self.course.formgrader(os.path.basename(self.name), in_notebook=False) + path = os.path.dirname( + self.jupyter_front_end.sessions.current_session['path']) + file = self.course.formgrader( + os.path.basename(self.name), in_notebook=False) import pdb pdb.pm() self.jupyter_front_end.commands.execute( "docmanager:open", { - "path": os.path.join(path, file), # Generalize if there is no index.md + # Generalize if there is no index.md + "path": os.path.join(path, file), "factory": "Notebook", # 'options': { # 'mode': 'split-right' @@ -762,11 +772,13 @@ class AssignmentInstructorDashboard(HBox): ) except KeyError: # jupyter notebook from IPython.display import display # type: ignore - display(self.course.formgrader(os.path.basename(self.name), in_notebook=True)) # type: ignore + display(self.course.formgrader(os.path.basename( + self.name), in_notebook=True)) # type: ignore def generate_status_cmd(self) -> str: try: - path = os.path.join(self.course.release_directory, os.path.basename(self.assignment.name)) + path = os.path.join(self.course.release_directory, + os.path.basename(self.assignment.name)) date = subprocess.run(['git', 'log', '-1', '--format=%ai'], check=True, text=True, capture_output=True, cwd=path).stdout status = f"last generation: {date}" @@ -797,7 +809,8 @@ class AssignmentInstructorDashboard(HBox): # `MissingEntry` exception will be raised, which means the student # didn't submit anything, so we assign them a score of zero. try: - submission = gb.find_submission(os.path.basename(self.assignment.name), student.id) + submission = gb.find_submission( + os.path.basename(self.assignment.name), student.id) except MissingEntry: pass else: @@ -850,7 +863,8 @@ class CourseInstructorDashboard(VBox): self.force_autograding = RadioButtons(description="", value=False, options=[False, True], layout={'width': 'fit-content'}) self.new_score_policy = RadioButtons(description="", value="only_greater", - options=["only_empty", "only_greater", "force_new_score"], + options=["only_empty", + "only_greater", "force_new_score"], layout={'width': 'fit-content'}) self.header = HBox( @@ -866,7 +880,8 @@ class CourseInstructorDashboard(VBox): value=student_group, options=course.student_groups, ) - self.header.children += (VBox([Label(_('student group')), self.student_group_UI]),) + self.header.children += (VBox([Label(_('student group')), + self.student_group_UI]),) self.student_group_UI.observe(lambda change: self.update(), names='value') self.release_mode.observe(lambda change: self.update(), @@ -929,16 +944,16 @@ class CourseInstructorDashboard(VBox): for assignment_name in self.course.assignments ] self.grid.children = [ - Label(label) - for j, label in enumerate( - [_('assignment'), - _('assignment repository'), - 'Gestion du cours', '', - 'Evaluations', '', '', - ]) - ] + [widget - for assignment_dashboard in self.assignment_dashboards - for widget in assignment_dashboard.children] + Label(label) + for j, label in enumerate( + [_('assignment'), + _('assignment repository'), + 'Gestion du cours', '', + 'Evaluations', '', '', + ]) + ] + [widget + for assignment_dashboard in self.assignment_dashboards + for widget in assignment_dashboard.children] class CourseGradeDashboard(VBox): @@ -960,9 +975,9 @@ class CourseGradeDashboard(VBox): options=["all"] + [a for a in self.course.assignments], width="350px") self.get_scores_UI = Button(description="update scores", - button_style="primary", - icon="book", - layout=layout) + button_style="primary", + icon="book", + layout=layout) self.get_scores_UI.on_click(lambda event: self.get_scores()) self.clear_csv_UI = Button(description="clear scores", @@ -1017,9 +1032,11 @@ class CourseGradeDashboard(VBox): renderers = {} for col in self.df.columns: if "note" in col and "/0" not in col: - renderers[col] = TextRenderer(text_color="black", background_color=Expr(_format_note)) + renderers[col] = TextRenderer( + text_color="black", background_color=Expr(_format_note)) elif "status" in col: - renderers[col] = TextRenderer(text_color="black", background_color=Expr(_format_status)) + renderers[col] = TextRenderer( + text_color="black", background_color=Expr(_format_status)) grid_layout = {"height": "300px"} self.grid = DataGrid(self.df, base_column_size=200, base_header_size=200, layout=grid_layout, editable=True, @@ -1072,12 +1089,14 @@ class CourseGradeDashboard(VBox): """ # load the requested assignments if self.assignments_UI.value is None or self.assignments_UI.value == "all": - assignments = [assignment_name for assignment_name in self.assignments_UI.options[1:]] + assignments = [ + assignment_name for assignment_name in self.assignments_UI.options[1:]] else: assignments = [self.assignments_UI.value] # load the requested groupes if self.student_group_UI.value is None or self.student_group_UI.value == "all": - student_groups = [student_group for student_group in self.student_group_UI.options[1:]] + student_groups = [ + student_group for student_group in self.student_group_UI.options[1:]] else: student_groups = [self.student_group_UI.value] @@ -1108,10 +1127,13 @@ class CourseGradeDashboard(VBox): if student not in d.keys(): d[student] = {"group": student_group} # for assignment in assignments: - d[student]["email"] = student + "@" + self.course.mail_extension - d[student][assignment + "-status"] = "as " + student_group + " with autograding=" + status.autograde_status + d[student]["email"] = student + \ + "@" + self.course.mail_extension + d[student][assignment + "-status"] = "as " + student_group + \ + " with autograding=" + status.autograde_status if status.autograde_status != "success": - self.course.log.info(f"missing successful autograde for {student}") + self.course.log.info( + f"missing successful autograde for {student}") bad_projects.append(student) continue self.course.log.info(f"fetching scores for {student}") @@ -1119,23 +1141,30 @@ class CourseGradeDashboard(VBox): repo = status.submission.repo job = status.autograde_job path = f"feedback/scores.csv" - scores_txt = repo.fetch_artifact(job, artifact_path=path).text + scores_txt = repo.fetch_artifact( + job, artifact_path=path).text scores = pd.read_csv(io.StringIO(scores_txt)) total_score = np.sum(scores["total_score"].values) manual_score = np.nansum(scores["manual_score"].values) - max_manual_score = np.sum(scores["max_manual_score"].values) + max_manual_score = np.sum( + scores["max_manual_score"].values) if np.all(np.isnan(scores["manual_score"].values)) and ~np.isnan(max_manual_score) and max_manual_score > 0: - d[student][assignment + f"-note (/{int(scores['max_total_score'].values[0])})"] = "attente notation manuelle" + d[student][assignment + + f"-note (/{int(scores['max_total_score'].values[0])})"] = "attente notation manuelle" else: - d[student][assignment + f"-note (/{int(scores['max_total_score'].values[0])})"] = total_score + d[student][assignment + + f"-note (/{int(scores['max_total_score'].values[0])})"] = total_score else: - self.course.log.info(f"missing submission for {student}") + self.course.log.info( + f"missing submission for {student}") bad_projects.append(student) continue if len(bad_projects) > 0: - self.course.log.warning(f"{len(bad_projects)} dépôt(s) avec autograde_status!=success:") + self.course.log.warning( + f"{len(bad_projects)} dépôt(s) avec autograde_status!=success:") for student in bad_projects: - self.course.log.warning(f"student={student}, status={d[student][assignment + '-status']}") + self.course.log.warning( + f"student={student}, status={d[student][assignment + '-status']}") total += len(submissions_status) total_bad += len(bad_projects) self.course.log.warning( @@ -1143,7 +1172,8 @@ class CourseGradeDashboard(VBox): f" {len(bad_projects)} dépôt(s) corrompu(s).") except ResourceNotFoundError: pass - self.course.log.info(f"{total} projets soumis pour {assignment}, {total_bad} dépôt(s) corrompu(s).") + self.course.log.info( + f"{total} projets soumis pour {assignment}, {total_bad} dépôt(s) corrompu(s).") self.df = pd.DataFrame.from_dict(d, orient="index") self.df.index.name = "student_id" diff --git a/travo/gitlab.py b/travo/gitlab.py index 80ba0db9..a60e1f0c 100644 --- a/travo/gitlab.py +++ b/travo/gitlab.py @@ -28,17 +28,19 @@ R = TypeVar('R', 'Group', 'Project', 'Namespace') JSON = Any # Could be made more specific Job = JSON # Could be made more specific + class ResourceNotFoundError(RuntimeError): pass + class AuthenticationError(RuntimeError): pass def request_credentials_basic(forge: 'GitLab', - username: Optional[str] = None, - password: Optional[str] = None - ) -> Tuple[str, str]: + username: Optional[str] = None, + password: Optional[str] = None + ) -> Tuple[str, str]: """ Basic interactive UI for requesting credentials to the user """ @@ -68,7 +70,7 @@ class GitLab: # (typically after requesting them interactively to the user), # or raise (typically after setting up a UI to request the # credentials) - on_missing_credentials: Any # Should be Callable + on_missing_credentials: Any # Should be Callable def __init__(self, base_url: str, @@ -269,7 +271,7 @@ class GitLab: password=password, scope="api")) token = result.json().get('access_token') - # TODO: handle connection failures + # TODO: handle connection failures if token is None: # TODO: pourrait réessayer raise AuthenticationError(_("invalid credentials", url=self.base_url)) @@ -417,7 +419,6 @@ class GitLab: return typing.cast(str, json[0]['id']) raise ResourceNotFoundError(f"Namespace {path} not found") - def get_resource(self, cls: Type[R], path: Union[R, int, str], **args: Any) -> R: """ Get a resource from its path @@ -437,7 +438,8 @@ class GitLab: raise RuntimeError(f"{cls.__name__} {path} not found: {json['error']}") message = json.get("message", "") if message and message[0] != "2": - raise ResourceNotFoundError(f"{cls.__name__} {path} not found: {json['message']}") + raise ResourceNotFoundError( + f"{cls.__name__} {path} not found: {json['message']}") return cls(gitlab=self, **json) def ensure_resource(self, @@ -490,8 +492,7 @@ class GitLab: assert isinstance(json, dict) return cls(gitlab=self, **json) - - def confirm(self, message: str)-> bool: + def confirm(self, message: str) -> bool: """ Asks the user to confirm a dangerous or irreversible operation. @@ -682,7 +683,7 @@ class GitLab: return self.ensure_resource(Group, path=path, name=name, - get_resource_args = dict(with_projects=with_projects), + get_resource_args=dict(with_projects=with_projects), **attributes) def remove_group(self, id_or_path: str, @@ -694,7 +695,7 @@ class GitLab: """ self.remove_resource(Group, id_or_path, force=force) - def get_current_user(self)-> Union['User', 'AnonymousUser']: + def get_current_user(self) -> Union['User', 'AnonymousUser']: """ Get the currently logged in user (which may be 'anonymous') @@ -716,7 +717,7 @@ class GitLab: """ if self._current_user is None: self._current_user = User(gitlab=self, - **self.get_json("/user")) + **self.get_json("/user")) return self._current_user @@ -854,14 +855,16 @@ class GitLab: if fork.owner is not None: if username is not None and fork.owner.username != username: continue - self.log.info(f"Download/update repository for {fork.owner.username} at date {date}:") + self.log.info( + f"Download/update repository for {fork.owner.username} at date {date}:") path = template.format(username=fork.owner.username, path=fork.path) try: fork.clone_or_pull(path, date=date) except subprocess.CalledProcessError: bad_projects.append(fork.http_url_to_repo) if len(bad_projects) > 0: - self.log.warning(f"{len(bad_projects)} corrupted or empty project, check the links :") + self.log.warning( + f"{len(bad_projects)} corrupted or empty project, check the links :") for url in bad_projects: self.log.warning(url) @@ -936,8 +939,8 @@ class ResourceRef: # - setting mandatory attributes in __post_init__ # - setting frozen attributes in __post_init__ # see e.g. https://groups.google.com/forum/#!topic/dev-python/7vBAZn_jEfQ - forge: 'Forge' = field(default=cast('Forge', None)) - path: str = field(default=cast('str', None)) + forge: 'Forge' = field(default=cast('Forge', None)) + path: str = field(default=cast('str', None)) url: InitVar[Optional[str]] = None def __post_init__(self, url: Optional[str] = None) -> None: @@ -948,11 +951,12 @@ class ResourceRef: if url is not None: u = urllib.parse.urlparse(url) if u.scheme != '': - root_url = urllib.parse.urlunparse([u.scheme, u.hostname, '', '', '', '']) + root_url = urllib.parse.urlunparse( + [u.scheme, u.hostname, '', '', '', '']) path = u.path else: # Assume a ssh - r = re.search("^(.*@)?([^:]+):(.*?)$", url) + r = re.search("^(.*@)?([^:]+):(.*?)$", url) if r is not None: root_url = "https://" + r.groups()[1] path = r.groups()[2] @@ -975,6 +979,8 @@ class ClassCallMetaclass(type): get_type_hints_cache: Dict[Type, Dict] = {} + + def get_type_hints(cls: Type) -> Dict: type_hints = get_type_hints_cache.get(cls, None) if type_hints is None: @@ -987,11 +993,11 @@ def get_type_hints(cls: Type) -> Dict: class Resource(metaclass=ClassCallMetaclass): class AccessLevels(enum.IntEnum): - GUEST = 10 - REPORTER = 20 - DEVELOPER = 30 + GUEST = 10 + REPORTER = 20 + DEVELOPER = 30 MAINTAINER = 40 - OWNER = 50 + OWNER = 50 __initialized: bool = field(default=False, repr=False, @@ -1039,9 +1045,9 @@ class Resource(metaclass=ClassCallMetaclass): >>> assert reproject.description == project.description """ # Select only the attributes that were changed - attributes = { key: value - for key, value in attributes.items() - if key not in self.__dict__ or value != self.__dict__[key] } + attributes = {key: value + for key, value in attributes.items() + if key not in self.__dict__ or value != self.__dict__[key]} if self.__initialized: # Check that the attributes are valid @@ -1071,7 +1077,7 @@ class Resource(metaclass=ClassCallMetaclass): value = resource_type(gitlab=self.gitlab, **value) elif typing_utils.issubtype(type_hint, List[Resource]): resource_type = typing_utils.get_args(type_hint)[0] - value = [ resource_type(gitlab=self.gitlab, **v) for v in value ] + value = [resource_type(gitlab=self.gitlab, **v) for v in value] self.__dict__[key] = value def __setattr__(self, key: str, value: Any) -> None: @@ -1114,6 +1120,7 @@ class Resource(metaclass=ClassCallMetaclass): res[key] = value return res + @dataclass class Project(Resource): _resource_type_api_url = "projects" @@ -1142,9 +1149,10 @@ class Project(Resource): last_activity_at: str web_url: Optional[str] = None - shared_with_groups: List[Dict[str, Any]] = field(default_factory=list) - visibility: Optional[str ] = None - merge_method: Optional[str ] = None + shared_with_groups: List[Dict[str, Any]] = field( + default_factory=list) + visibility: Optional[str] = None + merge_method: Optional[str] = None _links: Optional[dict] = None archived: Optional[bool] = None resolve_outdated_diff_discussions: Optional[bool] = None @@ -1159,7 +1167,7 @@ class Project(Resource): lfs_enabled: Optional[bool] = None packages_enabled: Optional[bool] = None service_desk_enabled: Optional[bool] = None - service_desk_address: Optional[str ] = None + service_desk_address: Optional[str] = None empty_repo: Optional[bool] = None public_jobs: Optional[bool] = None only_allow_merge_if_pipeline_succeeds: Optional[bool] = None @@ -1167,49 +1175,49 @@ class Project(Resource): only_allow_merge_if_all_discussions_are_resolved: Optional[bool] = None printing_merge_request_link_enabled: Optional[bool] = None can_create_merge_request_in: Optional[bool] = None - issues_access_level: Optional[str ] = None - repository_access_level: Optional[str ] = None - merge_requests_access_level: Optional[str ] = None - forking_access_level: Optional[str ] = None - wiki_access_level: Optional[str ] = None - builds_access_level: Optional[str ] = None - snippets_access_level: Optional[str ] = None - pages_access_level: Optional[str ] = None - operations_access_level: Optional[str ] = None - analytics_access_level: Optional[str ] = None + issues_access_level: Optional[str] = None + repository_access_level: Optional[str] = None + merge_requests_access_level: Optional[str] = None + forking_access_level: Optional[str] = None + wiki_access_level: Optional[str] = None + builds_access_level: Optional[str] = None + snippets_access_level: Optional[str] = None + pages_access_level: Optional[str] = None + operations_access_level: Optional[str] = None + analytics_access_level: Optional[str] = None emails_disabled: Optional[bool] = None - ci_default_git_depth: Optional[int ] = None + ci_default_git_depth: Optional[int] = None ci_forward_deployment_enabled: Optional[bool] = None - build_timeout: Optional[int ] = None + build_timeout: Optional[int] = None auto_cancel_pending_pipelines: Optional[bool] = None - build_coverage_regex: Optional[str ] = None + build_coverage_regex: Optional[str] = None allow_merge_on_skipped_pipeline: Optional[bool] = None remove_source_branch_after_merge: Optional[bool] = None - suggestion_commit_message: Optional[str ] = None + suggestion_commit_message: Optional[str] = None auto_devops_enabled: Optional[bool] = None - auto_devops_deploy_strategy: Optional[str ] = None + auto_devops_deploy_strategy: Optional[str] = None autoclose_referenced_issues: Optional[bool] = None - creator_id: Optional[int ] = None - import_status: Optional[str ] = None - open_issues_count: Optional[int ] = None - ci_config_path: Optional[str ] = None + creator_id: Optional[int] = None + import_status: Optional[str] = None + open_issues_count: Optional[int] = None + ci_config_path: Optional[str] = None - repository_storage: Optional[str ] = None + repository_storage: Optional[str] = None permissions: Optional[dict] = None forked_from_project: Optional['Project'] = None - import_error: Optional[str ] = None - runners_token: Optional[str ] = None + import_error: Optional[str] = None + runners_token: Optional[str] = None owner: Optional['User'] = None - build_git_strategy: Optional[str ] = None + build_git_strategy: Optional[str] = None restrict_user_defined_variables: Optional[bool] = None - container_registry_image_prefix: Optional[str ] = None + container_registry_image_prefix: Optional[str] = None topics: Optional[list] = None ci_job_token_scope_enabled: Optional[bool] = None - squash_option: Optional[str ] = None + squash_option: Optional[str] = None keep_latest_artifact: Optional[bool] = None def archive(self) -> 'Project': @@ -1246,7 +1254,8 @@ class Project(Resource): if full_path is None: full_path = self.path_with_namespace - self.gitlab.log.info(f'Exporting project {self.path_with_namespace} to {full_path} on {forge}') + self.gitlab.log.info( + f'Exporting project {self.path_with_namespace} to {full_path} on {forge}') self.gitlab.post_json(f'/projects/{self.id}/export') while self.gitlab.get_json(f'/projects/{self.id}/export')['export_status'] != 'finished': @@ -1453,8 +1462,8 @@ class Project(Resource): user_id = group_or_user.id if any(user_id == user['id'] for user in self.get_members()): return - data : dict = dict(user_id=user_id, - access_level=int(access)) + data: dict = dict(user_id=user_id, + access_level=int(access)) if expires_at is not None: data['expires_at'] = expires_at json = self.gitlab.post(f"/projects/{self.id}/members", @@ -1478,7 +1487,7 @@ class Project(Resource): def get_forks_ssh_url_to_repo(self) -> List[str]: forks = self.gitlab.get(f"/projects/{self.id}/forks").json() - return [ fork['ssh_url_to_repo'] for fork in forks ] + return [fork['ssh_url_to_repo'] for fork in forks] def get_forks(self, recursive: Union[int, bool] = False, @@ -1553,7 +1562,6 @@ class Project(Resource): simple=simple)] return forks - def get_origin_commit(self) -> JSON: """ Return the first (oldest) commit of the repository for the default branch. @@ -1566,7 +1574,7 @@ class Project(Resource): page: Optional[str] = "1" while page is not None and page != '': res = self.gitlab.get(f"/projects/{self.id}/repository/commits", - data={"per_page": 100, "page": page}) + data={"per_page": 100, "page": page}) page = res.headers.get("X-Next-Page") json = res.json() if len(json) == 0: @@ -1574,8 +1582,7 @@ class Project(Resource): else: return json[-1] - - def get_possible_forks(self, deep:bool=False, nonfork:bool=False, progress:bool=False) -> List['Project']: + def get_possible_forks(self, deep: bool = False, nonfork: bool = False, progress: bool = False) -> List['Project']: """ Iterate onto newer projects to detect is they are possible forks but not identified as such. @@ -1614,7 +1621,7 @@ class Project(Resource): other = Project(self.gitlab, **json) if (other.forked_from_project is not None and (not deep or other.forked_from_project.id == self.id)): - continue # Already registered as a fork of something + continue # Already registered as a fork of something if progress: print(".", end='', flush=True) if nonfork and other.path == self.path: @@ -1631,7 +1638,6 @@ class Project(Resource): print("", flush=True) return result - def add_origin(self, origin: 'Project') -> JSON: """ Register `self` as a fork of `origin`. @@ -1640,7 +1646,6 @@ class Project(Resource): json = self.gitlab.post(f"/projects/{self.id}/fork/{origin.id}").json() return json - def get_branches(self) -> List[JSON]: """ Return the branches of this project @@ -1796,7 +1801,7 @@ class Project(Resource): oldcontent = self.get_file(file, branch)['content'] except RuntimeError: oldcontent = None - if oldcontent is not None: # Compare old and desired content + if oldcontent is not None: # Compare old and desired content if content is None: return if encoding == "text": @@ -1809,7 +1814,7 @@ class Project(Resource): content=content, branch=branch, commit_message=commit_message, - ) + ) if encoding != "text": data['encoding'] = encoding if oldcontent is None: # file does not yet exist @@ -1875,7 +1880,8 @@ class Project(Resource): json = self.gitlab.post(f"/projects/{self.id}/protected_branches/", data=dict(name=name)).json() if 'message' in json: - raise RuntimeError(f"protecting branch {name} of project {self.path_with_namespace} failed: {json['message']}") + raise RuntimeError( + f"protecting branch {name} of project {self.path_with_namespace} failed: {json['message']}") def unprotect_branch(self, name: str) -> None: """ @@ -1887,7 +1893,8 @@ class Project(Resource): return json = r.json() if 'message' in json: - raise RuntimeError(f"unprotecting branch {name} of project {self.path_with_namespace} failed: {json['message']}") + raise RuntimeError( + f"unprotecting branch {name} of project {self.path_with_namespace} failed: {json['message']}") def get_pipelines(self) -> JSON: """ @@ -1922,25 +1929,28 @@ class Project(Resource): for pipeline in pipelines: pref = pipeline['ref'] if ref is not None and pref != ref: - continue # Skip unwanted refs + continue # Skip unwanted refs if pref in suites: - continue # skip older pipeline for this ref + continue # skip older pipeline for this ref suites[pref] = pipeline prefix = pref + '.' - report = self.gitlab.get(f"/projects/{self.id}/pipelines/{pipeline['id']}/test_report").json() + report = self.gitlab.get( + f"/projects/{self.id}/pipelines/{pipeline['id']}/test_report").json() for suite in report['test_suites']: suites[prefix + suite['name']] = suite - jobs = self.gitlab.get(f"/projects/{self.id}/pipelines/{pipeline['id']}/jobs").json() + jobs = self.gitlab.get( + f"/projects/{self.id}/pipelines/{pipeline['id']}/jobs").json() for job in jobs: name = prefix + job['name'] if name in suites: - job.update(suites[name]) + job.update(suites[name]) suites[name] = job - log = self.gitlab.get(f"/projects/{self.id}/jobs/{job['id']}/trace").text + log = self.gitlab.get( + f"/projects/{self.id}/jobs/{job['id']}/trace").text job['log'] = log if 'total_count' not in job: ok = len(re.findall('^ok ', log, re.MULTILINE)) @@ -1985,6 +1995,7 @@ class Project(Resource): return self.gitlab.get_json(f"/projects/{self.id}/members/all", depaginate=True) _get_owner_cache: Optional[JSON] = None + def get_owners(self) -> JSON: """ Return the owners including all indirect members with an access_level >= 50 @@ -2014,7 +2025,6 @@ class Project(Resource): self._get_owner_cache = res return res - def get_compare(self, from_project: 'Project', ref: str = "", from_ref: str = "") -> JSON: """ Compare `self` to another project. @@ -2031,7 +2041,7 @@ class Project(Resource): from_ref = from_project.default_branch res = self.gitlab.get(f"/projects/{self.id}/repository/compare", - data={"from": from_ref, "to": ref, "from_project_id": {from_project.id}}).json() + data={"from": from_ref, "to": ref, "from_project_id": {from_project.id}}).json() return res def get_badges(self, name: Optional[str] = None) -> List[JSON]: @@ -2136,7 +2146,7 @@ class Project(Resource): if len(badges) == 0: return self.gitlab.post_json(f'/projects/{self.id}/badges', - data=data) + data=data) badge = badges[0] if badge['link_url'] == link_url and badge['image_url'] == image_url: return badge @@ -2148,7 +2158,7 @@ class Project(Resource): date: Optional[str] = None, pull_can_fail: bool = False, force: bool = False, - anonymous: bool=False) -> None: + anonymous: bool = False) -> None: """ Clone or pull the project on the file system (with git). @@ -2239,6 +2249,7 @@ class Project(Resource): cwd=path, anonymous=anonymous) + @dataclass class Namespace(Resource): _resource_type_api_url = "namespaces" @@ -2262,7 +2273,8 @@ class Group(Resource): # In the GitLab api, the namespace of a group is specified # in the attribute `parent_id` rather than `namespace_id` _resource_type_namespace_id_attribute = "parent_id" - _read_only = Namespace._read_only + ('full_name', 'parent_id', 'projects', 'shared_projects') + _read_only = Namespace._read_only + \ + ('full_name', 'parent_id', 'projects', 'shared_projects') name: str path: str full_name: str @@ -2273,22 +2285,25 @@ class Group(Resource): lfs_enabled: bool request_access_enabled: bool web_url: Optional[str] = None - shared_with_groups: List[Dict[str, Any]] = field(default_factory=list) - projects: List[Project] = field(repr=False, default_factory=list) - shared_projects: List[Project] = field(repr=False, default_factory=list) - - parent_id: Optional[int ] = None - created_at: Optional[str ] = None - default_branch_protection: Optional[str ] = None - subgroup_creation_level: Optional[str ] = None - project_creation_level: Optional[str ] = None - auto_devops_enabled: Optional[str ] = None + shared_with_groups: List[Dict[str, Any]] = field( + default_factory=list) + projects: List[Project] = field( + repr=False, default_factory=list) + shared_projects: List[Project] = field( + repr=False, default_factory=list) + + parent_id: Optional[int] = None + created_at: Optional[str] = None + default_branch_protection: Optional[str] = None + subgroup_creation_level: Optional[str] = None + project_creation_level: Optional[str] = None + auto_devops_enabled: Optional[str] = None mentions_disabled: Optional[bool] = None emails_disabled: Optional[bool] = None two_factor_grace_period: Optional[bool] = None require_two_factor_authentication: Optional[bool] = None share_with_group_lock: Optional[bool] = None - runners_token: Optional[str ] = None + runners_token: Optional[str] = None def get_projects(self, owned: bool = False, @@ -2424,20 +2439,24 @@ class Group(Resource): for glob in ignore if fnmatch.fnmatch(project.path_with_namespace, glob)] if matches: - self.gitlab.log.info(f"Ignoring project {project.path_with_namespace} which matches {matches}") + self.gitlab.log.info( + f"Ignoring project {project.path_with_namespace} which matches {matches}") continue if project.archived: - self.gitlab.log.info(f'Ignoring archived project {project.path_with_namespace}') + self.gitlab.log.info( + f'Ignoring archived project {project.path_with_namespace}') continue if project.forked_from_project is not None: - self.gitlab.log.info(f'Ignoring project {project.path_with_namespace} which is a fork') + self.gitlab.log.info( + f'Ignoring project {project.path_with_namespace} which is a fork') continue project_full_path = os.path.join(full_path, project.path) try: forge.get_project(project_full_path) - self.gitlab.log.info(f'Ignoring project {project.path_with_namespace} which already exists in the target forge') + self.gitlab.log.info( + f'Ignoring project {project.path_with_namespace} which already exists in the target forge') continue - + except ResourceNotFoundError: pass project.export(forge, project_full_path) @@ -2482,11 +2501,11 @@ class User(Resource): private_profile: Optional[bool] = None bot: Optional[bool] = None - followers: Optional[int ] = None - following: Optional[int ] = None - commit_email: Optional[str ] = None + followers: Optional[int] = None + following: Optional[int] = None + commit_email: Optional[str] = None is_admin: Optional[bool] = None - note: Optional[str ] = None + note: Optional[str] = None def get_projects(self, with_shared: bool = False, @@ -2503,20 +2522,25 @@ class User(Resource): export = Group.export + @dataclass class AnonymousUser: username: str = "anonymous" + anonymous_user = AnonymousUser() class Unknown(enum.Enum): unknown = enum.auto() + def __repr__(self) -> str: return f'{self.name}' + unknown = Unknown.unknown + class GitLabTest(GitLab): """ A gitlab instance for testing purposes @@ -2533,7 +2557,7 @@ class GitLabTest(GitLab): self.tempdir: tempfile.TemporaryDirectory = tempfile.TemporaryDirectory() super().__init__(base_url=base_url, home_dir=self.tempdir.name) - def confirm(self, message:str) -> bool: + def confirm(self, message: str) -> bool: return True def login(self, diff --git a/travo/homework.py b/travo/homework.py index 374c84f9..dd5fe801 100755 --- a/travo/homework.py +++ b/travo/homework.py @@ -4,6 +4,7 @@ from typing import Optional, List from travo.utils import git_get_origin from travo.gitlab import GitLab, ResourceRef, Project, User, Group + @dataclass class Homework: """ @@ -16,16 +17,15 @@ class Homework: """ gitlab: GitLab - project: Project # the original project - assignment: Project # the assignment (can be `project` or not) - directory: str # The working directory. Usually `.` - - group: Optional[Group] = None # The possible correction group - group_level: int = 20 # The access level of the group + project: Project # the original project + assignment: Project # the assignment (can be `project` or not) + directory: str # The working directory. Usually `.` - instructor: Optional[User] = None # The possible instructor - instructor_level: int = 40 # The access level of the instructor + group: Optional[Group] = None # The possible correction group + group_level: int = 20 # The access level of the group + instructor: Optional[User] = None # The possible instructor + instructor_level: int = 40 # The access level of the instructor def __init__(self, url: str = '.') -> None: """ @@ -47,9 +47,11 @@ class Homework: url = git_get_origin(url) except: if url == ".": - raise RuntimeError(f"The current directory is not a valid travo/git directory. Specify a valid directory or an project URL.") + raise RuntimeError( + f"The current directory is not a valid travo/git directory. Specify a valid directory or an project URL.") else: - raise RuntimeError(f"{url} is not a valid travo/git directory. Specify a valid directory or an project URL.") + raise RuntimeError( + f"{url} is not a valid travo/git directory. Specify a valid directory or an project URL.") else: self.directory = '.' @@ -88,7 +90,8 @@ class Homework: # This is likely an assignment assignment = project.forked_from_project self.assignment = assignment - project.gitlab.log.info(f"Fork of: '{assignment.name_with_namespace}' {assignment.web_url}") + project.gitlab.log.info( + f"Fork of: '{assignment.name_with_namespace}' {assignment.web_url}") forks = [project] self.forks = forks return forks @@ -98,8 +101,7 @@ class Homework: self.copies = forks return forks - - def check_student(self, project: 'Project', fixup:bool=False) -> bool: + def check_student(self, project: 'Project', fixup: bool = False) -> bool: """ Check various configuration on a student copy. @@ -125,7 +127,8 @@ class Homework: project.add_origin(assignment) recheck = True elif assignment.id != project.forked_from_project.id: - print(f" ❌ bad fork of {project.forked_from_project.name_with_namespace}") + print( + f" ❌ bad fork of {project.forked_from_project.name_with_namespace}") result = False # Check visibiliy @@ -176,8 +179,8 @@ class Homework: print(f" ❌ bad membership of instructor {instructor.username}") result = False if fixup: - #FIXME share_with do not works on users yet - #project.share_with(instructor, self.instructor_level) + # FIXME share_with do not works on users yet + # project.share_with(instructor, self.instructor_level) recheck = True if recheck: @@ -185,8 +188,7 @@ class Homework: result = self.check_student(project) return result - - def print_info(self, project: 'Project', fixup:bool=False) -> None: + def print_info(self, project: 'Project', fixup: bool = False) -> None: """ Print most information about a student project """ @@ -218,7 +220,8 @@ class Homework: compare_rev = assignment.get_compare(project) if len(compare_rev['commits']) != 0: - print(f" not up to date with upstream; lags {len(compare_rev['commits'])}") + print( + f" not up to date with upstream; lags {len(compare_rev['commits'])}") if nocommits: return @@ -234,7 +237,8 @@ class Homework: mark = "❌" else: mark = " " - print(f" {mark} {k}: {v['status']} {v['success_count']}/{v['total_count']}") + print( + f" {mark} {k}: {v['status']} {v['success_count']}/{v['total_count']}") else: if status == "success": mark = "✅" diff --git a/travo/jupyter_course.py b/travo/jupyter_course.py index a1ddbaad..f9d9f80b 100644 --- a/travo/jupyter_course.py +++ b/travo/jupyter_course.py @@ -23,6 +23,7 @@ from .gitlab import GitLab, AuthenticationError from .gitlab import ResourceNotFoundError from . import dashboards + @contextlib.contextmanager def TrivialContextManager() -> Iterator[Any]: yield @@ -221,8 +222,10 @@ class JupyterCourse(Course): self.log.info("Sauvegarde de l'historique git") shutil.move(gitdir, tmpgitdir) try: - run(["nbgrader", "generate_assignment", "--force", assignment, f"--db='sqlite:///{db}'"]) - self.convert_from_ipynb_to_md(path=os.path.join(release_dir, assignment)) + run(["nbgrader", "generate_assignment", "--force", + assignment, f"--db='sqlite:///{db}'"]) + self.convert_from_ipynb_to_md( + path=os.path.join(release_dir, assignment)) except (): pass finally: @@ -241,14 +244,16 @@ class JupyterCourse(Course): io.open(os.path.join(target_path, ".gitignore"), "w").write( '\n'.join(self.ignore)+'\n') run(["git", "add", "."], cwd=target_path) - run(["git", "commit", "-n", "--allow-empty", f"-m {assignment} {datetime.now()}"], cwd=target_path) + run(["git", "commit", "-n", "--allow-empty", + f"-m {assignment} {datetime.now()}"], cwd=target_path) def nbgrader_update_student_list(self, tag: str = "", submitted_directory: str = "submitted") -> None: """Piece of code specific to methnum, to be more developed and generalized... """ - student_list = run(["nbgrader", "db", "student", "list"], capture_output=True).stdout.decode("utf-8") + student_list = run(["nbgrader", "db", "student", "list"], + capture_output=True).stdout.decode("utf-8") for student_id in os.listdir(submitted_directory): if tag.replace('*', '') not in student_id: continue @@ -287,10 +292,12 @@ class JupyterCourse(Course): for student_id in os.listdir("submitted"): if tag.replace('*', '') not in student_id: continue - self.convert_from_md_to_ipynb(os.path.join("submitted", student_id, assignment)) + self.convert_from_md_to_ipynb(os.path.join( + "submitted", student_id, assignment)) self.convert_from_md_to_ipynb(assignment) # run(["nbgrader", "generate_assignment", "--force", assignment]) - run(["nbgrader", "autograde", *nbgrader_config, os.path.basename(assignment_name), f"--student={tag}"]) + run(["nbgrader", "autograde", *nbgrader_config, + os.path.basename(assignment_name), f"--student={tag}"]) def generate_feedback(self, assignment_name: str, @@ -354,14 +361,16 @@ class JupyterCourse(Course): for nb_md in notebooks_md: with io.open(nb_md) as fd: if "nbgrader" not in fd.read(): - self.log.debug(f"Skip markdown file/notebook with no nbgrader metadata: {nb_md}") + self.log.debug( + f"Skip markdown file/notebook with no nbgrader metadata: {nb_md}") continue run(["jupytext", "--to", "ipynb", nb_md]) run(["nbgrader", "autograde", *nbgrader_config, assignment_name]) run(["nbgrader", "generate_feedback", *nbgrader_config, assignment_name]) autograded = os.path.join("autograded", student, assignment_name) shutil.copy(".gradebook.db", autograded) - feedback_generated = os.path.join("feedback_generated", student, assignment_name) + feedback_generated = os.path.join( + "feedback_generated", student, assignment_name) for format in ["csv", "md", "html", "svg"]: io.open(os.path.join(feedback_generated, f"scores.{format}"), "w").write( self.export_scores(format, student=student, assignment=assignment_name)) @@ -406,7 +415,8 @@ class JupyterCourse(Course): submission = assignment.submission() job = submission.ensure_autograded(force_autograde=force_autograde) - self.log.info(f"Téléchargement des retours dans {self.student_dir}/{assignment_name}/feedback/") + self.log.info( + f"Téléchargement des retours dans {self.student_dir}/{assignment_name}/feedback/") submission.repo.fetch_artifacts(job, path=assignment_dir, prefix="feedback") student = self.forge.get_current_user().username assert student is not None @@ -438,7 +448,8 @@ class JupyterCourse(Course): failed = [] for submission in assignment.submissions(): try: - self.log.info(f"Ensuring {submission.student}'s submission has been autograded") + self.log.info( + f"Ensuring {submission.student}'s submission has been autograded") submission.ensure_autograded(force_autograde=force_autograde) except RuntimeError as e: self.log.warning(e) @@ -455,11 +466,13 @@ class JupyterCourse(Course): Force the autograding of all submissions. """ self.forge.login() - assignment = self.assignment(assignment_name=assignment_name, student_group=student_group) + assignment = self.assignment( + assignment_name=assignment_name, student_group=student_group) failed = [] for submission in assignment.submissions(): try: - self.log.info(f"Ensuring {submission.student}'s submission has been autograded") + self.log.info( + f"Ensuring {submission.student}'s submission has been autograded") submission.force_autograde() except RuntimeError as e: self.log.warning(e) @@ -491,8 +504,10 @@ class JupyterCourse(Course): submissions_status = self.assignment(assignment_name=assignment_name, student_group=student_group).collect_status() self.log.info(f"Downloading submissions for {len(submissions_status)} students") - template = os.path.join("submitted", "{username}/" + f"{os.path.basename(assignment_name)}") - self.collect(assignment=assignment_name, student_group=student_group, template=template) + template = os.path.join( + "submitted", "{username}/" + f"{os.path.basename(assignment_name)}") + self.collect(assignment=assignment_name, + student_group=student_group, template=template) def collect_autograded(self, assignment_name: str, @@ -543,7 +558,8 @@ class JupyterCourse(Course): # os.path.join("autograded", student), # dirs_exist_ok=True) # shutil.rmtree(autograded_anonymous) - feedback_path = os.path.join("feedback_generated", student, os.path.basename(assignment_name)) + feedback_path = os.path.join( + "feedback_generated", student, os.path.basename(assignment_name)) if os.path.isdir("feedback"): shutil.copytree("feedback", feedback_path, @@ -729,14 +745,14 @@ class JupyterCourse(Course): if 'JUPYTERHUB_SERVICE_PREFIX' in os.environ: print("Launching formgrader in the background") jurl = jupyter_notebook_in_hub(path=url, - background=True) - assert jurl is not None # TODO check if jurl can be None and what it means + background=True) + assert jurl is not None # TODO check if jurl can be None and what it means url = jurl return HTML("Follow this link to " f"" f"start grading {assignment}" - "") # type: ignore + "") # type: ignore jupyter_notebook(url) def student_dashboard(self, diff --git a/travo/nbgrader_utils.py b/travo/nbgrader_utils.py index 78dc562a..48f6fde8 100644 --- a/travo/nbgrader_utils.py +++ b/travo/nbgrader_utils.py @@ -44,7 +44,7 @@ def merge_assignment_gradebook(source: Gradebook, target: Gradebook) -> None: def merge_submission_gradebook(source: Gradebook, target: Gradebook, - back : bool = False, + back: bool = False, on_inconsistency: str = "ERROR", # Literal("ERROR", "WARNING") new_score_policy: str = "only_empty" @@ -69,29 +69,33 @@ def merge_submission_gradebook(source: Gradebook, for notebook in submission.notebooks: for grade in notebook.grades: - args, kwargs = to_args(grade, ['name', 'notebook', 'assignment', 'student']) + args, kwargs = to_args( + grade, ['name', 'notebook', 'assignment', 'student']) try: target_grade = target.find_grade(*args) except MissingEntry: if on_inconsistency == "WARNING": log = getLogger() - log.warning(f"Skipping grade which does not exist in the target: {grade}") + log.warning( + f"Skipping grade which does not exist in the target: {grade}") continue else: raise if back: grade, target_grade = target_grade, grade - args, kwargs = to_args(grade, ['name', 'notebook', 'assignment', 'student']) + args, kwargs = to_args( + grade, ['name', 'notebook', 'assignment', 'student']) for key, value in kwargs.items(): - if ((new_score_policy=="only_empty" or new_score_policy=="only_greater") and getattr(target_grade, key) is None) \ - or new_score_policy=="force_new_score" \ - or (new_score_policy=="only_greater" and type(getattr(target_grade, key)) is float and type(getattr(grade, key)) is float and getattr(grade, key) > getattr(target_grade, key)): + if ((new_score_policy == "only_empty" or new_score_policy == "only_greater") and getattr(target_grade, key) is None) \ + or new_score_policy == "force_new_score" \ + or (new_score_policy == "only_greater" and type(getattr(target_grade, key)) is float and type(getattr(grade, key)) is float and getattr(grade, key) > getattr(target_grade, key)): setattr(target_grade, key, value) for comment in notebook.comments: - args, kwargs = to_args(comment, ['name', 'notebook', 'assignment', 'student']) + args, kwargs = to_args( + comment, ['name', 'notebook', 'assignment', 'student']) try: target_comment = target.find_comment(*args) except MissingEntry: @@ -99,19 +103,22 @@ def merge_submission_gradebook(source: Gradebook, or (comment.auto_comment is None and comment.manual_comment is None): log = getLogger() - log.warning(f"Skipping comment which does not exist in the target: {comment}") + log.warning( + f"Skipping comment which does not exist in the target: {comment}") continue else: raise if back: comment, target_comment = target_comment, comment - args, kwargs = to_args(comment, ['name', 'notebook', 'assignment', 'student']) + args, kwargs = to_args( + comment, ['name', 'notebook', 'assignment', 'student']) for key, value in kwargs.items(): if getattr(target_comment, key) is None: setattr(target_comment, key, value) + def remove_submission_gradebook(gb: Gradebook, assignment_name: str, student: str) -> None: @@ -125,7 +132,8 @@ def remove_submission_gradebook(gb: Gradebook, return gb.remove_submission(assignment_name, student) except (MissingEntry): - log.info(f"Missing entry for {assignment_name} submission from student {student} in your local .gradebook.db") + log.info( + f"Missing entry for {assignment_name} submission from student {student} in your local .gradebook.db") def remove_assignment_gradebook(gb: Gradebook, assignment_name: str, force: bool = False) -> None: @@ -161,7 +169,8 @@ def remove_assignment_gradebook(gb: Gradebook, assignment_name: str, force: bool gb.db.close() except (MissingEntry): - log.info(f"Missing entry for assignment {assignment_name} in your local .gradebook.db") + log.info( + f"Missing entry for assignment {assignment_name} in your local .gradebook.db") class GradebookExporter: @@ -182,9 +191,10 @@ class GradebookExporter: def export(self) -> Any: pass + class DataFrameGradebookExporter(GradebookExporter): def __init__(self) -> None: - self.data : List[List] = [] + self.data: List[List] = [] def record(self, student: str, assignment: str, notebook_name: str, @@ -420,9 +430,9 @@ def export_scores(gradebook: Gradebook, assignment_max_manual_score += max_manual_score assignment_extra_credit += extra_credit gradebook_exporter.record_assignment( - student, submission.assignment.name, - assignment_auto_score, assignment_max_auto_score, - assignment_manual_score, assignment_max_manual_score, - assignment_extra_credit) + student, submission.assignment.name, + assignment_auto_score, assignment_max_auto_score, + assignment_manual_score, assignment_max_manual_score, + assignment_extra_credit) return gradebook_exporter.export() diff --git a/travo/utils.py b/travo/utils.py index e0cd0c85..72319e53 100644 --- a/travo/utils.py +++ b/travo/utils.py @@ -4,9 +4,11 @@ import urllib import urllib.parse from typing import cast, Any, Sequence, Optional import logging -import colorlog # type: ignore +import colorlog # type: ignore + +_logger: Optional[logging.Logger] = None + -_logger : Optional[logging.Logger] = None def getLogger() -> logging.Logger: global _logger if _logger is None: @@ -17,6 +19,7 @@ def getLogger() -> logging.Logger: _logger.addHandler(handler) return _logger + def urlencode(s: str) -> str: """ Encode `s` for inclusion in a URL @@ -26,7 +29,8 @@ def urlencode(s: str) -> str: >>> urlencode("foo/bar!") 'foo%2Fbar%21' """ - return urllib.parse.urlencode({'':s})[1:] + return urllib.parse.urlencode({'': s})[1:] + def run(args: Sequence[str], check: bool = True, **kwargs: Any) -> subprocess.CompletedProcess: @@ -44,6 +48,7 @@ def run(args: Sequence[str], getLogger().info("Running: " + ' '.join(args)) return subprocess.run(args, check=check, **kwargs) + def git_get_origin(cwd: str = ".") -> str: """ Return the origin of the current repository @@ -57,7 +62,8 @@ def git_get_origin(cwd: str = ".") -> str: >>> git_get_origin() 'https://xxx.yy/truc.git' """ - result = run(["git", "remote", "get-url", "origin"], check=False, capture_output=True, cwd=cwd) + result = run(["git", "remote", "get-url", "origin"], + check=False, capture_output=True, cwd=cwd) if result.returncode != 0: raise RuntimeError(result.stdout.decode().strip()) for line in result.stdout.decode().splitlines(): -- GitLab From 0ddaf0671b993ac151721278ac8c9024dfadf37a Mon Sep 17 00:00:00 2001 From: Tchaps Dev Date: Sun, 21 May 2023 05:27:45 -0400 Subject: [PATCH 02/17] autopep8 python code formatter --- travo/assignment.py | 33 ++-- travo/course.py | 48 +++--- travo/dashboards.py | 80 ++++++---- travo/gitlab.py | 339 +++++++++++++++++++++------------------- travo/homework.py | 2 +- travo/jupyter_course.py | 75 ++++++--- travo/nbgrader_utils.py | 41 +++-- 7 files changed, 362 insertions(+), 256 deletions(-) diff --git a/travo/assignment.py b/travo/assignment.py index 5788f7ab..0d5f2afc 100644 --- a/travo/assignment.py +++ b/travo/assignment.py @@ -13,18 +13,18 @@ from .i18n import _ @dataclass class Assignment: - forge: Forge - log: Logger - repo_path: str - instructors_path: str - name: str - username: Optional[str] = None - leader_name: Optional[str] = None - assignment_dir: Optional[str] = None - script: str = field(default='travo') + forge: Forge + log: Logger + repo_path: str + instructors_path: str + name: str + username: Optional[str] = None + leader_name: Optional[str] = None + assignment_dir: Optional[str] = None + script: str = field(default='travo') jobs_enabled_for_students: bool = field(default=True) - expires_at: Optional[str] = None - _repo_cache: Optional[Project] = None + expires_at: Optional[str] = None + _repo_cache: Optional[Project] = None @classmethod def from_url(cls, @@ -502,7 +502,8 @@ Déplacez ou supprimez le # Something special needs to be done for "." assert assignment_dir != "." backup_dir = f"{assignment_dir}_{now}" - self.log.warning(f"""La mise à jour n'a pas pu se faire du fait d'un conflit + self.log.warning( + f"""La mise à jour n'a pas pu se faire du fait d'un conflit Votre devoir local va être renommé en {backup_dir} et une copie fraîche du sujet téléchargée à la place """) @@ -511,7 +512,8 @@ Déplacez ou supprimez le else: self.log.error( "- La mise à jour n'a pas pu se faire du fait d'un conflit.") - self.log.info(f""" Pour renommer votre devoir local et forcer la mise à jour, + self.log.info( + f""" Pour renommer votre devoir local et forcer la mise à jour, utilisez l'option force; en ligne de commande: {self.script} fetch ... --force @@ -557,7 +559,10 @@ Déplacez ou supprimez le return self.forge.git(args, cwd=assignment_dir, **kwargs) self.log.info("- Enregistrement des changements:") - if git(["commit", "--all", "-m", f"Soumission depuis {hostname} par {user.name}"], + if git(["commit", + "--all", + "-m", + f"Soumission depuis {hostname} par {user.name}"], check=False).returncode != 0: self.log.info(" Pas de changement à enregistrer") diff --git a/travo/course.py b/travo/course.py index 399de2c0..706a981f 100644 --- a/travo/course.py +++ b/travo/course.py @@ -42,7 +42,7 @@ class CourseAssignment(Assignment): >>> course = getfixture("rich_course") >>> course.assignment("SubCourse/Assignment1").personal_repo_path() 'travo-test-etu/TestCourse-2020-2021-SubCourse-Assignment1' - >>> course.assignment("SubCourse/Assignment1", + >>> course.assignment("SubCourse/Assignment1", ... student_group="Group1").personal_repo_path() 'travo-test-etu/TestCourse-2020-2021-SubCourse-Assignment1' """ @@ -174,22 +174,22 @@ class Course: If you wish to use another course layout, you can set the above variables directly. """ - forge: Forge - path: str - name: str - student_dir: str + forge: Forge + path: str + name: str + student_dir: str assignments_group_path: str = "" assignments_group_name: str = "" - session_path: Optional[str] = None - session_name: Optional[str] = None # Will be defined as soon as session_path is - assignments: Optional[List[str]] = None - student_groups: Optional[List[str]] = None - script: str = "travo" - url: Optional[str] = None + session_path: Optional[str] = None + session_name: Optional[str] = None # Will be defined as soon as session_path is + assignments: Optional[List[str]] = None + student_groups: Optional[List[str]] = None + script: str = "travo" + url: Optional[str] = None jobs_enabled_for_students: bool = False - log: logging.Logger = field(default_factory=getLogger) - mail_extension: str = "" - expires_at: Optional[str] = None + log: logging.Logger = field(default_factory=getLogger) + mail_extension: str = "" + expires_at: Optional[str] = None def __post_init__(self) -> None: # TODO: "Check that: name contains only letters, digits, emojis, '_', '.', dash, space. It must start with letter, digit, emoji or '_'." @@ -467,8 +467,9 @@ class Course: """ self.ensure_work_dir() assignment_dir = self.work_dir(assignment=assignment) - return self.assignment(assignment, student_group=student_group).fetch(assignment_dir=assignment_dir, - force=force) + return self.assignment( + assignment, student_group=student_group).fetch( + assignment_dir=assignment_dir, force=force) def submit(self, assignment: str, @@ -594,11 +595,11 @@ class Course: self.forge.remove_project(repo.path_with_namespace, force=force) def collect(self, - assignment: str, + assignment: str, student_group: Optional[str] = None, - student: Optional[str] = None, - template: str = "{username}", - date: Optional[str] = None) -> None: + student: Optional[str] = None, + template: str = "{username}", + date: Optional[str] = None) -> None: """ Collect the student's assignments @@ -623,7 +624,7 @@ class Course: date=date) def ensure_instructor_access(self, - assignment: str, + assignment: str, student_group: Optional[str] = None) -> None: """ Ensure instructor access to the student repositories. @@ -647,7 +648,10 @@ class Course: """Run an arbitrary shell command""" return run(args) - def get_released_assignments(self, level: str = "", order_by: str = "created_at") -> List[str]: + def get_released_assignments( + self, + level: str = "", + order_by: str = "created_at") -> List[str]: group_path = self.assignments_group_path if level: group_path += "/" + level diff --git a/travo/dashboards.py b/travo/dashboards.py index bdd820eb..22c72bba 100644 --- a/travo/dashboards.py +++ b/travo/dashboards.py @@ -726,12 +726,18 @@ class AssignmentInstructorDashboard(HBox): return self.course.collect_for_nbgrader( assignment_name=self.name, student_group=self.student_group) - self.course.ensure_autograded(assignment_name=self.name, student_group=self.student_group, - force_autograde=self.force_autograding) + self.course.ensure_autograded( + assignment_name=self.name, + student_group=self.student_group, + force_autograde=self.force_autograding) self.course.collect_autograded( assignment_name=self.name, student_group=self.student_group) - self.course.merge_autograded_db(assignment_name=os.path.basename(self.name), on_inconsistency="WARNING", back=False, - new_score_policy=self.new_score_policy) + self.course.merge_autograded_db( + assignment_name=os.path.basename( + self.name), + on_inconsistency="WARNING", + back=False, + new_score_policy=self.new_score_policy) self.course.clear_needs_manual_grade(os.path.basename(self.name)) def feedback_cmd(self, tag: str = '*') -> None: @@ -741,7 +747,7 @@ class AssignmentInstructorDashboard(HBox): self.course.generate_feedback(os.path.basename(self.name), tag=tag, new_score_policy=self.new_score_policy) # self.course.merge_autograded_db(os.path.basename(self.name), back=True, on_inconsistency="WARNING", - # tag=tag, new_score_policy=self.new_score_policy.value) + # tag=tag, new_score_policy=self.new_score_policy.value) self.course.release_feedback(self.name, student_group=self.student_group) def open_formgrader_cmd(self, event: Any) -> None: @@ -779,17 +785,25 @@ class AssignmentInstructorDashboard(HBox): try: path = os.path.join(self.course.release_directory, os.path.basename(self.assignment.name)) - date = subprocess.run(['git', 'log', '-1', '--format=%ai'], check=True, text=True, capture_output=True, + date = subprocess.run(['git', + 'log', + '-1', + '--format=%ai'], + check=True, + text=True, + capture_output=True, cwd=path).stdout status = f"last generation: {date}" - except: + except BaseException: status = "not generated" return status def count_submissions_cmd(self, submitted_directory: str = "submitted") -> str: status = "" - number_of_copies = len(glob.glob(f"{submitted_directory}/*/{os.path.basename(self.assignment.name)}", - recursive=True)) + number_of_copies = len( + glob.glob( + f"{submitted_directory}/*/{os.path.basename(self.assignment.name)}", + recursive=True)) if number_of_copies > 0: status += f"#submissions: {number_of_copies}\n" return status @@ -823,7 +837,7 @@ class AssignmentInstructorDashboard(HBox): status += f"Needs manual grading: {counts}\nGrades: {np.mean(grades):.2f}+/-{np.std(grades):.2f}\n" else: status = "No grades" - except: + except BaseException: pass return status @@ -837,8 +851,10 @@ class AssignmentInstructorDashboard(HBox): def release_feedback_status_cmd(self, student_group: Optional[Any]) -> str: try: - url = self.course.forge.get_project(self.course.assignment(self.assignment.name, - student_group=student_group).repo_path).http_url_to_repo + url = self.course.forge.get_project( + self.course.assignment( + self.assignment.name, + student_group=student_group).repo_path).http_url_to_repo url = "go to " + url.replace(".git", "/-/forks") except ResourceNotFoundError: url = "not released" @@ -858,14 +874,18 @@ class CourseInstructorDashboard(VBox): self.course = course self.course.forge.login() - self.release_mode = RadioButtons(description="", value=None, options=["public", "private"], - layout={'width': 'fit-content'}) - self.force_autograding = RadioButtons(description="", value=False, options=[False, True], - layout={'width': 'fit-content'}) - self.new_score_policy = RadioButtons(description="", value="only_greater", - options=["only_empty", - "only_greater", "force_new_score"], - layout={'width': 'fit-content'}) + self.release_mode = RadioButtons( + description="", value=None, options=[ + "public", "private"], layout={ + 'width': 'fit-content'}) + self.force_autograding = RadioButtons( + description="", value=False, options=[ + False, True], layout={ + 'width': 'fit-content'}) + self.new_score_policy = RadioButtons( + description="", value="only_greater", options=[ + "only_empty", "only_greater", "force_new_score"], layout={ + 'width': 'fit-content'}) self.header = HBox( [HTML(f'{course.name}', @@ -971,8 +991,8 @@ class CourseGradeDashboard(VBox): self.dashboard_grade_filename = "dashboard-grades.csv" if self.course.assignments is None: self.course.assignments = self.course.get_released_assignments() - self.assignments_UI = Dropdown(description="assignments", value=None, - options=["all"] + [a for a in self.course.assignments], width="350px") + self.assignments_UI = Dropdown(description="assignments", value=None, options=[ + "all"] + [a for a in self.course.assignments], width="350px") self.get_scores_UI = Button(description="update scores", button_style="primary", @@ -1039,8 +1059,13 @@ class CourseGradeDashboard(VBox): text_color="black", background_color=Expr(_format_status)) grid_layout = {"height": "300px"} - self.grid = DataGrid(self.df, base_column_size=200, base_header_size=200, layout=grid_layout, editable=True, - renderers=renderers) + self.grid = DataGrid( + self.df, + base_column_size=200, + base_header_size=200, + layout=grid_layout, + editable=True, + renderers=renderers) self.grid.auto_fit_params = {"area": "all", "padding": 100} self.grid.auto_fit_columns = True @@ -1115,8 +1140,8 @@ class CourseGradeDashboard(VBox): try: # project = course.forge.get_project(path) # forks = project.get_forks(recursive=True) - submissions_status = self.course.assignment(assignment_name=assignment, - student_group=student_group).collect_status() + submissions_status = self.course.assignment( + assignment_name=assignment, student_group=student_group).collect_status() # course.log.info(f"Collecting autograded for {len(submissions_status)} students") bad_projects = [] if len(submissions_status) == 0: @@ -1148,7 +1173,8 @@ class CourseGradeDashboard(VBox): manual_score = np.nansum(scores["manual_score"].values) max_manual_score = np.sum( scores["max_manual_score"].values) - if np.all(np.isnan(scores["manual_score"].values)) and ~np.isnan(max_manual_score) and max_manual_score > 0: + if np.all(np.isnan(scores["manual_score"].values)) and ~np.isnan( + max_manual_score) and max_manual_score > 0: d[student][assignment + f"-note (/{int(scores['max_total_score'].values[0])})"] = "attente notation manuelle" else: diff --git a/travo/gitlab.py b/travo/gitlab.py index a60e1f0c..e9d2864d 100644 --- a/travo/gitlab.py +++ b/travo/gitlab.py @@ -44,7 +44,7 @@ def request_credentials_basic(forge: 'GitLab', """ Basic interactive UI for requesting credentials to the user """ - print(_("please authenticate on", url=forge.base_url)) + print(_("please authenticate on", url=forge.base_url)) if username is None: username = input(_('username') + ': ') if username == 'anonymous': @@ -56,15 +56,15 @@ def request_credentials_basic(forge: 'GitLab', class GitLab: - debug: bool = False + debug: bool = False home_dir: str = os.environ.get("HOME", "") - token: Optional[str] = None - token_expires_at: Optional[float] = None + token: Optional[str] = None + token_expires_at: Optional[float] = None _current_user: Optional[Union['User', 'AnonymousUser']] = None base_url: str - api: str - session: requests.Session - log: logging.Logger + api: str + session: requests.Session + log: logging.Logger # on_missing_credentials should be a callable that either # returns the credentials as a tuple (username, password) # (typically after requesting them interactively to the user), @@ -74,11 +74,11 @@ class GitLab: def __init__(self, base_url: str, - token: Optional[str] = None, - log: logging.Logger = getLogger(), + token: Optional[str] = None, + log: logging.Logger = getLogger(), home_dir: Optional[str] = None): if base_url[-1] != "/": - base_url = base_url+"/" + base_url = base_url + "/" if not base_url[:8] == "https://": raise ValueError("Only the https protocol is supported") self.base_url = base_url @@ -113,11 +113,11 @@ class GitLab: @return whether the token is valid """ t = time.time() - response = self.session.get(self.base_url+"/oauth/token/info", + response = self.session.get(self.base_url + "/oauth/token/info", data=dict(access_token=token)) try: json = response.json() - except: + except BaseException: response.raise_for_status() if 'error' in json: assert json['error'] == 'invalid_token' @@ -265,7 +265,7 @@ class GitLab: self._current_user = anonymous_user return - result = self.session.post(self.base_url+"/oauth/token", + result = self.session.post(self.base_url + "/oauth/token", params=dict(grant_type="password", username=username, password=password, @@ -827,10 +827,10 @@ class GitLab: cwd=dir) def collect_forks(self, - path: str, + path: str, username: Optional[str] = None, template: str = "{username}", - date: Optional[str] = None) -> None: + date: Optional[str] = None) -> None: """ Collect all forks of this project @@ -940,8 +940,8 @@ class ResourceRef: # - setting frozen attributes in __post_init__ # see e.g. https://groups.google.com/forum/#!topic/dev-python/7vBAZn_jEfQ forge: 'Forge' = field(default=cast('Forge', None)) - path: str = field(default=cast('str', None)) - url: InitVar[Optional[str]] = None + path: str = field(default=cast('str', None)) + url: InitVar[Optional[str]] = None def __post_init__(self, url: Optional[str] = None) -> None: if (self.forge is None) == (url is None): @@ -961,8 +961,8 @@ class ResourceRef: root_url = "https://" + r.groups()[1] path = r.groups()[2] object.__setattr__(self, "forge", GitLab(root_url)) - object.__setattr__(self, "path", path) - object.__setattr__(self, "path", self.path.lstrip("/")) + object.__setattr__(self, "path", path) + object.__setattr__(self, "path", self.path.lstrip("/")) if self.path.endswith(".git"): object.__setattr__(self, "path", self.path[:-4]) @@ -1148,77 +1148,77 @@ class Project(Resource): last_activity_at: str - web_url: Optional[str] = None - shared_with_groups: List[Dict[str, Any]] = field( + web_url: Optional[str] = None + shared_with_groups: List[Dict[str, Any]] = field( default_factory=list) - visibility: Optional[str] = None - merge_method: Optional[str] = None - _links: Optional[dict] = None - archived: Optional[bool] = None + visibility: Optional[str] = None + merge_method: Optional[str] = None + _links: Optional[dict] = None + archived: Optional[bool] = None resolve_outdated_diff_discussions: Optional[bool] = None - container_registry_enabled: Optional[bool] = None - container_expiration_policy: Optional[dict] = None - issues_enabled: Optional[bool] = None - merge_requests_enabled: Optional[bool] = None - wiki_enabled: Optional[bool] = None - jobs_enabled: Optional[bool] = None - snippets_enabled: Optional[bool] = None - shared_runners_enabled: Optional[bool] = None - lfs_enabled: Optional[bool] = None - packages_enabled: Optional[bool] = None - service_desk_enabled: Optional[bool] = None - service_desk_address: Optional[str] = None - empty_repo: Optional[bool] = None - public_jobs: Optional[bool] = None + container_registry_enabled: Optional[bool] = None + container_expiration_policy: Optional[dict] = None + issues_enabled: Optional[bool] = None + merge_requests_enabled: Optional[bool] = None + wiki_enabled: Optional[bool] = None + jobs_enabled: Optional[bool] = None + snippets_enabled: Optional[bool] = None + shared_runners_enabled: Optional[bool] = None + lfs_enabled: Optional[bool] = None + packages_enabled: Optional[bool] = None + service_desk_enabled: Optional[bool] = None + service_desk_address: Optional[str] = None + empty_repo: Optional[bool] = None + public_jobs: Optional[bool] = None only_allow_merge_if_pipeline_succeeds: Optional[bool] = None - request_access_enabled: Optional[bool] = None + request_access_enabled: Optional[bool] = None only_allow_merge_if_all_discussions_are_resolved: Optional[bool] = None printing_merge_request_link_enabled: Optional[bool] = None - can_create_merge_request_in: Optional[bool] = None - issues_access_level: Optional[str] = None - repository_access_level: Optional[str] = None - merge_requests_access_level: Optional[str] = None - forking_access_level: Optional[str] = None - wiki_access_level: Optional[str] = None - builds_access_level: Optional[str] = None - snippets_access_level: Optional[str] = None - pages_access_level: Optional[str] = None - operations_access_level: Optional[str] = None - analytics_access_level: Optional[str] = None - emails_disabled: Optional[bool] = None - ci_default_git_depth: Optional[int] = None - ci_forward_deployment_enabled: Optional[bool] = None - build_timeout: Optional[int] = None - auto_cancel_pending_pipelines: Optional[bool] = None - build_coverage_regex: Optional[str] = None - allow_merge_on_skipped_pipeline: Optional[bool] = None - remove_source_branch_after_merge: Optional[bool] = None - suggestion_commit_message: Optional[str] = None - auto_devops_enabled: Optional[bool] = None - auto_devops_deploy_strategy: Optional[str] = None - autoclose_referenced_issues: Optional[bool] = None - - creator_id: Optional[int] = None - import_status: Optional[str] = None - open_issues_count: Optional[int] = None - ci_config_path: Optional[str] = None - - repository_storage: Optional[str] = None - - permissions: Optional[dict] = None - forked_from_project: Optional['Project'] = None - import_error: Optional[str] = None - runners_token: Optional[str] = None - owner: Optional['User'] = None - - build_git_strategy: Optional[str] = None - restrict_user_defined_variables: Optional[bool] = None - - container_registry_image_prefix: Optional[str] = None - topics: Optional[list] = None - ci_job_token_scope_enabled: Optional[bool] = None - squash_option: Optional[str] = None - keep_latest_artifact: Optional[bool] = None + can_create_merge_request_in: Optional[bool] = None + issues_access_level: Optional[str] = None + repository_access_level: Optional[str] = None + merge_requests_access_level: Optional[str] = None + forking_access_level: Optional[str] = None + wiki_access_level: Optional[str] = None + builds_access_level: Optional[str] = None + snippets_access_level: Optional[str] = None + pages_access_level: Optional[str] = None + operations_access_level: Optional[str] = None + analytics_access_level: Optional[str] = None + emails_disabled: Optional[bool] = None + ci_default_git_depth: Optional[int] = None + ci_forward_deployment_enabled: Optional[bool] = None + build_timeout: Optional[int] = None + auto_cancel_pending_pipelines: Optional[bool] = None + build_coverage_regex: Optional[str] = None + allow_merge_on_skipped_pipeline: Optional[bool] = None + remove_source_branch_after_merge: Optional[bool] = None + suggestion_commit_message: Optional[str] = None + auto_devops_enabled: Optional[bool] = None + auto_devops_deploy_strategy: Optional[str] = None + autoclose_referenced_issues: Optional[bool] = None + + creator_id: Optional[int] = None + import_status: Optional[str] = None + open_issues_count: Optional[int] = None + ci_config_path: Optional[str] = None + + repository_storage: Optional[str] = None + + permissions: Optional[dict] = None + forked_from_project: Optional['Project'] = None + import_error: Optional[str] = None + runners_token: Optional[str] = None + owner: Optional['User'] = None + + build_git_strategy: Optional[str] = None + restrict_user_defined_variables: Optional[bool] = None + + container_registry_image_prefix: Optional[str] = None + topics: Optional[list] = None + ci_job_token_scope_enabled: Optional[bool] = None + squash_option: Optional[str] = None + keep_latest_artifact: Optional[bool] = None def archive(self) -> 'Project': """Archive current project""" @@ -1258,7 +1258,8 @@ class Project(Resource): f'Exporting project {self.path_with_namespace} to {full_path} on {forge}') self.gitlab.post_json(f'/projects/{self.id}/export') - while self.gitlab.get_json(f'/projects/{self.id}/export')['export_status'] != 'finished': + while self.gitlab.get_json( + f'/projects/{self.id}/export')['export_status'] != 'finished': time.sleep(1) self.gitlab.log.info('waiting for export to complete') res = self.gitlab.get(f'/projects/{self.id}/export/download') @@ -1570,7 +1571,8 @@ class Project(Resource): See `get_possible_forks`. """ - # Need to iterate because there is no direct link to the last page nor a ascending order + # Need to iterate because there is no direct link to the last page nor a + # ascending order page: Optional[str] = "1" while page is not None and page != '': res = self.gitlab.get(f"/projects/{self.id}/repository/commits", @@ -1582,7 +1584,11 @@ class Project(Resource): else: return json[-1] - def get_possible_forks(self, deep: bool = False, nonfork: bool = False, progress: bool = False) -> List['Project']: + def get_possible_forks( + self, + deep: bool = False, + nonfork: bool = False, + progress: bool = False) -> List['Project']: """ Iterate onto newer projects to detect is they are possible forks but not identified as such. @@ -1681,7 +1687,8 @@ class Project(Resource): 'protected': True, 'web_url': 'https://gitlab-test.info.uqam.ca/groupe-public-test/projet-public/-/tree/master'}] """ - return cast(list, self.gitlab.get(f"/projects/{self.id}/repository/branches").json()) + return cast(list, self.gitlab.get( + f"/projects/{self.id}/repository/branches").json()) def get_branch(self, branch_name: Optional[str] = None) -> JSON: """ @@ -1994,7 +2001,7 @@ class Project(Resource): return self.gitlab.get_json(f"/projects/{self.id}/members/all", depaginate=True) - _get_owner_cache: Optional[JSON] = None + _get_owner_cache: Optional[JSON] = None def get_owners(self) -> JSON: """ @@ -2025,7 +2032,11 @@ class Project(Resource): self._get_owner_cache = res return res - def get_compare(self, from_project: 'Project', ref: str = "", from_ref: str = "") -> JSON: + def get_compare( + self, + from_project: 'Project', + ref: str = "", + from_ref: str = "") -> JSON: """ Compare `self` to another project. @@ -2040,8 +2051,13 @@ class Project(Resource): if from_ref == "": from_ref = from_project.default_branch - res = self.gitlab.get(f"/projects/{self.id}/repository/compare", - data={"from": from_ref, "to": ref, "from_project_id": {from_project.id}}).json() + res = self.gitlab.get( + f"/projects/{self.id}/repository/compare", + data={ + "from": from_ref, + "to": ref, + "from_project_id": { + from_project.id}}).json() return res def get_badges(self, name: Optional[str] = None) -> List[JSON]: @@ -2078,10 +2094,10 @@ class Project(Resource): ... image_url='https://foo_image', ... ) {'name': 'Foo', - 'link_url': 'https://foo_link', + 'link_url': 'https://foo_link', 'image_url': 'https://foo_image', 'rendered_link_url': 'https://foo_link', - 'rendered_image_url': 'https://foo_image', + 'rendered_image_url': 'https://foo_image', 'id': ..., 'kind': 'project'} >>> project.ensure_badge(name='Bar', @@ -2093,7 +2109,7 @@ class Project(Resource): 'image_url': 'https://bar_image', 'rendered_link_url': 'https://bar_link', 'rendered_image_url': 'https://bar_image', - 'id': ..., + 'id': ..., 'kind': 'project'} >>> project.get_badges(name="Bar") [{'name': 'Bar', @@ -2101,14 +2117,14 @@ class Project(Resource): 'image_url': 'https://bar_image', 'rendered_link_url': 'https://bar_link', 'rendered_image_url': 'https://bar_image', - 'id': ..., + 'id': ..., 'kind': 'project'}] >>> project.get_badges() [{'name': 'Foo', - 'link_url': 'https://foo_link', + 'link_url': 'https://foo_link', 'image_url': 'https://foo_image', 'rendered_link_url': 'https://foo_link', - 'rendered_image_url': 'https://foo_image', + 'rendered_image_url': 'https://foo_image', 'id': ..., 'kind': 'project'}, {'name': 'Bar', @@ -2116,7 +2132,7 @@ class Project(Resource): 'image_url': 'https://bar_image', 'rendered_link_url': 'https://bar_link', 'rendered_image_url': 'https://bar_image', - 'id': ..., + 'id': ..., 'kind': 'project'}] >>> project.ensure_badge(name='Bar', @@ -2128,7 +2144,7 @@ class Project(Resource): 'image_url': 'https://bar2_image', 'rendered_link_url': 'https://bar2_link', 'rendered_image_url': 'https://bar2_image', - 'id': ..., + 'id': ..., 'kind': 'project'} >>> project.get_badges(name="Bar") [{'name': 'Bar', @@ -2136,7 +2152,7 @@ class Project(Resource): 'image_url': 'https://bar2_image', 'rendered_link_url': 'https://bar2_link', 'rendered_image_url': 'https://bar2_image', - 'id': ..., + 'id': ..., 'kind': 'project'}] """ @@ -2245,7 +2261,10 @@ class Project(Resource): self.http_url_to_repo, path], anonymous=anonymous) if date is not None: - self.gitlab.git(["-c", "advice.detachedHead=false", "checkout", "origin/HEAD@{'"+date+"'}"], + self.gitlab.git(["-c", + "advice.detachedHead=false", + "checkout", + "origin/HEAD@{'" + date + "'}"], cwd=path, anonymous=anonymous) @@ -2261,9 +2280,9 @@ class Namespace(Resource): path: str full_path: str kind: str = field(repr=False) - web_url: Optional[str] = None - parent_id: Optional[int] = None - avatar_url: Optional[str] = None + web_url: Optional[str] = None + parent_id: Optional[int] = None + avatar_url: Optional[str] = None members_count_with_descendants: Optional[int] = None @@ -2284,26 +2303,26 @@ class Group(Resource): avatar_url: str lfs_enabled: bool request_access_enabled: bool - web_url: Optional[str] = None - shared_with_groups: List[Dict[str, Any]] = field( + web_url: Optional[str] = None + shared_with_groups: List[Dict[str, Any]] = field( default_factory=list) - projects: List[Project] = field( + projects: List[Project] = field( repr=False, default_factory=list) - shared_projects: List[Project] = field( + shared_projects: List[Project] = field( repr=False, default_factory=list) - parent_id: Optional[int] = None - created_at: Optional[str] = None - default_branch_protection: Optional[str] = None - subgroup_creation_level: Optional[str] = None - project_creation_level: Optional[str] = None - auto_devops_enabled: Optional[str] = None - mentions_disabled: Optional[bool] = None - emails_disabled: Optional[bool] = None - two_factor_grace_period: Optional[bool] = None + parent_id: Optional[int] = None + created_at: Optional[str] = None + default_branch_protection: Optional[str] = None + subgroup_creation_level: Optional[str] = None + project_creation_level: Optional[str] = None + auto_devops_enabled: Optional[str] = None + mentions_disabled: Optional[bool] = None + emails_disabled: Optional[bool] = None + two_factor_grace_period: Optional[bool] = None require_two_factor_authentication: Optional[bool] = None - share_with_group_lock: Optional[bool] = None - runners_token: Optional[str] = None + share_with_group_lock: Optional[bool] = None + runners_token: Optional[str] = None def get_projects(self, owned: bool = False, @@ -2467,45 +2486,45 @@ class Group(Resource): class User(Resource): _resource_type_api_url = "users" _read_only = ('id', 'path', 'namespace') - web_url: Optional[str] = None - name: Optional[str] = None - username: Optional[str] = None - state: Optional[str] = None - avatar_url: Optional[str] = None - created_at: Optional[str] = None - bio: Optional[str] = None - bio_html: Optional[str] = None - job_title: Optional[str] = None - work_information: Optional[str] = None - message: Optional[str] = None - location: Optional[str] = None - public_email: Optional[str] = None - skype: Optional[str] = None - linkedin: Optional[str] = None - twitter: Optional[str] = None - website_url: Optional[str] = None - organization: Optional[str] = None - last_sign_in_at: Optional[str] = None - confirmed_at: Optional[str] = None - last_activity_on: Optional[str] = None - email: Optional[str] = None - theme_id: Optional[int] = None - color_scheme_id: Optional[int] = None - projects_limit: Optional[int] = None - current_sign_in_at: Optional[str] = None - identities: Optional[List[Dict]] = None - can_create_group: Optional[bool] = None - can_create_project: Optional[bool] = None - two_factor_enabled: Optional[bool] = None - external: Optional[bool] = None - private_profile: Optional[bool] = None - - bot: Optional[bool] = None - followers: Optional[int] = None - following: Optional[int] = None - commit_email: Optional[str] = None - is_admin: Optional[bool] = None - note: Optional[str] = None + web_url: Optional[str] = None + name: Optional[str] = None + username: Optional[str] = None + state: Optional[str] = None + avatar_url: Optional[str] = None + created_at: Optional[str] = None + bio: Optional[str] = None + bio_html: Optional[str] = None + job_title: Optional[str] = None + work_information: Optional[str] = None + message: Optional[str] = None + location: Optional[str] = None + public_email: Optional[str] = None + skype: Optional[str] = None + linkedin: Optional[str] = None + twitter: Optional[str] = None + website_url: Optional[str] = None + organization: Optional[str] = None + last_sign_in_at: Optional[str] = None + confirmed_at: Optional[str] = None + last_activity_on: Optional[str] = None + email: Optional[str] = None + theme_id: Optional[int] = None + color_scheme_id: Optional[int] = None + projects_limit: Optional[int] = None + current_sign_in_at: Optional[str] = None + identities: Optional[List[Dict]] = None + can_create_group: Optional[bool] = None + can_create_project: Optional[bool] = None + two_factor_enabled: Optional[bool] = None + external: Optional[bool] = None + private_profile: Optional[bool] = None + + bot: Optional[bool] = None + followers: Optional[int] = None + following: Optional[int] = None + commit_email: Optional[str] = None + is_admin: Optional[bool] = None + note: Optional[str] = None def get_projects(self, with_shared: bool = False, diff --git a/travo/homework.py b/travo/homework.py index dd5fe801..56a5a489 100755 --- a/travo/homework.py +++ b/travo/homework.py @@ -45,7 +45,7 @@ class Homework: self.directory = url try: url = git_get_origin(url) - except: + except BaseException: if url == ".": raise RuntimeError( f"The current directory is not a valid travo/git directory. Specify a valid directory or an project URL.") diff --git a/travo/jupyter_course.py b/travo/jupyter_course.py index f9d9f80b..b3030040 100644 --- a/travo/jupyter_course.py +++ b/travo/jupyter_course.py @@ -31,7 +31,7 @@ def TrivialContextManager() -> Iterator[Any]: # Currently just a dummy grade report, just for making some tests grade_report = """ - + @@ -167,7 +167,7 @@ class JupyterCourse(Course): os.remove(testfile) if failures + errors: print(_("validation failed", errors=str(errors), failures=str(failures))) - exit(failures+errors) + exit(failures + errors) def convert_from_md_to_ipynb(self, path: str) -> None: import jupytext # type: ignore @@ -204,8 +204,12 @@ class JupyterCourse(Course): file.write(filedata) run(["jupytext", "--sync", ipynbname]) - def generate_assignment(self, assignment: str, release_dir: str = "release", - add_gitignore: bool = True, add_gitlab_ci: bool = True) -> None: + def generate_assignment( + self, + assignment: str, + release_dir: str = "release", + add_gitignore: bool = True, + add_gitlab_ci: bool = True) -> None: """ Generate the student version of the given assignment """ @@ -242,7 +246,7 @@ class JupyterCourse(Course): self.gitlab_ci_yml.format(assignment=assignment)) if add_gitignore: io.open(os.path.join(target_path, ".gitignore"), "w").write( - '\n'.join(self.ignore)+'\n') + '\n'.join(self.ignore) + '\n') run(["git", "add", "."], cwd=target_path) run(["git", "commit", "-n", "--allow-empty", f"-m {assignment} {datetime.now()}"], cwd=target_path) @@ -264,13 +268,20 @@ class JupyterCourse(Course): elif student_id.count(".") == 2: group, firstname, lastname = student_id.split(".") else: - raise ValueError(f"Unknown student format {student_id}. " - f"Must be group.firstname.lastname or firstname.lastname.") + raise ValueError( + f"Unknown student format {student_id}. " + f"Must be group.firstname.lastname or firstname.lastname.") firstname = firstname.lower() lastname = lastname.lower() email = f"{firstname}.{lastname}@{self.mail_extension}" - run(["nbgrader", "db", "student", "add", f"{student_id}", - f"--first-name={firstname}", f"--last-name={lastname}", f"--email={email}"]) + run(["nbgrader", + "db", + "student", + "add", + f"{student_id}", + f"--first-name={firstname}", + f"--last-name={lastname}", + f"--email={email}"]) def get_nbgrader_config(self) -> List[str]: nbgrader_config = ['--CourseDirectory.ignore=' + str(self.ignore_nbgrader)] @@ -308,13 +319,22 @@ class JupyterCourse(Course): The student name can be given with wildcard. """ nbgrader_config = self.get_nbgrader_config() - run(["nbgrader", "generate_feedback", "--force", "--CourseDirectory.feedback_directory=feedback_generated", - *nbgrader_config, os.path.basename(assignment_name), f"--student={tag}"]) + run(["nbgrader", + "generate_feedback", + "--force", + "--CourseDirectory.feedback_directory=feedback_generated", + *nbgrader_config, + os.path.basename(assignment_name), + f"--student={tag}"]) if os.path.exists("feedback"): shutil.rmtree("feedback") shutil.copytree("feedback_generated", "feedback") - self.merge_autograded_db(os.path.basename(assignment_name), back=True, on_inconsistency="WARNING", - tag=tag, new_score_policy=new_score_policy) + self.merge_autograded_db( + os.path.basename(assignment_name), + back=True, + on_inconsistency="WARNING", + tag=tag, + new_score_policy=new_score_policy) def student_autograde(self, assignment_name: str, @@ -335,20 +355,28 @@ class JupyterCourse(Course): elif student.count(".") == 2: group, firstname, lastname = student.split(".") else: - raise ValueError(f"Unknown student format {student}. " - f"Must be group.firstname.lastname or firstname.lastname.") + raise ValueError( + f"Unknown student format {student}. " + f"Must be group.firstname.lastname or firstname.lastname.") firstname = firstname.lower() lastname = lastname.lower() email = f"{firstname}.{lastname}@{self.mail_extension}" - run(["nbgrader", "db", "student", "add", f"{student}", f"--first-name={firstname}", - f"--last-name={lastname}", f"--email={email}", "--db=sqlite:///.gradebook.db"]) + run(["nbgrader", + "db", + "student", + "add", + f"{student}", + f"--first-name={firstname}", + f"--last-name={lastname}", + f"--email={email}", + "--db=sqlite:///.gradebook.db"]) nbgrader_config = ["--db=sqlite:///.gradebook.db", "--force", "--CourseDirectory.submitted_directory=submitted", "--CourseDirectory.autograded_directory=autograded", "--CourseDirectory.feedback_directory=feedback_generated", - "--CourseDirectory.ignore="+str(self.ignore_nbgrader), + "--CourseDirectory.ignore=" + str(self.ignore_nbgrader), "--ExecutePreprocessor.allow_errors=True", "--ExecutePreprocessor.interrupt_on_timeout=True", ] @@ -501,8 +529,9 @@ class JupyterCourse(Course): Only files starting with the given prefix are extracted. """ self.forge.login() - submissions_status = self.assignment(assignment_name=assignment_name, - student_group=student_group).collect_status() + submissions_status = self.assignment( + assignment_name=assignment_name, + student_group=student_group).collect_status() self.log.info(f"Downloading submissions for {len(submissions_status)} students") template = os.path.join( "submitted", "{username}/" + f"{os.path.basename(assignment_name)}") @@ -657,7 +686,8 @@ class JupyterCourse(Course): else: self.log.info( "Syncing students' gradebook to the global gradebook `.gradebook.db`") - for file in sorted(glob.glob(f"autograded/{tag}/{assignment_name}/.gradebook.db")): + for file in sorted( + glob.glob(f"autograded/{tag}/{assignment_name}/.gradebook.db")): self.log.info(f"Student gradebook `{file}`") source = Gradebook(f'sqlite:///{file}') try: @@ -703,7 +733,8 @@ class JupyterCourse(Course): student_group: Optional[str] = None, tag: Optional[str] = "*") -> None: self.forge.login() - for file in sorted(glob.glob(f"autograded/{tag}/{os.path.basename(assignment_name)}/.gradebook.db")): + for file in sorted( + glob.glob(f"autograded/{tag}/{os.path.basename(assignment_name)}/.gradebook.db")): content = base64.b64encode(io.open(file, 'rb').read()).decode("ascii") username = file.split('/')[1] project = self.assignment(assignment_name, diff --git a/travo/nbgrader_utils.py b/travo/nbgrader_utils.py index 48f6fde8..b764aad6 100644 --- a/travo/nbgrader_utils.py +++ b/travo/nbgrader_utils.py @@ -88,9 +88,24 @@ def merge_submission_gradebook(source: Gradebook, grade, ['name', 'notebook', 'assignment', 'student']) for key, value in kwargs.items(): - if ((new_score_policy == "only_empty" or new_score_policy == "only_greater") and getattr(target_grade, key) is None) \ - or new_score_policy == "force_new_score" \ - or (new_score_policy == "only_greater" and type(getattr(target_grade, key)) is float and type(getattr(grade, key)) is float and getattr(grade, key) > getattr(target_grade, key)): + if ( + ( + new_score_policy == "only_empty" or new_score_policy == "only_greater") and getattr( + target_grade, + key) is None) or new_score_policy == "force_new_score" or ( + new_score_policy == "only_greater" and isinstance( + getattr( + target_grade, + key), + float) and isinstance( + getattr( + grade, + key), + float) and getattr( + grade, + key) > getattr( + target_grade, + key)): setattr(target_grade, key, value) for comment in notebook.comments: @@ -125,8 +140,9 @@ def remove_submission_gradebook(gb: Gradebook, log = getLogger() try: gb.find_submission(assignment_name, student) - answer = input(f'Do you really want to suppress {assignment_name} submission of {student} ' - f'from your local .gradebook.db ? [y/N] ') + answer = input( + f'Do you really want to suppress {assignment_name} submission of {student} ' + f'from your local .gradebook.db ? [y/N] ') if answer != "y": log.info("Submission not deleted from your local .gradebook.db.") return @@ -136,13 +152,17 @@ def remove_submission_gradebook(gb: Gradebook, f"Missing entry for {assignment_name} submission from student {student} in your local .gradebook.db") -def remove_assignment_gradebook(gb: Gradebook, assignment_name: str, force: bool = False) -> None: +def remove_assignment_gradebook( + gb: Gradebook, + assignment_name: str, + force: bool = False) -> None: log = getLogger() try: gb.find_assignment(assignment_name) if not force: - answer = input(f'Do you really want to suppress all submissions from {assignment_name} ' - f'from your local .gradebook.db ? [y/N] ') + answer = input( + f'Do you really want to suppress all submissions from {assignment_name} ' + f'from your local .gradebook.db ? [y/N] ') if answer != "y": log.info("Assignment not deleted from your local .gradebook.db.") return @@ -155,7 +175,7 @@ def remove_assignment_gradebook(gb: Gradebook, assignment_name: str, force: bool try: for notebook in assignment.notebooks: gb.remove_notebook(notebook.name, assignment_name) - except: + except BaseException: pass gb.db.delete(assignment) @@ -397,7 +417,8 @@ def export_scores(gradebook: Gradebook, for grade in notebook.grades: # Try to guess whether this is a test cell, whose score can be computed automatically # At some point, auto_score was None in this case, but this seems to be gone - # For now, assumes that a code cell with a non trivial max_score is a test cell + # For now, assumes that a code cell with a non trivial max_score is + # a test cell if grade.cell_type == 'code' and grade.auto_score is not None: # Autograded cell max_auto_score += grade.max_score -- GitLab From d8ced231d2176184f12f2c3e1d0ef5e565d9aa68 Mon Sep 17 00:00:00 2001 From: Tchaps Dev Date: Sat, 3 Jun 2023 21:10:25 -0400 Subject: [PATCH 03/17] fix error and standard --- conftest.py | 1 - 1 file changed, 1 deletion(-) diff --git a/conftest.py b/conftest.py index 3fbd365b..256fb3db 100644 --- a/conftest.py +++ b/conftest.py @@ -41,7 +41,6 @@ def project_name(test_run_id: str) -> str: @pytest.fixture def project(gitlab: GitLab, project_path: str, project_name: str) -> Iterator[Project]: project = gitlab.ensure_project(project_path, project_name) - # TODO: factor out duplication with assignment_repo project.ensure_file("README.md") yield project gitlab.remove_project(project_path, force=True) -- GitLab From 4e8c445f487ccbd1f1d8f9c20b7783205ebc50e4 Mon Sep 17 00:00:00 2001 From: Tchaps Dev Date: Sat, 3 Jun 2023 21:10:44 -0400 Subject: [PATCH 04/17] fix standard --- .coverage | Bin 0 -> 53248 bytes .scannerwork/.sonar_lock | 0 .scannerwork/report-task.txt | 6 + coverage-reports/coverage.xml | 3252 +++++++++++++++++++++++++++++ coverage.xml | 3252 +++++++++++++++++++++++++++++ flake8_after_autopep8_output.csv | 177 ++ flake8_after_autopep8_output2.txt | 123 ++ flake8_original_output.csv | 405 ++++ flake8_output.txt | 405 ++++ setup.py | 2 +- sonar-project.properties | 6 + travo.und/id.txt | 1 + travo.und/settings.xml | 62 + travo/course.py | 15 +- travo/dashboards.py | 36 +- travo/gitlab.py | 18 +- travo/homework.py | 18 +- travo/jupyter_course.py | 15 +- travo/nbgrader_utils.py | 3 + travo/script.py | 8 +- understand/travo-metrics-oop.csv | 358 ++++ understand/travo-metrics.csv | 358 ++++ 22 files changed, 8469 insertions(+), 51 deletions(-) create mode 100644 .coverage create mode 100644 .scannerwork/.sonar_lock create mode 100644 .scannerwork/report-task.txt create mode 100644 coverage-reports/coverage.xml create mode 100644 coverage.xml create mode 100644 flake8_after_autopep8_output.csv create mode 100644 flake8_after_autopep8_output2.txt create mode 100644 flake8_original_output.csv create mode 100644 flake8_output.txt create mode 100644 sonar-project.properties create mode 100644 travo.und/id.txt create mode 100644 travo.und/settings.xml create mode 100644 understand/travo-metrics-oop.csv create mode 100644 understand/travo-metrics.csv diff --git a/.coverage b/.coverage new file mode 100644 index 0000000000000000000000000000000000000000..f13de030cb8efbd054d831b065acd0eb51ed3403 GIT binary patch literal 53248 zcmWFz^vNtqRY=P(%1ta$FlG>7U}R))P*7lCVBlh4VBlpy0Colj1{MUDff0#~i^;{H z7w*N&AI8AL*2};j$Lr6p%QJ^pjr$@`E@v0_JoZG+WVT*hnn%S)Ltr!nMnhmU1V%^* zGzRjpi%Uu}Hr19SCgr4-6eT977C}f}=O9n=_sG?IS$w({#E7Sw)2Wg4VOi{?p zD@jdHEm9~b%FInHs#M5Mt<(W4fZA4)T2TTKNXsuu%}mb&sZh{>YS&aKN=-{GO3h17 zEe0E|ppluP$)(v`&&4h-EX>%R3ieZCQF3BYGB=8E5{r@%Uhzy*C`wJvFG>NqKB*`% zFF7N%SVtid?!)B#JdjHuzAehn)i23c$jQtDdo!;%vm`S=Pa(A;HMz7TH3h2&bwGgz z!@9blAc6a)Bwrx`zJPN-c-p@YzjMJH4_RC8KUer{eqELag5L00SPLfo8Jnwykb zq>xpbTL6ljqWoNl#U=T;bb{j>>|a#9CHWAY#K#SmxP*EjJ~IU+I-$bg7=`F6&C4t- zO;vzJzK#M^NqlCCjsnEvItn09XmV+)a%eW*_r5{p0?O(8!o6|69`q!=0jnK`Lg6AUD)BF7IkQya*! znI**vNjdpRsA&zHVv18!!5)JtODoMw24$6Eh0HvK}=wW(zv_>RTpmvWpFgI zv#^VciZV7ras(*6L6{ZA6Ce?6J^+go@BD(qk_-h*w}XT=xir;T*~G0yaXB1hRlFgH zWNVIQ0z0`~5*+%usU?XZ%#7k>kO;!b-l>(kWr;bZsR{*&nMK8*Vgp(OD1a2EB$gy9 zBqrsTmVnbQhzm}h*{PLC?u8hD>Hh50N=>kGU0sEM{Nm!wq?}YxwN-2d6ID>pNGt}G zLdEI|N%{FXsfl@@0veoYJc|`dGBS%5K$b$?gj_4xBg`nS1euXurVe%!!~jTs56MV{ z=P!li{M_8cyc9^;53YtGbzN!-+;fmZL|0cqLA@-ss5mn}56w(aeGf7eDhn#H;Q6

im*CZ<5LJ1A0+Of1hx#V`)yOqaxx)RN5HR0WU{uwy`470MHf6_Sfm6Tx+Lqi4+H8&TjO^mt+Ki2*;N$>vXMAyTMrv*%8kY$rk)TN;(u;pyDyS`h zoK8TE9Hig?aUnK<3O7g$CP6|0rV85D;nDlwiH|m|y5Eu=C z(GVC7fzc2c4S~@R7!85Z5Eu=C(GVC7fzc2cIU&Hq#4O7XTjF8B&&Vt-4qXIbu4klY z3R>jP#Q%bU{{{cokrODRJ{=8#(GVC7fzc2c4S~@R7!85Z5Eu=C(GVC7fzc2c4T0eq z0zAyJjIdDvCN5@aPUs*2X#Ss%_dEmtJ^pR{6ZmuZ-T7ttzVn^uTfkSw=fNk%`-S)X z@C=brUyX*qXb6mkz-S1JhQMeDjE2By2#kinXb6mkz>p3BWjiciijEh z1qS~6{M-5E_!jd0;49~!$ajH1m(P<=n)fU31%8hqog+paKNL*_{(JIUx1_LG%Bk=l>1U!eG=}qaiRF0;3@? z8UmvsFd71*Aut*OqaiRF0;3@?8Umvsz`(%F$jrbCn*V3y|HHulXEaDgLtr!nMnhmU z1V%$(Gz3ONU^E0qLtr!nMnhmU1V%$(Gz5lY2rx7Aa)Rdn`FOY)_#g7$Jd}NA|9qQ``zIY_G3H@m zOh6Z*9sDm8j8JHOu7~~lkY#12& znHlUriWnF`&XZwaXs`!y53n;lU}O+@z`$^Tk*}apf{T@rv&n#qf#Dx3L!LjA!2$*b zhKUReKS8E2FdUF)IKW>6(g(tfAOeIN7#Nut7!r1XY-4B;0115nn+{@uFi0hb0s{+& zfCB@I00Tn<1IYUfOiU6oAZZ4Mh6WJb3?dj97?cZIISn09XSsUJ9WcbI_pwF;CoW+6RKoLmM zpZ~A7mxCA#2kIFa7;5Bf8W=1X7(T=^d|{XS()|DbpN3{;8wNWCuo?yi21W*kI#A#+ zbmX&v431;_cl!T(Mh1oo<|>N@RtLtZ3JeK}j10Fy(Ou8@hk4KL7f`(d3>*pd1rZDk zKS2IxVBleJ=K)DQfN&WVK&CT!{1K050SSZUKn#$tI2afj_*hvOIptXYeG^~6xSwGI zBPRTv%zBg29J|NR-{6F%rOFgWmotYvt>`;>v<3n*0D znHU~$F)&yZd}n50c<{f8{{zTO0f$FmbqqVc{ybm*@6Gqyx0o0hV!T_w>oYJg1U#s{ z9{nE-;_mM&U|?|gwf8;5U{JIiV196?l_BFED2=@MzPG;uY*eDKh6)1%*!v6&9H5lb zpk)24=6iiTSek+1|Nr&h6~SzahXO22V3te+yMPn}NSnfjYOn~1Sg`Lei27e|z`(#D zGv~kM|N8&$*%=rZ92CH=2T3w8Ff@Q%_}!WzHjcUcCp#MxC^s`z$uhEVa@y5BH|{Hb zH|O&?%jbW7{Ga~$dH?^KIiLT3P6y5Z^YJfW;Q!74h5s%8GyePhH~25|pW;8vzlVP- z|2qEV{Gf~iwPKVS4S~@R7!85Z5Eu=C(GVC7fzc2c4S~@R7!85Z5Eu=C(GZ|T2(Ym* zax(Jqfhk^IFvY_IrntGm6c-nm;^YKV92{VZogGZEv4JU8RxriF0;ZUm!4wk{3kxSF zc>bROG&(^G$B&vh8UmvsFd71*Aut*OqaiRF0;3@?8UmvsFd71*Aut*OqaiRTLI5=X zKidBv6j3qih|v%j4S~@R7!85Z5Eu=C(GVC7fzc2c4S~@R7!85Z5TIEIfcNQ)&i~Ua rd`Ar)4S~@R7!85Z5Eu=C(GVC7fzc2c4S~@R7!85Z5Eu=C!4LufODNCt literal 0 HcmV?d00001 diff --git a/.scannerwork/.sonar_lock b/.scannerwork/.sonar_lock new file mode 100644 index 00000000..e69de29b diff --git a/.scannerwork/report-task.txt b/.scannerwork/report-task.txt new file mode 100644 index 00000000..17d92e84 --- /dev/null +++ b/.scannerwork/report-task.txt @@ -0,0 +1,6 @@ +projectKey=Travo +serverUrl=http://localhost:9000 +serverVersion=10.0.0.68432 +dashboardUrl=http://localhost:9000/dashboard?id=Travo +ceTaskId=AYiD7iapjFrrcy7i8Pk7 +ceTaskUrl=http://localhost:9000/api/ce/task?id=AYiD7iapjFrrcy7i8Pk7 diff --git a/coverage-reports/coverage.xml b/coverage-reports/coverage.xml new file mode 100644 index 00000000..e7f6a5e4 --- /dev/null +++ b/coverage-reports/coverage.xml @@ -0,0 +1,3252 @@ + + + + + + D:\ws\Travo\travo + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/coverage.xml b/coverage.xml new file mode 100644 index 00000000..2225d67b --- /dev/null +++ b/coverage.xml @@ -0,0 +1,3252 @@ + + + + + + D:\ws\Travo\travo + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/flake8_after_autopep8_output.csv b/flake8_after_autopep8_output.csv new file mode 100644 index 00000000..10f2b697 --- /dev/null +++ b/flake8_after_autopep8_output.csv @@ -0,0 +1,177 @@ +travo/__init__.py:3:1: F401 '.gitlab.Forge' imported but unused +travo/__init__.py:3:1: F401 '.gitlab.GitLab' imported but unused +travo/__init__.py:4:1: F401 '.assignment.Assignment' imported but unused +travo/__init__.py:5:1: F401 '.course.Course' imported but unused +travo/__init__.py:6:1: F401 '.homework.Homework' imported but unused +travo/assignment.py:8:1: F401 'typing.Sequence' imported but unused +travo/assignment.py:9:1: F401 '.gitlab.unknown' imported but unused +travo/assignment.py:87:89: E501 line too long (93 > 88 characters) +travo/assignment.py:321:89: E501 line too long (99 > 88 characters) +travo/assignment.py:322:89: E501 line too long (98 > 88 characters) +travo/assignment.py:505:89: E501 line too long (96 > 88 characters) +travo/assignment.py:514:89: E501 line too long (98 > 88 characters) +travo/assignment.py:560:89: E501 line too long (90 > 88 characters) +travo/assignment.py:750:89: E501 line too long (90 > 88 characters) +travo/course.py:9:1: F401 '.gitlab.GitLabTest' imported but unused +travo/course.py:34:89: E501 line too long (93 > 88 characters) +travo/course.py:45:59: W291 trailing whitespace +travo/course.py:87:89: E501 line too long (89 > 88 characters) +travo/course.py:195:89: E501 line too long (144 > 88 characters) +travo/course.py:360:89: E501 line too long (89 > 88 characters) +travo/course.py:395:89: E501 line too long (98 > 88 characters) +travo/course.py:470:89: E501 line too long (108 > 88 characters) +travo/course.py:471:89: E501 line too long (90 > 88 characters) +travo/course.py:492:89: E501 line too long (96 > 88 characters) +travo/course.py:650:89: E501 line too long (99 > 88 characters) +travo/dashboards.py:368:89: E501 line too long (181 > 88 characters) +travo/dashboards.py:374:89: E501 line too long (128 > 88 characters) +travo/dashboards.py:729:89: E501 line too long (98 > 88 characters) +travo/dashboards.py:733:89: E501 line too long (124 > 88 characters) +travo/dashboards.py:743:89: E501 line too long (109 > 88 characters) +travo/dashboards.py:744:89: E501 line too long (95 > 88 characters) +travo/dashboards.py:749:13: F401 'ipylab.JupyterFrontEnd' imported but unused +travo/dashboards.py:782:89: E501 line too long (115 > 88 characters) +travo/dashboards.py:785:9: E722 do not use bare 'except' +travo/dashboards.py:791:89: E501 line too long (109 > 88 characters) +travo/dashboards.py:808:89: E501 line too long (90 > 88 characters) +travo/dashboards.py:823:89: E501 line too long (119 > 88 characters) +travo/dashboards.py:826:9: E722 do not use bare 'except' +travo/dashboards.py:840:89: E501 line too long (92 > 88 characters) +travo/dashboards.py:841:89: E501 line too long (127 > 88 characters) +travo/dashboards.py:861:89: E501 line too long (99 > 88 characters) +travo/dashboards.py:863:89: E501 line too long (97 > 88 characters) +travo/dashboards.py:867:89: E501 line too long (89 > 88 characters) +travo/dashboards.py:921:89: E501 line too long (90 > 88 characters) +travo/dashboards.py:975:89: E501 line too long (109 > 88 characters) +travo/dashboards.py:1042:89: E501 line too long (116 > 88 characters) +travo/dashboards.py:1118:89: E501 line too long (91 > 88 characters) +travo/dashboards.py:1119:89: E501 line too long (109 > 88 characters) +travo/dashboards.py:1120:89: E501 line too long (102 > 88 characters) +travo/dashboards.py:1132:89: E501 line too long (90 > 88 characters) +travo/dashboards.py:1143:40: F541 f-string is missing placeholders +travo/dashboards.py:1148:33: F841 local variable 'manual_score' is assigned to but never used +travo/dashboards.py:1151:89: E501 line too long (140 > 88 characters) +travo/dashboards.py:1153:89: E501 line too long (132 > 88 characters) +travo/dashboards.py:1156:89: E501 line too long (116 > 88 characters) +travo/dashboards.py:1164:89: E501 line too long (92 > 88 characters) +travo/dashboards.py:1167:89: E501 line too long (98 > 88 characters) +travo/dashboards.py:1171:89: E501 line too long (110 > 88 characters) +travo/dashboards.py:1176:89: E501 line too long (95 > 88 characters) +travo/gitlab.py:120:9: E722 do not use bare 'except' +travo/gitlab.py:216:89: E501 line too long (99 > 88 characters) +travo/gitlab.py:406:89: E501 line too long (100 > 88 characters) +travo/gitlab.py:466:89: E501 line too long (93 > 88 characters) +travo/gitlab.py:552:89: E501 line too long (114 > 88 characters) +travo/gitlab.py:575:89: E501 line too long (104 > 88 characters) +travo/gitlab.py:612:89: E501 line too long (132 > 88 characters) +travo/gitlab.py:681:89: E501 line too long (113 > 88 characters) +travo/gitlab.py:752:89: E501 line too long (104 > 88 characters) +travo/gitlab.py:782:89: E501 line too long (128 > 88 characters) +travo/gitlab.py:859:89: E501 line too long (92 > 88 characters) +travo/gitlab.py:867:89: E501 line too long (97 > 88 characters) +travo/gitlab.py:1261:89: E501 line too long (97 > 88 characters) +travo/gitlab.py:1547:89: E501 line too long (89 > 88 characters) +travo/gitlab.py:1573:89: E501 line too long (96 > 88 characters) +travo/gitlab.py:1585:89: E501 line too long (119 > 88 characters) +travo/gitlab.py:1587:89: E501 line too long (100 > 88 characters) +travo/gitlab.py:1589:89: E501 line too long (100 > 88 characters) +travo/gitlab.py:1595:89: E501 line too long (144 > 88 characters) +travo/gitlab.py:1599:89: E501 line too long (89 > 88 characters) +travo/gitlab.py:1618:35: F541 f-string is missing placeholders +travo/gitlab.py:1675:89: E501 line too long (155 > 88 characters) +travo/gitlab.py:1682:89: E501 line too long (108 > 88 characters) +travo/gitlab.py:1684:89: E501 line too long (93 > 88 characters) +travo/gitlab.py:1884:89: E501 line too long (108 > 88 characters) +travo/gitlab.py:1897:89: E501 line too long (110 > 88 characters) +travo/gitlab.py:1916:89: E501 line too long (96 > 88 characters) +travo/gitlab.py:1918:89: E501 line too long (113 > 88 characters) +travo/gitlab.py:1921:89: E501 line too long (94 > 88 characters) +travo/gitlab.py:2028:89: E501 line too long (94 > 88 characters) +travo/gitlab.py:2044:89: E501 line too long (110 > 88 characters) +travo/gitlab.py:2081:45: W291 trailing whitespace +travo/gitlab.py:2084:56: W291 trailing whitespace +travo/gitlab.py:2096:24: W291 trailing whitespace +travo/gitlab.py:2104:25: W291 trailing whitespace +travo/gitlab.py:2108:46: W291 trailing whitespace +travo/gitlab.py:2111:57: W291 trailing whitespace +travo/gitlab.py:2119:25: W291 trailing whitespace +travo/gitlab.py:2131:24: W291 trailing whitespace +travo/gitlab.py:2139:25: W291 trailing whitespace +travo/gitlab.py:2191:89: E501 line too long (99 > 88 characters) +travo/gitlab.py:2248:89: E501 line too long (104 > 88 characters) +travo/gitlab.py:2395:89: E501 line too long (94 > 88 characters) +travo/gitlab.py:2443:89: E501 line too long (94 > 88 characters) +travo/gitlab.py:2457:89: E501 line too long (111 > 88 characters) +travo/homework.py:1:1: F401 'dataclasses.field' imported but unused +travo/homework.py:2:1: F401 'os' imported but unused +travo/homework.py:48:13: E722 do not use bare 'except' +travo/homework.py:51:25: F541 f-string is missing placeholders +travo/homework.py:51:89: E501 line too long (130 > 88 characters) +travo/homework.py:54:89: E501 line too long (114 > 88 characters) +travo/homework.py:124:23: F541 f-string is missing placeholders +travo/homework.py:131:89: E501 line too long (89 > 88 characters) +travo/homework.py:164:23: F541 f-string is missing placeholders +travo/homework.py:175:89: E501 line too long (101 > 88 characters) +travo/homework.py:187:19: F541 f-string is missing placeholders +travo/homework.py:206:19: F541 f-string is missing placeholders +travo/homework.py:218:23: F541 f-string is missing placeholders +travo/homework.py:224:89: E501 line too long (93 > 88 characters) +travo/homework.py:241:89: E501 line too long (91 > 88 characters) +travo/jupyter_course.py:11:1: F401 'logging' imported but unused +travo/jupyter_course.py:13:1: F401 'requests' imported but unused +travo/jupyter_course.py:14:1: F401 'typing.Callable' imported but unused +travo/jupyter_course.py:14:1: F401 'typing.Tuple' imported but unused +travo/jupyter_course.py:14:1: F401 'typing.cast' imported but unused +travo/jupyter_course.py:16:1: F401 'nbgrader.api.Gradebook' imported but unused +travo/jupyter_course.py:16:1: F401 'nbgrader.api.MissingEntry' imported but unused +travo/jupyter_course.py:18:1: F401 '.assignment.Assignment' imported but unused +travo/jupyter_course.py:22:1: F401 '.gitlab.GitLab' imported but unused +travo/jupyter_course.py:22:1: F401 '.gitlab.AuthenticationError' imported but unused +travo/jupyter_course.py:23:1: F401 '.gitlab.ResourceNotFoundError' imported but unused +travo/jupyter_course.py:34:40: W291 trailing whitespace +travo/jupyter_course.py:35:89: E501 line too long (122 > 88 characters) +travo/jupyter_course.py:36:89: E501 line too long (119 > 88 characters) +travo/jupyter_course.py:37:89: E501 line too long (134 > 88 characters) +travo/jupyter_course.py:38:89: E501 line too long (113 > 88 characters) +travo/jupyter_course.py:208:89: E501 line too long (92 > 88 characters) +travo/jupyter_course.py:212:9: F401 'jupytext' imported but unused +travo/jupyter_course.py:268:89: E501 line too long (92 > 88 characters) +travo/jupyter_course.py:273:89: E501 line too long (93 > 88 characters) +travo/jupyter_course.py:286:89: E501 line too long (100 > 88 characters) +travo/jupyter_course.py:307:89: E501 line too long (114 > 88 characters) +travo/jupyter_course.py:311:89: E501 line too long (115 > 88 characters) +travo/jupyter_course.py:316:89: E501 line too long (106 > 88 characters) +travo/jupyter_course.py:339:89: E501 line too long (92 > 88 characters) +travo/jupyter_course.py:343:89: E501 line too long (95 > 88 characters) +travo/jupyter_course.py:344:89: E501 line too long (96 > 88 characters) +travo/jupyter_course.py:365:89: E501 line too long (90 > 88 characters) +travo/jupyter_course.py:419:89: E501 line too long (94 > 88 characters) +travo/jupyter_course.py:498:89: E501 line too long (92 > 88 characters) +travo/jupyter_course.py:505:89: E501 line too long (90 > 88 characters) +travo/jupyter_course.py:638:89: E501 line too long (102 > 88 characters) +travo/jupyter_course.py:646:89: E501 line too long (89 > 88 characters) +travo/jupyter_course.py:651:9: F811 redefinition of unused 'Gradebook' from line 16 +travo/jupyter_course.py:651:9: F811 redefinition of unused 'MissingEntry' from line 16 +travo/jupyter_course.py:652:89: E501 line too long (90 > 88 characters) +travo/jupyter_course.py:660:89: E501 line too long (91 > 88 characters) +travo/jupyter_course.py:689:9: F811 redefinition of unused 'Gradebook' from line 16 +travo/jupyter_course.py:706:89: E501 line too long (109 > 88 characters) +travo/jupyter_course.py:749:89: E501 line too long (91 > 88 characters) +travo/nbgrader_utils.py:53:89: E501 line too long (90 > 88 characters) +travo/nbgrader_utils.py:80:89: E501 line too long (94 > 88 characters) +travo/nbgrader_utils.py:91:89: E501 line too long (142 > 88 characters) +travo/nbgrader_utils.py:93:89: E501 line too long (210 > 88 characters) +travo/nbgrader_utils.py:107:89: E501 line too long (98 > 88 characters) +travo/nbgrader_utils.py:128:89: E501 line too long (99 > 88 characters) +travo/nbgrader_utils.py:136:89: E501 line too long (113 > 88 characters) +travo/nbgrader_utils.py:139:89: E501 line too long (98 > 88 characters) +travo/nbgrader_utils.py:144:89: E501 line too long (100 > 88 characters) +travo/nbgrader_utils.py:158:9: E722 do not use bare 'except' +travo/nbgrader_utils.py:173:89: E501 line too long (90 > 88 characters) +travo/nbgrader_utils.py:398:89: E501 line too long (105 > 88 characters) +travo/nbgrader_utils.py:399:89: E501 line too long (96 > 88 characters) +travo/nbgrader_utils.py:400:89: E501 line too long (99 > 88 characters) +travo/script.py:325:89: E501 line too long (114 > 88 characters) +travo/travo.py:3:1: F401 '.gitlab.GitLab' imported but unused +travo/utils.py:1:1: F401 'os' imported but unused +travo/utils.py:58:89: E501 line too long (112 > 88 characters) diff --git a/flake8_after_autopep8_output2.txt b/flake8_after_autopep8_output2.txt new file mode 100644 index 00000000..ff1d6998 --- /dev/null +++ b/flake8_after_autopep8_output2.txt @@ -0,0 +1,123 @@ +travo/__init__.py:3:1: F401 '.gitlab.Forge' imported but unused +travo/__init__.py:3:1: F401 '.gitlab.GitLab' imported but unused +travo/__init__.py:4:1: F401 '.assignment.Assignment' imported but unused +travo/__init__.py:5:1: F401 '.course.Course' imported but unused +travo/__init__.py:6:1: F401 '.homework.Homework' imported but unused +travo/assignment.py:8:1: F401 'typing.Sequence' imported but unused +travo/assignment.py:9:1: F401 '.gitlab.unknown' imported but unused +travo/assignment.py:87:89: E501 line too long (93 > 88 characters) +travo/assignment.py:321:89: E501 line too long (99 > 88 characters) +travo/assignment.py:322:89: E501 line too long (98 > 88 characters) +travo/assignment.py:755:89: E501 line too long (90 > 88 characters) +travo/course.py:9:1: F401 '.gitlab.GitLabTest' imported but unused +travo/course.py:34:89: E501 line too long (93 > 88 characters) +travo/course.py:87:89: E501 line too long (89 > 88 characters) +travo/course.py:195:89: E501 line too long (144 > 88 characters) +travo/course.py:360:89: E501 line too long (89 > 88 characters) +travo/course.py:395:89: E501 line too long (98 > 88 characters) +travo/course.py:493:89: E501 line too long (96 > 88 characters) +travo/dashboards.py:368:89: E501 line too long (181 > 88 characters) +travo/dashboards.py:374:89: E501 line too long (128 > 88 characters) +travo/dashboards.py:749:89: E501 line too long (109 > 88 characters) +travo/dashboards.py:755:13: F401 'ipylab.JupyterFrontEnd' imported but unused +travo/dashboards.py:822:89: E501 line too long (90 > 88 characters) +travo/dashboards.py:837:89: E501 line too long (119 > 88 characters) +travo/dashboards.py:941:89: E501 line too long (90 > 88 characters) +travo/dashboards.py:995:89: E501 line too long (100 > 88 characters) +travo/dashboards.py:1144:89: E501 line too long (97 > 88 characters) +travo/dashboards.py:1145:89: E501 line too long (102 > 88 characters) +travo/dashboards.py:1157:89: E501 line too long (90 > 88 characters) +travo/dashboards.py:1168:40: F541 f-string is missing placeholders +travo/dashboards.py:1173:33: F841 local variable 'manual_score' is assigned to but never used +travo/dashboards.py:1176:89: E501 line too long (97 > 88 characters) +travo/dashboards.py:1179:89: E501 line too long (132 > 88 characters) +travo/dashboards.py:1182:89: E501 line too long (116 > 88 characters) +travo/dashboards.py:1190:89: E501 line too long (92 > 88 characters) +travo/dashboards.py:1193:89: E501 line too long (98 > 88 characters) +travo/dashboards.py:1197:89: E501 line too long (110 > 88 characters) +travo/dashboards.py:1202:89: E501 line too long (95 > 88 characters) +travo/gitlab.py:216:89: E501 line too long (99 > 88 characters) +travo/gitlab.py:406:89: E501 line too long (100 > 88 characters) +travo/gitlab.py:466:89: E501 line too long (93 > 88 characters) +travo/gitlab.py:552:89: E501 line too long (114 > 88 characters) +travo/gitlab.py:575:89: E501 line too long (104 > 88 characters) +travo/gitlab.py:612:89: E501 line too long (132 > 88 characters) +travo/gitlab.py:681:89: E501 line too long (113 > 88 characters) +travo/gitlab.py:752:89: E501 line too long (104 > 88 characters) +travo/gitlab.py:782:89: E501 line too long (128 > 88 characters) +travo/gitlab.py:859:89: E501 line too long (92 > 88 characters) +travo/gitlab.py:867:89: E501 line too long (97 > 88 characters) +travo/gitlab.py:1548:89: E501 line too long (89 > 88 characters) +travo/gitlab.py:1593:89: E501 line too long (100 > 88 characters) +travo/gitlab.py:1595:89: E501 line too long (100 > 88 characters) +travo/gitlab.py:1601:89: E501 line too long (144 > 88 characters) +travo/gitlab.py:1605:89: E501 line too long (89 > 88 characters) +travo/gitlab.py:1624:35: F541 f-string is missing placeholders +travo/gitlab.py:1681:89: E501 line too long (155 > 88 characters) +travo/gitlab.py:1688:89: E501 line too long (108 > 88 characters) +travo/gitlab.py:1891:89: E501 line too long (108 > 88 characters) +travo/gitlab.py:1904:89: E501 line too long (110 > 88 characters) +travo/gitlab.py:1923:89: E501 line too long (96 > 88 characters) +travo/gitlab.py:1925:89: E501 line too long (113 > 88 characters) +travo/gitlab.py:1928:89: E501 line too long (94 > 88 characters) +travo/gitlab.py:2207:89: E501 line too long (99 > 88 characters) +travo/gitlab.py:2414:89: E501 line too long (94 > 88 characters) +travo/gitlab.py:2462:89: E501 line too long (94 > 88 characters) +travo/gitlab.py:2476:89: E501 line too long (111 > 88 characters) +travo/homework.py:1:1: F401 'dataclasses.field' imported but unused +travo/homework.py:2:1: F401 'os' imported but unused +travo/homework.py:51:25: F541 f-string is missing placeholders +travo/homework.py:51:89: E501 line too long (130 > 88 characters) +travo/homework.py:54:89: E501 line too long (114 > 88 characters) +travo/homework.py:124:23: F541 f-string is missing placeholders +travo/homework.py:131:89: E501 line too long (89 > 88 characters) +travo/homework.py:164:23: F541 f-string is missing placeholders +travo/homework.py:175:89: E501 line too long (101 > 88 characters) +travo/homework.py:187:19: F541 f-string is missing placeholders +travo/homework.py:206:19: F541 f-string is missing placeholders +travo/homework.py:218:23: F541 f-string is missing placeholders +travo/homework.py:224:89: E501 line too long (93 > 88 characters) +travo/homework.py:241:89: E501 line too long (91 > 88 characters) +travo/jupyter_course.py:11:1: F401 'logging' imported but unused +travo/jupyter_course.py:13:1: F401 'requests' imported but unused +travo/jupyter_course.py:14:1: F401 'typing.Callable' imported but unused +travo/jupyter_course.py:14:1: F401 'typing.Tuple' imported but unused +travo/jupyter_course.py:14:1: F401 'typing.cast' imported but unused +travo/jupyter_course.py:16:1: F401 'nbgrader.api.Gradebook' imported but unused +travo/jupyter_course.py:16:1: F401 'nbgrader.api.MissingEntry' imported but unused +travo/jupyter_course.py:18:1: F401 '.assignment.Assignment' imported but unused +travo/jupyter_course.py:22:1: F401 '.gitlab.GitLab' imported but unused +travo/jupyter_course.py:22:1: F401 '.gitlab.AuthenticationError' imported but unused +travo/jupyter_course.py:23:1: F401 '.gitlab.ResourceNotFoundError' imported but unused +travo/jupyter_course.py:35:89: E501 line too long (122 > 88 characters) +travo/jupyter_course.py:36:89: E501 line too long (119 > 88 characters) +travo/jupyter_course.py:37:89: E501 line too long (134 > 88 characters) +travo/jupyter_course.py:38:89: E501 line too long (113 > 88 characters) +travo/jupyter_course.py:216:9: F401 'jupytext' imported but unused +travo/jupyter_course.py:297:89: E501 line too long (100 > 88 characters) +travo/jupyter_course.py:318:89: E501 line too long (114 > 88 characters) +travo/jupyter_course.py:393:89: E501 line too long (90 > 88 characters) +travo/jupyter_course.py:447:89: E501 line too long (94 > 88 characters) +travo/jupyter_course.py:526:89: E501 line too long (92 > 88 characters) +travo/jupyter_course.py:667:89: E501 line too long (102 > 88 characters) +travo/jupyter_course.py:675:89: E501 line too long (89 > 88 characters) +travo/jupyter_course.py:680:9: F811 redefinition of unused 'Gradebook' from line 16 +travo/jupyter_course.py:680:9: F811 redefinition of unused 'MissingEntry' from line 16 +travo/jupyter_course.py:681:89: E501 line too long (90 > 88 characters) +travo/jupyter_course.py:719:9: F811 redefinition of unused 'Gradebook' from line 16 +travo/jupyter_course.py:737:89: E501 line too long (98 > 88 characters) +travo/jupyter_course.py:780:89: E501 line too long (91 > 88 characters) +travo/nbgrader_utils.py:53:89: E501 line too long (90 > 88 characters) +travo/nbgrader_utils.py:80:89: E501 line too long (94 > 88 characters) +travo/nbgrader_utils.py:93:89: E501 line too long (116 > 88 characters) +travo/nbgrader_utils.py:95:89: E501 line too long (91 > 88 characters) +travo/nbgrader_utils.py:122:89: E501 line too long (98 > 88 characters) +travo/nbgrader_utils.py:152:89: E501 line too long (113 > 88 characters) +travo/nbgrader_utils.py:164:89: E501 line too long (89 > 88 characters) +travo/nbgrader_utils.py:193:89: E501 line too long (90 > 88 characters) +travo/nbgrader_utils.py:418:89: E501 line too long (105 > 88 characters) +travo/nbgrader_utils.py:419:89: E501 line too long (96 > 88 characters) +travo/script.py:325:89: E501 line too long (114 > 88 characters) +travo/travo.py:3:1: F401 '.gitlab.GitLab' imported but unused +travo/utils.py:1:1: F401 'os' imported but unused +travo/utils.py:58:89: E501 line too long (112 > 88 characters) diff --git a/flake8_original_output.csv b/flake8_original_output.csv new file mode 100644 index 00000000..9961e108 --- /dev/null +++ b/flake8_original_output.csv @@ -0,0 +1,405 @@ +travo/__init__.py:3:1: F401 '.gitlab.Forge' imported but unused +travo/__init__.py:3:1: F401 '.gitlab.GitLab' imported but unused +travo/__init__.py:4:1: F401 '.assignment.Assignment' imported but unused +travo/__init__.py:5:1: F401 '.course.Course' imported but unused +travo/__init__.py:6:1: F401 '.homework.Homework' imported but unused +travo/assignment.py:8:1: F401 'typing.Sequence' imported but unused +travo/assignment.py:9:1: F401 '.gitlab.unknown' imported but unused +travo/assignment.py:87:89: E501 line too long (93 > 88 characters) +travo/assignment.py:155:5: E303 too many blank lines (2) +travo/assignment.py:157:5: E301 expected 1 blank line, found 0 +travo/assignment.py:251:89: E501 line too long (98 > 88 characters) +travo/assignment.py:263:47: E252 missing whitespace around parameter equals +travo/assignment.py:263:48: E252 missing whitespace around parameter equals +travo/assignment.py:321:89: E501 line too long (99 > 88 characters) +travo/assignment.py:322:89: E501 line too long (98 > 88 characters) +travo/assignment.py:474:9: E306 expected 1 blank line before a nested definition, found 0 +travo/assignment.py:504:89: E501 line too long (96 > 88 characters) +travo/assignment.py:511:89: E501 line too long (96 > 88 characters) +travo/assignment.py:512:89: E501 line too long (98 > 88 characters) +travo/assignment.py:523:89: E501 line too long (106 > 88 characters) +travo/assignment.py:557:89: E501 line too long (90 > 88 characters) +travo/assignment.py:684:26: E261 at least two spaces before inline comment +travo/assignment.py:684:27: E262 inline comment should start with '# ' +travo/assignment.py:747:89: E501 line too long (90 > 88 characters) +travo/assignment.py:761:89: E501 line too long (92 > 88 characters) +travo/course.py:9:1: F401 '.gitlab.GitLabTest' imported but unused +travo/course.py:34:89: E501 line too long (93 > 88 characters) +travo/course.py:45:59: W291 trailing whitespace +travo/course.py:87:89: E501 line too long (89 > 88 characters) +travo/course.py:118:5: E303 too many blank lines (2) +travo/course.py:196:89: E501 line too long (144 > 88 characters) +travo/course.py:361:89: E501 line too long (89 > 88 characters) +travo/course.py:365:16: E221 multiple spaces before operator +travo/course.py:396:89: E501 line too long (98 > 88 characters) +travo/course.py:471:89: E501 line too long (108 > 88 characters) +travo/course.py:472:89: E501 line too long (90 > 88 characters) +travo/course.py:492:89: E501 line too long (101 > 88 characters) +travo/course.py:497:89: E501 line too long (98 > 88 characters) +travo/course.py:524:89: E501 line too long (91 > 88 characters) +travo/course.py:528:23: E251 unexpected spaces around keyword / parameter equals +travo/course.py:528:25: E251 unexpected spaces around keyword / parameter equals +travo/course.py:529:27: E251 unexpected spaces around keyword / parameter equals +travo/course.py:529:29: E251 unexpected spaces around keyword / parameter equals +travo/course.py:530:35: E251 unexpected spaces around keyword / parameter equals +travo/course.py:530:37: E251 unexpected spaces around keyword / parameter equals +travo/course.py:531:39: E251 unexpected spaces around keyword / parameter equals +travo/course.py:531:41: E251 unexpected spaces around keyword / parameter equals +travo/course.py:532:25: E251 unexpected spaces around keyword / parameter equals +travo/course.py:532:27: E251 unexpected spaces around keyword / parameter equals +travo/course.py:533:29: E251 unexpected spaces around keyword / parameter equals +travo/course.py:533:31: E251 unexpected spaces around keyword / parameter equals +travo/course.py:534:24: E251 unexpected spaces around keyword / parameter equals +travo/course.py:534:26: E251 unexpected spaces around keyword / parameter equals +travo/course.py:553:89: E501 line too long (93 > 88 characters) +travo/course.py:623:17: E128 continuation line under-indented for visual indent +travo/course.py:624:17: E128 continuation line under-indented for visual indent +travo/course.py:647:89: E501 line too long (99 > 88 characters) +travo/dashboards.py:83:89: E501 line too long (90 > 88 characters) +travo/dashboards.py:84:89: E501 line too long (94 > 88 characters) +travo/dashboards.py:366:89: E501 line too long (181 > 88 characters) +travo/dashboards.py:372:89: E501 line too long (128 > 88 characters) +travo/dashboards.py:590:89: E501 line too long (113 > 88 characters) +travo/dashboards.py:615:89: E501 line too long (107 > 88 characters) +travo/dashboards.py:663:89: E501 line too long (94 > 88 characters) +travo/dashboards.py:722:89: E501 line too long (101 > 88 characters) +travo/dashboards.py:723:89: E501 line too long (98 > 88 characters) +travo/dashboards.py:725:89: E501 line too long (99 > 88 characters) +travo/dashboards.py:726:89: E501 line too long (124 > 88 characters) +travo/dashboards.py:736:89: E501 line too long (109 > 88 characters) +travo/dashboards.py:737:89: E501 line too long (95 > 88 characters) +travo/dashboards.py:742:13: F401 'ipylab.JupyterFrontEnd' imported but unused +travo/dashboards.py:746:89: E501 line too long (91 > 88 characters) +travo/dashboards.py:747:89: E501 line too long (89 > 88 characters) +travo/dashboards.py:753:89: E501 line too long (91 > 88 characters) +travo/dashboards.py:765:89: E501 line too long (107 > 88 characters) +travo/dashboards.py:769:89: E501 line too long (102 > 88 characters) +travo/dashboards.py:770:89: E501 line too long (115 > 88 characters) +travo/dashboards.py:773:9: E722 do not use bare 'except' +travo/dashboards.py:779:89: E501 line too long (109 > 88 characters) +travo/dashboards.py:796:89: E501 line too long (90 > 88 characters) +travo/dashboards.py:800:89: E501 line too long (107 > 88 characters) +travo/dashboards.py:810:89: E501 line too long (119 > 88 characters) +travo/dashboards.py:813:9: E722 do not use bare 'except' +travo/dashboards.py:827:89: E501 line too long (92 > 88 characters) +travo/dashboards.py:828:89: E501 line too long (127 > 88 characters) +travo/dashboards.py:848:89: E501 line too long (99 > 88 characters) +travo/dashboards.py:850:89: E501 line too long (97 > 88 characters) +travo/dashboards.py:853:89: E501 line too long (103 > 88 characters) +travo/dashboards.py:869:89: E501 line too long (95 > 88 characters) +travo/dashboards.py:906:89: E501 line too long (90 > 88 characters) +travo/dashboards.py:960:89: E501 line too long (109 > 88 characters) +travo/dashboards.py:963:36: E128 continuation line under-indented for visual indent +travo/dashboards.py:964:36: E128 continuation line under-indented for visual indent +travo/dashboards.py:965:36: E128 continuation line under-indented for visual indent +travo/dashboards.py:1020:89: E501 line too long (102 > 88 characters) +travo/dashboards.py:1022:89: E501 line too long (104 > 88 characters) +travo/dashboards.py:1025:89: E501 line too long (116 > 88 characters) +travo/dashboards.py:1075:89: E501 line too long (98 > 88 characters) +travo/dashboards.py:1080:89: E501 line too long (99 > 88 characters) +travo/dashboards.py:1099:89: E501 line too long (91 > 88 characters) +travo/dashboards.py:1100:89: E501 line too long (109 > 88 characters) +travo/dashboards.py:1101:89: E501 line too long (102 > 88 characters) +travo/dashboards.py:1111:89: E501 line too long (92 > 88 characters) +travo/dashboards.py:1112:89: E501 line too long (135 > 88 characters) +travo/dashboards.py:1114:89: E501 line too long (99 > 88 characters) +travo/dashboards.py:1121:40: F541 f-string is missing placeholders +travo/dashboards.py:1122:89: E501 line too long (94 > 88 characters) +travo/dashboards.py:1125:33: F841 local variable 'manual_score' is assigned to but never used +travo/dashboards.py:1126:89: E501 line too long (92 > 88 characters) +travo/dashboards.py:1127:89: E501 line too long (140 > 88 characters) +travo/dashboards.py:1128:89: E501 line too long (145 > 88 characters) +travo/dashboards.py:1130:89: E501 line too long (129 > 88 characters) +travo/dashboards.py:1132:89: E501 line too long (89 > 88 characters) +travo/dashboards.py:1136:89: E501 line too long (112 > 88 characters) +travo/dashboards.py:1138:89: E501 line too long (118 > 88 characters) +travo/dashboards.py:1142:89: E501 line too long (110 > 88 characters) +travo/dashboards.py:1146:89: E501 line too long (112 > 88 characters) +travo/gitlab.py:31:1: E302 expected 2 blank lines, found 1 +travo/gitlab.py:34:1: E302 expected 2 blank lines, found 1 +travo/gitlab.py:39:29: E128 continuation line under-indented for visual indent +travo/gitlab.py:40:29: E128 continuation line under-indented for visual indent +travo/gitlab.py:41:29: E124 closing bracket does not match visual indentation +travo/gitlab.py:71:32: E261 at least two spaces before inline comment +travo/gitlab.py:118:9: E722 do not use bare 'except' +travo/gitlab.py:214:89: E501 line too long (99 > 88 characters) +travo/gitlab.py:272:43: W291 trailing whitespace +travo/gitlab.py:404:89: E501 line too long (100 > 88 characters) +travo/gitlab.py:421:5: E303 too many blank lines (2) +travo/gitlab.py:440:89: E501 line too long (94 > 88 characters) +travo/gitlab.py:464:89: E501 line too long (93 > 88 characters) +travo/gitlab.py:494:5: E303 too many blank lines (2) +travo/gitlab.py:494:36: E225 missing whitespace around operator +travo/gitlab.py:551:89: E501 line too long (114 > 88 characters) +travo/gitlab.py:574:89: E501 line too long (104 > 88 characters) +travo/gitlab.py:611:89: E501 line too long (132 > 88 characters) +travo/gitlab.py:680:89: E501 line too long (113 > 88 characters) +travo/gitlab.py:685:54: E251 unexpected spaces around keyword / parameter equals +travo/gitlab.py:685:56: E251 unexpected spaces around keyword / parameter equals +travo/gitlab.py:685:89: E501 line too long (90 > 88 characters) +travo/gitlab.py:697:31: E225 missing whitespace around operator +travo/gitlab.py:719:41: E127 continuation line over-indented for visual indent +travo/gitlab.py:751:89: E501 line too long (104 > 88 characters) +travo/gitlab.py:781:89: E501 line too long (128 > 88 characters) +travo/gitlab.py:857:89: E501 line too long (102 > 88 characters) +travo/gitlab.py:864:89: E501 line too long (110 > 88 characters) +travo/gitlab.py:939:19: E221 multiple spaces before operator +travo/gitlab.py:940:15: E221 multiple spaces before operator +travo/gitlab.py:951:89: E501 line too long (90 > 88 characters) +travo/gitlab.py:955:60: W291 trailing whitespace +travo/gitlab.py:978:1: E302 expected 2 blank lines, found 0 +travo/gitlab.py:990:14: E221 multiple spaces before operator +travo/gitlab.py:991:17: E221 multiple spaces before operator +travo/gitlab.py:992:18: E221 multiple spaces before operator +travo/gitlab.py:994:14: E221 multiple spaces before operator +travo/gitlab.py:1042:23: E201 whitespace after '{' +travo/gitlab.py:1044:82: E202 whitespace before '}' +travo/gitlab.py:1074:26: E201 whitespace after '[' +travo/gitlab.py:1074:80: E202 whitespace before ']' +travo/gitlab.py:1117:1: E302 expected 2 blank lines, found 1 +travo/gitlab.py:1145:89: E501 line too long (89 > 88 characters) +travo/gitlab.py:1146:52: E202 whitespace before ']' +travo/gitlab.py:1147:52: E202 whitespace before ']' +travo/gitlab.py:1162:52: E202 whitespace before ']' +travo/gitlab.py:1170:52: E202 whitespace before ']' +travo/gitlab.py:1171:52: E202 whitespace before ']' +travo/gitlab.py:1172:52: E202 whitespace before ']' +travo/gitlab.py:1173:52: E202 whitespace before ']' +travo/gitlab.py:1174:52: E202 whitespace before ']' +travo/gitlab.py:1175:52: E202 whitespace before ']' +travo/gitlab.py:1176:52: E202 whitespace before ']' +travo/gitlab.py:1177:52: E202 whitespace before ']' +travo/gitlab.py:1178:52: E202 whitespace before ']' +travo/gitlab.py:1179:52: E202 whitespace before ']' +travo/gitlab.py:1181:52: E202 whitespace before ']' +travo/gitlab.py:1183:52: E202 whitespace before ']' +travo/gitlab.py:1185:52: E202 whitespace before ']' +travo/gitlab.py:1188:52: E202 whitespace before ']' +travo/gitlab.py:1190:52: E202 whitespace before ']' +travo/gitlab.py:1193:52: E202 whitespace before ']' +travo/gitlab.py:1194:52: E202 whitespace before ']' +travo/gitlab.py:1195:52: E202 whitespace before ']' +travo/gitlab.py:1196:52: E202 whitespace before ']' +travo/gitlab.py:1198:52: E202 whitespace before ']' +travo/gitlab.py:1202:52: E202 whitespace before ']' +travo/gitlab.py:1203:52: E202 whitespace before ']' +travo/gitlab.py:1206:52: E202 whitespace before ']' +travo/gitlab.py:1209:52: E202 whitespace before ']' +travo/gitlab.py:1212:52: E202 whitespace before ']' +travo/gitlab.py:1249:89: E501 line too long (103 > 88 characters) +travo/gitlab.py:1252:89: E501 line too long (97 > 88 characters) +travo/gitlab.py:1481:17: E201 whitespace after '[' +travo/gitlab.py:1481:59: E202 whitespace before ']' +travo/gitlab.py:1538:89: E501 line too long (89 > 88 characters) +travo/gitlab.py:1557:5: E303 too many blank lines (2) +travo/gitlab.py:1565:89: E501 line too long (96 > 88 characters) +travo/gitlab.py:1569:21: E128 continuation line under-indented for visual indent +travo/gitlab.py:1578:5: E303 too many blank lines (2) +travo/gitlab.py:1578:38: E231 missing whitespace after ':' +travo/gitlab.py:1578:43: E252 missing whitespace around parameter equals +travo/gitlab.py:1578:44: E252 missing whitespace around parameter equals +travo/gitlab.py:1578:58: E231 missing whitespace after ':' +travo/gitlab.py:1578:63: E252 missing whitespace around parameter equals +travo/gitlab.py:1578:64: E252 missing whitespace around parameter equals +travo/gitlab.py:1578:79: E231 missing whitespace after ':' +travo/gitlab.py:1578:84: E252 missing whitespace around parameter equals +travo/gitlab.py:1578:85: E252 missing whitespace around parameter equals +travo/gitlab.py:1578:89: E501 line too long (110 > 88 characters) +travo/gitlab.py:1580:89: E501 line too long (100 > 88 characters) +travo/gitlab.py:1582:89: E501 line too long (100 > 88 characters) +travo/gitlab.py:1588:89: E501 line too long (144 > 88 characters) +travo/gitlab.py:1592:89: E501 line too long (89 > 88 characters) +travo/gitlab.py:1611:35: F541 f-string is missing placeholders +travo/gitlab.py:1617:29: E261 at least two spaces before inline comment +travo/gitlab.py:1635:5: E303 too many blank lines (2) +travo/gitlab.py:1644:5: E303 too many blank lines (2) +travo/gitlab.py:1670:89: E501 line too long (155 > 88 characters) +travo/gitlab.py:1677:89: E501 line too long (108 > 88 characters) +travo/gitlab.py:1679:89: E501 line too long (93 > 88 characters) +travo/gitlab.py:1799:37: E262 inline comment should start with '# ' +travo/gitlab.py:1878:89: E501 line too long (123 > 88 characters) +travo/gitlab.py:1890:89: E501 line too long (125 > 88 characters) +travo/gitlab.py:1909:89: E501 line too long (96 > 88 characters) +travo/gitlab.py:1911:89: E501 line too long (113 > 88 characters) +travo/gitlab.py:1914:89: E501 line too long (94 > 88 characters) +travo/gitlab.py:1925:25: E261 at least two spaces before inline comment +travo/gitlab.py:1927:25: E261 at least two spaces before inline comment +travo/gitlab.py:1932:89: E501 line too long (106 > 88 characters) +travo/gitlab.py:1936:89: E501 line too long (97 > 88 characters) +travo/gitlab.py:1940:19: E111 indentation is not a multiple of 4 +travo/gitlab.py:1943:89: E501 line too long (89 > 88 characters) +travo/gitlab.py:1988:5: E301 expected 1 blank line, found 0 +travo/gitlab.py:2018:5: E303 too many blank lines (2) +travo/gitlab.py:2018:89: E501 line too long (94 > 88 characters) +travo/gitlab.py:2034:17: E128 continuation line under-indented for visual indent +travo/gitlab.py:2034:89: E501 line too long (96 > 88 characters) +travo/gitlab.py:2071:45: W291 trailing whitespace +travo/gitlab.py:2074:56: W291 trailing whitespace +travo/gitlab.py:2086:24: W291 trailing whitespace +travo/gitlab.py:2094:25: W291 trailing whitespace +travo/gitlab.py:2098:46: W291 trailing whitespace +travo/gitlab.py:2101:57: W291 trailing whitespace +travo/gitlab.py:2109:25: W291 trailing whitespace +travo/gitlab.py:2121:24: W291 trailing whitespace +travo/gitlab.py:2129:25: W291 trailing whitespace +travo/gitlab.py:2139:35: E128 continuation line under-indented for visual indent +travo/gitlab.py:2151:38: E252 missing whitespace around parameter equals +travo/gitlab.py:2151:39: E252 missing whitespace around parameter equals +travo/gitlab.py:2181:89: E501 line too long (99 > 88 characters) +travo/gitlab.py:2238:89: E501 line too long (104 > 88 characters) +travo/gitlab.py:2242:1: E302 expected 2 blank lines, found 1 +travo/gitlab.py:2265:89: E501 line too long (97 > 88 characters) +travo/gitlab.py:2276:89: E501 line too long (89 > 88 characters) +travo/gitlab.py:2277:89: E501 line too long (94 > 88 characters) +travo/gitlab.py:2278:89: E501 line too long (94 > 88 characters) +travo/gitlab.py:2280:52: E202 whitespace before ']' +travo/gitlab.py:2281:52: E202 whitespace before ']' +travo/gitlab.py:2282:52: E202 whitespace before ']' +travo/gitlab.py:2283:52: E202 whitespace before ']' +travo/gitlab.py:2284:52: E202 whitespace before ']' +travo/gitlab.py:2285:52: E202 whitespace before ']' +travo/gitlab.py:2291:52: E202 whitespace before ']' +travo/gitlab.py:2380:89: E501 line too long (94 > 88 characters) +travo/gitlab.py:2427:89: E501 line too long (111 > 88 characters) +travo/gitlab.py:2430:89: E501 line too long (96 > 88 characters) +travo/gitlab.py:2433:89: E501 line too long (103 > 88 characters) +travo/gitlab.py:2438:89: E501 line too long (128 > 88 characters) +travo/gitlab.py:2440:1: W293 blank line contains whitespace +travo/gitlab.py:2485:51: E202 whitespace before ']' +travo/gitlab.py:2486:51: E202 whitespace before ']' +travo/gitlab.py:2487:51: E202 whitespace before ']' +travo/gitlab.py:2489:51: E202 whitespace before ']' +travo/gitlab.py:2506:1: E302 expected 2 blank lines, found 1 +travo/gitlab.py:2510:1: E305 expected 2 blank lines after class or function definition, found 1 +travo/gitlab.py:2515:5: E301 expected 1 blank line, found 0 +travo/gitlab.py:2518:1: E305 expected 2 blank lines after class or function definition, found 1 +travo/gitlab.py:2520:1: E302 expected 2 blank lines, found 1 +travo/gitlab.py:2536:30: E231 missing whitespace after ':' +travo/homework.py:1:1: F401 'dataclasses.field' imported but unused +travo/homework.py:2:1: F401 'os' imported but unused +travo/homework.py:7:1: E302 expected 2 blank lines, found 1 +travo/homework.py:19:21: E261 at least two spaces before inline comment +travo/homework.py:20:24: E261 at least two spaces before inline comment +travo/homework.py:21:19: E261 at least two spaces before inline comment +travo/homework.py:23:34: E261 at least two spaces before inline comment +travo/homework.py:24:26: E261 at least two spaces before inline comment +travo/homework.py:26:38: E261 at least two spaces before inline comment +travo/homework.py:27:31: E261 at least two spaces before inline comment +travo/homework.py:30:5: E303 too many blank lines (2) +travo/homework.py:48:13: E722 do not use bare 'except' +travo/homework.py:50:40: F541 f-string is missing placeholders +travo/homework.py:50:89: E501 line too long (145 > 88 characters) +travo/homework.py:52:89: E501 line too long (129 > 88 characters) +travo/homework.py:91:89: E501 line too long (104 > 88 characters) +travo/homework.py:102:5: E303 too many blank lines (2) +travo/homework.py:102:54: E231 missing whitespace after ':' +travo/homework.py:102:59: E252 missing whitespace around parameter equals +travo/homework.py:102:60: E252 missing whitespace around parameter equals +travo/homework.py:122:23: F541 f-string is missing placeholders +travo/homework.py:128:89: E501 line too long (91 > 88 characters) +travo/homework.py:161:23: F541 f-string is missing placeholders +travo/homework.py:172:89: E501 line too long (101 > 88 characters) +travo/homework.py:179:21: E265 block comment should start with '# ' +travo/homework.py:180:21: E265 block comment should start with '# ' +travo/homework.py:184:19: F541 f-string is missing placeholders +travo/homework.py:189:5: E303 too many blank lines (2) +travo/homework.py:189:51: E231 missing whitespace after ':' +travo/homework.py:189:56: E252 missing whitespace around parameter equals +travo/homework.py:189:57: E252 missing whitespace around parameter equals +travo/homework.py:204:19: F541 f-string is missing placeholders +travo/homework.py:216:23: F541 f-string is missing placeholders +travo/homework.py:221:89: E501 line too long (95 > 88 characters) +travo/homework.py:237:89: E501 line too long (93 > 88 characters) +travo/jupyter_course.py:11:1: F401 'logging' imported but unused +travo/jupyter_course.py:13:1: F401 'requests' imported but unused +travo/jupyter_course.py:14:1: F401 'typing.Callable' imported but unused +travo/jupyter_course.py:14:1: F401 'typing.Tuple' imported but unused +travo/jupyter_course.py:14:1: F401 'typing.cast' imported but unused +travo/jupyter_course.py:16:1: F401 'nbgrader.api.Gradebook' imported but unused +travo/jupyter_course.py:16:1: F401 'nbgrader.api.MissingEntry' imported but unused +travo/jupyter_course.py:18:1: F401 '.assignment.Assignment' imported but unused +travo/jupyter_course.py:22:1: F401 '.gitlab.GitLab' imported but unused +travo/jupyter_course.py:22:1: F401 '.gitlab.AuthenticationError' imported but unused +travo/jupyter_course.py:23:1: F401 '.gitlab.ResourceNotFoundError' imported but unused +travo/jupyter_course.py:26:1: E302 expected 2 blank lines, found 1 +travo/jupyter_course.py:33:40: W291 trailing whitespace +travo/jupyter_course.py:34:89: E501 line too long (122 > 88 characters) +travo/jupyter_course.py:35:89: E501 line too long (119 > 88 characters) +travo/jupyter_course.py:36:89: E501 line too long (134 > 88 characters) +travo/jupyter_course.py:37:89: E501 line too long (113 > 88 characters) +travo/jupyter_course.py:207:89: E501 line too long (92 > 88 characters) +travo/jupyter_course.py:211:9: F401 'jupytext' imported but unused +travo/jupyter_course.py:224:89: E501 line too long (105 > 88 characters) +travo/jupyter_course.py:225:89: E501 line too long (89 > 88 characters) +travo/jupyter_course.py:244:89: E501 line too long (107 > 88 characters) +travo/jupyter_course.py:251:89: E501 line too long (109 > 88 characters) +travo/jupyter_course.py:263:89: E501 line too long (92 > 88 characters) +travo/jupyter_course.py:268:89: E501 line too long (93 > 88 characters) +travo/jupyter_course.py:281:89: E501 line too long (100 > 88 characters) +travo/jupyter_course.py:290:89: E501 line too long (92 > 88 characters) +travo/jupyter_course.py:293:89: E501 line too long (111 > 88 characters) +travo/jupyter_course.py:300:89: E501 line too long (114 > 88 characters) +travo/jupyter_course.py:304:89: E501 line too long (115 > 88 characters) +travo/jupyter_course.py:309:89: E501 line too long (106 > 88 characters) +travo/jupyter_course.py:332:89: E501 line too long (92 > 88 characters) +travo/jupyter_course.py:336:89: E501 line too long (95 > 88 characters) +travo/jupyter_course.py:337:89: E501 line too long (96 > 88 characters) +travo/jupyter_course.py:357:89: E501 line too long (101 > 88 characters) +travo/jupyter_course.py:364:89: E501 line too long (89 > 88 characters) +travo/jupyter_course.py:409:89: E501 line too long (104 > 88 characters) +travo/jupyter_course.py:441:89: E501 line too long (96 > 88 characters) +travo/jupyter_course.py:458:89: E501 line too long (98 > 88 characters) +travo/jupyter_course.py:462:89: E501 line too long (96 > 88 characters) +travo/jupyter_course.py:485:89: E501 line too long (92 > 88 characters) +travo/jupyter_course.py:492:89: E501 line too long (90 > 88 characters) +travo/jupyter_course.py:494:89: E501 line too long (100 > 88 characters) +travo/jupyter_course.py:495:89: E501 line too long (96 > 88 characters) +travo/jupyter_course.py:546:89: E501 line too long (106 > 88 characters) +travo/jupyter_course.py:622:89: E501 line too long (102 > 88 characters) +travo/jupyter_course.py:630:89: E501 line too long (89 > 88 characters) +travo/jupyter_course.py:635:9: F811 redefinition of unused 'Gradebook' from line 16 +travo/jupyter_course.py:635:9: F811 redefinition of unused 'MissingEntry' from line 16 +travo/jupyter_course.py:636:89: E501 line too long (90 > 88 characters) +travo/jupyter_course.py:644:89: E501 line too long (91 > 88 characters) +travo/jupyter_course.py:673:9: F811 redefinition of unused 'Gradebook' from line 16 +travo/jupyter_course.py:690:89: E501 line too long (109 > 88 characters) +travo/jupyter_course.py:732:47: E128 continuation line under-indented for visual indent +travo/jupyter_course.py:733:40: E261 at least two spaces before inline comment +travo/jupyter_course.py:733:89: E501 line too long (90 > 88 characters) +travo/jupyter_course.py:739:32: E261 at least two spaces before inline comment +travo/jupyter_course.py:739:33: E262 inline comment should start with '# ' +travo/nbgrader_utils.py:53:89: E501 line too long (90 > 88 characters) +travo/nbgrader_utils.py:72:89: E501 line too long (96 > 88 characters) +travo/nbgrader_utils.py:78:89: E501 line too long (102 > 88 characters) +travo/nbgrader_utils.py:85:89: E501 line too long (100 > 88 characters) +travo/nbgrader_utils.py:88:46: E225 missing whitespace around operator +travo/nbgrader_utils.py:88:80: E225 missing whitespace around operator +travo/nbgrader_utils.py:88:89: E501 line too long (138 > 88 characters) +travo/nbgrader_utils.py:89:52: E225 missing whitespace around operator +travo/nbgrader_utils.py:90:53: E225 missing whitespace around operator +travo/nbgrader_utils.py:90:89: E501 line too long (208 > 88 characters) +travo/nbgrader_utils.py:94:89: E501 line too long (98 > 88 characters) +travo/nbgrader_utils.py:102:89: E501 line too long (106 > 88 characters) +travo/nbgrader_utils.py:109:89: E501 line too long (102 > 88 characters) +travo/nbgrader_utils.py:115:1: E302 expected 2 blank lines, found 1 +travo/nbgrader_utils.py:121:89: E501 line too long (99 > 88 characters) +travo/nbgrader_utils.py:128:89: E501 line too long (118 > 88 characters) +travo/nbgrader_utils.py:131:89: E501 line too long (98 > 88 characters) +travo/nbgrader_utils.py:136:89: E501 line too long (100 > 88 characters) +travo/nbgrader_utils.py:150:9: E722 do not use bare 'except' +travo/nbgrader_utils.py:164:89: E501 line too long (95 > 88 characters) +travo/nbgrader_utils.py:185:1: E302 expected 2 blank lines, found 1 +travo/nbgrader_utils.py:388:89: E501 line too long (105 > 88 characters) +travo/nbgrader_utils.py:389:89: E501 line too long (96 > 88 characters) +travo/nbgrader_utils.py:390:89: E501 line too long (99 > 88 characters) +travo/script.py:325:89: E501 line too long (114 > 88 characters) +travo/travo.py:3:1: F401 '.gitlab.GitLab' imported but unused +travo/utils.py:1:1: F401 'os' imported but unused +travo/utils.py:7:16: E261 at least two spaces before inline comment +travo/utils.py:10:1: E302 expected 2 blank lines, found 0 +travo/utils.py:20:1: E302 expected 2 blank lines, found 1 +travo/utils.py:29:38: E231 missing whitespace after ':' +travo/utils.py:31:1: E302 expected 2 blank lines, found 1 +travo/utils.py:47:1: E302 expected 2 blank lines, found 1 +travo/utils.py:53:89: E501 line too long (112 > 88 characters) +travo/utils.py:60:89: E501 line too long (99 > 88 characters) diff --git a/flake8_output.txt b/flake8_output.txt new file mode 100644 index 00000000..9961e108 --- /dev/null +++ b/flake8_output.txt @@ -0,0 +1,405 @@ +travo/__init__.py:3:1: F401 '.gitlab.Forge' imported but unused +travo/__init__.py:3:1: F401 '.gitlab.GitLab' imported but unused +travo/__init__.py:4:1: F401 '.assignment.Assignment' imported but unused +travo/__init__.py:5:1: F401 '.course.Course' imported but unused +travo/__init__.py:6:1: F401 '.homework.Homework' imported but unused +travo/assignment.py:8:1: F401 'typing.Sequence' imported but unused +travo/assignment.py:9:1: F401 '.gitlab.unknown' imported but unused +travo/assignment.py:87:89: E501 line too long (93 > 88 characters) +travo/assignment.py:155:5: E303 too many blank lines (2) +travo/assignment.py:157:5: E301 expected 1 blank line, found 0 +travo/assignment.py:251:89: E501 line too long (98 > 88 characters) +travo/assignment.py:263:47: E252 missing whitespace around parameter equals +travo/assignment.py:263:48: E252 missing whitespace around parameter equals +travo/assignment.py:321:89: E501 line too long (99 > 88 characters) +travo/assignment.py:322:89: E501 line too long (98 > 88 characters) +travo/assignment.py:474:9: E306 expected 1 blank line before a nested definition, found 0 +travo/assignment.py:504:89: E501 line too long (96 > 88 characters) +travo/assignment.py:511:89: E501 line too long (96 > 88 characters) +travo/assignment.py:512:89: E501 line too long (98 > 88 characters) +travo/assignment.py:523:89: E501 line too long (106 > 88 characters) +travo/assignment.py:557:89: E501 line too long (90 > 88 characters) +travo/assignment.py:684:26: E261 at least two spaces before inline comment +travo/assignment.py:684:27: E262 inline comment should start with '# ' +travo/assignment.py:747:89: E501 line too long (90 > 88 characters) +travo/assignment.py:761:89: E501 line too long (92 > 88 characters) +travo/course.py:9:1: F401 '.gitlab.GitLabTest' imported but unused +travo/course.py:34:89: E501 line too long (93 > 88 characters) +travo/course.py:45:59: W291 trailing whitespace +travo/course.py:87:89: E501 line too long (89 > 88 characters) +travo/course.py:118:5: E303 too many blank lines (2) +travo/course.py:196:89: E501 line too long (144 > 88 characters) +travo/course.py:361:89: E501 line too long (89 > 88 characters) +travo/course.py:365:16: E221 multiple spaces before operator +travo/course.py:396:89: E501 line too long (98 > 88 characters) +travo/course.py:471:89: E501 line too long (108 > 88 characters) +travo/course.py:472:89: E501 line too long (90 > 88 characters) +travo/course.py:492:89: E501 line too long (101 > 88 characters) +travo/course.py:497:89: E501 line too long (98 > 88 characters) +travo/course.py:524:89: E501 line too long (91 > 88 characters) +travo/course.py:528:23: E251 unexpected spaces around keyword / parameter equals +travo/course.py:528:25: E251 unexpected spaces around keyword / parameter equals +travo/course.py:529:27: E251 unexpected spaces around keyword / parameter equals +travo/course.py:529:29: E251 unexpected spaces around keyword / parameter equals +travo/course.py:530:35: E251 unexpected spaces around keyword / parameter equals +travo/course.py:530:37: E251 unexpected spaces around keyword / parameter equals +travo/course.py:531:39: E251 unexpected spaces around keyword / parameter equals +travo/course.py:531:41: E251 unexpected spaces around keyword / parameter equals +travo/course.py:532:25: E251 unexpected spaces around keyword / parameter equals +travo/course.py:532:27: E251 unexpected spaces around keyword / parameter equals +travo/course.py:533:29: E251 unexpected spaces around keyword / parameter equals +travo/course.py:533:31: E251 unexpected spaces around keyword / parameter equals +travo/course.py:534:24: E251 unexpected spaces around keyword / parameter equals +travo/course.py:534:26: E251 unexpected spaces around keyword / parameter equals +travo/course.py:553:89: E501 line too long (93 > 88 characters) +travo/course.py:623:17: E128 continuation line under-indented for visual indent +travo/course.py:624:17: E128 continuation line under-indented for visual indent +travo/course.py:647:89: E501 line too long (99 > 88 characters) +travo/dashboards.py:83:89: E501 line too long (90 > 88 characters) +travo/dashboards.py:84:89: E501 line too long (94 > 88 characters) +travo/dashboards.py:366:89: E501 line too long (181 > 88 characters) +travo/dashboards.py:372:89: E501 line too long (128 > 88 characters) +travo/dashboards.py:590:89: E501 line too long (113 > 88 characters) +travo/dashboards.py:615:89: E501 line too long (107 > 88 characters) +travo/dashboards.py:663:89: E501 line too long (94 > 88 characters) +travo/dashboards.py:722:89: E501 line too long (101 > 88 characters) +travo/dashboards.py:723:89: E501 line too long (98 > 88 characters) +travo/dashboards.py:725:89: E501 line too long (99 > 88 characters) +travo/dashboards.py:726:89: E501 line too long (124 > 88 characters) +travo/dashboards.py:736:89: E501 line too long (109 > 88 characters) +travo/dashboards.py:737:89: E501 line too long (95 > 88 characters) +travo/dashboards.py:742:13: F401 'ipylab.JupyterFrontEnd' imported but unused +travo/dashboards.py:746:89: E501 line too long (91 > 88 characters) +travo/dashboards.py:747:89: E501 line too long (89 > 88 characters) +travo/dashboards.py:753:89: E501 line too long (91 > 88 characters) +travo/dashboards.py:765:89: E501 line too long (107 > 88 characters) +travo/dashboards.py:769:89: E501 line too long (102 > 88 characters) +travo/dashboards.py:770:89: E501 line too long (115 > 88 characters) +travo/dashboards.py:773:9: E722 do not use bare 'except' +travo/dashboards.py:779:89: E501 line too long (109 > 88 characters) +travo/dashboards.py:796:89: E501 line too long (90 > 88 characters) +travo/dashboards.py:800:89: E501 line too long (107 > 88 characters) +travo/dashboards.py:810:89: E501 line too long (119 > 88 characters) +travo/dashboards.py:813:9: E722 do not use bare 'except' +travo/dashboards.py:827:89: E501 line too long (92 > 88 characters) +travo/dashboards.py:828:89: E501 line too long (127 > 88 characters) +travo/dashboards.py:848:89: E501 line too long (99 > 88 characters) +travo/dashboards.py:850:89: E501 line too long (97 > 88 characters) +travo/dashboards.py:853:89: E501 line too long (103 > 88 characters) +travo/dashboards.py:869:89: E501 line too long (95 > 88 characters) +travo/dashboards.py:906:89: E501 line too long (90 > 88 characters) +travo/dashboards.py:960:89: E501 line too long (109 > 88 characters) +travo/dashboards.py:963:36: E128 continuation line under-indented for visual indent +travo/dashboards.py:964:36: E128 continuation line under-indented for visual indent +travo/dashboards.py:965:36: E128 continuation line under-indented for visual indent +travo/dashboards.py:1020:89: E501 line too long (102 > 88 characters) +travo/dashboards.py:1022:89: E501 line too long (104 > 88 characters) +travo/dashboards.py:1025:89: E501 line too long (116 > 88 characters) +travo/dashboards.py:1075:89: E501 line too long (98 > 88 characters) +travo/dashboards.py:1080:89: E501 line too long (99 > 88 characters) +travo/dashboards.py:1099:89: E501 line too long (91 > 88 characters) +travo/dashboards.py:1100:89: E501 line too long (109 > 88 characters) +travo/dashboards.py:1101:89: E501 line too long (102 > 88 characters) +travo/dashboards.py:1111:89: E501 line too long (92 > 88 characters) +travo/dashboards.py:1112:89: E501 line too long (135 > 88 characters) +travo/dashboards.py:1114:89: E501 line too long (99 > 88 characters) +travo/dashboards.py:1121:40: F541 f-string is missing placeholders +travo/dashboards.py:1122:89: E501 line too long (94 > 88 characters) +travo/dashboards.py:1125:33: F841 local variable 'manual_score' is assigned to but never used +travo/dashboards.py:1126:89: E501 line too long (92 > 88 characters) +travo/dashboards.py:1127:89: E501 line too long (140 > 88 characters) +travo/dashboards.py:1128:89: E501 line too long (145 > 88 characters) +travo/dashboards.py:1130:89: E501 line too long (129 > 88 characters) +travo/dashboards.py:1132:89: E501 line too long (89 > 88 characters) +travo/dashboards.py:1136:89: E501 line too long (112 > 88 characters) +travo/dashboards.py:1138:89: E501 line too long (118 > 88 characters) +travo/dashboards.py:1142:89: E501 line too long (110 > 88 characters) +travo/dashboards.py:1146:89: E501 line too long (112 > 88 characters) +travo/gitlab.py:31:1: E302 expected 2 blank lines, found 1 +travo/gitlab.py:34:1: E302 expected 2 blank lines, found 1 +travo/gitlab.py:39:29: E128 continuation line under-indented for visual indent +travo/gitlab.py:40:29: E128 continuation line under-indented for visual indent +travo/gitlab.py:41:29: E124 closing bracket does not match visual indentation +travo/gitlab.py:71:32: E261 at least two spaces before inline comment +travo/gitlab.py:118:9: E722 do not use bare 'except' +travo/gitlab.py:214:89: E501 line too long (99 > 88 characters) +travo/gitlab.py:272:43: W291 trailing whitespace +travo/gitlab.py:404:89: E501 line too long (100 > 88 characters) +travo/gitlab.py:421:5: E303 too many blank lines (2) +travo/gitlab.py:440:89: E501 line too long (94 > 88 characters) +travo/gitlab.py:464:89: E501 line too long (93 > 88 characters) +travo/gitlab.py:494:5: E303 too many blank lines (2) +travo/gitlab.py:494:36: E225 missing whitespace around operator +travo/gitlab.py:551:89: E501 line too long (114 > 88 characters) +travo/gitlab.py:574:89: E501 line too long (104 > 88 characters) +travo/gitlab.py:611:89: E501 line too long (132 > 88 characters) +travo/gitlab.py:680:89: E501 line too long (113 > 88 characters) +travo/gitlab.py:685:54: E251 unexpected spaces around keyword / parameter equals +travo/gitlab.py:685:56: E251 unexpected spaces around keyword / parameter equals +travo/gitlab.py:685:89: E501 line too long (90 > 88 characters) +travo/gitlab.py:697:31: E225 missing whitespace around operator +travo/gitlab.py:719:41: E127 continuation line over-indented for visual indent +travo/gitlab.py:751:89: E501 line too long (104 > 88 characters) +travo/gitlab.py:781:89: E501 line too long (128 > 88 characters) +travo/gitlab.py:857:89: E501 line too long (102 > 88 characters) +travo/gitlab.py:864:89: E501 line too long (110 > 88 characters) +travo/gitlab.py:939:19: E221 multiple spaces before operator +travo/gitlab.py:940:15: E221 multiple spaces before operator +travo/gitlab.py:951:89: E501 line too long (90 > 88 characters) +travo/gitlab.py:955:60: W291 trailing whitespace +travo/gitlab.py:978:1: E302 expected 2 blank lines, found 0 +travo/gitlab.py:990:14: E221 multiple spaces before operator +travo/gitlab.py:991:17: E221 multiple spaces before operator +travo/gitlab.py:992:18: E221 multiple spaces before operator +travo/gitlab.py:994:14: E221 multiple spaces before operator +travo/gitlab.py:1042:23: E201 whitespace after '{' +travo/gitlab.py:1044:82: E202 whitespace before '}' +travo/gitlab.py:1074:26: E201 whitespace after '[' +travo/gitlab.py:1074:80: E202 whitespace before ']' +travo/gitlab.py:1117:1: E302 expected 2 blank lines, found 1 +travo/gitlab.py:1145:89: E501 line too long (89 > 88 characters) +travo/gitlab.py:1146:52: E202 whitespace before ']' +travo/gitlab.py:1147:52: E202 whitespace before ']' +travo/gitlab.py:1162:52: E202 whitespace before ']' +travo/gitlab.py:1170:52: E202 whitespace before ']' +travo/gitlab.py:1171:52: E202 whitespace before ']' +travo/gitlab.py:1172:52: E202 whitespace before ']' +travo/gitlab.py:1173:52: E202 whitespace before ']' +travo/gitlab.py:1174:52: E202 whitespace before ']' +travo/gitlab.py:1175:52: E202 whitespace before ']' +travo/gitlab.py:1176:52: E202 whitespace before ']' +travo/gitlab.py:1177:52: E202 whitespace before ']' +travo/gitlab.py:1178:52: E202 whitespace before ']' +travo/gitlab.py:1179:52: E202 whitespace before ']' +travo/gitlab.py:1181:52: E202 whitespace before ']' +travo/gitlab.py:1183:52: E202 whitespace before ']' +travo/gitlab.py:1185:52: E202 whitespace before ']' +travo/gitlab.py:1188:52: E202 whitespace before ']' +travo/gitlab.py:1190:52: E202 whitespace before ']' +travo/gitlab.py:1193:52: E202 whitespace before ']' +travo/gitlab.py:1194:52: E202 whitespace before ']' +travo/gitlab.py:1195:52: E202 whitespace before ']' +travo/gitlab.py:1196:52: E202 whitespace before ']' +travo/gitlab.py:1198:52: E202 whitespace before ']' +travo/gitlab.py:1202:52: E202 whitespace before ']' +travo/gitlab.py:1203:52: E202 whitespace before ']' +travo/gitlab.py:1206:52: E202 whitespace before ']' +travo/gitlab.py:1209:52: E202 whitespace before ']' +travo/gitlab.py:1212:52: E202 whitespace before ']' +travo/gitlab.py:1249:89: E501 line too long (103 > 88 characters) +travo/gitlab.py:1252:89: E501 line too long (97 > 88 characters) +travo/gitlab.py:1481:17: E201 whitespace after '[' +travo/gitlab.py:1481:59: E202 whitespace before ']' +travo/gitlab.py:1538:89: E501 line too long (89 > 88 characters) +travo/gitlab.py:1557:5: E303 too many blank lines (2) +travo/gitlab.py:1565:89: E501 line too long (96 > 88 characters) +travo/gitlab.py:1569:21: E128 continuation line under-indented for visual indent +travo/gitlab.py:1578:5: E303 too many blank lines (2) +travo/gitlab.py:1578:38: E231 missing whitespace after ':' +travo/gitlab.py:1578:43: E252 missing whitespace around parameter equals +travo/gitlab.py:1578:44: E252 missing whitespace around parameter equals +travo/gitlab.py:1578:58: E231 missing whitespace after ':' +travo/gitlab.py:1578:63: E252 missing whitespace around parameter equals +travo/gitlab.py:1578:64: E252 missing whitespace around parameter equals +travo/gitlab.py:1578:79: E231 missing whitespace after ':' +travo/gitlab.py:1578:84: E252 missing whitespace around parameter equals +travo/gitlab.py:1578:85: E252 missing whitespace around parameter equals +travo/gitlab.py:1578:89: E501 line too long (110 > 88 characters) +travo/gitlab.py:1580:89: E501 line too long (100 > 88 characters) +travo/gitlab.py:1582:89: E501 line too long (100 > 88 characters) +travo/gitlab.py:1588:89: E501 line too long (144 > 88 characters) +travo/gitlab.py:1592:89: E501 line too long (89 > 88 characters) +travo/gitlab.py:1611:35: F541 f-string is missing placeholders +travo/gitlab.py:1617:29: E261 at least two spaces before inline comment +travo/gitlab.py:1635:5: E303 too many blank lines (2) +travo/gitlab.py:1644:5: E303 too many blank lines (2) +travo/gitlab.py:1670:89: E501 line too long (155 > 88 characters) +travo/gitlab.py:1677:89: E501 line too long (108 > 88 characters) +travo/gitlab.py:1679:89: E501 line too long (93 > 88 characters) +travo/gitlab.py:1799:37: E262 inline comment should start with '# ' +travo/gitlab.py:1878:89: E501 line too long (123 > 88 characters) +travo/gitlab.py:1890:89: E501 line too long (125 > 88 characters) +travo/gitlab.py:1909:89: E501 line too long (96 > 88 characters) +travo/gitlab.py:1911:89: E501 line too long (113 > 88 characters) +travo/gitlab.py:1914:89: E501 line too long (94 > 88 characters) +travo/gitlab.py:1925:25: E261 at least two spaces before inline comment +travo/gitlab.py:1927:25: E261 at least two spaces before inline comment +travo/gitlab.py:1932:89: E501 line too long (106 > 88 characters) +travo/gitlab.py:1936:89: E501 line too long (97 > 88 characters) +travo/gitlab.py:1940:19: E111 indentation is not a multiple of 4 +travo/gitlab.py:1943:89: E501 line too long (89 > 88 characters) +travo/gitlab.py:1988:5: E301 expected 1 blank line, found 0 +travo/gitlab.py:2018:5: E303 too many blank lines (2) +travo/gitlab.py:2018:89: E501 line too long (94 > 88 characters) +travo/gitlab.py:2034:17: E128 continuation line under-indented for visual indent +travo/gitlab.py:2034:89: E501 line too long (96 > 88 characters) +travo/gitlab.py:2071:45: W291 trailing whitespace +travo/gitlab.py:2074:56: W291 trailing whitespace +travo/gitlab.py:2086:24: W291 trailing whitespace +travo/gitlab.py:2094:25: W291 trailing whitespace +travo/gitlab.py:2098:46: W291 trailing whitespace +travo/gitlab.py:2101:57: W291 trailing whitespace +travo/gitlab.py:2109:25: W291 trailing whitespace +travo/gitlab.py:2121:24: W291 trailing whitespace +travo/gitlab.py:2129:25: W291 trailing whitespace +travo/gitlab.py:2139:35: E128 continuation line under-indented for visual indent +travo/gitlab.py:2151:38: E252 missing whitespace around parameter equals +travo/gitlab.py:2151:39: E252 missing whitespace around parameter equals +travo/gitlab.py:2181:89: E501 line too long (99 > 88 characters) +travo/gitlab.py:2238:89: E501 line too long (104 > 88 characters) +travo/gitlab.py:2242:1: E302 expected 2 blank lines, found 1 +travo/gitlab.py:2265:89: E501 line too long (97 > 88 characters) +travo/gitlab.py:2276:89: E501 line too long (89 > 88 characters) +travo/gitlab.py:2277:89: E501 line too long (94 > 88 characters) +travo/gitlab.py:2278:89: E501 line too long (94 > 88 characters) +travo/gitlab.py:2280:52: E202 whitespace before ']' +travo/gitlab.py:2281:52: E202 whitespace before ']' +travo/gitlab.py:2282:52: E202 whitespace before ']' +travo/gitlab.py:2283:52: E202 whitespace before ']' +travo/gitlab.py:2284:52: E202 whitespace before ']' +travo/gitlab.py:2285:52: E202 whitespace before ']' +travo/gitlab.py:2291:52: E202 whitespace before ']' +travo/gitlab.py:2380:89: E501 line too long (94 > 88 characters) +travo/gitlab.py:2427:89: E501 line too long (111 > 88 characters) +travo/gitlab.py:2430:89: E501 line too long (96 > 88 characters) +travo/gitlab.py:2433:89: E501 line too long (103 > 88 characters) +travo/gitlab.py:2438:89: E501 line too long (128 > 88 characters) +travo/gitlab.py:2440:1: W293 blank line contains whitespace +travo/gitlab.py:2485:51: E202 whitespace before ']' +travo/gitlab.py:2486:51: E202 whitespace before ']' +travo/gitlab.py:2487:51: E202 whitespace before ']' +travo/gitlab.py:2489:51: E202 whitespace before ']' +travo/gitlab.py:2506:1: E302 expected 2 blank lines, found 1 +travo/gitlab.py:2510:1: E305 expected 2 blank lines after class or function definition, found 1 +travo/gitlab.py:2515:5: E301 expected 1 blank line, found 0 +travo/gitlab.py:2518:1: E305 expected 2 blank lines after class or function definition, found 1 +travo/gitlab.py:2520:1: E302 expected 2 blank lines, found 1 +travo/gitlab.py:2536:30: E231 missing whitespace after ':' +travo/homework.py:1:1: F401 'dataclasses.field' imported but unused +travo/homework.py:2:1: F401 'os' imported but unused +travo/homework.py:7:1: E302 expected 2 blank lines, found 1 +travo/homework.py:19:21: E261 at least two spaces before inline comment +travo/homework.py:20:24: E261 at least two spaces before inline comment +travo/homework.py:21:19: E261 at least two spaces before inline comment +travo/homework.py:23:34: E261 at least two spaces before inline comment +travo/homework.py:24:26: E261 at least two spaces before inline comment +travo/homework.py:26:38: E261 at least two spaces before inline comment +travo/homework.py:27:31: E261 at least two spaces before inline comment +travo/homework.py:30:5: E303 too many blank lines (2) +travo/homework.py:48:13: E722 do not use bare 'except' +travo/homework.py:50:40: F541 f-string is missing placeholders +travo/homework.py:50:89: E501 line too long (145 > 88 characters) +travo/homework.py:52:89: E501 line too long (129 > 88 characters) +travo/homework.py:91:89: E501 line too long (104 > 88 characters) +travo/homework.py:102:5: E303 too many blank lines (2) +travo/homework.py:102:54: E231 missing whitespace after ':' +travo/homework.py:102:59: E252 missing whitespace around parameter equals +travo/homework.py:102:60: E252 missing whitespace around parameter equals +travo/homework.py:122:23: F541 f-string is missing placeholders +travo/homework.py:128:89: E501 line too long (91 > 88 characters) +travo/homework.py:161:23: F541 f-string is missing placeholders +travo/homework.py:172:89: E501 line too long (101 > 88 characters) +travo/homework.py:179:21: E265 block comment should start with '# ' +travo/homework.py:180:21: E265 block comment should start with '# ' +travo/homework.py:184:19: F541 f-string is missing placeholders +travo/homework.py:189:5: E303 too many blank lines (2) +travo/homework.py:189:51: E231 missing whitespace after ':' +travo/homework.py:189:56: E252 missing whitespace around parameter equals +travo/homework.py:189:57: E252 missing whitespace around parameter equals +travo/homework.py:204:19: F541 f-string is missing placeholders +travo/homework.py:216:23: F541 f-string is missing placeholders +travo/homework.py:221:89: E501 line too long (95 > 88 characters) +travo/homework.py:237:89: E501 line too long (93 > 88 characters) +travo/jupyter_course.py:11:1: F401 'logging' imported but unused +travo/jupyter_course.py:13:1: F401 'requests' imported but unused +travo/jupyter_course.py:14:1: F401 'typing.Callable' imported but unused +travo/jupyter_course.py:14:1: F401 'typing.Tuple' imported but unused +travo/jupyter_course.py:14:1: F401 'typing.cast' imported but unused +travo/jupyter_course.py:16:1: F401 'nbgrader.api.Gradebook' imported but unused +travo/jupyter_course.py:16:1: F401 'nbgrader.api.MissingEntry' imported but unused +travo/jupyter_course.py:18:1: F401 '.assignment.Assignment' imported but unused +travo/jupyter_course.py:22:1: F401 '.gitlab.GitLab' imported but unused +travo/jupyter_course.py:22:1: F401 '.gitlab.AuthenticationError' imported but unused +travo/jupyter_course.py:23:1: F401 '.gitlab.ResourceNotFoundError' imported but unused +travo/jupyter_course.py:26:1: E302 expected 2 blank lines, found 1 +travo/jupyter_course.py:33:40: W291 trailing whitespace +travo/jupyter_course.py:34:89: E501 line too long (122 > 88 characters) +travo/jupyter_course.py:35:89: E501 line too long (119 > 88 characters) +travo/jupyter_course.py:36:89: E501 line too long (134 > 88 characters) +travo/jupyter_course.py:37:89: E501 line too long (113 > 88 characters) +travo/jupyter_course.py:207:89: E501 line too long (92 > 88 characters) +travo/jupyter_course.py:211:9: F401 'jupytext' imported but unused +travo/jupyter_course.py:224:89: E501 line too long (105 > 88 characters) +travo/jupyter_course.py:225:89: E501 line too long (89 > 88 characters) +travo/jupyter_course.py:244:89: E501 line too long (107 > 88 characters) +travo/jupyter_course.py:251:89: E501 line too long (109 > 88 characters) +travo/jupyter_course.py:263:89: E501 line too long (92 > 88 characters) +travo/jupyter_course.py:268:89: E501 line too long (93 > 88 characters) +travo/jupyter_course.py:281:89: E501 line too long (100 > 88 characters) +travo/jupyter_course.py:290:89: E501 line too long (92 > 88 characters) +travo/jupyter_course.py:293:89: E501 line too long (111 > 88 characters) +travo/jupyter_course.py:300:89: E501 line too long (114 > 88 characters) +travo/jupyter_course.py:304:89: E501 line too long (115 > 88 characters) +travo/jupyter_course.py:309:89: E501 line too long (106 > 88 characters) +travo/jupyter_course.py:332:89: E501 line too long (92 > 88 characters) +travo/jupyter_course.py:336:89: E501 line too long (95 > 88 characters) +travo/jupyter_course.py:337:89: E501 line too long (96 > 88 characters) +travo/jupyter_course.py:357:89: E501 line too long (101 > 88 characters) +travo/jupyter_course.py:364:89: E501 line too long (89 > 88 characters) +travo/jupyter_course.py:409:89: E501 line too long (104 > 88 characters) +travo/jupyter_course.py:441:89: E501 line too long (96 > 88 characters) +travo/jupyter_course.py:458:89: E501 line too long (98 > 88 characters) +travo/jupyter_course.py:462:89: E501 line too long (96 > 88 characters) +travo/jupyter_course.py:485:89: E501 line too long (92 > 88 characters) +travo/jupyter_course.py:492:89: E501 line too long (90 > 88 characters) +travo/jupyter_course.py:494:89: E501 line too long (100 > 88 characters) +travo/jupyter_course.py:495:89: E501 line too long (96 > 88 characters) +travo/jupyter_course.py:546:89: E501 line too long (106 > 88 characters) +travo/jupyter_course.py:622:89: E501 line too long (102 > 88 characters) +travo/jupyter_course.py:630:89: E501 line too long (89 > 88 characters) +travo/jupyter_course.py:635:9: F811 redefinition of unused 'Gradebook' from line 16 +travo/jupyter_course.py:635:9: F811 redefinition of unused 'MissingEntry' from line 16 +travo/jupyter_course.py:636:89: E501 line too long (90 > 88 characters) +travo/jupyter_course.py:644:89: E501 line too long (91 > 88 characters) +travo/jupyter_course.py:673:9: F811 redefinition of unused 'Gradebook' from line 16 +travo/jupyter_course.py:690:89: E501 line too long (109 > 88 characters) +travo/jupyter_course.py:732:47: E128 continuation line under-indented for visual indent +travo/jupyter_course.py:733:40: E261 at least two spaces before inline comment +travo/jupyter_course.py:733:89: E501 line too long (90 > 88 characters) +travo/jupyter_course.py:739:32: E261 at least two spaces before inline comment +travo/jupyter_course.py:739:33: E262 inline comment should start with '# ' +travo/nbgrader_utils.py:53:89: E501 line too long (90 > 88 characters) +travo/nbgrader_utils.py:72:89: E501 line too long (96 > 88 characters) +travo/nbgrader_utils.py:78:89: E501 line too long (102 > 88 characters) +travo/nbgrader_utils.py:85:89: E501 line too long (100 > 88 characters) +travo/nbgrader_utils.py:88:46: E225 missing whitespace around operator +travo/nbgrader_utils.py:88:80: E225 missing whitespace around operator +travo/nbgrader_utils.py:88:89: E501 line too long (138 > 88 characters) +travo/nbgrader_utils.py:89:52: E225 missing whitespace around operator +travo/nbgrader_utils.py:90:53: E225 missing whitespace around operator +travo/nbgrader_utils.py:90:89: E501 line too long (208 > 88 characters) +travo/nbgrader_utils.py:94:89: E501 line too long (98 > 88 characters) +travo/nbgrader_utils.py:102:89: E501 line too long (106 > 88 characters) +travo/nbgrader_utils.py:109:89: E501 line too long (102 > 88 characters) +travo/nbgrader_utils.py:115:1: E302 expected 2 blank lines, found 1 +travo/nbgrader_utils.py:121:89: E501 line too long (99 > 88 characters) +travo/nbgrader_utils.py:128:89: E501 line too long (118 > 88 characters) +travo/nbgrader_utils.py:131:89: E501 line too long (98 > 88 characters) +travo/nbgrader_utils.py:136:89: E501 line too long (100 > 88 characters) +travo/nbgrader_utils.py:150:9: E722 do not use bare 'except' +travo/nbgrader_utils.py:164:89: E501 line too long (95 > 88 characters) +travo/nbgrader_utils.py:185:1: E302 expected 2 blank lines, found 1 +travo/nbgrader_utils.py:388:89: E501 line too long (105 > 88 characters) +travo/nbgrader_utils.py:389:89: E501 line too long (96 > 88 characters) +travo/nbgrader_utils.py:390:89: E501 line too long (99 > 88 characters) +travo/script.py:325:89: E501 line too long (114 > 88 characters) +travo/travo.py:3:1: F401 '.gitlab.GitLab' imported but unused +travo/utils.py:1:1: F401 'os' imported but unused +travo/utils.py:7:16: E261 at least two spaces before inline comment +travo/utils.py:10:1: E302 expected 2 blank lines, found 0 +travo/utils.py:20:1: E302 expected 2 blank lines, found 1 +travo/utils.py:29:38: E231 missing whitespace after ':' +travo/utils.py:31:1: E302 expected 2 blank lines, found 1 +travo/utils.py:47:1: E302 expected 2 blank lines, found 1 +travo/utils.py:53:89: E501 line too long (112 > 88 characters) +travo/utils.py:60:89: E501 line too long (99 > 88 characters) diff --git a/setup.py b/setup.py index 439d50b3..adbd6641 100644 --- a/setup.py +++ b/setup.py @@ -10,7 +10,7 @@ setup( license='CC', classifiers=[ 'Development Status :: 4 - Alpha', - 'Intended Audience :: Information Technology' + 'Intended Audience :: Information Technology' + 'Topic :: Scientific/Engineering', 'Programming Language :: Python :: 3', ], # classifiers list: https://pypi.python.org/pypi?%3Aaction=list_classifiers diff --git a/sonar-project.properties b/sonar-project.properties new file mode 100644 index 00000000..fd038bb1 --- /dev/null +++ b/sonar-project.properties @@ -0,0 +1,6 @@ +sonar.projectKey=Travo +sonar.qualitygate.wait=true +sonar.python.file.suffixes=py +sonar.python.coverage.reportPaths=coverage-reports/*coverage*.xml +sonar.python.xunit.reportPath=xunit-reports/xunit-result-*.xml +sonar.exclusions=understand/*,coverage-reports/*,travo.und/*,flake8*.*, \ No newline at end of file diff --git a/travo.und/id.txt b/travo.und/id.txt new file mode 100644 index 00000000..5a957170 --- /dev/null +++ b/travo.und/id.txt @@ -0,0 +1 @@ +{2dfcb915-d541-4cf7-9cd2-edaf97aaafda} \ No newline at end of file diff --git a/travo.und/settings.xml b/travo.und/settings.xml new file mode 100644 index 00000000..57e4bfc3 --- /dev/null +++ b/travo.und/settings.xml @@ -0,0 +1,62 @@ + + +

+ + + + + + + + + + + + + + + + + + + + diff --git a/travo/course.py b/travo/course.py index 706a981f..7cdd1126 100644 --- a/travo/course.py +++ b/travo/course.py @@ -192,7 +192,7 @@ class Course: expires_at: Optional[str] = None def __post_init__(self) -> None: - # TODO: "Check that: name contains only letters, digits, emojis, '_', '.', dash, space. It must start with letter, digit, emoji or '_'." + # "Check that: name contains only letters, digits, emojis, '_', '.', dash, space. It must start with letter, digit, emoji or '_'." if self.session_path is not None: self.assignments_group_path = os.path.join( self.path, @@ -259,14 +259,14 @@ class Course: should some course want to use another one. """ assert role == "student" - dir = self.student_dir - if dir == ".": + dir1 = self.student_dir + if dir1 == ".": return "." - if dir[:2] == "~/": - dir = os.path.join(self.forge.home_dir, dir[2:]) + if dir1[:2] == "~/": + dir1 = os.path.join(self.forge.home_dir, dir1[2:]) if assignment is not None: - dir = os.path.join(dir, assignment) - return dir + dir1 = os.path.join(dir1, assignment) + return dir1 def ensure_work_dir(self) -> str: """ @@ -319,7 +319,6 @@ class Course: message += _('unknown group', student_group=student_group) + "\n" message += _('specify group', student_groups=', '.join(self.student_groups)) + "\n" - # message += _('help', script=self.script) raise RuntimeError(message) diff --git a/travo/dashboards.py b/travo/dashboards.py index 22c72bba..2f7e9a34 100644 --- a/travo/dashboards.py +++ b/travo/dashboards.py @@ -50,8 +50,10 @@ from .utils import run from travo.i18n import _ from . import jupyter_course # only used by type hints -# TODO: should use the current foreground color rather than black -border_layout = {'border': '1px solid black'} +border_layout_style = '1px solid black'; + +# TO DO: should use the current foreground color rather than black +border_layout = {'border': border_layout_style } def HTML(*args: Any, **kwargs: Any) -> ipywidgets.HTML: @@ -100,7 +102,7 @@ class AuthenticationWidget(VBox): self.passwordUI, self.button, self.messageUI), - layout={'border': '1px solid black', + layout={'border': border_layout_style, 'display': 'none'}) def show_widget(self, message: str = "") -> None: @@ -226,6 +228,8 @@ class StatusBar(VBox): class AssignmentStudentDashboard(HBox): + assignment_status_not_release: str + def __init__(self, assignment: Assignment, status_bar: Optional[StatusBar] = None, @@ -295,6 +299,8 @@ class AssignmentStudentDashboard(HBox): ) Thread(target=self.update).start() + self.assignment_status_not_release = "not released" + def update(self) -> None: # For now, fetching the assignment status requires the user to # be logged in. Fails gracefuly if this is not yet the case. @@ -302,7 +308,7 @@ class AssignmentStudentDashboard(HBox): status = self.assignment.status() except AuthenticationError: return - if status.status == "not released": + if status.status == self.assignment_status_not_release: self.nameUI.value = self.name self.fetchUI.disabled = True else: @@ -429,11 +435,13 @@ class CourseStudentDashboard(VBox): student_group_UI: Dropdown assignments: Tuple[str, ...] = () assignment_dashboards: Dict[str, AssignmentStudentDashboard] + student_group_UI_label: str = "" def __init__(self, course: Course, student_group: Optional[str] = None): self.course = course + self.student_group_UI_label = 'student group' self.header = HBox( [HTML(f'{course.name}', @@ -441,7 +449,7 @@ class CourseStudentDashboard(VBox): layout=border_layout) if self.course.student_groups is not None: self.student_group_UI = Dropdown( - description=_('student group'), + description=_(self.student_group_UI_label), value=student_group, options=course.student_groups, ) @@ -644,7 +652,7 @@ class AssignmentInstructorDashboard(HBox): status = self.assignment.status() except AuthenticationError: return - if status.status == "not released": + if status.status == self.assignment_status_release: self.assignmentUI.value = "" self.collectButton.disabled = True self.feedbackButton.disabled = True @@ -758,7 +766,7 @@ class AssignmentInstructorDashboard(HBox): # raise ValueError("Can't open work dir if assignment_dir is not set") path = os.path.dirname( self.jupyter_front_end.sessions.current_session['path']) - file = self.course.formgrader( + fileForm = self.course.formgrader( os.path.basename(self.name), in_notebook=False) import pdb pdb.pm() @@ -766,7 +774,7 @@ class AssignmentInstructorDashboard(HBox): "docmanager:open", { # Generalize if there is no index.md - "path": os.path.join(path, file), + "path": os.path.join(path, fileForm), "factory": "Notebook", # 'options': { # 'mode': 'split-right' @@ -846,7 +854,7 @@ class AssignmentInstructorDashboard(HBox): p = self.course.forge.get_project(self.assignment.repo_path) status = f"last release: {p.visibility}\n{p.last_activity_at}" except ResourceNotFoundError: - status = "not released" + status = self.assignment_status_release return status def release_feedback_status_cmd(self, student_group: Optional[Any]) -> str: @@ -857,7 +865,7 @@ class AssignmentInstructorDashboard(HBox): student_group=student_group).repo_path).http_url_to_repo url = "go to " + url.replace(".git", "/-/forks") except ResourceNotFoundError: - url = "not released" + url = self.assignment_status_release return url @@ -873,6 +881,7 @@ class CourseInstructorDashboard(VBox): student_group: Optional[str] = None): self.course = course self.course.forge.login() + self.assignment_status_not_release = "not released" self.release_mode = RadioButtons( description="", value=None, options=[ @@ -893,14 +902,14 @@ class CourseInstructorDashboard(VBox): VBox([Label("release mode"), self.release_mode], width="10px"), VBox([Label("collect:\nforce new autograde"), self.force_autograding]), VBox([Label("new score policy"), self.new_score_policy])], - layout=Layout(border='1px solid black', grid_gap='5px 40px')) + layout=Layout(border=border_layout_style, grid_gap='5px 40px')) if self.course.student_groups is not None: self.student_group_UI = Dropdown( description="", value=student_group, options=course.student_groups, ) - self.header.children += (VBox([Label(_('student group')), + self.header.children += (VBox([Label(_(self.assignment_status_not_release)), self.student_group_UI]),) self.student_group_UI.observe(lambda change: self.update(), names='value') @@ -986,6 +995,7 @@ class CourseGradeDashboard(VBox): def __init__(self, course: 'jupyter_course.JupyterCourse') -> None: self.course = course self.course.forge.login() + self.assignment_status_not_release = "not released" layout = Layout(width="initial") self.dashboard_grade_filename = "dashboard-grades.csv" @@ -1017,7 +1027,7 @@ class CourseGradeDashboard(VBox): layout=border_layout) if self.course.student_groups is not None: self.student_group_UI = Dropdown( - description=_('student group'), + description=_(self.assignment_status_not_release), value=None, options=["all"] + list(self.course.student_groups), ) diff --git a/travo/gitlab.py b/travo/gitlab.py index e9d2864d..1e6ea358 100644 --- a/travo/gitlab.py +++ b/travo/gitlab.py @@ -79,7 +79,7 @@ class GitLab: home_dir: Optional[str] = None): if base_url[-1] != "/": base_url = base_url + "/" - if not base_url[:8] == "https://": + if base_url[:8] != "https://": raise ValueError("Only the https protocol is supported") self.base_url = base_url self.api = base_url + "api/v4/" @@ -941,7 +941,7 @@ class ResourceRef: # see e.g. https://groups.google.com/forum/#!topic/dev-python/7vBAZn_jEfQ forge: 'Forge' = field(default=cast('Forge', None)) path: str = field(default=cast('str', None)) - url: InitVar[Optional[str]] = None + url: InitVar[Optional[str]] def __post_init__(self, url: Optional[str] = None) -> None: if (self.forge is None) == (url is None): @@ -1271,10 +1271,10 @@ class Project(Resource): "namespace": os.path.dirname(full_path) } json = forge.post_json('projects/import', data=data, files=files) - id = json['id'] - while forge.get_json(f'/projects/{id}/import')['import_status'] != 'finished': + project_id = json['id'] + while forge.get_json(f'/projects/{project_id}/import')['import_status'] != 'finished': time.sleep(1) - return forge.get_project(id) + return forge.get_project(project_id) def ensure_fork(self, path: str, @@ -1621,7 +1621,7 @@ class Project(Resource): q = {"id_after": self.id, "page": page} if not deep: q["min_access_level"] = 40 - res = self.gitlab.get(f"/projects", data=q) + res = self.gitlab.get("/projects", data=q) page = res.headers.get("X-Next-Page") for json in res.json(): other = Project(self.gitlab, **json) @@ -1725,14 +1725,14 @@ class Project(Resource): file: str, ref: str) -> JSON: """Get a file from the repository""" - file = urlencode(file) - json = self.gitlab.get(f"/projects/{self.id}/repository/files/{file}", + file_encoded = urlencode(file) + json = self.gitlab.get(f"/projects/{self.id}/repository/files/{file_encoded}", data=dict( ref=ref, )).json() error = json.get('error', json.get('message')) if error is not None: - raise RuntimeError(f"get file {file} of ref {ref} " + raise RuntimeError(f"get file {file_encoded} of ref {ref} " f"of project {self.path_with_namespace} failed: " f"{error}") return json diff --git a/travo/homework.py b/travo/homework.py index 56a5a489..4ee4fc03 100755 --- a/travo/homework.py +++ b/travo/homework.py @@ -48,7 +48,7 @@ class Homework: except BaseException: if url == ".": raise RuntimeError( - f"The current directory is not a valid travo/git directory. Specify a valid directory or an project URL.") + "The current directory is not a valid travo/git directory. Specify a valid directory or an project URL.") else: raise RuntimeError( f"{url} is not a valid travo/git directory. Specify a valid directory or an project URL.") @@ -121,7 +121,7 @@ class Homework: # Check fork if assignment is not None: if project.forked_from_project is None: - print(f" ❌ not a fork") + print(" ❌ not a fork") result = False if fixup: project.add_origin(assignment) @@ -149,7 +149,7 @@ class Homework: if g['group_id'] == self.group.id: if g['group_access_level'] >= self.group_level: sharedok = True - continue + if not sharedok: print(f" ❌ bad group sharing with group {self.group.full_path}") result = False @@ -161,7 +161,7 @@ class Homework: if instructor is None and assignment is not None: owners = assignment.get_owners() if len(owners) == 0: - print(f" ❌ no assignment owner") + print(" ❌ no assignment owner") result = False elif len(owners) > 1: print(f" ❌ multiple assignment owners {owners}") @@ -174,17 +174,17 @@ class Homework: for member in project.get_members(): if member['id'] == instructor.id and member['access_level'] >= self.instructor_level: instructok = True - continue + if not instructok: print(f" ❌ bad membership of instructor {instructor.username}") result = False if fixup: - # FIXME share_with do not works on users yet + ##FIXME share_with do not works on users yet # project.share_with(instructor, self.instructor_level) recheck = True if recheck: - print(f" Recheck after fixup!") + print(" Recheck after fixup!") result = self.check_student(project) return result @@ -203,7 +203,7 @@ class Homework: self.check_student(project, fixup=fixup) if project.default_branch is None: - print(f" ❌ empty repository") + print(" ❌ empty repository") return nocommits = False @@ -215,7 +215,7 @@ class Homework: compare = None if compare is not None: if len(compare['commits']) == 0: - print(f" ❌ no commits") + print(" ❌ no commits") nocommits = True compare_rev = assignment.get_compare(project) diff --git a/travo/jupyter_course.py b/travo/jupyter_course.py index b3030040..60e67829 100644 --- a/travo/jupyter_course.py +++ b/travo/jupyter_course.py @@ -134,6 +134,7 @@ class JupyterCourse(Course): ignore_nbgrader = ignore + [".*"] gitlab_ci_yml = None release_directory: str = "release" + gradebook_db: str = ".gradebook.db"; @staticmethod def validate(*files: str) -> None: @@ -219,7 +220,7 @@ class JupyterCourse(Course): with tempfile.TemporaryDirectory() as tmpdirname: gitdir = os.path.join(target_path, ".git") tmpgitdir = os.path.join(tmpdirname, ".git") - db = os.path.join(target_path, ".gradebook.db") + db = os.path.join(target_path, self.gradebook_db) # tmpdb = os.path.join(tmpdirname, ".gradebook.db") preserve_gitdir = os.path.exists(gitdir) if preserve_gitdir: @@ -396,7 +397,7 @@ class JupyterCourse(Course): run(["nbgrader", "autograde", *nbgrader_config, assignment_name]) run(["nbgrader", "generate_feedback", *nbgrader_config, assignment_name]) autograded = os.path.join("autograded", student, assignment_name) - shutil.copy(".gradebook.db", autograded) + shutil.copy(self.gradebook_db, autograded) feedback_generated = os.path.join( "feedback_generated", student, assignment_name) for format in ["csv", "md", "html", "svg"]: @@ -651,10 +652,10 @@ class JupyterCourse(Course): assert status.submission is not None and status.autograde_job is not None job = status.autograde_job repo = status.submission.repo - file = f"autograded/{student}/{assignment_name}/.gradebook.db" - content = repo.fetch_artifact(job, artifact_path=file).content - os.makedirs(os.path.dirname(file), exist_ok=True) - with io.open(file, 'wb') as f: + file_1 = f"autograded/{student}/{assignment_name}/.gradebook.db" + content = repo.fetch_artifact(job, artifact_path=file_1).content + os.makedirs(os.path.dirname(file_1), exist_ok=True) + with io.open(file_1, 'wb') as f: f.write(content) def merge_autograded_db(self, @@ -746,7 +747,7 @@ class JupyterCourse(Course): if group != student_group: continue self.log.info(f"Release feedback for student gradebook `{file}`") - project.ensure_file(".gradebook.db", + project.ensure_file(self.gradebook_db, content=content, encoding="base64", commit_message="Release feedback" diff --git a/travo/nbgrader_utils.py b/travo/nbgrader_utils.py index b764aad6..587b89b7 100644 --- a/travo/nbgrader_utils.py +++ b/travo/nbgrader_utils.py @@ -199,6 +199,7 @@ class GradebookExporter: auto_score: float, max_auto_score: float, manual_score: Optional[float], max_manual_score: float, extra_credit: float) -> None: + # to be implemented pass def record_assignment(self, @@ -206,9 +207,11 @@ class GradebookExporter: auto_score: float, max_auto_score: float, manual_score: Optional[float], max_manual_score: float, extra_credit: float) -> None: + # to be implemented pass def export(self) -> Any: + # to be implemented pass diff --git a/travo/script.py b/travo/script.py index 3e4a4a2c..7d2b8540 100644 --- a/travo/script.py +++ b/travo/script.py @@ -151,10 +151,10 @@ def add_subparsers_for_object_methods( method = getattr(object, name) if not (inspect.ismethod(method) or inspect.isfunction(method)): continue - help = inspect.getdoc(method) - if help is not None: - help = help.splitlines()[0] - parser = subparsers.add_parser(name, help=help, description=help) + help_doc = inspect.getdoc(method) + if help_doc is not None: + help_doc = help_doc.splitlines()[0] + parser = subparsers.add_parser(name, help=help_doc, description=help_doc) add_parser_arguments_for_function(parser, method) diff --git a/understand/travo-metrics-oop.csv b/understand/travo-metrics-oop.csv new file mode 100644 index 00000000..c5dc2413 --- /dev/null +++ b/understand/travo-metrics-oop.csv @@ -0,0 +1,358 @@ +Kind,Name,CountClassDerived,CountClassCoupled,CountDeclMethodAll,MaxInheritanceTree,SumCyclomatic,CountDeclInstanceMethod,CountPath,Essential +Abstract Class,travo.gitlab.Project,0,12,46,4,109,27,, +Class,travo.assignment.Assignment,1,13,23,0,61,22,, +Class,travo.assignment.Submission,0,7,6,0,29,6,, +Class,travo.assignment.SubmissionStatus,0,1,1,0,1,1,, +Class,travo.course.Course,1,10,21,0,47,21,, +Class,travo.course.CourseAssignment,0,5,29,1,12,6,, +Class,travo.dashboards.AssignmentInstructorDashboard,0,8,15,1,34,15,, +Class,travo.dashboards.AssignmentStudentDashboard,0,7,5,1,21,5,, +Class,travo.dashboards.AuthenticationWidget,0,4,6,1,8,6,, +Class,travo.dashboards.CourseGradeDashboard,0,7,10,1,32,10,, +Class,travo.dashboards.CourseInstructorDashboard,0,7,3,1,7,3,, +Class,travo.dashboards.CourseStudentDashboard,0,10,3,1,12,3,, +Class,travo.dashboards.StatusBar,0,5,3,1,9,3,, +Class,travo.gitlab.AnonymousUser,0,0,0,0,0,0,, +Class,travo.gitlab.AuthenticationError,0,0,11,4,0,0,, +Class,travo.gitlab.ClassCallMetaclass,1,1,14,2,3,1,, +Class,travo.gitlab.GitLab,1,15,32,0,83,32,, +Class,travo.gitlab.GitLabTest,0,3,35,1,3,3,, +Class,travo.gitlab.Group,0,7,23,4,19,4,, +Class,travo.gitlab.Namespace,0,0,19,4,0,0,, +Class,travo.gitlab.Resource,4,3,19,3,15,5,, +Class,travo.gitlab.Resource.AccessLevels,0,0,0,1,0,0,, +Class,travo.gitlab.ResourceNotFoundError,0,0,11,4,0,0,, +Class,travo.gitlab.ResourceRef,0,4,1,0,7,1,, +Class,travo.gitlab.Unknown,0,1,1,1,1,1,, +Class,travo.gitlab.User,0,2,20,4,1,1,, +Class,travo.homework.Homework,0,6,6,0,46,6,, +Class,travo.jupyter_course.JupyterCourse,0,9,47,1,95,24,, +Class,travo.nbgrader_utils.BadgeGradebookExporter,1,2,5,1,8,2,, +Class,travo.nbgrader_utils.CSVGradebookExporter,0,1,8,2,1,1,, +Class,travo.nbgrader_utils.DataFrameGradebookExporter,1,2,7,1,7,4,, +Class,travo.nbgrader_utils.FormatedGradebookExporter,2,2,7,1,7,4,, +Class,travo.nbgrader_utils.GradebookExporter,3,2,3,0,3,3,, +Class,travo.nbgrader_utils.HTMLGradebookExporter,0,0,7,2,0,0,, +Class,travo.nbgrader_utils.MDGradebookExporter,0,0,7,2,0,0,, +Class,travo.nbgrader_utils.SVGGradebookExporter,0,1,6,2,1,1,, +File,__init__.py,,,,,1,,1,1 +Function,conftest.assignment_name,,,,,,,1,1 +Function,conftest.assignment_path,,,,,,,1,1 +Function,conftest.assignment_personal_repo,,,,,,,1,1 +Function,conftest.assignment_repo,,,,,,,1,1 +Function,conftest.course,,,,,,,1,1 +Function,conftest.course_assignment_group,,,,,,,1,1 +Function,conftest.fork_name,,,,,,,1,1 +Function,conftest.fork_path,,,,,,,1,1 +Function,conftest.gitlab,,,,,,,1,1 +Function,conftest.group,,,,,,,1,1 +Function,conftest.group_name,,,,,,,1,1 +Function,conftest.group_path,,,,,,,1,1 +Function,conftest.other_user,,,,,,,1,1 +Function,conftest.project,,,,,,,1,1 +Function,conftest.project_name,,,,,,,1,1 +Function,conftest.project_path,,,,,,,1,1 +Function,conftest.rich_course,,,,,,,1,1 +Function,conftest.standalone_assignment,,,,,,,1,1 +Function,conftest.standalone_assignment_dir,,,,,,,1,1 +Function,conftest.standalone_assignment_namespace,,,,,,,1,1 +Function,conftest.standalone_assignment_submission,,,,,,,1,1 +Function,conftest.student_work_dir,,,,,,,1,1 +Function,conftest.test_run_id,,,,,,,1,1 +Function,conftest.user,,,,,,,1,1 +Function,conftest.user_name,,,,,,,1,1 +Function,travo.assignment.Assignment.assignment_clone,,,,,,,8,1 +Function,travo.assignment.Assignment.check_assignment_dir,,,,,,,4,3 +Function,travo.assignment.Assignment.collect_status,,,,,,,1,1 +Function,travo.assignment.Assignment.ensure_clone_configuration,,,,,,,2,1 +Function,travo.assignment.Assignment.ensure_personal_repo,,,,,,,10,1 +Function,travo.assignment.Assignment.fetch,,,,,,,20,5 +Function,travo.assignment.Assignment.fetch.git,,,,,,,1,1 +Function,travo.assignment.Assignment.fetch_branch,,,,,,,8,4 +Function,travo.assignment.Assignment.fetch_branch.git,,,,,,,1,1 +Function,travo.assignment.Assignment.from_url,,,,,,,2,1 +Function,travo.assignment.Assignment.get_submission_username,,,,,,,2,1 +Function,travo.assignment.Assignment.get_username,,,,,,,3,3 +Function,travo.assignment.Assignment.has_personal_repo,,,,,,,2,1 +Function,travo.assignment.Assignment.personal_repo,,,,,,,1,1 +Function,travo.assignment.Assignment.personal_repo_name,,,,,,,1,1 +Function,travo.assignment.Assignment.personal_repo_path,,,,,,,1,1 +Function,travo.assignment.Assignment.remove_personal_repo,,,,,,,1,1 +Function,travo.assignment.Assignment.repo,,,,,,,2,1 +Function,travo.assignment.Assignment.status,,,,,,,3,1 +Function,travo.assignment.Assignment.submission,,,,,,,2,1 +Function,travo.assignment.Assignment.submissions,,,,,,,1,1 +Function,travo.assignment.Assignment.submissions_forked_from_missing,,,,,,,1,1 +Function,travo.assignment.Assignment.submissions_forked_from_path,,,,,,,2,1 +Function,travo.assignment.Assignment.submissions_search_from,,,,,,,1,1 +Function,travo.assignment.Assignment.submit,,,,,,,8,1 +Function,travo.assignment.Assignment.submit.git,,,,,,,1,1 +Function,travo.assignment.Submission.__post_init__,,,,,,,1,1 +Function,travo.assignment.Submission.ensure_autograded,,,,,,,481,10 +Function,travo.assignment.Submission.force_autograde,,,,,,,4,3 +Function,travo.assignment.Submission.get_autograde_job,,,,,,,3,3 +Function,travo.assignment.Submission.get_leader_and_team,,,,,,,12,1 +Function,travo.assignment.Submission.status,,,,,,,5,1 +Function,travo.assignment.SubmissionStatus.is_submitted,,,,,,,1,1 +Function,travo.assignment.job_status_priority,,,,,,,1,1 +Function,travo.assignment_test.test_fetch_from_empty_personal_repo,,,,,,,1,1 +Function,travo.course.Course.__post_init__,,,,,,,24,1 +Function,travo.course.Course.assignment,,,,,,,1,1 +Function,travo.course.Course.assignment_personal_repo,,,,,,,1,1 +Function,travo.course.Course.assignment_personal_repo_name,,,,,,,1,1 +Function,travo.course.Course.assignment_personal_repo_path,,,,,,,1,1 +Function,travo.course.Course.assignment_repo_name,,,,,,,1,1 +Function,travo.course.Course.assignment_repo_path,,,,,,,4,1 +Function,travo.course.Course.check_assignment,,,,,,,1,1 +Function,travo.course.Course.check_student_group,,,,,,,4,3 +Function,travo.course.Course.collect,,,,,,,1,1 +Function,travo.course.Course.ensure_instructor_access,,,,,,,4,1 +Function,travo.course.Course.ensure_work_dir,,,,,,,2,1 +Function,travo.course.Course.fetch,,,,,,,1,1 +Function,travo.course.Course.get_released_assignments,,,,,,,2,1 +Function,travo.course.Course.release,,,,,,,8,1 +Function,travo.course.Course.remove_assignment,,,,,,,4,1 +Function,travo.course.Course.remove_assignment_personal_repo,,,,,,,1,1 +Function,travo.course.Course.run,,,,,,,1,1 +Function,travo.course.Course.share_with,,,,,,,2,1 +Function,travo.course.Course.submit,,,,,,,1,1 +Function,travo.course.Course.work_dir,,,,,,,5,1 +Function,travo.course.CourseAssignment.get_submission_username,,,,,,,2,1 +Function,travo.course.CourseAssignment.personal_repo_name,,,,,,,2,1 +Function,travo.course.CourseAssignment.personal_repo_path,,,,,,,2,1 +Function,travo.course.CourseAssignment.submissions_forked_from_missing,,,,,,,1,1 +Function,travo.course.CourseAssignment.submissions_forked_from_path,,,,,,,3,3 +Function,travo.course.CourseAssignment.submissions_search_from,,,,,,,2,1 +Function,travo.course.missing_course,,,,,,,1,1 +Function,travo.dashboards.AssignmentInstructorDashboard.__init__,,,,,,,4,1 +Function,travo.dashboards.AssignmentInstructorDashboard.collect,,,,,,,1,1 +Function,travo.dashboards.AssignmentInstructorDashboard.collect_cmd,,,,,,,2,1 +Function,travo.dashboards.AssignmentInstructorDashboard.count_submissions_cmd,,,,,,,2,1 +Function,travo.dashboards.AssignmentInstructorDashboard.count_submissions_need_manual_grade_cmd,,,,,,,9,1 +Function,travo.dashboards.AssignmentInstructorDashboard.feedback,,,,,,,1,1 +Function,travo.dashboards.AssignmentInstructorDashboard.feedback_cmd,,,,,,,2,1 +Function,travo.dashboards.AssignmentInstructorDashboard.formgrader,,,,,,,1,1 +Function,travo.dashboards.AssignmentInstructorDashboard.generate,,,,,,,1,1 +Function,travo.dashboards.AssignmentInstructorDashboard.generate_status_cmd,,,,,,,2,1 +Function,travo.dashboards.AssignmentInstructorDashboard.open_formgrader_cmd,,,,,,,2,1 +Function,travo.dashboards.AssignmentInstructorDashboard.release,,,,,,,2,1 +Function,travo.dashboards.AssignmentInstructorDashboard.release_feedback_status_cmd,,,,,,,2,1 +Function,travo.dashboards.AssignmentInstructorDashboard.release_status_cmd,,,,,,,2,1 +Function,travo.dashboards.AssignmentInstructorDashboard.update,,,,,,,10,1 +Function,travo.dashboards.AssignmentStudentDashboard.__init__,,,,,,,4,1 +Function,travo.dashboards.AssignmentStudentDashboard.fetch,,,,,,,1,1 +Function,travo.dashboards.AssignmentStudentDashboard.open_work_dir,,,,,,,6,4 +Function,travo.dashboards.AssignmentStudentDashboard.submit,,,,,,,1,1 +Function,travo.dashboards.AssignmentStudentDashboard.update,,,,,,,37,1 +Function,travo.dashboards.AssignmentStudentDashboard.update.annotation,,,,,,,5,1 +Function,travo.dashboards.AuthenticationWidget.__init__,,,,,,,1,1 +Function,travo.dashboards.AuthenticationWidget.hide_widget,,,,,,,1,1 +Function,travo.dashboards.AuthenticationWidget.login,,,,,,,3,1 +Function,travo.dashboards.AuthenticationWidget.on_login,,,,,,,1,1 +Function,travo.dashboards.AuthenticationWidget.on_missing_credentials,,,,,,,1,1 +Function,travo.dashboards.AuthenticationWidget.show_widget,,,,,,,1,1 +Function,travo.dashboards.CourseGradeDashboard.__init__,,,,,,,8,1 +Function,travo.dashboards.CourseGradeDashboard.clear_csv,,,,,,,1,1 +Function,travo.dashboards.CourseGradeDashboard.clear_csv_cmd,,,,,,,1,1 +Function,travo.dashboards.CourseGradeDashboard.copy_cmd,,,,,,,1,1 +Function,travo.dashboards.CourseGradeDashboard.copy_dataframe,,,,,,,1,1 +Function,travo.dashboards.CourseGradeDashboard.get_scores,,,,,,,1,1 +Function,travo.dashboards.CourseGradeDashboard.get_scores_cmd,,,,,,,696,9 +Function,travo.dashboards.CourseGradeDashboard.make_grid,,,,,,,4,1 +Function,travo.dashboards.CourseGradeDashboard.refresh_scores,,,,,,,2,1 +Function,travo.dashboards.CourseGradeDashboard.update,,,,,,,1,1 +Function,travo.dashboards.CourseInstructorDashboard.__init__,,,,,,,4,1 +Function,travo.dashboards.CourseInstructorDashboard.make_grid,,,,,,,4,1 +Function,travo.dashboards.CourseInstructorDashboard.update,,,,,,,1,1 +Function,travo.dashboards.CourseStudentDashboard.__init__,,,,,,,4,1 +Function,travo.dashboards.CourseStudentDashboard.update,,,,,,,30,1 +Function,travo.dashboards.CourseStudentDashboard.update_student_group,,,,,,,2,1 +Function,travo.dashboards.HTML,,,,,,,1,1 +Function,travo.dashboards.StatusBar.__init__,,,,,,,1,1 +Function,travo.dashboards.StatusBar.__init__.set_log_level,,,,,,,1,1 +Function,travo.dashboards.StatusBar.__init__.set_log_show,,,,,,,2,1 +Function,travo.dashboards.StatusBar.run,,,,,,,8,1 +Function,travo.dashboards.StatusBar.run_in_subthread,,,,,,,1,1 +Function,travo.dashboards._format_note,,,,,,,1,1 +Function,travo.dashboards._format_status,,,,,,,3,3 +Function,travo.gitlab.ClassCallMetaclass.__call__,,,,,,,3,1 +Function,travo.gitlab.GitLab.__init__,,,,,,,8,1 +Function,travo.gitlab.GitLab.__repr__,,,,,,,1,1 +Function,travo.gitlab.GitLab.collect_forks,,,,,,,10,4 +Function,travo.gitlab.GitLab.confirm,,,,,,,1,1 +Function,travo.gitlab.GitLab.delete,,,,,,,1,1 +Function,travo.gitlab.GitLab.ensure_group,,,,,,,1,1 +Function,travo.gitlab.GitLab.ensure_local_git_configuration,,,,,,,3,1 +Function,travo.gitlab.GitLab.ensure_project,,,,,,,1,1 +Function,travo.gitlab.GitLab.ensure_resource,,,,,,,3,3 +Function,travo.gitlab.GitLab.get,,,,,,,1,1 +Function,travo.gitlab.GitLab.get_current_user,,,,,,,2,1 +Function,travo.gitlab.GitLab.get_group,,,,,,,1,1 +Function,travo.gitlab.GitLab.get_json,,,,,,,8,5 +Function,travo.gitlab.GitLab.get_namespace,,,,,,,1,1 +Function,travo.gitlab.GitLab.get_project,,,,,,,1,1 +Function,travo.gitlab.GitLab.get_resource,,,,,,,5,4 +Function,travo.gitlab.GitLab.get_status,,,,,,,1,1 +Function,travo.gitlab.GitLab.get_user,,,,,,,4,4 +Function,travo.gitlab.GitLab.git,,,,,,,3,1 +Function,travo.gitlab.GitLab.http_url_to_repo,,,,,,,1,1 +Function,travo.gitlab.GitLab.login,,,,,,,63,11 +Function,travo.gitlab.GitLab.logout,,,,,,,8,1 +Function,travo.gitlab.GitLab.namespace_id,,,,,,,4,4 +Function,travo.gitlab.GitLab.post,,,,,,,1,1 +Function,travo.gitlab.GitLab.post_json,,,,,,,2,1 +Function,travo.gitlab.GitLab.put,,,,,,,1,1 +Function,travo.gitlab.GitLab.put_json,,,,,,,2,1 +Function,travo.gitlab.GitLab.remove_group,,,,,,,1,1 +Function,travo.gitlab.GitLab.remove_project,,,,,,,1,1 +Function,travo.gitlab.GitLab.remove_resource,,,,,,,9,4 +Function,travo.gitlab.GitLab.set_token,,,,,,,6,1 +Function,travo.gitlab.GitLab.token_file,,,,,,,1,1 +Function,travo.gitlab.GitLabTest.__init__,,,,,,,1,1 +Function,travo.gitlab.GitLabTest.confirm,,,,,,,1,1 +Function,travo.gitlab.GitLabTest.login,,,,,,,1,1 +Function,travo.gitlab.Group.export,,,,,,,2176,9 +Function,travo.gitlab.Group.get_members,,,,,,,1,1 +Function,travo.gitlab.Group.get_projects,,,,,,,2,1 +Function,travo.gitlab.Group.get_subgroups,,,,,,,1,1 +Function,travo.gitlab.Project.add_origin,,,,,,,1,1 +Function,travo.gitlab.Project.archive,,,,,,,1,1 +Function,travo.gitlab.Project.clone_or_pull,,,,,,,23,7 +Function,travo.gitlab.Project.ensure_badge,,,,,,,3,3 +Function,travo.gitlab.Project.ensure_branch,,,,,,,8,1 +Function,travo.gitlab.Project.ensure_file,,,,,,,204,5 +Function,travo.gitlab.Project.ensure_fork,,,,,,,155,6 +Function,travo.gitlab.Project.export,,,,,,,8,1 +Function,travo.gitlab.Project.fetch_artifact,,,,,,,1,1 +Function,travo.gitlab.Project.fetch_artifacts,,,,,,,3,1 +Function,travo.gitlab.Project.get_badges,,,,,,,2,1 +Function,travo.gitlab.Project.get_branch,,,,,,,2,1 +Function,travo.gitlab.Project.get_branches,,,,,,,1,1 +Function,travo.gitlab.Project.get_compare,,,,,,,4,1 +Function,travo.gitlab.Project.get_file,,,,,,,2,1 +Function,travo.gitlab.Project.get_forks,,,,,,,12,1 +Function,travo.gitlab.Project.get_forks_ssh_url_to_repo,,,,,,,1,1 +Function,travo.gitlab.Project.get_members,,,,,,,1,1 +Function,travo.gitlab.Project.get_origin_commit,,,,,,,4,1 +Function,travo.gitlab.Project.get_owners,,,,,,,11,5 +Function,travo.gitlab.Project.get_pipelines,,,,,,,1,1 +Function,travo.gitlab.Project.get_possible_forks,,,,,,,299,5 +Function,travo.gitlab.Project.get_reports,,,,,,,57,4 +Function,travo.gitlab.Project.protect_branch,,,,,,,2,1 +Function,travo.gitlab.Project.remove_pipelines,,,,,,,2,1 +Function,travo.gitlab.Project.share_with,,,,,,,6,4 +Function,travo.gitlab.Project.unprotect_branch,,,,,,,3,3 +Function,travo.gitlab.Resource.__post_init__,,,,,,,1,1 +Function,travo.gitlab.Resource.__setattr__,,,,,,,1,1 +Function,travo.gitlab.Resource.get_api_url,,,,,,,1,1 +Function,travo.gitlab.Resource.get_attributes,,,,,,,2,1 +Function,travo.gitlab.Resource.setattributes,,,,,,,42,5 +Function,travo.gitlab.ResourceRef.__post_init__,,,,,,,32,3 +Function,travo.gitlab.Unknown.__repr__,,,,,,,1,1 +Function,travo.gitlab.User.get_projects,,,,,,,1,1 +Function,travo.gitlab.get_type_hints,,,,,,,2,1 +Function,travo.gitlab.request_credentials_basic,,,,,,,8,1 +Function,travo.homework.Homework.__init__,,,,,,,1,1 +Function,travo.homework.Homework.check_student,,,,,,,31200,8 +Function,travo.homework.Homework.get_copies,,,,,,,2,1 +Function,travo.homework.Homework.get_group,,,,,,,1,1 +Function,travo.homework.Homework.get_project,,,,,,,4,4 +Function,travo.homework.Homework.print_info,,,,,,,242,3 +Function,travo.i18n._,,,,,,,1,1 +Function,travo.jupyter_course.JupyterCourse.autograde,,,,,,,3,3 +Function,travo.jupyter_course.JupyterCourse.clear_needs_manual_grade,,,,,,,7,1 +Function,travo.jupyter_course.JupyterCourse.collect_autograded,,,,,,,9,4 +Function,travo.jupyter_course.JupyterCourse.collect_for_nbgrader,,,,,,,1,1 +Function,travo.jupyter_course.JupyterCourse.collect_gradebooks,,,,,,,5,4 +Function,travo.jupyter_course.JupyterCourse.collect_scores,,,,,,,3,3 +Function,travo.jupyter_course.JupyterCourse.collect_status,,,,,,,1,1 +Function,travo.jupyter_course.JupyterCourse.convert_from_ipynb_to_md,,,,,,,2,1 +Function,travo.jupyter_course.JupyterCourse.convert_from_md_to_ipynb,,,,,,,3,3 +Function,travo.jupyter_course.JupyterCourse.ensure_autograded,,,,,,,6,3 +Function,travo.jupyter_course.JupyterCourse.export_scores,,,,,,,1,1 +Function,travo.jupyter_course.JupyterCourse.fetch_feedback,,,,,,,6,1 +Function,travo.jupyter_course.JupyterCourse.force_autograde,,,,,,,6,3 +Function,travo.jupyter_course.JupyterCourse.formgrader,,,,,,,6,1 +Function,travo.jupyter_course.JupyterCourse.generate_assignment,,,,,,,32,1 +Function,travo.jupyter_course.JupyterCourse.generate_feedback,,,,,,,2,1 +Function,travo.jupyter_course.JupyterCourse.get_nbgrader_config,,,,,,,2,1 +Function,travo.jupyter_course.JupyterCourse.grade_dashboard,,,,,,,1,1 +Function,travo.jupyter_course.JupyterCourse.instructor_dashboard,,,,,,,1,1 +Function,travo.jupyter_course.JupyterCourse.jupyter,,,,,,,3,3 +Function,travo.jupyter_course.JupyterCourse.merge_autograded_db,,,,,,,20,1 +Function,travo.jupyter_course.JupyterCourse.nbgrader_update_student_list,,,,,,,13,6 +Function,travo.jupyter_course.JupyterCourse.release_feedback,,,,,,,4,4 +Function,travo.jupyter_course.JupyterCourse.student_autograde,,,,,,,192,6 +Function,travo.jupyter_course.JupyterCourse.student_dashboard,,,,,,,1,1 +Function,travo.jupyter_course.JupyterCourse.validate,,,,,,,42,1 +Function,travo.jupyter_course.TrivialContextManager,,,,,,,1,1 +Function,travo.jupyter_course.jupyter_notebook,,,,,,,2,1 +Function,travo.jupyter_course.jupyter_notebook_in_hub,,,,,,,4,1 +Function,travo.nbgrader_utils.BadgeGradebookExporter.export,,,,,,,1,1 +Function,travo.nbgrader_utils.BadgeGradebookExporter.record_assignment,,,,,,,20,1 +Function,travo.nbgrader_utils.CSVGradebookExporter.export,,,,,,,1,1 +Function,travo.nbgrader_utils.DataFrameGradebookExporter.__init__,,,,,,,1,1 +Function,travo.nbgrader_utils.DataFrameGradebookExporter.export,,,,,,,1,1 +Function,travo.nbgrader_utils.DataFrameGradebookExporter.record,,,,,,,8,1 +Function,travo.nbgrader_utils.DataFrameGradebookExporter.record_assignment,,,,,,,1,1 +Function,travo.nbgrader_utils.FormatedGradebookExporter.__init__,,,,,,,1,1 +Function,travo.nbgrader_utils.FormatedGradebookExporter.export,,,,,,,1,1 +Function,travo.nbgrader_utils.FormatedGradebookExporter.record,,,,,,,8,1 +Function,travo.nbgrader_utils.FormatedGradebookExporter.record_assignment,,,,,,,1,1 +Function,travo.nbgrader_utils.GradebookExporter.export,,,,,,,1,1 +Function,travo.nbgrader_utils.GradebookExporter.record,,,,,,,1,1 +Function,travo.nbgrader_utils.GradebookExporter.record_assignment,,,,,,,1,1 +Function,travo.nbgrader_utils.SVGGradebookExporter.export,,,,,,,1,1 +Function,travo.nbgrader_utils.export_scores,,,,,,,140,4 +Function,travo.nbgrader_utils.merge_assignment_gradebook,,,,,,,17,1 +Function,travo.nbgrader_utils.merge_submission_gradebook,,,,,,,728,10 +Function,travo.nbgrader_utils.remove_assignment_gradebook,,,,,,,26,5 +Function,travo.nbgrader_utils.remove_submission_gradebook,,,,,,,3,3 +Function,travo.nbgrader_utils.to_args,,,,,,,2,1 +Function,travo.script.CLI,,,,,,,21,4 +Function,travo.script.add_object_parser,,,,,,,2,1 +Function,travo.script.add_object_parser.add_subobject,,,,,,,1,1 +Function,travo.script.add_parser_arguments_for_function,,,,,,,9,1 +Function,travo.script.add_subparsers_for_object_methods,,,,,,,9,4 +Function,travo.script.dummy,,,,,,,1,1 +Function,travo.script.main,,,,,,,1,1 +Function,travo.script.main.git,,,,,,,1,1 +Function,travo.utils.getLogger,,,,,,,2,1 +Function,travo.utils.git_get_origin,,,,,,,4,3 +Function,travo.utils.run,,,,,,,2,1 +Function,travo.utils.urlencode,,,,,,,1,1 +Module File,assignment.py,,,,,93,,1,1 +Module File,assignment_test.py,,,,,1,,0,0 +Module File,conftest.py,,,,,25,,0,0 +Module File,course.py,,,,,60,,0,0 +Module File,dashboards.py,,,,,130,,1,1 +Module File,gitlab.py,,,,,248,,1,1 +Module File,homework.py,,,,,46,,0,0 +Module File,i18n.py,,,,,2,,1,1 +Module File,jupyter_course.py,,,,,102,,1,1 +Module File,nbgrader_utils.py,,,,,78,,1,1 +Module File,script.py,,,,,29,,1,1 +Module File,setup.py,,,,,1,,1,1 +Module File,travo.py,,,,,0,,0,0 +Module File,utils.py,,,,,9,,1,1 +Package,travo,,,,,0,,, +Package,travo,,,,,1,,, +Package,travo,,,,,93,,, +Package,travo,,,,,0,,, +Package,travo,,,,,1,,, +Package,travo,,,,,0,,, +Package,travo,,,,,60,,, +Package,travo,,,,,0,,, +Package,travo,,,,,0,,, +Package,travo,,,,,130,,, +Package,travo,,,,,248,,, +Package,travo,,,,,0,,, +Package,travo,,,,,46,,, +Package,travo,,,,,2,,, +Package,travo,,,,,0,,, +Package,travo,,,,,0,,, +Package,travo,,,,,102,,, +Package,travo,,,,,78,,, +Package,travo,,,,,29,,, +Package,travo,,,,,0,,, +Package,travo,,,,,9,,, diff --git a/understand/travo-metrics.csv b/understand/travo-metrics.csv new file mode 100644 index 00000000..c5f2d166 --- /dev/null +++ b/understand/travo-metrics.csv @@ -0,0 +1,358 @@ +Kind,Name,CountClassDerived,CountClassCoupled,CountDeclMethodAll,CountLine,CountLineCode,CountPath,Essential,CountLineComment,CountLineBlank,MaxInheritanceTree,SumCyclomatic,CountDeclInstanceMethod +File,"__init__.py",,,,6,5,1,1,0,1,,1, +Module File,"assignment.py",,,,863,482,1,1,240,144,,93, +Module File,"assignment_test.py",,,,36,21,0,0,6,9,,1, +Function,"conftest.assignment_name",,,,2,2,1,1,0,0,,, +Function,"conftest.assignment_path",,,,2,2,1,1,0,0,,, +Function,"conftest.assignment_personal_repo",,,,6,6,1,1,0,0,,, +Function,"conftest.assignment_repo",,,,13,13,1,1,0,0,,, +Function,"conftest.course",,,,7,7,1,1,0,0,,, +Function,"conftest.course_assignment_group",,,,5,5,1,1,0,0,,, +Function,"conftest.fork_name",,,,2,2,1,1,0,0,,, +Function,"conftest.fork_path",,,,2,2,1,1,0,0,,, +Function,"conftest.gitlab",,,,4,4,1,1,0,0,,, +Function,"conftest.group",,,,3,3,1,1,0,0,,, +Function,"conftest.group_name",,,,2,2,1,1,0,0,,, +Function,"conftest.group_path",,,,2,2,1,1,0,0,,, +Function,"conftest.other_user",,,,2,2,1,1,0,0,,, +Function,"conftest.project",,,,6,5,1,1,1,0,,, +Function,"conftest.project_name",,,,2,2,1,1,0,0,,, +Function,"conftest.project_path",,,,2,2,1,1,0,0,,, +Module File,"conftest.py",,,,199,146,0,0,6,48,,25, +Function,"conftest.rich_course",,,,9,9,1,1,0,0,,, +Function,"conftest.standalone_assignment",,,,17,17,1,1,0,0,,, +Function,"conftest.standalone_assignment_dir",,,,2,2,1,1,0,0,,, +Function,"conftest.standalone_assignment_namespace",,,,6,6,1,1,0,0,,, +Function,"conftest.standalone_assignment_submission",,,,6,6,1,1,0,0,,, +Function,"conftest.student_work_dir",,,,2,2,1,1,0,0,,, +Function,"conftest.test_run_id",,,,8,5,1,1,3,0,,, +Function,"conftest.user",,,,2,2,1,1,0,0,,, +Function,"conftest.user_name",,,,2,2,1,1,0,0,,, +Module File,"course.py",,,,657,312,0,0,239,110,,60, +Module File,"dashboards.py",,,,1173,957,1,1,120,125,,130, +Module File,"gitlab.py",,,,2546,1214,1,1,932,418,,248, +Module File,"homework.py",,,,245,163,0,0,44,45,,46, +Module File,"i18n.py",,,,31,10,1,1,16,6,,2, +Module File,"jupyter_course.py",,,,773,575,1,1,137,72,,102, +Module File,"nbgrader_utils.py",,,,428,345,1,1,23,66,,78, +Module File,"script.py",,,,414,131,1,1,213,70,,29, +Module File,"setup.py",,,,40,31,1,1,13,1,,1, +Package,"travo",,,,0,0,,,0,0,,0, +Package,"travo",,,,6,5,,,0,1,,1, +Package,"travo",,,,863,482,,,240,144,,93, +Package,"travo",,,,0,0,,,0,0,,0, +Package,"travo",,,,36,21,,,6,9,,1, +Package,"travo",,,,0,0,,,0,0,,0, +Package,"travo",,,,657,312,,,239,110,,60, +Package,"travo",,,,0,0,,,0,0,,0, +Package,"travo",,,,0,0,,,0,0,,0, +Package,"travo",,,,1173,957,,,120,125,,130, +Package,"travo",,,,2546,1214,,,932,418,,248, +Package,"travo",,,,0,0,,,0,0,,0, +Package,"travo",,,,245,163,,,44,45,,46, +Package,"travo",,,,31,10,,,16,6,,2, +Package,"travo",,,,0,0,,,0,0,,0, +Package,"travo",,,,0,0,,,0,0,,0, +Package,"travo",,,,773,575,,,137,72,,102, +Package,"travo",,,,428,345,,,23,66,,78, +Package,"travo",,,,414,131,,,213,70,,29, +Package,"travo",,,,3,1,,,2,0,,0, +Package,"travo",,,,65,34,,,24,8,,9, +Class,"travo.assignment.Assignment",1,13,23,616,310,,,200,106,0,61,22 +Function,"travo.assignment.Assignment.assignment_clone",,,,34,21,8,1,8,5,,, +Function,"travo.assignment.Assignment.check_assignment_dir",,,,20,14,4,3,4,2,,, +Function,"travo.assignment.Assignment.collect_status",,,,6,3,1,1,3,0,,, +Function,"travo.assignment.Assignment.ensure_clone_configuration",,,,77,16,2,1,45,16,,, +Function,"travo.assignment.Assignment.ensure_personal_repo",,,,80,46,10,1,20,14,,, +Function,"travo.assignment.Assignment.fetch",,,,66,44,20,5,16,6,,, +Function,"travo.assignment.Assignment.fetch.git",,,,2,2,1,1,0,0,,, +Function,"travo.assignment.Assignment.fetch_branch",,,,54,31,8,4,15,8,,, +Function,"travo.assignment.Assignment.fetch_branch.git",,,,2,2,1,1,0,0,,, +Function,"travo.assignment.Assignment.from_url",,,,28,21,2,1,2,5,,, +Function,"travo.assignment.Assignment.get_submission_username",,,,20,5,2,1,12,3,,, +Function,"travo.assignment.Assignment.get_username",,,,15,8,3,3,6,1,,, +Function,"travo.assignment.Assignment.has_personal_repo",,,,21,6,2,1,13,2,,, +Function,"travo.assignment.Assignment.personal_repo",,,,2,2,1,1,0,0,,, +Function,"travo.assignment.Assignment.personal_repo_name",,,,13,2,1,1,8,3,,, +Function,"travo.assignment.Assignment.personal_repo_path",,,,14,5,1,1,7,2,,, +Function,"travo.assignment.Assignment.remove_personal_repo",,,,5,2,1,1,3,0,,, +Function,"travo.assignment.Assignment.repo",,,,4,4,2,1,0,0,,, +Function,"travo.assignment.Assignment.status",,,,16,13,3,1,3,0,,, +Function,"travo.assignment.Assignment.submission",,,,12,7,2,1,4,1,,, +Function,"travo.assignment.Assignment.submissions",,,,18,7,1,1,10,1,,, +Function,"travo.assignment.Assignment.submissions_forked_from_missing",,,,2,2,1,1,0,0,,, +Function,"travo.assignment.Assignment.submissions_forked_from_path",,,,11,4,2,1,6,1,,, +Function,"travo.assignment.Assignment.submissions_search_from",,,,5,2,1,1,3,0,,, +Function,"travo.assignment.Assignment.submit",,,,50,31,8,1,9,10,,, +Function,"travo.assignment.Assignment.submit.git",,,,2,2,1,1,0,0,,, +Class,"travo.assignment.Submission",0,7,6,207,145,,,37,27,0,29,6 +Function,"travo.assignment.Submission.__post_init__",,,,3,3,1,1,0,0,,, +Function,"travo.assignment.Submission.ensure_autograded",,,,76,58,481,10,10,9,,, +Function,"travo.assignment.Submission.force_autograde",,,,27,19,4,3,7,1,,, +Function,"travo.assignment.Submission.get_autograde_job",,,,39,20,3,3,14,6,,, +Function,"travo.assignment.Submission.get_leader_and_team",,,,27,19,12,1,6,2,,, +Function,"travo.assignment.Submission.status",,,,25,22,5,1,0,3,,, +Class,"travo.assignment.SubmissionStatus",0,1,1,11,10,,,1,1,0,1,1 +Function,"travo.assignment.SubmissionStatus.is_submitted",,,,2,2,1,1,0,0,,, +Function,"travo.assignment.job_status_priority",,,,2,2,1,1,0,0,,, +Function,"travo.assignment_test.test_fetch_from_empty_personal_repo",,,,31,19,1,1,6,6,,, +Class,"travo.course.Course",1,10,21,517,255,,,181,83,0,47,21 +Function,"travo.course.Course.__post_init__",,,,16,13,24,1,1,2,,, +Function,"travo.course.Course.assignment",,,,29,24,1,1,4,1,,, +Function,"travo.course.Course.assignment_personal_repo",,,,9,6,1,1,3,0,,, +Function,"travo.course.Course.assignment_personal_repo_name",,,,5,2,1,1,3,0,,, +Function,"travo.course.Course.assignment_personal_repo_path",,,,9,6,1,1,3,0,,, +Function,"travo.course.Course.assignment_repo_name",,,,13,2,1,1,8,3,,, +Function,"travo.course.Course.assignment_repo_path",,,,34,12,4,1,17,5,,, +Function,"travo.course.Course.check_assignment",,,,11,2,1,1,7,2,,, +Function,"travo.course.Course.check_student_group",,,,21,14,4,3,5,2,,, +Function,"travo.course.Course.collect",,,,28,11,1,1,12,5,,, +Function,"travo.course.Course.ensure_instructor_access",,,,20,16,4,1,3,1,,, +Function,"travo.course.Course.ensure_work_dir",,,,32,7,2,1,17,8,,, +Function,"travo.course.Course.fetch",,,,10,7,1,1,3,0,,, +Function,"travo.course.Course.get_released_assignments",,,,11,11,2,1,0,0,,, +Function,"travo.course.Course.release",,,,66,39,8,1,16,11,,, +Function,"travo.course.Course.remove_assignment",,,,24,16,4,1,6,3,,, +Function,"travo.course.Course.remove_assignment_personal_repo",,,,7,4,1,1,3,0,,, +Function,"travo.course.Course.run",,,,3,2,1,1,1,0,,, +Function,"travo.course.Course.share_with",,,,11,11,2,1,0,0,,, +Function,"travo.course.Course.submit",,,,14,11,1,1,3,0,,, +Function,"travo.course.Course.work_dir",,,,59,12,5,1,36,11,,, +Class,"travo.course.CourseAssignment",0,5,29,117,41,,,57,20,1,12,6 +Function,"travo.course.CourseAssignment.get_submission_username",,,,20,5,2,1,11,4,,, +Function,"travo.course.CourseAssignment.personal_repo_name",,,,19,6,2,1,10,3,,, +Function,"travo.course.CourseAssignment.personal_repo_path",,,,26,10,2,1,13,3,,, +Function,"travo.course.CourseAssignment.submissions_forked_from_missing",,,,5,3,1,1,2,0,,, +Function,"travo.course.CourseAssignment.submissions_forked_from_path",,,,22,7,3,3,13,2,,, +Function,"travo.course.CourseAssignment.submissions_search_from",,,,10,7,2,1,3,0,,, +Function,"travo.course.missing_course",,,,2,2,1,1,0,0,,, +Class,"travo.dashboards.AssignmentInstructorDashboard",0,8,15,309,270,,,31,23,1,34,15 +Function,"travo.dashboards.AssignmentInstructorDashboard.__init__",,,,106,98,4,1,3,7,,, +Function,"travo.dashboards.AssignmentInstructorDashboard.collect",,,,8,8,1,1,1,0,,, +Function,"travo.dashboards.AssignmentInstructorDashboard.collect_cmd",,,,11,11,2,1,0,0,,, +Function,"travo.dashboards.AssignmentInstructorDashboard.count_submissions_cmd",,,,7,7,2,1,1,0,,, +Function,"travo.dashboards.AssignmentInstructorDashboard.count_submissions_need_manual_grade_cmd",,,,31,26,9,1,6,0,,, +Function,"travo.dashboards.AssignmentInstructorDashboard.feedback",,,,9,9,1,1,1,0,,, +Function,"travo.dashboards.AssignmentInstructorDashboard.feedback_cmd",,,,9,7,2,1,2,0,,, +Function,"travo.dashboards.AssignmentInstructorDashboard.formgrader",,,,8,8,1,1,1,0,,, +Function,"travo.dashboards.AssignmentInstructorDashboard.generate",,,,9,9,1,1,1,0,,, +Function,"travo.dashboards.AssignmentInstructorDashboard.generate_status_cmd",,,,9,9,2,1,0,0,,, +Function,"travo.dashboards.AssignmentInstructorDashboard.open_formgrader_cmd",,,,26,20,2,1,11,1,,, +Function,"travo.dashboards.AssignmentInstructorDashboard.release",,,,12,12,2,1,1,0,,, +Function,"travo.dashboards.AssignmentInstructorDashboard.release_feedback_status_cmd",,,,8,8,2,1,0,0,,, +Function,"travo.dashboards.AssignmentInstructorDashboard.release_status_cmd",,,,7,7,2,1,0,0,,, +Function,"travo.dashboards.AssignmentInstructorDashboard.update",,,,34,30,10,1,3,1,,, +Class,"travo.dashboards.AssignmentStudentDashboard",0,7,5,193,167,,,16,14,1,21,5 +Function,"travo.dashboards.AssignmentStudentDashboard.__init__",,,,68,64,4,1,1,4,,, +Function,"travo.dashboards.AssignmentStudentDashboard.fetch",,,,8,8,1,1,1,0,,, +Function,"travo.dashboards.AssignmentStudentDashboard.open_work_dir",,,,26,22,6,4,5,0,,, +Function,"travo.dashboards.AssignmentStudentDashboard.submit",,,,8,8,1,1,1,0,,, +Function,"travo.dashboards.AssignmentStudentDashboard.update",,,,75,64,37,1,6,5,,, +Function,"travo.dashboards.AssignmentStudentDashboard.update.annotation",,,,10,10,5,1,0,0,,, +Class,"travo.dashboards.AuthenticationWidget",0,4,6,74,53,,,13,8,1,8,6 +Function,"travo.dashboards.AuthenticationWidget.__init__",,,,24,20,1,1,4,0,,, +Function,"travo.dashboards.AuthenticationWidget.hide_widget",,,,2,2,1,1,0,0,,, +Function,"travo.dashboards.AuthenticationWidget.login",,,,16,16,3,1,0,0,,, +Function,"travo.dashboards.AuthenticationWidget.on_login",,,,2,2,1,1,0,0,,, +Function,"travo.dashboards.AuthenticationWidget.on_missing_credentials",,,,11,8,1,1,3,0,,, +Function,"travo.dashboards.AuthenticationWidget.show_widget",,,,3,3,1,1,0,0,,, +Class,"travo.dashboards.CourseGradeDashboard",0,7,10,217,176,,,20,26,1,32,10 +Function,"travo.dashboards.CourseGradeDashboard.__init__",,,,57,49,8,1,0,8,,, +Function,"travo.dashboards.CourseGradeDashboard.clear_csv",,,,8,8,1,1,1,0,,, +Function,"travo.dashboards.CourseGradeDashboard.clear_csv_cmd",,,,3,3,1,1,0,0,,, +Function,"travo.dashboards.CourseGradeDashboard.copy_cmd",,,,3,3,1,1,0,0,,, +Function,"travo.dashboards.CourseGradeDashboard.copy_dataframe",,,,8,8,1,1,1,0,,, +Function,"travo.dashboards.CourseGradeDashboard.get_scores",,,,8,8,1,1,1,0,,, +Function,"travo.dashboards.CourseGradeDashboard.get_scores_cmd",,,,86,70,696,9,11,5,,, +Function,"travo.dashboards.CourseGradeDashboard.make_grid",,,,16,14,4,1,1,2,,, +Function,"travo.dashboards.CourseGradeDashboard.refresh_scores",,,,9,9,2,1,1,0,,, +Function,"travo.dashboards.CourseGradeDashboard.update",,,,3,3,1,1,0,0,,, +Class,"travo.dashboards.CourseInstructorDashboard",0,7,3,107,88,,,9,10,1,7,3 +Function,"travo.dashboards.CourseInstructorDashboard.__init__",,,,60,54,4,1,0,6,,, +Function,"travo.dashboards.CourseInstructorDashboard.make_grid",,,,31,31,4,1,0,0,,, +Function,"travo.dashboards.CourseInstructorDashboard.update",,,,2,2,1,1,0,0,,, +Class,"travo.dashboards.CourseStudentDashboard",0,10,3,101,84,,,6,11,1,12,3 +Function,"travo.dashboards.CourseStudentDashboard.__init__",,,,47,42,4,1,0,5,,, +Function,"travo.dashboards.CourseStudentDashboard.update",,,,38,34,30,1,2,2,,, +Function,"travo.dashboards.CourseStudentDashboard.update_student_group",,,,4,4,2,1,0,0,,, +Function,"travo.dashboards.HTML",,,,9,4,1,1,4,1,,, +Class,"travo.dashboards.StatusBar",0,5,3,80,73,,,1,7,1,9,3 +Function,"travo.dashboards.StatusBar.__init__",,,,44,39,1,1,0,5,,, +Function,"travo.dashboards.StatusBar.__init__.set_log_level",,,,2,2,1,1,0,0,,, +Function,"travo.dashboards.StatusBar.__init__.set_log_show",,,,9,9,2,1,0,0,,, +Function,"travo.dashboards.StatusBar.run",,,,23,23,8,1,1,0,,, +Function,"travo.dashboards.StatusBar.run_in_subthread",,,,10,10,1,1,0,0,,, +Function,"travo.dashboards._format_note",,,,2,2,1,1,0,0,,, +Function,"travo.dashboards._format_status",,,,7,7,3,3,0,0,,, +Class,"travo.gitlab.AnonymousUser",0,0,0,2,2,,,0,0,0,0,0 +Class,"travo.gitlab.AuthenticationError",0,0,11,2,2,,,0,0,4,0,0 +Class,"travo.gitlab.ClassCallMetaclass",1,1,14,9,9,,,3,0,2,3,1 +Function,"travo.gitlab.ClassCallMetaclass.__call__",,,,8,8,3,1,3,0,,, +Class,"travo.gitlab.GitLab",1,15,32,824,349,,,326,150,0,83,32 +Function,"travo.gitlab.GitLab.__init__",,,,18,18,8,1,0,0,,, +Function,"travo.gitlab.GitLab.__repr__",,,,2,2,1,1,0,0,,, +Function,"travo.gitlab.GitLab.collect_forks",,,,39,23,10,4,13,3,,, +Function,"travo.gitlab.GitLab.confirm",,,,9,4,1,1,4,1,,, +Function,"travo.gitlab.GitLab.delete",,,,5,4,1,1,1,0,,, +Function,"travo.gitlab.GitLab.ensure_group",,,,35,10,1,1,18,7,,, +Function,"travo.gitlab.GitLab.ensure_local_git_configuration",,,,18,13,3,1,4,1,,, +Function,"travo.gitlab.GitLab.ensure_project",,,,57,8,1,1,36,13,,, +Function,"travo.gitlab.GitLab.ensure_resource",,,,49,28,3,3,14,7,,, +Function,"travo.gitlab.GitLab.get",,,,5,4,1,1,1,0,,, +Function,"travo.gitlab.GitLab.get_current_user",,,,25,5,2,1,14,6,,, +Function,"travo.gitlab.GitLab.get_group",,,,22,4,1,1,13,5,,, +Function,"travo.gitlab.GitLab.get_json",,,,33,21,8,5,8,4,,, +Function,"travo.gitlab.GitLab.get_namespace",,,,2,2,1,1,0,0,,, +Function,"travo.gitlab.GitLab.get_project",,,,26,2,1,1,19,5,,, +Function,"travo.gitlab.GitLab.get_resource",,,,21,13,5,4,6,2,,, +Function,"travo.gitlab.GitLab.get_status",,,,3,2,1,1,1,0,,, +Function,"travo.gitlab.GitLab.get_user",,,,40,16,4,4,17,7,,, +Function,"travo.gitlab.GitLab.git",,,,44,17,3,1,20,7,,, +Function,"travo.gitlab.GitLab.http_url_to_repo",,,,11,2,1,1,7,2,,, +Function,"travo.gitlab.GitLab.login",,,,120,38,63,11,59,23,,, +Function,"travo.gitlab.GitLab.logout",,,,20,13,8,1,6,1,,, +Function,"travo.gitlab.GitLab.namespace_id",,,,45,12,4,4,26,7,,, +Function,"travo.gitlab.GitLab.post",,,,5,4,1,1,1,0,,, +Function,"travo.gitlab.GitLab.post_json",,,,16,8,2,1,5,3,,, +Function,"travo.gitlab.GitLab.put",,,,5,4,1,1,1,0,,, +Function,"travo.gitlab.GitLab.put_json",,,,16,8,2,1,5,3,,, +Function,"travo.gitlab.GitLab.remove_group",,,,8,4,1,1,3,1,,, +Function,"travo.gitlab.GitLab.remove_project",,,,7,3,1,1,3,1,,, +Function,"travo.gitlab.GitLab.remove_resource",,,,28,19,9,4,6,3,,, +Function,"travo.gitlab.GitLab.set_token",,,,31,22,6,1,6,3,,, +Function,"travo.gitlab.GitLab.token_file",,,,8,5,1,1,3,0,,, +Class,"travo.gitlab.GitLabTest",0,3,35,27,17,,,5,5,1,3,3 +Function,"travo.gitlab.GitLabTest.__init__",,,,3,3,1,1,0,0,,, +Function,"travo.gitlab.GitLabTest.confirm",,,,2,2,1,1,0,0,,, +Function,"travo.gitlab.GitLabTest.login",,,,8,8,1,1,0,0,,, +Class,"travo.gitlab.Group",0,7,23,185,120,,,46,20,4,19,4 +Function,"travo.gitlab.Group.export",,,,97,61,2176,9,27,9,,, +Function,"travo.gitlab.Group.get_members",,,,6,5,1,1,1,0,,, +Function,"travo.gitlab.Group.get_projects",,,,40,20,2,1,15,6,,, +Function,"travo.gitlab.Group.get_subgroups",,,,6,5,1,1,1,0,,, +Class,"travo.gitlab.Namespace",0,0,19,14,12,,,2,0,4,0,0 +Abstract Class,"travo.gitlab.Project",0,12,46,1123,514,,,446,172,4,109,27 +Function,"travo.gitlab.Project.add_origin",,,,7,3,1,1,3,1,,, +Function,"travo.gitlab.Project.archive",,,,4,3,1,1,1,0,,, +Function,"travo.gitlab.Project.clone_or_pull",,,,95,62,23,7,26,7,,, +Function,"travo.gitlab.Project.ensure_badge",,,,94,14,3,3,72,8,,, +Function,"travo.gitlab.Project.ensure_branch",,,,20,15,8,1,5,0,,, +Function,"travo.gitlab.Project.ensure_file",,,,100,43,204,5,48,12,,, +Function,"travo.gitlab.Project.ensure_fork",,,,144,49,155,6,76,21,,, +Function,"travo.gitlab.Project.export",,,,48,22,8,1,18,8,,, +Function,"travo.gitlab.Project.fetch_artifact",,,,12,7,1,1,4,1,,, +Function,"travo.gitlab.Project.fetch_artifacts",,,,12,10,3,1,2,0,,, +Function,"travo.gitlab.Project.get_badges",,,,13,7,2,1,5,1,,, +Function,"travo.gitlab.Project.get_branch",,,,9,5,2,1,4,0,,, +Function,"travo.gitlab.Project.get_branches",,,,36,2,1,1,31,3,,, +Function,"travo.gitlab.Project.get_compare",,,,18,8,4,1,5,5,,, +Function,"travo.gitlab.Project.get_file",,,,15,14,2,1,1,0,,, +Function,"travo.gitlab.Project.get_forks",,,,72,23,12,1,38,12,,, +Function,"travo.gitlab.Project.get_forks_ssh_url_to_repo",,,,3,3,1,1,0,0,,, +Function,"travo.gitlab.Project.get_members",,,,6,2,1,1,3,1,,, +Function,"travo.gitlab.Project.get_origin_commit",,,,19,11,4,1,6,2,,, +Function,"travo.gitlab.Project.get_owners",,,,28,17,11,5,5,6,,, +Function,"travo.gitlab.Project.get_pipelines",,,,5,2,1,1,3,0,,, +Function,"travo.gitlab.Project.get_possible_forks",,,,55,34,299,5,13,9,,, +Function,"travo.gitlab.Project.get_reports",,,,48,29,57,4,11,10,,, +Function,"travo.gitlab.Project.protect_branch",,,,50,5,2,1,33,12,,, +Function,"travo.gitlab.Project.remove_pipelines",,,,6,3,2,1,3,0,,, +Function,"travo.gitlab.Project.share_with",,,,64,29,6,4,27,8,,, +Function,"travo.gitlab.Project.unprotect_branch",,,,11,7,3,3,3,1,,, +Class,"travo.gitlab.Resource",4,3,19,129,56,,,50,24,3,15,5 +Class,"travo.gitlab.Resource.AccessLevels",0,0,0,6,6,,,0,0,1,0,0 +Function,"travo.gitlab.Resource.__post_init__",,,,2,2,1,1,0,0,,, +Function,"travo.gitlab.Resource.__setattr__",,,,32,2,1,1,24,6,,, +Function,"travo.gitlab.Resource.get_api_url",,,,2,2,1,1,0,0,,, +Function,"travo.gitlab.Resource.get_attributes",,,,6,6,2,1,0,0,,, +Function,"travo.gitlab.Resource.setattributes",,,,59,26,42,5,25,8,,, +Class,"travo.gitlab.ResourceNotFoundError",0,0,11,2,2,,,0,0,4,0,0 +Class,"travo.gitlab.ResourceRef",0,4,1,78,24,,,42,12,0,7,1 +Function,"travo.gitlab.ResourceRef.__post_init__",,,,21,20,32,3,1,0,,, +Class,"travo.gitlab.Unknown",0,1,1,4,4,,,0,0,1,1,1 +Function,"travo.gitlab.Unknown.__repr__",,,,2,2,1,1,0,0,,, +Class,"travo.gitlab.User",0,2,20,57,50,,,3,4,4,1,1 +Function,"travo.gitlab.User.get_projects",,,,12,8,1,1,3,1,,, +Function,"travo.gitlab.get_type_hints",,,,6,6,2,1,0,0,,, +Function,"travo.gitlab.request_credentials_basic",,,,15,12,8,1,3,0,,, +Class,"travo.homework.Homework",0,6,6,238,157,,,44,44,0,46,6 +Function,"travo.homework.Homework.__init__",,,,8,4,1,1,3,1,,, +Function,"travo.homework.Homework.check_student",,,,85,62,31200,8,12,11,,, +Function,"travo.homework.Homework.get_copies",,,,23,13,2,1,6,4,,, +Function,"travo.homework.Homework.get_group",,,,6,2,1,1,3,1,,, +Function,"travo.homework.Homework.get_project",,,,30,22,4,4,3,5,,, +Function,"travo.homework.Homework.print_info",,,,57,45,242,3,4,8,,, +Function,"travo.i18n._",,,,21,2,1,1,15,4,,, +Class,"travo.jupyter_course.JupyterCourse",0,9,47,650,487,,,119,53,1,95,24 +Function,"travo.jupyter_course.JupyterCourse.autograde",,,,17,13,3,3,4,0,,, +Function,"travo.jupyter_course.JupyterCourse.clear_needs_manual_grade",,,,22,16,7,1,5,1,,, +Function,"travo.jupyter_course.JupyterCourse.collect_autograded",,,,55,30,9,4,21,4,,, +Function,"travo.jupyter_course.JupyterCourse.collect_for_nbgrader",,,,17,9,1,1,6,2,,, +Function,"travo.jupyter_course.JupyterCourse.collect_gradebooks",,,,28,23,5,4,4,1,,, +Function,"travo.jupyter_course.JupyterCourse.collect_scores",,,,32,26,3,3,6,2,,, +Function,"travo.jupyter_course.JupyterCourse.collect_status",,,,6,6,1,1,0,0,,, +Function,"travo.jupyter_course.JupyterCourse.convert_from_ipynb_to_md",,,,15,14,2,1,2,0,,, +Function,"travo.jupyter_course.JupyterCourse.convert_from_md_to_ipynb",,,,18,16,3,3,3,0,,, +Function,"travo.jupyter_course.JupyterCourse.ensure_autograded",,,,25,17,6,3,7,1,,, +Function,"travo.jupyter_course.JupyterCourse.export_scores",,,,15,12,1,1,4,0,,, +Function,"travo.jupyter_course.JupyterCourse.fetch_feedback",,,,31,25,6,1,3,3,,, +Function,"travo.jupyter_course.JupyterCourse.force_autograde",,,,21,18,6,3,3,0,,, +Function,"travo.jupyter_course.JupyterCourse.formgrader",,,,23,19,6,1,6,1,,, +Function,"travo.jupyter_course.JupyterCourse.generate_assignment",,,,39,33,32,1,7,0,,, +Function,"travo.jupyter_course.JupyterCourse.generate_feedback",,,,16,12,2,1,4,0,,, +Function,"travo.jupyter_course.JupyterCourse.get_nbgrader_config",,,,6,6,2,1,0,0,,, +Function,"travo.jupyter_course.JupyterCourse.grade_dashboard",,,,10,5,1,1,4,1,,, +Function,"travo.jupyter_course.JupyterCourse.instructor_dashboard",,,,10,5,1,1,4,1,,, +Function,"travo.jupyter_course.JupyterCourse.jupyter",,,,8,7,3,3,1,0,,, +Function,"travo.jupyter_course.JupyterCourse.merge_autograded_db",,,,46,33,20,1,10,3,,, +Function,"travo.jupyter_course.JupyterCourse.nbgrader_update_student_list",,,,23,21,13,6,2,0,,, +Function,"travo.jupyter_course.JupyterCourse.release_feedback",,,,22,22,4,4,0,0,,, +Function,"travo.jupyter_course.JupyterCourse.student_autograde",,,,60,51,192,6,5,4,,, +Function,"travo.jupyter_course.JupyterCourse.student_dashboard",,,,10,5,1,1,4,1,,, +Function,"travo.jupyter_course.JupyterCourse.validate",,,,32,29,42,1,3,0,,, +Function,"travo.jupyter_course.TrivialContextManager",,,,2,2,1,1,0,0,,, +Function,"travo.jupyter_course.jupyter_notebook",,,,11,6,2,1,4,1,,, +Function,"travo.jupyter_course.jupyter_notebook_in_hub",,,,40,26,4,1,10,5,,, +Class,"travo.nbgrader_utils.BadgeGradebookExporter",1,2,5,41,34,,,1,7,1,8,2 +Function,"travo.nbgrader_utils.BadgeGradebookExporter.export",,,,2,2,1,1,0,0,,, +Function,"travo.nbgrader_utils.BadgeGradebookExporter.record_assignment",,,,36,31,20,1,1,5,,, +Class,"travo.nbgrader_utils.CSVGradebookExporter",0,1,8,3,3,,,0,0,2,1,1 +Function,"travo.nbgrader_utils.CSVGradebookExporter.export",,,,2,2,1,1,0,0,,, +Class,"travo.nbgrader_utils.DataFrameGradebookExporter",1,2,7,46,42,,,3,3,1,7,4 +Function,"travo.nbgrader_utils.DataFrameGradebookExporter.__init__",,,,2,2,1,1,0,0,,, +Function,"travo.nbgrader_utils.DataFrameGradebookExporter.export",,,,12,11,1,1,2,0,,, +Function,"travo.nbgrader_utils.DataFrameGradebookExporter.record",,,,22,22,8,1,1,0,,, +Function,"travo.nbgrader_utils.DataFrameGradebookExporter.record_assignment",,,,6,6,1,1,0,0,,, +Class,"travo.nbgrader_utils.FormatedGradebookExporter",2,2,7,46,41,,,0,5,1,7,4 +Function,"travo.nbgrader_utils.FormatedGradebookExporter.__init__",,,,2,2,1,1,0,0,,, +Function,"travo.nbgrader_utils.FormatedGradebookExporter.export",,,,2,2,1,1,0,0,,, +Function,"travo.nbgrader_utils.FormatedGradebookExporter.record",,,,22,22,8,1,0,0,,, +Function,"travo.nbgrader_utils.FormatedGradebookExporter.record_assignment",,,,10,10,1,1,0,0,,, +Class,"travo.nbgrader_utils.GradebookExporter",3,2,3,17,15,,,0,2,0,3,3 +Function,"travo.nbgrader_utils.GradebookExporter.export",,,,2,2,1,1,0,0,,, +Function,"travo.nbgrader_utils.GradebookExporter.record",,,,6,6,1,1,0,0,,, +Function,"travo.nbgrader_utils.GradebookExporter.record_assignment",,,,6,6,1,1,0,0,,, +Class,"travo.nbgrader_utils.HTMLGradebookExporter",0,0,7,6,6,,,0,0,2,0,0 +Class,"travo.nbgrader_utils.MDGradebookExporter",0,0,7,5,5,,,0,0,2,0,0 +Class,"travo.nbgrader_utils.SVGGradebookExporter",0,1,6,3,3,,,0,0,2,1,1 +Function,"travo.nbgrader_utils.SVGGradebookExporter.export",,,,2,2,1,1,0,0,,, +Function,"travo.nbgrader_utils.export_scores",,,,70,62,140,4,4,4,,, +Function,"travo.nbgrader_utils.merge_assignment_gradebook",,,,26,18,17,1,5,3,,, +Function,"travo.nbgrader_utils.merge_submission_gradebook",,,,69,54,728,10,7,8,,, +Function,"travo.nbgrader_utils.remove_assignment_gradebook",,,,34,28,26,5,0,6,,, +Function,"travo.nbgrader_utils.remove_submission_gradebook",,,,14,14,3,3,0,0,,, +Function,"travo.nbgrader_utils.to_args",,,,6,6,2,1,0,0,,, +Module File,"travo.py",,,,3,1,0,0,2,0,,0, +Function,"travo.script.CLI",,,,129,54,21,4,55,20,,, +Function,"travo.script.add_object_parser",,,,92,11,2,1,67,14,,, +Function,"travo.script.add_object_parser.add_subobject",,,,4,4,1,1,0,0,,, +Function,"travo.script.add_parser_arguments_for_function",,,,80,27,9,1,44,9,,, +Function,"travo.script.add_subparsers_for_object_methods",,,,43,14,9,4,24,5,,, +Function,"travo.script.dummy",,,,2,2,1,1,0,0,,, +Function,"travo.script.main",,,,29,15,1,1,10,4,,, +Function,"travo.script.main.git",,,,5,2,1,1,3,0,,, +Function,"travo.utils.getLogger",,,,9,9,2,1,0,0,,, +Function,"travo.utils.git_get_origin",,,,19,7,4,3,11,1,,, +Function,"travo.utils.run",,,,15,8,2,1,6,1,,, +Function,"travo.utils.urlencode",,,,10,2,1,1,6,2,,, +Module File,"utils.py",,,,65,34,1,1,24,8,,9, -- GitLab From fc1a43c22ddd4f055e78a226493d40611bcde2a6 Mon Sep 17 00:00:00 2001 From: Tchaps Dev Date: Sun, 4 Jun 2023 10:36:26 -0400 Subject: [PATCH 05/17] code smell fixing --- sonar-project.properties | 2 +- travo/dashboards.py | 54 +++++++++++++++++++--------------------- travo/gitlab.py | 18 +++++++------- travo/jupyter_course.py | 18 +++++++------- travo/nbgrader_utils.py | 2 +- travo/script.py | 2 +- 6 files changed, 46 insertions(+), 50 deletions(-) diff --git a/sonar-project.properties b/sonar-project.properties index fd038bb1..f6f5baa4 100644 --- a/sonar-project.properties +++ b/sonar-project.properties @@ -3,4 +3,4 @@ sonar.qualitygate.wait=true sonar.python.file.suffixes=py sonar.python.coverage.reportPaths=coverage-reports/*coverage*.xml sonar.python.xunit.reportPath=xunit-reports/xunit-result-*.xml -sonar.exclusions=understand/*,coverage-reports/*,travo.und/*,flake8*.*, \ No newline at end of file +sonar.exclusions=understand/*,coverage-reports/*,travo.und/*,flake8*.*,SonarQube-reports/* \ No newline at end of file diff --git a/travo/dashboards.py b/travo/dashboards.py index 2f7e9a34..2f8ae911 100644 --- a/travo/dashboards.py +++ b/travo/dashboards.py @@ -50,10 +50,13 @@ from .utils import run from travo.i18n import _ from . import jupyter_course # only used by type hints -border_layout_style = '1px solid black'; +BORDER_LAYOUT_STYLE = '1px solid black' # TO DO: should use the current foreground color rather than black -border_layout = {'border': border_layout_style } +border_layout = {'border': BORDER_LAYOUT_STYLE } + +ASSIGNMENT_STATUS_NOT_RELEASE = "not released" +ATTENTE_NOTATION_MANUELLE = "attente notation manuelle" def HTML(*args: Any, **kwargs: Any) -> ipywidgets.HTML: @@ -102,7 +105,7 @@ class AuthenticationWidget(VBox): self.passwordUI, self.button, self.messageUI), - layout={'border': border_layout_style, + layout={'border': BORDER_LAYOUT_STYLE, 'display': 'none'}) def show_widget(self, message: str = "") -> None: @@ -228,7 +231,6 @@ class StatusBar(VBox): class AssignmentStudentDashboard(HBox): - assignment_status_not_release: str def __init__(self, assignment: Assignment, @@ -299,8 +301,6 @@ class AssignmentStudentDashboard(HBox): ) Thread(target=self.update).start() - self.assignment_status_not_release = "not released" - def update(self) -> None: # For now, fetching the assignment status requires the user to # be logged in. Fails gracefuly if this is not yet the case. @@ -308,7 +308,7 @@ class AssignmentStudentDashboard(HBox): status = self.assignment.status() except AuthenticationError: return - if status.status == self.assignment_status_not_release: + if status.status == ASSIGNMENT_STATUS_NOT_RELEASE: self.nameUI.value = self.name self.fetchUI.disabled = True else: @@ -405,12 +405,12 @@ class AssignmentStudentDashboard(HBox): # TODO : if README.md does not exist neither, try to open gitlab file browser index_files = ["index.md", "index.ipynb", "README.md", "README.ipynb"] for x in index_files: - file = os.path.join(self.assignment.assignment_dir, x) - if os.path.isfile(file): + file_1 = os.path.join(self.assignment.assignment_dir, x) + if os.path.isfile(file_1): self.jupyter_front_end.commands.execute( "docmanager:open", { - "path": path + "/" + file, # Generalize if there is no index.md + "path": path + "/" + file_1, # Generalize if there is no index.md "factory": "Notebook", # 'options': { # 'mode': 'split-right' @@ -493,8 +493,6 @@ class CourseStudentDashboard(VBox): def update(self, update_assignment_list: bool = False) -> None: student_group = self.student_group_UI.value - # if student_group is None: - # self.center = None if update_assignment_list: if self.course.assignments is not None: assignments = self.course.assignments @@ -662,7 +660,7 @@ class AssignmentInstructorDashboard(HBox): self.assignmentUI.value = ( f'{_("browse")}' ) - # self.generateButton.disabled = False + # Comment to remove: self.generateButton.disabled = False self.releaseStatus.value = self.release_status_cmd() if self.student_group is None: self.collectButton.disabled = True @@ -762,11 +760,11 @@ class AssignmentInstructorDashboard(HBox): try: # jupyterlab from ipylab import JupyterFrontEnd # type: ignore - # if self.assignment.assignment_dir is None: - # raise ValueError("Can't open work dir if assignment_dir is not set") + ## Comment to remove: if self.assignment.assignment_dir is None: + ## Comment to remove: raise ValueError("Can't open work dir if assignment_dir is not set") path = os.path.dirname( self.jupyter_front_end.sessions.current_session['path']) - fileForm = self.course.formgrader( + file_form = self.course.formgrader( os.path.basename(self.name), in_notebook=False) import pdb pdb.pm() @@ -774,7 +772,7 @@ class AssignmentInstructorDashboard(HBox): "docmanager:open", { # Generalize if there is no index.md - "path": os.path.join(path, fileForm), + "path": os.path.join(path, file_form), "factory": "Notebook", # 'options': { # 'mode': 'split-right' @@ -881,7 +879,6 @@ class CourseInstructorDashboard(VBox): student_group: Optional[str] = None): self.course = course self.course.forge.login() - self.assignment_status_not_release = "not released" self.release_mode = RadioButtons( description="", value=None, options=[ @@ -902,14 +899,14 @@ class CourseInstructorDashboard(VBox): VBox([Label("release mode"), self.release_mode], width="10px"), VBox([Label("collect:\nforce new autograde"), self.force_autograding]), VBox([Label("new score policy"), self.new_score_policy])], - layout=Layout(border=border_layout_style, grid_gap='5px 40px')) + layout=Layout(border=BORDER_LAYOUT_STYLE, grid_gap='5px 40px')) if self.course.student_groups is not None: self.student_group_UI = Dropdown( description="", value=student_group, options=course.student_groups, ) - self.header.children += (VBox([Label(_(self.assignment_status_not_release)), + self.header.children += (VBox([Label(_(ASSIGNMENT_STATUS_NOT_RELEASE)), self.student_group_UI]),) self.student_group_UI.observe(lambda change: self.update(), names='value') @@ -995,7 +992,6 @@ class CourseGradeDashboard(VBox): def __init__(self, course: 'jupyter_course.JupyterCourse') -> None: self.course = course self.course.forge.login() - self.assignment_status_not_release = "not released" layout = Layout(width="initial") self.dashboard_grade_filename = "dashboard-grades.csv" @@ -1027,7 +1023,7 @@ class CourseGradeDashboard(VBox): layout=border_layout) if self.course.student_groups is not None: self.student_group_UI = Dropdown( - description=_(self.assignment_status_not_release), + description=_(ASSIGNMENT_STATUS_NOT_RELEASE), value=None, options=["all"] + list(self.course.student_groups), ) @@ -1146,13 +1142,13 @@ class CourseGradeDashboard(VBox): total = 0 total_bad = 0 for student_group in student_groups: - # path = course.assignment_repo_path(assignment, student_group) + # # Comment to remove: path = course.assignment_repo_path(assignment, student_group) try: - # project = course.forge.get_project(path) + ## Comment to remove: project = course.forge.get_project(path) # forks = project.get_forks(recursive=True) submissions_status = self.course.assignment( assignment_name=assignment, student_group=student_group).collect_status() - # course.log.info(f"Collecting autograded for {len(submissions_status)} students") + ## Comment to remove: course.log.info(f"Collecting autograded for {len(submissions_status)} students") bad_projects = [] if len(submissions_status) == 0: continue @@ -1175,7 +1171,7 @@ class CourseGradeDashboard(VBox): if status.submission is not None: repo = status.submission.repo job = status.autograde_job - path = f"feedback/scores.csv" + path = "feedback/scores.csv" scores_txt = repo.fetch_artifact( job, artifact_path=path).text scores = pd.read_csv(io.StringIO(scores_txt)) @@ -1186,7 +1182,7 @@ class CourseGradeDashboard(VBox): if np.all(np.isnan(scores["manual_score"].values)) and ~np.isnan( max_manual_score) and max_manual_score > 0: d[student][assignment + - f"-note (/{int(scores['max_total_score'].values[0])})"] = "attente notation manuelle" + f"-note (/{int(scores['max_total_score'].values[0])})"] = ATTENTE_NOTATION_MANUELLE else: d[student][assignment + f"-note (/{int(scores['max_total_score'].values[0])})"] = total_score @@ -1222,12 +1218,12 @@ class CourseGradeDashboard(VBox): self.update() def copy_cmd(self) -> None: - df2 = self.df.replace("attente notation manuelle", np.nan) + df2 = self.df.replace(ATTENTE_NOTATION_MANUELLE, np.nan) df2.to_clipboard(excel=True) def _format_note(cell: Any) -> str: - return ("yellow" if cell.value == "attente notation manuelle" else "white") + return ("yellow" if cell.value == ATTENTE_NOTATION_MANUELLE else "white") def _format_status(cell: Any) -> str: diff --git a/travo/gitlab.py b/travo/gitlab.py index 1e6ea358..4b201d30 100644 --- a/travo/gitlab.py +++ b/travo/gitlab.py @@ -23,8 +23,8 @@ from .i18n import _ from .utils import urlencode, run, getLogger R = TypeVar('R', 'Group', 'Project', 'Namespace') -# JSON = TypeAlias(Any) # Python 3.10 -# Job = TypeAlias(JSON) # Python 3.10 +#Comment To Remove : JSON = TypeAlias(Any) # Python 3.10 +#Comment To Remove : Job = TypeAlias(JSON) # Python 3.10 JSON = Any # Could be made more specific Job = JSON # Could be made more specific @@ -1459,7 +1459,7 @@ class Project(Resource): >>> assert other_user.id in [u['id'] for u in project.get_members()] """ if isinstance(group_or_user, User): - # user_id = self.gitlab.get_user(group_or_user).id + #Comment To Remove : user_id = self.gitlab.get_user(group_or_user).id user_id = group_or_user.id if any(user_id == user['id'] for user in self.get_members()): return @@ -1472,7 +1472,7 @@ class Project(Resource): assert json['id'] == user_id assert json['access_level'] == int(access) elif isinstance(group_or_user, Group): - # group_id = self.gitlab.get_group(group_or_user).id + #Comment To Remove : group_id = self.gitlab.get_group(group_or_user).id group_id = group_or_user.id data = dict(group_id=group_id, group_access=int(access)) @@ -1801,11 +1801,11 @@ class Project(Resource): of project travo-test-etu/temporary-test-projet-20... failed: 404 Commit Not Found """ - file = urlencode(file) + file_1 = urlencode(file) if branch is None: branch = self.default_branch try: - oldcontent = self.get_file(file, branch)['content'] + oldcontent = self.get_file(file_1, branch)['content'] except RuntimeError: oldcontent = None if oldcontent is not None: # Compare old and desired content @@ -1825,16 +1825,16 @@ class Project(Resource): if encoding != "text": data['encoding'] = encoding if oldcontent is None: # file does not yet exist - json = self.gitlab.post(f"/projects/{self.id}/repository/files/{file}", + json = self.gitlab.post(f"/projects/{self.id}/repository/files/{file_1}", data=data ).json() else: - json = self.gitlab.put(f"/projects/{self.id}/repository/files/{file}", + json = self.gitlab.put(f"/projects/{self.id}/repository/files/{file_1}", data=data ).json() error = json.get('error', json.get('message')) if error is not None: - raise RuntimeError(f"ensuring file {file} " + raise RuntimeError(f"ensuring file {file_1} " f"of project {self.path_with_namespace} failed: " f"{error}") diff --git a/travo/jupyter_course.py b/travo/jupyter_course.py index 60e67829..7c4a14e0 100644 --- a/travo/jupyter_course.py +++ b/travo/jupyter_course.py @@ -143,16 +143,16 @@ class JupyterCourse(Course): """ errors = 0 failures = 0 - for file in files: - if file.endswith(".md"): - testfile = f".test.{file}.ipynb" - run(["jupytext", file, "-o", testfile]) - file = testfile + for file_1 in files: + if file_1.endswith(".md"): + testfile = f".test.{file_1}.ipynb" + run(["jupytext", file_1, "-o", testfile]) + file_1 = testfile else: testfile = "" - assert file.endswith(".ipynb") + assert file_1.endswith(".ipynb") command = ["nbgrader", "validate"] - process = subprocess.Popen([*command, file], + process = subprocess.Popen([*command, file_1], stdout=subprocess.PIPE, stderr=subprocess.STDOUT, bufsize=1, @@ -221,7 +221,7 @@ class JupyterCourse(Course): gitdir = os.path.join(target_path, ".git") tmpgitdir = os.path.join(tmpdirname, ".git") db = os.path.join(target_path, self.gradebook_db) - # tmpdb = os.path.join(tmpdirname, ".gradebook.db") + #ToRemove: tmpdb = os.path.join(tmpdirname, ".gradebook.db") preserve_gitdir = os.path.exists(gitdir) if preserve_gitdir: self.log.info("Sauvegarde de l'historique git") @@ -582,7 +582,7 @@ class JupyterCourse(Course): repo = status.submission.repo job = status.autograde_job repo.fetch_artifacts(job, path=".", prefix=prefix) - # autograded_anonymous = os.path.join("autograded", "student") + #ToRemove autograded_anonymous = os.path.join("autograded", "student") # if os.path.isdir(autograded_anonymous): # shutil.copytree(autograded_anonymous, # os.path.join("autograded", student), diff --git a/travo/nbgrader_utils.py b/travo/nbgrader_utils.py index 587b89b7..3113d90b 100644 --- a/travo/nbgrader_utils.py +++ b/travo/nbgrader_utils.py @@ -259,7 +259,7 @@ class DataFrameGradebookExporter(GradebookExporter): 'total_score', 'max_total_score', ]) df.set_index(['student', 'assignment', 'notebook'], inplace=True) - # df = df.astype('Int64') + #ToRemove: df = df.astype('Int64') return df diff --git a/travo/script.py b/travo/script.py index 7d2b8540..6c165729 100644 --- a/travo/script.py +++ b/travo/script.py @@ -367,7 +367,7 @@ def CLI( assert "--" + key not in kwargs # TODO this seems to fix a conflicting bug but I'm not sure what I'm doing function_args.append(value) - # function_kwargs[key] = value + #ToRemove function_kwargs[key] = value if debug: result = function(*function_args, **function_kwargs) -- GitLab From 489ac2048e3587daed64f2bc6174e22414c4ff7d Mon Sep 17 00:00:00 2001 From: Tchaps Dev Date: Sat, 24 Jun 2023 14:12:04 -0400 Subject: [PATCH 06/17] gitignore --- .gitignore | 6 ++++++ .scannerwork/report-task.txt | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index cc31b2ab..3d0d31bc 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,9 @@ __pycache__ .travo travo.egg-info report.xml + +SonarQube-reports/ +coverage-reports/ +.scannerwork/ +.pytest_cache/ +flake8*.* \ No newline at end of file diff --git a/.scannerwork/report-task.txt b/.scannerwork/report-task.txt index 17d92e84..882862fb 100644 --- a/.scannerwork/report-task.txt +++ b/.scannerwork/report-task.txt @@ -2,5 +2,5 @@ projectKey=Travo serverUrl=http://localhost:9000 serverVersion=10.0.0.68432 dashboardUrl=http://localhost:9000/dashboard?id=Travo -ceTaskId=AYiD7iapjFrrcy7i8Pk7 -ceTaskUrl=http://localhost:9000/api/ce/task?id=AYiD7iapjFrrcy7i8Pk7 +ceTaskId=AYiGpRgUjFrrcy7i8Pk_ +ceTaskUrl=http://localhost:9000/api/ce/task?id=AYiGpRgUjFrrcy7i8Pk_ -- GitLab From 20cf7a0af055588ac381fc7d2a3764bef41494a2 Mon Sep 17 00:00:00 2001 From: Tchaps Dev Date: Sun, 25 Jun 2023 06:32:01 -0400 Subject: [PATCH 07/17] flake8 git ignore --- .gitignore | 2 +- flake8_after_autopep8_output.csv | 177 ------------- flake8_after_autopep8_output2.txt | 123 --------- flake8_original_output.csv | 405 ------------------------------ flake8_output.txt | 405 ------------------------------ 5 files changed, 1 insertion(+), 1111 deletions(-) delete mode 100644 flake8_after_autopep8_output.csv delete mode 100644 flake8_after_autopep8_output2.txt delete mode 100644 flake8_original_output.csv delete mode 100644 flake8_output.txt diff --git a/.gitignore b/.gitignore index 3d0d31bc..6ba59f75 100644 --- a/.gitignore +++ b/.gitignore @@ -14,4 +14,4 @@ SonarQube-reports/ coverage-reports/ .scannerwork/ .pytest_cache/ -flake8*.* \ No newline at end of file +flake8-reports/ \ No newline at end of file diff --git a/flake8_after_autopep8_output.csv b/flake8_after_autopep8_output.csv deleted file mode 100644 index 10f2b697..00000000 --- a/flake8_after_autopep8_output.csv +++ /dev/null @@ -1,177 +0,0 @@ -travo/__init__.py:3:1: F401 '.gitlab.Forge' imported but unused -travo/__init__.py:3:1: F401 '.gitlab.GitLab' imported but unused -travo/__init__.py:4:1: F401 '.assignment.Assignment' imported but unused -travo/__init__.py:5:1: F401 '.course.Course' imported but unused -travo/__init__.py:6:1: F401 '.homework.Homework' imported but unused -travo/assignment.py:8:1: F401 'typing.Sequence' imported but unused -travo/assignment.py:9:1: F401 '.gitlab.unknown' imported but unused -travo/assignment.py:87:89: E501 line too long (93 > 88 characters) -travo/assignment.py:321:89: E501 line too long (99 > 88 characters) -travo/assignment.py:322:89: E501 line too long (98 > 88 characters) -travo/assignment.py:505:89: E501 line too long (96 > 88 characters) -travo/assignment.py:514:89: E501 line too long (98 > 88 characters) -travo/assignment.py:560:89: E501 line too long (90 > 88 characters) -travo/assignment.py:750:89: E501 line too long (90 > 88 characters) -travo/course.py:9:1: F401 '.gitlab.GitLabTest' imported but unused -travo/course.py:34:89: E501 line too long (93 > 88 characters) -travo/course.py:45:59: W291 trailing whitespace -travo/course.py:87:89: E501 line too long (89 > 88 characters) -travo/course.py:195:89: E501 line too long (144 > 88 characters) -travo/course.py:360:89: E501 line too long (89 > 88 characters) -travo/course.py:395:89: E501 line too long (98 > 88 characters) -travo/course.py:470:89: E501 line too long (108 > 88 characters) -travo/course.py:471:89: E501 line too long (90 > 88 characters) -travo/course.py:492:89: E501 line too long (96 > 88 characters) -travo/course.py:650:89: E501 line too long (99 > 88 characters) -travo/dashboards.py:368:89: E501 line too long (181 > 88 characters) -travo/dashboards.py:374:89: E501 line too long (128 > 88 characters) -travo/dashboards.py:729:89: E501 line too long (98 > 88 characters) -travo/dashboards.py:733:89: E501 line too long (124 > 88 characters) -travo/dashboards.py:743:89: E501 line too long (109 > 88 characters) -travo/dashboards.py:744:89: E501 line too long (95 > 88 characters) -travo/dashboards.py:749:13: F401 'ipylab.JupyterFrontEnd' imported but unused -travo/dashboards.py:782:89: E501 line too long (115 > 88 characters) -travo/dashboards.py:785:9: E722 do not use bare 'except' -travo/dashboards.py:791:89: E501 line too long (109 > 88 characters) -travo/dashboards.py:808:89: E501 line too long (90 > 88 characters) -travo/dashboards.py:823:89: E501 line too long (119 > 88 characters) -travo/dashboards.py:826:9: E722 do not use bare 'except' -travo/dashboards.py:840:89: E501 line too long (92 > 88 characters) -travo/dashboards.py:841:89: E501 line too long (127 > 88 characters) -travo/dashboards.py:861:89: E501 line too long (99 > 88 characters) -travo/dashboards.py:863:89: E501 line too long (97 > 88 characters) -travo/dashboards.py:867:89: E501 line too long (89 > 88 characters) -travo/dashboards.py:921:89: E501 line too long (90 > 88 characters) -travo/dashboards.py:975:89: E501 line too long (109 > 88 characters) -travo/dashboards.py:1042:89: E501 line too long (116 > 88 characters) -travo/dashboards.py:1118:89: E501 line too long (91 > 88 characters) -travo/dashboards.py:1119:89: E501 line too long (109 > 88 characters) -travo/dashboards.py:1120:89: E501 line too long (102 > 88 characters) -travo/dashboards.py:1132:89: E501 line too long (90 > 88 characters) -travo/dashboards.py:1143:40: F541 f-string is missing placeholders -travo/dashboards.py:1148:33: F841 local variable 'manual_score' is assigned to but never used -travo/dashboards.py:1151:89: E501 line too long (140 > 88 characters) -travo/dashboards.py:1153:89: E501 line too long (132 > 88 characters) -travo/dashboards.py:1156:89: E501 line too long (116 > 88 characters) -travo/dashboards.py:1164:89: E501 line too long (92 > 88 characters) -travo/dashboards.py:1167:89: E501 line too long (98 > 88 characters) -travo/dashboards.py:1171:89: E501 line too long (110 > 88 characters) -travo/dashboards.py:1176:89: E501 line too long (95 > 88 characters) -travo/gitlab.py:120:9: E722 do not use bare 'except' -travo/gitlab.py:216:89: E501 line too long (99 > 88 characters) -travo/gitlab.py:406:89: E501 line too long (100 > 88 characters) -travo/gitlab.py:466:89: E501 line too long (93 > 88 characters) -travo/gitlab.py:552:89: E501 line too long (114 > 88 characters) -travo/gitlab.py:575:89: E501 line too long (104 > 88 characters) -travo/gitlab.py:612:89: E501 line too long (132 > 88 characters) -travo/gitlab.py:681:89: E501 line too long (113 > 88 characters) -travo/gitlab.py:752:89: E501 line too long (104 > 88 characters) -travo/gitlab.py:782:89: E501 line too long (128 > 88 characters) -travo/gitlab.py:859:89: E501 line too long (92 > 88 characters) -travo/gitlab.py:867:89: E501 line too long (97 > 88 characters) -travo/gitlab.py:1261:89: E501 line too long (97 > 88 characters) -travo/gitlab.py:1547:89: E501 line too long (89 > 88 characters) -travo/gitlab.py:1573:89: E501 line too long (96 > 88 characters) -travo/gitlab.py:1585:89: E501 line too long (119 > 88 characters) -travo/gitlab.py:1587:89: E501 line too long (100 > 88 characters) -travo/gitlab.py:1589:89: E501 line too long (100 > 88 characters) -travo/gitlab.py:1595:89: E501 line too long (144 > 88 characters) -travo/gitlab.py:1599:89: E501 line too long (89 > 88 characters) -travo/gitlab.py:1618:35: F541 f-string is missing placeholders -travo/gitlab.py:1675:89: E501 line too long (155 > 88 characters) -travo/gitlab.py:1682:89: E501 line too long (108 > 88 characters) -travo/gitlab.py:1684:89: E501 line too long (93 > 88 characters) -travo/gitlab.py:1884:89: E501 line too long (108 > 88 characters) -travo/gitlab.py:1897:89: E501 line too long (110 > 88 characters) -travo/gitlab.py:1916:89: E501 line too long (96 > 88 characters) -travo/gitlab.py:1918:89: E501 line too long (113 > 88 characters) -travo/gitlab.py:1921:89: E501 line too long (94 > 88 characters) -travo/gitlab.py:2028:89: E501 line too long (94 > 88 characters) -travo/gitlab.py:2044:89: E501 line too long (110 > 88 characters) -travo/gitlab.py:2081:45: W291 trailing whitespace -travo/gitlab.py:2084:56: W291 trailing whitespace -travo/gitlab.py:2096:24: W291 trailing whitespace -travo/gitlab.py:2104:25: W291 trailing whitespace -travo/gitlab.py:2108:46: W291 trailing whitespace -travo/gitlab.py:2111:57: W291 trailing whitespace -travo/gitlab.py:2119:25: W291 trailing whitespace -travo/gitlab.py:2131:24: W291 trailing whitespace -travo/gitlab.py:2139:25: W291 trailing whitespace -travo/gitlab.py:2191:89: E501 line too long (99 > 88 characters) -travo/gitlab.py:2248:89: E501 line too long (104 > 88 characters) -travo/gitlab.py:2395:89: E501 line too long (94 > 88 characters) -travo/gitlab.py:2443:89: E501 line too long (94 > 88 characters) -travo/gitlab.py:2457:89: E501 line too long (111 > 88 characters) -travo/homework.py:1:1: F401 'dataclasses.field' imported but unused -travo/homework.py:2:1: F401 'os' imported but unused -travo/homework.py:48:13: E722 do not use bare 'except' -travo/homework.py:51:25: F541 f-string is missing placeholders -travo/homework.py:51:89: E501 line too long (130 > 88 characters) -travo/homework.py:54:89: E501 line too long (114 > 88 characters) -travo/homework.py:124:23: F541 f-string is missing placeholders -travo/homework.py:131:89: E501 line too long (89 > 88 characters) -travo/homework.py:164:23: F541 f-string is missing placeholders -travo/homework.py:175:89: E501 line too long (101 > 88 characters) -travo/homework.py:187:19: F541 f-string is missing placeholders -travo/homework.py:206:19: F541 f-string is missing placeholders -travo/homework.py:218:23: F541 f-string is missing placeholders -travo/homework.py:224:89: E501 line too long (93 > 88 characters) -travo/homework.py:241:89: E501 line too long (91 > 88 characters) -travo/jupyter_course.py:11:1: F401 'logging' imported but unused -travo/jupyter_course.py:13:1: F401 'requests' imported but unused -travo/jupyter_course.py:14:1: F401 'typing.Callable' imported but unused -travo/jupyter_course.py:14:1: F401 'typing.Tuple' imported but unused -travo/jupyter_course.py:14:1: F401 'typing.cast' imported but unused -travo/jupyter_course.py:16:1: F401 'nbgrader.api.Gradebook' imported but unused -travo/jupyter_course.py:16:1: F401 'nbgrader.api.MissingEntry' imported but unused -travo/jupyter_course.py:18:1: F401 '.assignment.Assignment' imported but unused -travo/jupyter_course.py:22:1: F401 '.gitlab.GitLab' imported but unused -travo/jupyter_course.py:22:1: F401 '.gitlab.AuthenticationError' imported but unused -travo/jupyter_course.py:23:1: F401 '.gitlab.ResourceNotFoundError' imported but unused -travo/jupyter_course.py:34:40: W291 trailing whitespace -travo/jupyter_course.py:35:89: E501 line too long (122 > 88 characters) -travo/jupyter_course.py:36:89: E501 line too long (119 > 88 characters) -travo/jupyter_course.py:37:89: E501 line too long (134 > 88 characters) -travo/jupyter_course.py:38:89: E501 line too long (113 > 88 characters) -travo/jupyter_course.py:208:89: E501 line too long (92 > 88 characters) -travo/jupyter_course.py:212:9: F401 'jupytext' imported but unused -travo/jupyter_course.py:268:89: E501 line too long (92 > 88 characters) -travo/jupyter_course.py:273:89: E501 line too long (93 > 88 characters) -travo/jupyter_course.py:286:89: E501 line too long (100 > 88 characters) -travo/jupyter_course.py:307:89: E501 line too long (114 > 88 characters) -travo/jupyter_course.py:311:89: E501 line too long (115 > 88 characters) -travo/jupyter_course.py:316:89: E501 line too long (106 > 88 characters) -travo/jupyter_course.py:339:89: E501 line too long (92 > 88 characters) -travo/jupyter_course.py:343:89: E501 line too long (95 > 88 characters) -travo/jupyter_course.py:344:89: E501 line too long (96 > 88 characters) -travo/jupyter_course.py:365:89: E501 line too long (90 > 88 characters) -travo/jupyter_course.py:419:89: E501 line too long (94 > 88 characters) -travo/jupyter_course.py:498:89: E501 line too long (92 > 88 characters) -travo/jupyter_course.py:505:89: E501 line too long (90 > 88 characters) -travo/jupyter_course.py:638:89: E501 line too long (102 > 88 characters) -travo/jupyter_course.py:646:89: E501 line too long (89 > 88 characters) -travo/jupyter_course.py:651:9: F811 redefinition of unused 'Gradebook' from line 16 -travo/jupyter_course.py:651:9: F811 redefinition of unused 'MissingEntry' from line 16 -travo/jupyter_course.py:652:89: E501 line too long (90 > 88 characters) -travo/jupyter_course.py:660:89: E501 line too long (91 > 88 characters) -travo/jupyter_course.py:689:9: F811 redefinition of unused 'Gradebook' from line 16 -travo/jupyter_course.py:706:89: E501 line too long (109 > 88 characters) -travo/jupyter_course.py:749:89: E501 line too long (91 > 88 characters) -travo/nbgrader_utils.py:53:89: E501 line too long (90 > 88 characters) -travo/nbgrader_utils.py:80:89: E501 line too long (94 > 88 characters) -travo/nbgrader_utils.py:91:89: E501 line too long (142 > 88 characters) -travo/nbgrader_utils.py:93:89: E501 line too long (210 > 88 characters) -travo/nbgrader_utils.py:107:89: E501 line too long (98 > 88 characters) -travo/nbgrader_utils.py:128:89: E501 line too long (99 > 88 characters) -travo/nbgrader_utils.py:136:89: E501 line too long (113 > 88 characters) -travo/nbgrader_utils.py:139:89: E501 line too long (98 > 88 characters) -travo/nbgrader_utils.py:144:89: E501 line too long (100 > 88 characters) -travo/nbgrader_utils.py:158:9: E722 do not use bare 'except' -travo/nbgrader_utils.py:173:89: E501 line too long (90 > 88 characters) -travo/nbgrader_utils.py:398:89: E501 line too long (105 > 88 characters) -travo/nbgrader_utils.py:399:89: E501 line too long (96 > 88 characters) -travo/nbgrader_utils.py:400:89: E501 line too long (99 > 88 characters) -travo/script.py:325:89: E501 line too long (114 > 88 characters) -travo/travo.py:3:1: F401 '.gitlab.GitLab' imported but unused -travo/utils.py:1:1: F401 'os' imported but unused -travo/utils.py:58:89: E501 line too long (112 > 88 characters) diff --git a/flake8_after_autopep8_output2.txt b/flake8_after_autopep8_output2.txt deleted file mode 100644 index ff1d6998..00000000 --- a/flake8_after_autopep8_output2.txt +++ /dev/null @@ -1,123 +0,0 @@ -travo/__init__.py:3:1: F401 '.gitlab.Forge' imported but unused -travo/__init__.py:3:1: F401 '.gitlab.GitLab' imported but unused -travo/__init__.py:4:1: F401 '.assignment.Assignment' imported but unused -travo/__init__.py:5:1: F401 '.course.Course' imported but unused -travo/__init__.py:6:1: F401 '.homework.Homework' imported but unused -travo/assignment.py:8:1: F401 'typing.Sequence' imported but unused -travo/assignment.py:9:1: F401 '.gitlab.unknown' imported but unused -travo/assignment.py:87:89: E501 line too long (93 > 88 characters) -travo/assignment.py:321:89: E501 line too long (99 > 88 characters) -travo/assignment.py:322:89: E501 line too long (98 > 88 characters) -travo/assignment.py:755:89: E501 line too long (90 > 88 characters) -travo/course.py:9:1: F401 '.gitlab.GitLabTest' imported but unused -travo/course.py:34:89: E501 line too long (93 > 88 characters) -travo/course.py:87:89: E501 line too long (89 > 88 characters) -travo/course.py:195:89: E501 line too long (144 > 88 characters) -travo/course.py:360:89: E501 line too long (89 > 88 characters) -travo/course.py:395:89: E501 line too long (98 > 88 characters) -travo/course.py:493:89: E501 line too long (96 > 88 characters) -travo/dashboards.py:368:89: E501 line too long (181 > 88 characters) -travo/dashboards.py:374:89: E501 line too long (128 > 88 characters) -travo/dashboards.py:749:89: E501 line too long (109 > 88 characters) -travo/dashboards.py:755:13: F401 'ipylab.JupyterFrontEnd' imported but unused -travo/dashboards.py:822:89: E501 line too long (90 > 88 characters) -travo/dashboards.py:837:89: E501 line too long (119 > 88 characters) -travo/dashboards.py:941:89: E501 line too long (90 > 88 characters) -travo/dashboards.py:995:89: E501 line too long (100 > 88 characters) -travo/dashboards.py:1144:89: E501 line too long (97 > 88 characters) -travo/dashboards.py:1145:89: E501 line too long (102 > 88 characters) -travo/dashboards.py:1157:89: E501 line too long (90 > 88 characters) -travo/dashboards.py:1168:40: F541 f-string is missing placeholders -travo/dashboards.py:1173:33: F841 local variable 'manual_score' is assigned to but never used -travo/dashboards.py:1176:89: E501 line too long (97 > 88 characters) -travo/dashboards.py:1179:89: E501 line too long (132 > 88 characters) -travo/dashboards.py:1182:89: E501 line too long (116 > 88 characters) -travo/dashboards.py:1190:89: E501 line too long (92 > 88 characters) -travo/dashboards.py:1193:89: E501 line too long (98 > 88 characters) -travo/dashboards.py:1197:89: E501 line too long (110 > 88 characters) -travo/dashboards.py:1202:89: E501 line too long (95 > 88 characters) -travo/gitlab.py:216:89: E501 line too long (99 > 88 characters) -travo/gitlab.py:406:89: E501 line too long (100 > 88 characters) -travo/gitlab.py:466:89: E501 line too long (93 > 88 characters) -travo/gitlab.py:552:89: E501 line too long (114 > 88 characters) -travo/gitlab.py:575:89: E501 line too long (104 > 88 characters) -travo/gitlab.py:612:89: E501 line too long (132 > 88 characters) -travo/gitlab.py:681:89: E501 line too long (113 > 88 characters) -travo/gitlab.py:752:89: E501 line too long (104 > 88 characters) -travo/gitlab.py:782:89: E501 line too long (128 > 88 characters) -travo/gitlab.py:859:89: E501 line too long (92 > 88 characters) -travo/gitlab.py:867:89: E501 line too long (97 > 88 characters) -travo/gitlab.py:1548:89: E501 line too long (89 > 88 characters) -travo/gitlab.py:1593:89: E501 line too long (100 > 88 characters) -travo/gitlab.py:1595:89: E501 line too long (100 > 88 characters) -travo/gitlab.py:1601:89: E501 line too long (144 > 88 characters) -travo/gitlab.py:1605:89: E501 line too long (89 > 88 characters) -travo/gitlab.py:1624:35: F541 f-string is missing placeholders -travo/gitlab.py:1681:89: E501 line too long (155 > 88 characters) -travo/gitlab.py:1688:89: E501 line too long (108 > 88 characters) -travo/gitlab.py:1891:89: E501 line too long (108 > 88 characters) -travo/gitlab.py:1904:89: E501 line too long (110 > 88 characters) -travo/gitlab.py:1923:89: E501 line too long (96 > 88 characters) -travo/gitlab.py:1925:89: E501 line too long (113 > 88 characters) -travo/gitlab.py:1928:89: E501 line too long (94 > 88 characters) -travo/gitlab.py:2207:89: E501 line too long (99 > 88 characters) -travo/gitlab.py:2414:89: E501 line too long (94 > 88 characters) -travo/gitlab.py:2462:89: E501 line too long (94 > 88 characters) -travo/gitlab.py:2476:89: E501 line too long (111 > 88 characters) -travo/homework.py:1:1: F401 'dataclasses.field' imported but unused -travo/homework.py:2:1: F401 'os' imported but unused -travo/homework.py:51:25: F541 f-string is missing placeholders -travo/homework.py:51:89: E501 line too long (130 > 88 characters) -travo/homework.py:54:89: E501 line too long (114 > 88 characters) -travo/homework.py:124:23: F541 f-string is missing placeholders -travo/homework.py:131:89: E501 line too long (89 > 88 characters) -travo/homework.py:164:23: F541 f-string is missing placeholders -travo/homework.py:175:89: E501 line too long (101 > 88 characters) -travo/homework.py:187:19: F541 f-string is missing placeholders -travo/homework.py:206:19: F541 f-string is missing placeholders -travo/homework.py:218:23: F541 f-string is missing placeholders -travo/homework.py:224:89: E501 line too long (93 > 88 characters) -travo/homework.py:241:89: E501 line too long (91 > 88 characters) -travo/jupyter_course.py:11:1: F401 'logging' imported but unused -travo/jupyter_course.py:13:1: F401 'requests' imported but unused -travo/jupyter_course.py:14:1: F401 'typing.Callable' imported but unused -travo/jupyter_course.py:14:1: F401 'typing.Tuple' imported but unused -travo/jupyter_course.py:14:1: F401 'typing.cast' imported but unused -travo/jupyter_course.py:16:1: F401 'nbgrader.api.Gradebook' imported but unused -travo/jupyter_course.py:16:1: F401 'nbgrader.api.MissingEntry' imported but unused -travo/jupyter_course.py:18:1: F401 '.assignment.Assignment' imported but unused -travo/jupyter_course.py:22:1: F401 '.gitlab.GitLab' imported but unused -travo/jupyter_course.py:22:1: F401 '.gitlab.AuthenticationError' imported but unused -travo/jupyter_course.py:23:1: F401 '.gitlab.ResourceNotFoundError' imported but unused -travo/jupyter_course.py:35:89: E501 line too long (122 > 88 characters) -travo/jupyter_course.py:36:89: E501 line too long (119 > 88 characters) -travo/jupyter_course.py:37:89: E501 line too long (134 > 88 characters) -travo/jupyter_course.py:38:89: E501 line too long (113 > 88 characters) -travo/jupyter_course.py:216:9: F401 'jupytext' imported but unused -travo/jupyter_course.py:297:89: E501 line too long (100 > 88 characters) -travo/jupyter_course.py:318:89: E501 line too long (114 > 88 characters) -travo/jupyter_course.py:393:89: E501 line too long (90 > 88 characters) -travo/jupyter_course.py:447:89: E501 line too long (94 > 88 characters) -travo/jupyter_course.py:526:89: E501 line too long (92 > 88 characters) -travo/jupyter_course.py:667:89: E501 line too long (102 > 88 characters) -travo/jupyter_course.py:675:89: E501 line too long (89 > 88 characters) -travo/jupyter_course.py:680:9: F811 redefinition of unused 'Gradebook' from line 16 -travo/jupyter_course.py:680:9: F811 redefinition of unused 'MissingEntry' from line 16 -travo/jupyter_course.py:681:89: E501 line too long (90 > 88 characters) -travo/jupyter_course.py:719:9: F811 redefinition of unused 'Gradebook' from line 16 -travo/jupyter_course.py:737:89: E501 line too long (98 > 88 characters) -travo/jupyter_course.py:780:89: E501 line too long (91 > 88 characters) -travo/nbgrader_utils.py:53:89: E501 line too long (90 > 88 characters) -travo/nbgrader_utils.py:80:89: E501 line too long (94 > 88 characters) -travo/nbgrader_utils.py:93:89: E501 line too long (116 > 88 characters) -travo/nbgrader_utils.py:95:89: E501 line too long (91 > 88 characters) -travo/nbgrader_utils.py:122:89: E501 line too long (98 > 88 characters) -travo/nbgrader_utils.py:152:89: E501 line too long (113 > 88 characters) -travo/nbgrader_utils.py:164:89: E501 line too long (89 > 88 characters) -travo/nbgrader_utils.py:193:89: E501 line too long (90 > 88 characters) -travo/nbgrader_utils.py:418:89: E501 line too long (105 > 88 characters) -travo/nbgrader_utils.py:419:89: E501 line too long (96 > 88 characters) -travo/script.py:325:89: E501 line too long (114 > 88 characters) -travo/travo.py:3:1: F401 '.gitlab.GitLab' imported but unused -travo/utils.py:1:1: F401 'os' imported but unused -travo/utils.py:58:89: E501 line too long (112 > 88 characters) diff --git a/flake8_original_output.csv b/flake8_original_output.csv deleted file mode 100644 index 9961e108..00000000 --- a/flake8_original_output.csv +++ /dev/null @@ -1,405 +0,0 @@ -travo/__init__.py:3:1: F401 '.gitlab.Forge' imported but unused -travo/__init__.py:3:1: F401 '.gitlab.GitLab' imported but unused -travo/__init__.py:4:1: F401 '.assignment.Assignment' imported but unused -travo/__init__.py:5:1: F401 '.course.Course' imported but unused -travo/__init__.py:6:1: F401 '.homework.Homework' imported but unused -travo/assignment.py:8:1: F401 'typing.Sequence' imported but unused -travo/assignment.py:9:1: F401 '.gitlab.unknown' imported but unused -travo/assignment.py:87:89: E501 line too long (93 > 88 characters) -travo/assignment.py:155:5: E303 too many blank lines (2) -travo/assignment.py:157:5: E301 expected 1 blank line, found 0 -travo/assignment.py:251:89: E501 line too long (98 > 88 characters) -travo/assignment.py:263:47: E252 missing whitespace around parameter equals -travo/assignment.py:263:48: E252 missing whitespace around parameter equals -travo/assignment.py:321:89: E501 line too long (99 > 88 characters) -travo/assignment.py:322:89: E501 line too long (98 > 88 characters) -travo/assignment.py:474:9: E306 expected 1 blank line before a nested definition, found 0 -travo/assignment.py:504:89: E501 line too long (96 > 88 characters) -travo/assignment.py:511:89: E501 line too long (96 > 88 characters) -travo/assignment.py:512:89: E501 line too long (98 > 88 characters) -travo/assignment.py:523:89: E501 line too long (106 > 88 characters) -travo/assignment.py:557:89: E501 line too long (90 > 88 characters) -travo/assignment.py:684:26: E261 at least two spaces before inline comment -travo/assignment.py:684:27: E262 inline comment should start with '# ' -travo/assignment.py:747:89: E501 line too long (90 > 88 characters) -travo/assignment.py:761:89: E501 line too long (92 > 88 characters) -travo/course.py:9:1: F401 '.gitlab.GitLabTest' imported but unused -travo/course.py:34:89: E501 line too long (93 > 88 characters) -travo/course.py:45:59: W291 trailing whitespace -travo/course.py:87:89: E501 line too long (89 > 88 characters) -travo/course.py:118:5: E303 too many blank lines (2) -travo/course.py:196:89: E501 line too long (144 > 88 characters) -travo/course.py:361:89: E501 line too long (89 > 88 characters) -travo/course.py:365:16: E221 multiple spaces before operator -travo/course.py:396:89: E501 line too long (98 > 88 characters) -travo/course.py:471:89: E501 line too long (108 > 88 characters) -travo/course.py:472:89: E501 line too long (90 > 88 characters) -travo/course.py:492:89: E501 line too long (101 > 88 characters) -travo/course.py:497:89: E501 line too long (98 > 88 characters) -travo/course.py:524:89: E501 line too long (91 > 88 characters) -travo/course.py:528:23: E251 unexpected spaces around keyword / parameter equals -travo/course.py:528:25: E251 unexpected spaces around keyword / parameter equals -travo/course.py:529:27: E251 unexpected spaces around keyword / parameter equals -travo/course.py:529:29: E251 unexpected spaces around keyword / parameter equals -travo/course.py:530:35: E251 unexpected spaces around keyword / parameter equals -travo/course.py:530:37: E251 unexpected spaces around keyword / parameter equals -travo/course.py:531:39: E251 unexpected spaces around keyword / parameter equals -travo/course.py:531:41: E251 unexpected spaces around keyword / parameter equals -travo/course.py:532:25: E251 unexpected spaces around keyword / parameter equals -travo/course.py:532:27: E251 unexpected spaces around keyword / parameter equals -travo/course.py:533:29: E251 unexpected spaces around keyword / parameter equals -travo/course.py:533:31: E251 unexpected spaces around keyword / parameter equals -travo/course.py:534:24: E251 unexpected spaces around keyword / parameter equals -travo/course.py:534:26: E251 unexpected spaces around keyword / parameter equals -travo/course.py:553:89: E501 line too long (93 > 88 characters) -travo/course.py:623:17: E128 continuation line under-indented for visual indent -travo/course.py:624:17: E128 continuation line under-indented for visual indent -travo/course.py:647:89: E501 line too long (99 > 88 characters) -travo/dashboards.py:83:89: E501 line too long (90 > 88 characters) -travo/dashboards.py:84:89: E501 line too long (94 > 88 characters) -travo/dashboards.py:366:89: E501 line too long (181 > 88 characters) -travo/dashboards.py:372:89: E501 line too long (128 > 88 characters) -travo/dashboards.py:590:89: E501 line too long (113 > 88 characters) -travo/dashboards.py:615:89: E501 line too long (107 > 88 characters) -travo/dashboards.py:663:89: E501 line too long (94 > 88 characters) -travo/dashboards.py:722:89: E501 line too long (101 > 88 characters) -travo/dashboards.py:723:89: E501 line too long (98 > 88 characters) -travo/dashboards.py:725:89: E501 line too long (99 > 88 characters) -travo/dashboards.py:726:89: E501 line too long (124 > 88 characters) -travo/dashboards.py:736:89: E501 line too long (109 > 88 characters) -travo/dashboards.py:737:89: E501 line too long (95 > 88 characters) -travo/dashboards.py:742:13: F401 'ipylab.JupyterFrontEnd' imported but unused -travo/dashboards.py:746:89: E501 line too long (91 > 88 characters) -travo/dashboards.py:747:89: E501 line too long (89 > 88 characters) -travo/dashboards.py:753:89: E501 line too long (91 > 88 characters) -travo/dashboards.py:765:89: E501 line too long (107 > 88 characters) -travo/dashboards.py:769:89: E501 line too long (102 > 88 characters) -travo/dashboards.py:770:89: E501 line too long (115 > 88 characters) -travo/dashboards.py:773:9: E722 do not use bare 'except' -travo/dashboards.py:779:89: E501 line too long (109 > 88 characters) -travo/dashboards.py:796:89: E501 line too long (90 > 88 characters) -travo/dashboards.py:800:89: E501 line too long (107 > 88 characters) -travo/dashboards.py:810:89: E501 line too long (119 > 88 characters) -travo/dashboards.py:813:9: E722 do not use bare 'except' -travo/dashboards.py:827:89: E501 line too long (92 > 88 characters) -travo/dashboards.py:828:89: E501 line too long (127 > 88 characters) -travo/dashboards.py:848:89: E501 line too long (99 > 88 characters) -travo/dashboards.py:850:89: E501 line too long (97 > 88 characters) -travo/dashboards.py:853:89: E501 line too long (103 > 88 characters) -travo/dashboards.py:869:89: E501 line too long (95 > 88 characters) -travo/dashboards.py:906:89: E501 line too long (90 > 88 characters) -travo/dashboards.py:960:89: E501 line too long (109 > 88 characters) -travo/dashboards.py:963:36: E128 continuation line under-indented for visual indent -travo/dashboards.py:964:36: E128 continuation line under-indented for visual indent -travo/dashboards.py:965:36: E128 continuation line under-indented for visual indent -travo/dashboards.py:1020:89: E501 line too long (102 > 88 characters) -travo/dashboards.py:1022:89: E501 line too long (104 > 88 characters) -travo/dashboards.py:1025:89: E501 line too long (116 > 88 characters) -travo/dashboards.py:1075:89: E501 line too long (98 > 88 characters) -travo/dashboards.py:1080:89: E501 line too long (99 > 88 characters) -travo/dashboards.py:1099:89: E501 line too long (91 > 88 characters) -travo/dashboards.py:1100:89: E501 line too long (109 > 88 characters) -travo/dashboards.py:1101:89: E501 line too long (102 > 88 characters) -travo/dashboards.py:1111:89: E501 line too long (92 > 88 characters) -travo/dashboards.py:1112:89: E501 line too long (135 > 88 characters) -travo/dashboards.py:1114:89: E501 line too long (99 > 88 characters) -travo/dashboards.py:1121:40: F541 f-string is missing placeholders -travo/dashboards.py:1122:89: E501 line too long (94 > 88 characters) -travo/dashboards.py:1125:33: F841 local variable 'manual_score' is assigned to but never used -travo/dashboards.py:1126:89: E501 line too long (92 > 88 characters) -travo/dashboards.py:1127:89: E501 line too long (140 > 88 characters) -travo/dashboards.py:1128:89: E501 line too long (145 > 88 characters) -travo/dashboards.py:1130:89: E501 line too long (129 > 88 characters) -travo/dashboards.py:1132:89: E501 line too long (89 > 88 characters) -travo/dashboards.py:1136:89: E501 line too long (112 > 88 characters) -travo/dashboards.py:1138:89: E501 line too long (118 > 88 characters) -travo/dashboards.py:1142:89: E501 line too long (110 > 88 characters) -travo/dashboards.py:1146:89: E501 line too long (112 > 88 characters) -travo/gitlab.py:31:1: E302 expected 2 blank lines, found 1 -travo/gitlab.py:34:1: E302 expected 2 blank lines, found 1 -travo/gitlab.py:39:29: E128 continuation line under-indented for visual indent -travo/gitlab.py:40:29: E128 continuation line under-indented for visual indent -travo/gitlab.py:41:29: E124 closing bracket does not match visual indentation -travo/gitlab.py:71:32: E261 at least two spaces before inline comment -travo/gitlab.py:118:9: E722 do not use bare 'except' -travo/gitlab.py:214:89: E501 line too long (99 > 88 characters) -travo/gitlab.py:272:43: W291 trailing whitespace -travo/gitlab.py:404:89: E501 line too long (100 > 88 characters) -travo/gitlab.py:421:5: E303 too many blank lines (2) -travo/gitlab.py:440:89: E501 line too long (94 > 88 characters) -travo/gitlab.py:464:89: E501 line too long (93 > 88 characters) -travo/gitlab.py:494:5: E303 too many blank lines (2) -travo/gitlab.py:494:36: E225 missing whitespace around operator -travo/gitlab.py:551:89: E501 line too long (114 > 88 characters) -travo/gitlab.py:574:89: E501 line too long (104 > 88 characters) -travo/gitlab.py:611:89: E501 line too long (132 > 88 characters) -travo/gitlab.py:680:89: E501 line too long (113 > 88 characters) -travo/gitlab.py:685:54: E251 unexpected spaces around keyword / parameter equals -travo/gitlab.py:685:56: E251 unexpected spaces around keyword / parameter equals -travo/gitlab.py:685:89: E501 line too long (90 > 88 characters) -travo/gitlab.py:697:31: E225 missing whitespace around operator -travo/gitlab.py:719:41: E127 continuation line over-indented for visual indent -travo/gitlab.py:751:89: E501 line too long (104 > 88 characters) -travo/gitlab.py:781:89: E501 line too long (128 > 88 characters) -travo/gitlab.py:857:89: E501 line too long (102 > 88 characters) -travo/gitlab.py:864:89: E501 line too long (110 > 88 characters) -travo/gitlab.py:939:19: E221 multiple spaces before operator -travo/gitlab.py:940:15: E221 multiple spaces before operator -travo/gitlab.py:951:89: E501 line too long (90 > 88 characters) -travo/gitlab.py:955:60: W291 trailing whitespace -travo/gitlab.py:978:1: E302 expected 2 blank lines, found 0 -travo/gitlab.py:990:14: E221 multiple spaces before operator -travo/gitlab.py:991:17: E221 multiple spaces before operator -travo/gitlab.py:992:18: E221 multiple spaces before operator -travo/gitlab.py:994:14: E221 multiple spaces before operator -travo/gitlab.py:1042:23: E201 whitespace after '{' -travo/gitlab.py:1044:82: E202 whitespace before '}' -travo/gitlab.py:1074:26: E201 whitespace after '[' -travo/gitlab.py:1074:80: E202 whitespace before ']' -travo/gitlab.py:1117:1: E302 expected 2 blank lines, found 1 -travo/gitlab.py:1145:89: E501 line too long (89 > 88 characters) -travo/gitlab.py:1146:52: E202 whitespace before ']' -travo/gitlab.py:1147:52: E202 whitespace before ']' -travo/gitlab.py:1162:52: E202 whitespace before ']' -travo/gitlab.py:1170:52: E202 whitespace before ']' -travo/gitlab.py:1171:52: E202 whitespace before ']' -travo/gitlab.py:1172:52: E202 whitespace before ']' -travo/gitlab.py:1173:52: E202 whitespace before ']' -travo/gitlab.py:1174:52: E202 whitespace before ']' -travo/gitlab.py:1175:52: E202 whitespace before ']' -travo/gitlab.py:1176:52: E202 whitespace before ']' -travo/gitlab.py:1177:52: E202 whitespace before ']' -travo/gitlab.py:1178:52: E202 whitespace before ']' -travo/gitlab.py:1179:52: E202 whitespace before ']' -travo/gitlab.py:1181:52: E202 whitespace before ']' -travo/gitlab.py:1183:52: E202 whitespace before ']' -travo/gitlab.py:1185:52: E202 whitespace before ']' -travo/gitlab.py:1188:52: E202 whitespace before ']' -travo/gitlab.py:1190:52: E202 whitespace before ']' -travo/gitlab.py:1193:52: E202 whitespace before ']' -travo/gitlab.py:1194:52: E202 whitespace before ']' -travo/gitlab.py:1195:52: E202 whitespace before ']' -travo/gitlab.py:1196:52: E202 whitespace before ']' -travo/gitlab.py:1198:52: E202 whitespace before ']' -travo/gitlab.py:1202:52: E202 whitespace before ']' -travo/gitlab.py:1203:52: E202 whitespace before ']' -travo/gitlab.py:1206:52: E202 whitespace before ']' -travo/gitlab.py:1209:52: E202 whitespace before ']' -travo/gitlab.py:1212:52: E202 whitespace before ']' -travo/gitlab.py:1249:89: E501 line too long (103 > 88 characters) -travo/gitlab.py:1252:89: E501 line too long (97 > 88 characters) -travo/gitlab.py:1481:17: E201 whitespace after '[' -travo/gitlab.py:1481:59: E202 whitespace before ']' -travo/gitlab.py:1538:89: E501 line too long (89 > 88 characters) -travo/gitlab.py:1557:5: E303 too many blank lines (2) -travo/gitlab.py:1565:89: E501 line too long (96 > 88 characters) -travo/gitlab.py:1569:21: E128 continuation line under-indented for visual indent -travo/gitlab.py:1578:5: E303 too many blank lines (2) -travo/gitlab.py:1578:38: E231 missing whitespace after ':' -travo/gitlab.py:1578:43: E252 missing whitespace around parameter equals -travo/gitlab.py:1578:44: E252 missing whitespace around parameter equals -travo/gitlab.py:1578:58: E231 missing whitespace after ':' -travo/gitlab.py:1578:63: E252 missing whitespace around parameter equals -travo/gitlab.py:1578:64: E252 missing whitespace around parameter equals -travo/gitlab.py:1578:79: E231 missing whitespace after ':' -travo/gitlab.py:1578:84: E252 missing whitespace around parameter equals -travo/gitlab.py:1578:85: E252 missing whitespace around parameter equals -travo/gitlab.py:1578:89: E501 line too long (110 > 88 characters) -travo/gitlab.py:1580:89: E501 line too long (100 > 88 characters) -travo/gitlab.py:1582:89: E501 line too long (100 > 88 characters) -travo/gitlab.py:1588:89: E501 line too long (144 > 88 characters) -travo/gitlab.py:1592:89: E501 line too long (89 > 88 characters) -travo/gitlab.py:1611:35: F541 f-string is missing placeholders -travo/gitlab.py:1617:29: E261 at least two spaces before inline comment -travo/gitlab.py:1635:5: E303 too many blank lines (2) -travo/gitlab.py:1644:5: E303 too many blank lines (2) -travo/gitlab.py:1670:89: E501 line too long (155 > 88 characters) -travo/gitlab.py:1677:89: E501 line too long (108 > 88 characters) -travo/gitlab.py:1679:89: E501 line too long (93 > 88 characters) -travo/gitlab.py:1799:37: E262 inline comment should start with '# ' -travo/gitlab.py:1878:89: E501 line too long (123 > 88 characters) -travo/gitlab.py:1890:89: E501 line too long (125 > 88 characters) -travo/gitlab.py:1909:89: E501 line too long (96 > 88 characters) -travo/gitlab.py:1911:89: E501 line too long (113 > 88 characters) -travo/gitlab.py:1914:89: E501 line too long (94 > 88 characters) -travo/gitlab.py:1925:25: E261 at least two spaces before inline comment -travo/gitlab.py:1927:25: E261 at least two spaces before inline comment -travo/gitlab.py:1932:89: E501 line too long (106 > 88 characters) -travo/gitlab.py:1936:89: E501 line too long (97 > 88 characters) -travo/gitlab.py:1940:19: E111 indentation is not a multiple of 4 -travo/gitlab.py:1943:89: E501 line too long (89 > 88 characters) -travo/gitlab.py:1988:5: E301 expected 1 blank line, found 0 -travo/gitlab.py:2018:5: E303 too many blank lines (2) -travo/gitlab.py:2018:89: E501 line too long (94 > 88 characters) -travo/gitlab.py:2034:17: E128 continuation line under-indented for visual indent -travo/gitlab.py:2034:89: E501 line too long (96 > 88 characters) -travo/gitlab.py:2071:45: W291 trailing whitespace -travo/gitlab.py:2074:56: W291 trailing whitespace -travo/gitlab.py:2086:24: W291 trailing whitespace -travo/gitlab.py:2094:25: W291 trailing whitespace -travo/gitlab.py:2098:46: W291 trailing whitespace -travo/gitlab.py:2101:57: W291 trailing whitespace -travo/gitlab.py:2109:25: W291 trailing whitespace -travo/gitlab.py:2121:24: W291 trailing whitespace -travo/gitlab.py:2129:25: W291 trailing whitespace -travo/gitlab.py:2139:35: E128 continuation line under-indented for visual indent -travo/gitlab.py:2151:38: E252 missing whitespace around parameter equals -travo/gitlab.py:2151:39: E252 missing whitespace around parameter equals -travo/gitlab.py:2181:89: E501 line too long (99 > 88 characters) -travo/gitlab.py:2238:89: E501 line too long (104 > 88 characters) -travo/gitlab.py:2242:1: E302 expected 2 blank lines, found 1 -travo/gitlab.py:2265:89: E501 line too long (97 > 88 characters) -travo/gitlab.py:2276:89: E501 line too long (89 > 88 characters) -travo/gitlab.py:2277:89: E501 line too long (94 > 88 characters) -travo/gitlab.py:2278:89: E501 line too long (94 > 88 characters) -travo/gitlab.py:2280:52: E202 whitespace before ']' -travo/gitlab.py:2281:52: E202 whitespace before ']' -travo/gitlab.py:2282:52: E202 whitespace before ']' -travo/gitlab.py:2283:52: E202 whitespace before ']' -travo/gitlab.py:2284:52: E202 whitespace before ']' -travo/gitlab.py:2285:52: E202 whitespace before ']' -travo/gitlab.py:2291:52: E202 whitespace before ']' -travo/gitlab.py:2380:89: E501 line too long (94 > 88 characters) -travo/gitlab.py:2427:89: E501 line too long (111 > 88 characters) -travo/gitlab.py:2430:89: E501 line too long (96 > 88 characters) -travo/gitlab.py:2433:89: E501 line too long (103 > 88 characters) -travo/gitlab.py:2438:89: E501 line too long (128 > 88 characters) -travo/gitlab.py:2440:1: W293 blank line contains whitespace -travo/gitlab.py:2485:51: E202 whitespace before ']' -travo/gitlab.py:2486:51: E202 whitespace before ']' -travo/gitlab.py:2487:51: E202 whitespace before ']' -travo/gitlab.py:2489:51: E202 whitespace before ']' -travo/gitlab.py:2506:1: E302 expected 2 blank lines, found 1 -travo/gitlab.py:2510:1: E305 expected 2 blank lines after class or function definition, found 1 -travo/gitlab.py:2515:5: E301 expected 1 blank line, found 0 -travo/gitlab.py:2518:1: E305 expected 2 blank lines after class or function definition, found 1 -travo/gitlab.py:2520:1: E302 expected 2 blank lines, found 1 -travo/gitlab.py:2536:30: E231 missing whitespace after ':' -travo/homework.py:1:1: F401 'dataclasses.field' imported but unused -travo/homework.py:2:1: F401 'os' imported but unused -travo/homework.py:7:1: E302 expected 2 blank lines, found 1 -travo/homework.py:19:21: E261 at least two spaces before inline comment -travo/homework.py:20:24: E261 at least two spaces before inline comment -travo/homework.py:21:19: E261 at least two spaces before inline comment -travo/homework.py:23:34: E261 at least two spaces before inline comment -travo/homework.py:24:26: E261 at least two spaces before inline comment -travo/homework.py:26:38: E261 at least two spaces before inline comment -travo/homework.py:27:31: E261 at least two spaces before inline comment -travo/homework.py:30:5: E303 too many blank lines (2) -travo/homework.py:48:13: E722 do not use bare 'except' -travo/homework.py:50:40: F541 f-string is missing placeholders -travo/homework.py:50:89: E501 line too long (145 > 88 characters) -travo/homework.py:52:89: E501 line too long (129 > 88 characters) -travo/homework.py:91:89: E501 line too long (104 > 88 characters) -travo/homework.py:102:5: E303 too many blank lines (2) -travo/homework.py:102:54: E231 missing whitespace after ':' -travo/homework.py:102:59: E252 missing whitespace around parameter equals -travo/homework.py:102:60: E252 missing whitespace around parameter equals -travo/homework.py:122:23: F541 f-string is missing placeholders -travo/homework.py:128:89: E501 line too long (91 > 88 characters) -travo/homework.py:161:23: F541 f-string is missing placeholders -travo/homework.py:172:89: E501 line too long (101 > 88 characters) -travo/homework.py:179:21: E265 block comment should start with '# ' -travo/homework.py:180:21: E265 block comment should start with '# ' -travo/homework.py:184:19: F541 f-string is missing placeholders -travo/homework.py:189:5: E303 too many blank lines (2) -travo/homework.py:189:51: E231 missing whitespace after ':' -travo/homework.py:189:56: E252 missing whitespace around parameter equals -travo/homework.py:189:57: E252 missing whitespace around parameter equals -travo/homework.py:204:19: F541 f-string is missing placeholders -travo/homework.py:216:23: F541 f-string is missing placeholders -travo/homework.py:221:89: E501 line too long (95 > 88 characters) -travo/homework.py:237:89: E501 line too long (93 > 88 characters) -travo/jupyter_course.py:11:1: F401 'logging' imported but unused -travo/jupyter_course.py:13:1: F401 'requests' imported but unused -travo/jupyter_course.py:14:1: F401 'typing.Callable' imported but unused -travo/jupyter_course.py:14:1: F401 'typing.Tuple' imported but unused -travo/jupyter_course.py:14:1: F401 'typing.cast' imported but unused -travo/jupyter_course.py:16:1: F401 'nbgrader.api.Gradebook' imported but unused -travo/jupyter_course.py:16:1: F401 'nbgrader.api.MissingEntry' imported but unused -travo/jupyter_course.py:18:1: F401 '.assignment.Assignment' imported but unused -travo/jupyter_course.py:22:1: F401 '.gitlab.GitLab' imported but unused -travo/jupyter_course.py:22:1: F401 '.gitlab.AuthenticationError' imported but unused -travo/jupyter_course.py:23:1: F401 '.gitlab.ResourceNotFoundError' imported but unused -travo/jupyter_course.py:26:1: E302 expected 2 blank lines, found 1 -travo/jupyter_course.py:33:40: W291 trailing whitespace -travo/jupyter_course.py:34:89: E501 line too long (122 > 88 characters) -travo/jupyter_course.py:35:89: E501 line too long (119 > 88 characters) -travo/jupyter_course.py:36:89: E501 line too long (134 > 88 characters) -travo/jupyter_course.py:37:89: E501 line too long (113 > 88 characters) -travo/jupyter_course.py:207:89: E501 line too long (92 > 88 characters) -travo/jupyter_course.py:211:9: F401 'jupytext' imported but unused -travo/jupyter_course.py:224:89: E501 line too long (105 > 88 characters) -travo/jupyter_course.py:225:89: E501 line too long (89 > 88 characters) -travo/jupyter_course.py:244:89: E501 line too long (107 > 88 characters) -travo/jupyter_course.py:251:89: E501 line too long (109 > 88 characters) -travo/jupyter_course.py:263:89: E501 line too long (92 > 88 characters) -travo/jupyter_course.py:268:89: E501 line too long (93 > 88 characters) -travo/jupyter_course.py:281:89: E501 line too long (100 > 88 characters) -travo/jupyter_course.py:290:89: E501 line too long (92 > 88 characters) -travo/jupyter_course.py:293:89: E501 line too long (111 > 88 characters) -travo/jupyter_course.py:300:89: E501 line too long (114 > 88 characters) -travo/jupyter_course.py:304:89: E501 line too long (115 > 88 characters) -travo/jupyter_course.py:309:89: E501 line too long (106 > 88 characters) -travo/jupyter_course.py:332:89: E501 line too long (92 > 88 characters) -travo/jupyter_course.py:336:89: E501 line too long (95 > 88 characters) -travo/jupyter_course.py:337:89: E501 line too long (96 > 88 characters) -travo/jupyter_course.py:357:89: E501 line too long (101 > 88 characters) -travo/jupyter_course.py:364:89: E501 line too long (89 > 88 characters) -travo/jupyter_course.py:409:89: E501 line too long (104 > 88 characters) -travo/jupyter_course.py:441:89: E501 line too long (96 > 88 characters) -travo/jupyter_course.py:458:89: E501 line too long (98 > 88 characters) -travo/jupyter_course.py:462:89: E501 line too long (96 > 88 characters) -travo/jupyter_course.py:485:89: E501 line too long (92 > 88 characters) -travo/jupyter_course.py:492:89: E501 line too long (90 > 88 characters) -travo/jupyter_course.py:494:89: E501 line too long (100 > 88 characters) -travo/jupyter_course.py:495:89: E501 line too long (96 > 88 characters) -travo/jupyter_course.py:546:89: E501 line too long (106 > 88 characters) -travo/jupyter_course.py:622:89: E501 line too long (102 > 88 characters) -travo/jupyter_course.py:630:89: E501 line too long (89 > 88 characters) -travo/jupyter_course.py:635:9: F811 redefinition of unused 'Gradebook' from line 16 -travo/jupyter_course.py:635:9: F811 redefinition of unused 'MissingEntry' from line 16 -travo/jupyter_course.py:636:89: E501 line too long (90 > 88 characters) -travo/jupyter_course.py:644:89: E501 line too long (91 > 88 characters) -travo/jupyter_course.py:673:9: F811 redefinition of unused 'Gradebook' from line 16 -travo/jupyter_course.py:690:89: E501 line too long (109 > 88 characters) -travo/jupyter_course.py:732:47: E128 continuation line under-indented for visual indent -travo/jupyter_course.py:733:40: E261 at least two spaces before inline comment -travo/jupyter_course.py:733:89: E501 line too long (90 > 88 characters) -travo/jupyter_course.py:739:32: E261 at least two spaces before inline comment -travo/jupyter_course.py:739:33: E262 inline comment should start with '# ' -travo/nbgrader_utils.py:53:89: E501 line too long (90 > 88 characters) -travo/nbgrader_utils.py:72:89: E501 line too long (96 > 88 characters) -travo/nbgrader_utils.py:78:89: E501 line too long (102 > 88 characters) -travo/nbgrader_utils.py:85:89: E501 line too long (100 > 88 characters) -travo/nbgrader_utils.py:88:46: E225 missing whitespace around operator -travo/nbgrader_utils.py:88:80: E225 missing whitespace around operator -travo/nbgrader_utils.py:88:89: E501 line too long (138 > 88 characters) -travo/nbgrader_utils.py:89:52: E225 missing whitespace around operator -travo/nbgrader_utils.py:90:53: E225 missing whitespace around operator -travo/nbgrader_utils.py:90:89: E501 line too long (208 > 88 characters) -travo/nbgrader_utils.py:94:89: E501 line too long (98 > 88 characters) -travo/nbgrader_utils.py:102:89: E501 line too long (106 > 88 characters) -travo/nbgrader_utils.py:109:89: E501 line too long (102 > 88 characters) -travo/nbgrader_utils.py:115:1: E302 expected 2 blank lines, found 1 -travo/nbgrader_utils.py:121:89: E501 line too long (99 > 88 characters) -travo/nbgrader_utils.py:128:89: E501 line too long (118 > 88 characters) -travo/nbgrader_utils.py:131:89: E501 line too long (98 > 88 characters) -travo/nbgrader_utils.py:136:89: E501 line too long (100 > 88 characters) -travo/nbgrader_utils.py:150:9: E722 do not use bare 'except' -travo/nbgrader_utils.py:164:89: E501 line too long (95 > 88 characters) -travo/nbgrader_utils.py:185:1: E302 expected 2 blank lines, found 1 -travo/nbgrader_utils.py:388:89: E501 line too long (105 > 88 characters) -travo/nbgrader_utils.py:389:89: E501 line too long (96 > 88 characters) -travo/nbgrader_utils.py:390:89: E501 line too long (99 > 88 characters) -travo/script.py:325:89: E501 line too long (114 > 88 characters) -travo/travo.py:3:1: F401 '.gitlab.GitLab' imported but unused -travo/utils.py:1:1: F401 'os' imported but unused -travo/utils.py:7:16: E261 at least two spaces before inline comment -travo/utils.py:10:1: E302 expected 2 blank lines, found 0 -travo/utils.py:20:1: E302 expected 2 blank lines, found 1 -travo/utils.py:29:38: E231 missing whitespace after ':' -travo/utils.py:31:1: E302 expected 2 blank lines, found 1 -travo/utils.py:47:1: E302 expected 2 blank lines, found 1 -travo/utils.py:53:89: E501 line too long (112 > 88 characters) -travo/utils.py:60:89: E501 line too long (99 > 88 characters) diff --git a/flake8_output.txt b/flake8_output.txt deleted file mode 100644 index 9961e108..00000000 --- a/flake8_output.txt +++ /dev/null @@ -1,405 +0,0 @@ -travo/__init__.py:3:1: F401 '.gitlab.Forge' imported but unused -travo/__init__.py:3:1: F401 '.gitlab.GitLab' imported but unused -travo/__init__.py:4:1: F401 '.assignment.Assignment' imported but unused -travo/__init__.py:5:1: F401 '.course.Course' imported but unused -travo/__init__.py:6:1: F401 '.homework.Homework' imported but unused -travo/assignment.py:8:1: F401 'typing.Sequence' imported but unused -travo/assignment.py:9:1: F401 '.gitlab.unknown' imported but unused -travo/assignment.py:87:89: E501 line too long (93 > 88 characters) -travo/assignment.py:155:5: E303 too many blank lines (2) -travo/assignment.py:157:5: E301 expected 1 blank line, found 0 -travo/assignment.py:251:89: E501 line too long (98 > 88 characters) -travo/assignment.py:263:47: E252 missing whitespace around parameter equals -travo/assignment.py:263:48: E252 missing whitespace around parameter equals -travo/assignment.py:321:89: E501 line too long (99 > 88 characters) -travo/assignment.py:322:89: E501 line too long (98 > 88 characters) -travo/assignment.py:474:9: E306 expected 1 blank line before a nested definition, found 0 -travo/assignment.py:504:89: E501 line too long (96 > 88 characters) -travo/assignment.py:511:89: E501 line too long (96 > 88 characters) -travo/assignment.py:512:89: E501 line too long (98 > 88 characters) -travo/assignment.py:523:89: E501 line too long (106 > 88 characters) -travo/assignment.py:557:89: E501 line too long (90 > 88 characters) -travo/assignment.py:684:26: E261 at least two spaces before inline comment -travo/assignment.py:684:27: E262 inline comment should start with '# ' -travo/assignment.py:747:89: E501 line too long (90 > 88 characters) -travo/assignment.py:761:89: E501 line too long (92 > 88 characters) -travo/course.py:9:1: F401 '.gitlab.GitLabTest' imported but unused -travo/course.py:34:89: E501 line too long (93 > 88 characters) -travo/course.py:45:59: W291 trailing whitespace -travo/course.py:87:89: E501 line too long (89 > 88 characters) -travo/course.py:118:5: E303 too many blank lines (2) -travo/course.py:196:89: E501 line too long (144 > 88 characters) -travo/course.py:361:89: E501 line too long (89 > 88 characters) -travo/course.py:365:16: E221 multiple spaces before operator -travo/course.py:396:89: E501 line too long (98 > 88 characters) -travo/course.py:471:89: E501 line too long (108 > 88 characters) -travo/course.py:472:89: E501 line too long (90 > 88 characters) -travo/course.py:492:89: E501 line too long (101 > 88 characters) -travo/course.py:497:89: E501 line too long (98 > 88 characters) -travo/course.py:524:89: E501 line too long (91 > 88 characters) -travo/course.py:528:23: E251 unexpected spaces around keyword / parameter equals -travo/course.py:528:25: E251 unexpected spaces around keyword / parameter equals -travo/course.py:529:27: E251 unexpected spaces around keyword / parameter equals -travo/course.py:529:29: E251 unexpected spaces around keyword / parameter equals -travo/course.py:530:35: E251 unexpected spaces around keyword / parameter equals -travo/course.py:530:37: E251 unexpected spaces around keyword / parameter equals -travo/course.py:531:39: E251 unexpected spaces around keyword / parameter equals -travo/course.py:531:41: E251 unexpected spaces around keyword / parameter equals -travo/course.py:532:25: E251 unexpected spaces around keyword / parameter equals -travo/course.py:532:27: E251 unexpected spaces around keyword / parameter equals -travo/course.py:533:29: E251 unexpected spaces around keyword / parameter equals -travo/course.py:533:31: E251 unexpected spaces around keyword / parameter equals -travo/course.py:534:24: E251 unexpected spaces around keyword / parameter equals -travo/course.py:534:26: E251 unexpected spaces around keyword / parameter equals -travo/course.py:553:89: E501 line too long (93 > 88 characters) -travo/course.py:623:17: E128 continuation line under-indented for visual indent -travo/course.py:624:17: E128 continuation line under-indented for visual indent -travo/course.py:647:89: E501 line too long (99 > 88 characters) -travo/dashboards.py:83:89: E501 line too long (90 > 88 characters) -travo/dashboards.py:84:89: E501 line too long (94 > 88 characters) -travo/dashboards.py:366:89: E501 line too long (181 > 88 characters) -travo/dashboards.py:372:89: E501 line too long (128 > 88 characters) -travo/dashboards.py:590:89: E501 line too long (113 > 88 characters) -travo/dashboards.py:615:89: E501 line too long (107 > 88 characters) -travo/dashboards.py:663:89: E501 line too long (94 > 88 characters) -travo/dashboards.py:722:89: E501 line too long (101 > 88 characters) -travo/dashboards.py:723:89: E501 line too long (98 > 88 characters) -travo/dashboards.py:725:89: E501 line too long (99 > 88 characters) -travo/dashboards.py:726:89: E501 line too long (124 > 88 characters) -travo/dashboards.py:736:89: E501 line too long (109 > 88 characters) -travo/dashboards.py:737:89: E501 line too long (95 > 88 characters) -travo/dashboards.py:742:13: F401 'ipylab.JupyterFrontEnd' imported but unused -travo/dashboards.py:746:89: E501 line too long (91 > 88 characters) -travo/dashboards.py:747:89: E501 line too long (89 > 88 characters) -travo/dashboards.py:753:89: E501 line too long (91 > 88 characters) -travo/dashboards.py:765:89: E501 line too long (107 > 88 characters) -travo/dashboards.py:769:89: E501 line too long (102 > 88 characters) -travo/dashboards.py:770:89: E501 line too long (115 > 88 characters) -travo/dashboards.py:773:9: E722 do not use bare 'except' -travo/dashboards.py:779:89: E501 line too long (109 > 88 characters) -travo/dashboards.py:796:89: E501 line too long (90 > 88 characters) -travo/dashboards.py:800:89: E501 line too long (107 > 88 characters) -travo/dashboards.py:810:89: E501 line too long (119 > 88 characters) -travo/dashboards.py:813:9: E722 do not use bare 'except' -travo/dashboards.py:827:89: E501 line too long (92 > 88 characters) -travo/dashboards.py:828:89: E501 line too long (127 > 88 characters) -travo/dashboards.py:848:89: E501 line too long (99 > 88 characters) -travo/dashboards.py:850:89: E501 line too long (97 > 88 characters) -travo/dashboards.py:853:89: E501 line too long (103 > 88 characters) -travo/dashboards.py:869:89: E501 line too long (95 > 88 characters) -travo/dashboards.py:906:89: E501 line too long (90 > 88 characters) -travo/dashboards.py:960:89: E501 line too long (109 > 88 characters) -travo/dashboards.py:963:36: E128 continuation line under-indented for visual indent -travo/dashboards.py:964:36: E128 continuation line under-indented for visual indent -travo/dashboards.py:965:36: E128 continuation line under-indented for visual indent -travo/dashboards.py:1020:89: E501 line too long (102 > 88 characters) -travo/dashboards.py:1022:89: E501 line too long (104 > 88 characters) -travo/dashboards.py:1025:89: E501 line too long (116 > 88 characters) -travo/dashboards.py:1075:89: E501 line too long (98 > 88 characters) -travo/dashboards.py:1080:89: E501 line too long (99 > 88 characters) -travo/dashboards.py:1099:89: E501 line too long (91 > 88 characters) -travo/dashboards.py:1100:89: E501 line too long (109 > 88 characters) -travo/dashboards.py:1101:89: E501 line too long (102 > 88 characters) -travo/dashboards.py:1111:89: E501 line too long (92 > 88 characters) -travo/dashboards.py:1112:89: E501 line too long (135 > 88 characters) -travo/dashboards.py:1114:89: E501 line too long (99 > 88 characters) -travo/dashboards.py:1121:40: F541 f-string is missing placeholders -travo/dashboards.py:1122:89: E501 line too long (94 > 88 characters) -travo/dashboards.py:1125:33: F841 local variable 'manual_score' is assigned to but never used -travo/dashboards.py:1126:89: E501 line too long (92 > 88 characters) -travo/dashboards.py:1127:89: E501 line too long (140 > 88 characters) -travo/dashboards.py:1128:89: E501 line too long (145 > 88 characters) -travo/dashboards.py:1130:89: E501 line too long (129 > 88 characters) -travo/dashboards.py:1132:89: E501 line too long (89 > 88 characters) -travo/dashboards.py:1136:89: E501 line too long (112 > 88 characters) -travo/dashboards.py:1138:89: E501 line too long (118 > 88 characters) -travo/dashboards.py:1142:89: E501 line too long (110 > 88 characters) -travo/dashboards.py:1146:89: E501 line too long (112 > 88 characters) -travo/gitlab.py:31:1: E302 expected 2 blank lines, found 1 -travo/gitlab.py:34:1: E302 expected 2 blank lines, found 1 -travo/gitlab.py:39:29: E128 continuation line under-indented for visual indent -travo/gitlab.py:40:29: E128 continuation line under-indented for visual indent -travo/gitlab.py:41:29: E124 closing bracket does not match visual indentation -travo/gitlab.py:71:32: E261 at least two spaces before inline comment -travo/gitlab.py:118:9: E722 do not use bare 'except' -travo/gitlab.py:214:89: E501 line too long (99 > 88 characters) -travo/gitlab.py:272:43: W291 trailing whitespace -travo/gitlab.py:404:89: E501 line too long (100 > 88 characters) -travo/gitlab.py:421:5: E303 too many blank lines (2) -travo/gitlab.py:440:89: E501 line too long (94 > 88 characters) -travo/gitlab.py:464:89: E501 line too long (93 > 88 characters) -travo/gitlab.py:494:5: E303 too many blank lines (2) -travo/gitlab.py:494:36: E225 missing whitespace around operator -travo/gitlab.py:551:89: E501 line too long (114 > 88 characters) -travo/gitlab.py:574:89: E501 line too long (104 > 88 characters) -travo/gitlab.py:611:89: E501 line too long (132 > 88 characters) -travo/gitlab.py:680:89: E501 line too long (113 > 88 characters) -travo/gitlab.py:685:54: E251 unexpected spaces around keyword / parameter equals -travo/gitlab.py:685:56: E251 unexpected spaces around keyword / parameter equals -travo/gitlab.py:685:89: E501 line too long (90 > 88 characters) -travo/gitlab.py:697:31: E225 missing whitespace around operator -travo/gitlab.py:719:41: E127 continuation line over-indented for visual indent -travo/gitlab.py:751:89: E501 line too long (104 > 88 characters) -travo/gitlab.py:781:89: E501 line too long (128 > 88 characters) -travo/gitlab.py:857:89: E501 line too long (102 > 88 characters) -travo/gitlab.py:864:89: E501 line too long (110 > 88 characters) -travo/gitlab.py:939:19: E221 multiple spaces before operator -travo/gitlab.py:940:15: E221 multiple spaces before operator -travo/gitlab.py:951:89: E501 line too long (90 > 88 characters) -travo/gitlab.py:955:60: W291 trailing whitespace -travo/gitlab.py:978:1: E302 expected 2 blank lines, found 0 -travo/gitlab.py:990:14: E221 multiple spaces before operator -travo/gitlab.py:991:17: E221 multiple spaces before operator -travo/gitlab.py:992:18: E221 multiple spaces before operator -travo/gitlab.py:994:14: E221 multiple spaces before operator -travo/gitlab.py:1042:23: E201 whitespace after '{' -travo/gitlab.py:1044:82: E202 whitespace before '}' -travo/gitlab.py:1074:26: E201 whitespace after '[' -travo/gitlab.py:1074:80: E202 whitespace before ']' -travo/gitlab.py:1117:1: E302 expected 2 blank lines, found 1 -travo/gitlab.py:1145:89: E501 line too long (89 > 88 characters) -travo/gitlab.py:1146:52: E202 whitespace before ']' -travo/gitlab.py:1147:52: E202 whitespace before ']' -travo/gitlab.py:1162:52: E202 whitespace before ']' -travo/gitlab.py:1170:52: E202 whitespace before ']' -travo/gitlab.py:1171:52: E202 whitespace before ']' -travo/gitlab.py:1172:52: E202 whitespace before ']' -travo/gitlab.py:1173:52: E202 whitespace before ']' -travo/gitlab.py:1174:52: E202 whitespace before ']' -travo/gitlab.py:1175:52: E202 whitespace before ']' -travo/gitlab.py:1176:52: E202 whitespace before ']' -travo/gitlab.py:1177:52: E202 whitespace before ']' -travo/gitlab.py:1178:52: E202 whitespace before ']' -travo/gitlab.py:1179:52: E202 whitespace before ']' -travo/gitlab.py:1181:52: E202 whitespace before ']' -travo/gitlab.py:1183:52: E202 whitespace before ']' -travo/gitlab.py:1185:52: E202 whitespace before ']' -travo/gitlab.py:1188:52: E202 whitespace before ']' -travo/gitlab.py:1190:52: E202 whitespace before ']' -travo/gitlab.py:1193:52: E202 whitespace before ']' -travo/gitlab.py:1194:52: E202 whitespace before ']' -travo/gitlab.py:1195:52: E202 whitespace before ']' -travo/gitlab.py:1196:52: E202 whitespace before ']' -travo/gitlab.py:1198:52: E202 whitespace before ']' -travo/gitlab.py:1202:52: E202 whitespace before ']' -travo/gitlab.py:1203:52: E202 whitespace before ']' -travo/gitlab.py:1206:52: E202 whitespace before ']' -travo/gitlab.py:1209:52: E202 whitespace before ']' -travo/gitlab.py:1212:52: E202 whitespace before ']' -travo/gitlab.py:1249:89: E501 line too long (103 > 88 characters) -travo/gitlab.py:1252:89: E501 line too long (97 > 88 characters) -travo/gitlab.py:1481:17: E201 whitespace after '[' -travo/gitlab.py:1481:59: E202 whitespace before ']' -travo/gitlab.py:1538:89: E501 line too long (89 > 88 characters) -travo/gitlab.py:1557:5: E303 too many blank lines (2) -travo/gitlab.py:1565:89: E501 line too long (96 > 88 characters) -travo/gitlab.py:1569:21: E128 continuation line under-indented for visual indent -travo/gitlab.py:1578:5: E303 too many blank lines (2) -travo/gitlab.py:1578:38: E231 missing whitespace after ':' -travo/gitlab.py:1578:43: E252 missing whitespace around parameter equals -travo/gitlab.py:1578:44: E252 missing whitespace around parameter equals -travo/gitlab.py:1578:58: E231 missing whitespace after ':' -travo/gitlab.py:1578:63: E252 missing whitespace around parameter equals -travo/gitlab.py:1578:64: E252 missing whitespace around parameter equals -travo/gitlab.py:1578:79: E231 missing whitespace after ':' -travo/gitlab.py:1578:84: E252 missing whitespace around parameter equals -travo/gitlab.py:1578:85: E252 missing whitespace around parameter equals -travo/gitlab.py:1578:89: E501 line too long (110 > 88 characters) -travo/gitlab.py:1580:89: E501 line too long (100 > 88 characters) -travo/gitlab.py:1582:89: E501 line too long (100 > 88 characters) -travo/gitlab.py:1588:89: E501 line too long (144 > 88 characters) -travo/gitlab.py:1592:89: E501 line too long (89 > 88 characters) -travo/gitlab.py:1611:35: F541 f-string is missing placeholders -travo/gitlab.py:1617:29: E261 at least two spaces before inline comment -travo/gitlab.py:1635:5: E303 too many blank lines (2) -travo/gitlab.py:1644:5: E303 too many blank lines (2) -travo/gitlab.py:1670:89: E501 line too long (155 > 88 characters) -travo/gitlab.py:1677:89: E501 line too long (108 > 88 characters) -travo/gitlab.py:1679:89: E501 line too long (93 > 88 characters) -travo/gitlab.py:1799:37: E262 inline comment should start with '# ' -travo/gitlab.py:1878:89: E501 line too long (123 > 88 characters) -travo/gitlab.py:1890:89: E501 line too long (125 > 88 characters) -travo/gitlab.py:1909:89: E501 line too long (96 > 88 characters) -travo/gitlab.py:1911:89: E501 line too long (113 > 88 characters) -travo/gitlab.py:1914:89: E501 line too long (94 > 88 characters) -travo/gitlab.py:1925:25: E261 at least two spaces before inline comment -travo/gitlab.py:1927:25: E261 at least two spaces before inline comment -travo/gitlab.py:1932:89: E501 line too long (106 > 88 characters) -travo/gitlab.py:1936:89: E501 line too long (97 > 88 characters) -travo/gitlab.py:1940:19: E111 indentation is not a multiple of 4 -travo/gitlab.py:1943:89: E501 line too long (89 > 88 characters) -travo/gitlab.py:1988:5: E301 expected 1 blank line, found 0 -travo/gitlab.py:2018:5: E303 too many blank lines (2) -travo/gitlab.py:2018:89: E501 line too long (94 > 88 characters) -travo/gitlab.py:2034:17: E128 continuation line under-indented for visual indent -travo/gitlab.py:2034:89: E501 line too long (96 > 88 characters) -travo/gitlab.py:2071:45: W291 trailing whitespace -travo/gitlab.py:2074:56: W291 trailing whitespace -travo/gitlab.py:2086:24: W291 trailing whitespace -travo/gitlab.py:2094:25: W291 trailing whitespace -travo/gitlab.py:2098:46: W291 trailing whitespace -travo/gitlab.py:2101:57: W291 trailing whitespace -travo/gitlab.py:2109:25: W291 trailing whitespace -travo/gitlab.py:2121:24: W291 trailing whitespace -travo/gitlab.py:2129:25: W291 trailing whitespace -travo/gitlab.py:2139:35: E128 continuation line under-indented for visual indent -travo/gitlab.py:2151:38: E252 missing whitespace around parameter equals -travo/gitlab.py:2151:39: E252 missing whitespace around parameter equals -travo/gitlab.py:2181:89: E501 line too long (99 > 88 characters) -travo/gitlab.py:2238:89: E501 line too long (104 > 88 characters) -travo/gitlab.py:2242:1: E302 expected 2 blank lines, found 1 -travo/gitlab.py:2265:89: E501 line too long (97 > 88 characters) -travo/gitlab.py:2276:89: E501 line too long (89 > 88 characters) -travo/gitlab.py:2277:89: E501 line too long (94 > 88 characters) -travo/gitlab.py:2278:89: E501 line too long (94 > 88 characters) -travo/gitlab.py:2280:52: E202 whitespace before ']' -travo/gitlab.py:2281:52: E202 whitespace before ']' -travo/gitlab.py:2282:52: E202 whitespace before ']' -travo/gitlab.py:2283:52: E202 whitespace before ']' -travo/gitlab.py:2284:52: E202 whitespace before ']' -travo/gitlab.py:2285:52: E202 whitespace before ']' -travo/gitlab.py:2291:52: E202 whitespace before ']' -travo/gitlab.py:2380:89: E501 line too long (94 > 88 characters) -travo/gitlab.py:2427:89: E501 line too long (111 > 88 characters) -travo/gitlab.py:2430:89: E501 line too long (96 > 88 characters) -travo/gitlab.py:2433:89: E501 line too long (103 > 88 characters) -travo/gitlab.py:2438:89: E501 line too long (128 > 88 characters) -travo/gitlab.py:2440:1: W293 blank line contains whitespace -travo/gitlab.py:2485:51: E202 whitespace before ']' -travo/gitlab.py:2486:51: E202 whitespace before ']' -travo/gitlab.py:2487:51: E202 whitespace before ']' -travo/gitlab.py:2489:51: E202 whitespace before ']' -travo/gitlab.py:2506:1: E302 expected 2 blank lines, found 1 -travo/gitlab.py:2510:1: E305 expected 2 blank lines after class or function definition, found 1 -travo/gitlab.py:2515:5: E301 expected 1 blank line, found 0 -travo/gitlab.py:2518:1: E305 expected 2 blank lines after class or function definition, found 1 -travo/gitlab.py:2520:1: E302 expected 2 blank lines, found 1 -travo/gitlab.py:2536:30: E231 missing whitespace after ':' -travo/homework.py:1:1: F401 'dataclasses.field' imported but unused -travo/homework.py:2:1: F401 'os' imported but unused -travo/homework.py:7:1: E302 expected 2 blank lines, found 1 -travo/homework.py:19:21: E261 at least two spaces before inline comment -travo/homework.py:20:24: E261 at least two spaces before inline comment -travo/homework.py:21:19: E261 at least two spaces before inline comment -travo/homework.py:23:34: E261 at least two spaces before inline comment -travo/homework.py:24:26: E261 at least two spaces before inline comment -travo/homework.py:26:38: E261 at least two spaces before inline comment -travo/homework.py:27:31: E261 at least two spaces before inline comment -travo/homework.py:30:5: E303 too many blank lines (2) -travo/homework.py:48:13: E722 do not use bare 'except' -travo/homework.py:50:40: F541 f-string is missing placeholders -travo/homework.py:50:89: E501 line too long (145 > 88 characters) -travo/homework.py:52:89: E501 line too long (129 > 88 characters) -travo/homework.py:91:89: E501 line too long (104 > 88 characters) -travo/homework.py:102:5: E303 too many blank lines (2) -travo/homework.py:102:54: E231 missing whitespace after ':' -travo/homework.py:102:59: E252 missing whitespace around parameter equals -travo/homework.py:102:60: E252 missing whitespace around parameter equals -travo/homework.py:122:23: F541 f-string is missing placeholders -travo/homework.py:128:89: E501 line too long (91 > 88 characters) -travo/homework.py:161:23: F541 f-string is missing placeholders -travo/homework.py:172:89: E501 line too long (101 > 88 characters) -travo/homework.py:179:21: E265 block comment should start with '# ' -travo/homework.py:180:21: E265 block comment should start with '# ' -travo/homework.py:184:19: F541 f-string is missing placeholders -travo/homework.py:189:5: E303 too many blank lines (2) -travo/homework.py:189:51: E231 missing whitespace after ':' -travo/homework.py:189:56: E252 missing whitespace around parameter equals -travo/homework.py:189:57: E252 missing whitespace around parameter equals -travo/homework.py:204:19: F541 f-string is missing placeholders -travo/homework.py:216:23: F541 f-string is missing placeholders -travo/homework.py:221:89: E501 line too long (95 > 88 characters) -travo/homework.py:237:89: E501 line too long (93 > 88 characters) -travo/jupyter_course.py:11:1: F401 'logging' imported but unused -travo/jupyter_course.py:13:1: F401 'requests' imported but unused -travo/jupyter_course.py:14:1: F401 'typing.Callable' imported but unused -travo/jupyter_course.py:14:1: F401 'typing.Tuple' imported but unused -travo/jupyter_course.py:14:1: F401 'typing.cast' imported but unused -travo/jupyter_course.py:16:1: F401 'nbgrader.api.Gradebook' imported but unused -travo/jupyter_course.py:16:1: F401 'nbgrader.api.MissingEntry' imported but unused -travo/jupyter_course.py:18:1: F401 '.assignment.Assignment' imported but unused -travo/jupyter_course.py:22:1: F401 '.gitlab.GitLab' imported but unused -travo/jupyter_course.py:22:1: F401 '.gitlab.AuthenticationError' imported but unused -travo/jupyter_course.py:23:1: F401 '.gitlab.ResourceNotFoundError' imported but unused -travo/jupyter_course.py:26:1: E302 expected 2 blank lines, found 1 -travo/jupyter_course.py:33:40: W291 trailing whitespace -travo/jupyter_course.py:34:89: E501 line too long (122 > 88 characters) -travo/jupyter_course.py:35:89: E501 line too long (119 > 88 characters) -travo/jupyter_course.py:36:89: E501 line too long (134 > 88 characters) -travo/jupyter_course.py:37:89: E501 line too long (113 > 88 characters) -travo/jupyter_course.py:207:89: E501 line too long (92 > 88 characters) -travo/jupyter_course.py:211:9: F401 'jupytext' imported but unused -travo/jupyter_course.py:224:89: E501 line too long (105 > 88 characters) -travo/jupyter_course.py:225:89: E501 line too long (89 > 88 characters) -travo/jupyter_course.py:244:89: E501 line too long (107 > 88 characters) -travo/jupyter_course.py:251:89: E501 line too long (109 > 88 characters) -travo/jupyter_course.py:263:89: E501 line too long (92 > 88 characters) -travo/jupyter_course.py:268:89: E501 line too long (93 > 88 characters) -travo/jupyter_course.py:281:89: E501 line too long (100 > 88 characters) -travo/jupyter_course.py:290:89: E501 line too long (92 > 88 characters) -travo/jupyter_course.py:293:89: E501 line too long (111 > 88 characters) -travo/jupyter_course.py:300:89: E501 line too long (114 > 88 characters) -travo/jupyter_course.py:304:89: E501 line too long (115 > 88 characters) -travo/jupyter_course.py:309:89: E501 line too long (106 > 88 characters) -travo/jupyter_course.py:332:89: E501 line too long (92 > 88 characters) -travo/jupyter_course.py:336:89: E501 line too long (95 > 88 characters) -travo/jupyter_course.py:337:89: E501 line too long (96 > 88 characters) -travo/jupyter_course.py:357:89: E501 line too long (101 > 88 characters) -travo/jupyter_course.py:364:89: E501 line too long (89 > 88 characters) -travo/jupyter_course.py:409:89: E501 line too long (104 > 88 characters) -travo/jupyter_course.py:441:89: E501 line too long (96 > 88 characters) -travo/jupyter_course.py:458:89: E501 line too long (98 > 88 characters) -travo/jupyter_course.py:462:89: E501 line too long (96 > 88 characters) -travo/jupyter_course.py:485:89: E501 line too long (92 > 88 characters) -travo/jupyter_course.py:492:89: E501 line too long (90 > 88 characters) -travo/jupyter_course.py:494:89: E501 line too long (100 > 88 characters) -travo/jupyter_course.py:495:89: E501 line too long (96 > 88 characters) -travo/jupyter_course.py:546:89: E501 line too long (106 > 88 characters) -travo/jupyter_course.py:622:89: E501 line too long (102 > 88 characters) -travo/jupyter_course.py:630:89: E501 line too long (89 > 88 characters) -travo/jupyter_course.py:635:9: F811 redefinition of unused 'Gradebook' from line 16 -travo/jupyter_course.py:635:9: F811 redefinition of unused 'MissingEntry' from line 16 -travo/jupyter_course.py:636:89: E501 line too long (90 > 88 characters) -travo/jupyter_course.py:644:89: E501 line too long (91 > 88 characters) -travo/jupyter_course.py:673:9: F811 redefinition of unused 'Gradebook' from line 16 -travo/jupyter_course.py:690:89: E501 line too long (109 > 88 characters) -travo/jupyter_course.py:732:47: E128 continuation line under-indented for visual indent -travo/jupyter_course.py:733:40: E261 at least two spaces before inline comment -travo/jupyter_course.py:733:89: E501 line too long (90 > 88 characters) -travo/jupyter_course.py:739:32: E261 at least two spaces before inline comment -travo/jupyter_course.py:739:33: E262 inline comment should start with '# ' -travo/nbgrader_utils.py:53:89: E501 line too long (90 > 88 characters) -travo/nbgrader_utils.py:72:89: E501 line too long (96 > 88 characters) -travo/nbgrader_utils.py:78:89: E501 line too long (102 > 88 characters) -travo/nbgrader_utils.py:85:89: E501 line too long (100 > 88 characters) -travo/nbgrader_utils.py:88:46: E225 missing whitespace around operator -travo/nbgrader_utils.py:88:80: E225 missing whitespace around operator -travo/nbgrader_utils.py:88:89: E501 line too long (138 > 88 characters) -travo/nbgrader_utils.py:89:52: E225 missing whitespace around operator -travo/nbgrader_utils.py:90:53: E225 missing whitespace around operator -travo/nbgrader_utils.py:90:89: E501 line too long (208 > 88 characters) -travo/nbgrader_utils.py:94:89: E501 line too long (98 > 88 characters) -travo/nbgrader_utils.py:102:89: E501 line too long (106 > 88 characters) -travo/nbgrader_utils.py:109:89: E501 line too long (102 > 88 characters) -travo/nbgrader_utils.py:115:1: E302 expected 2 blank lines, found 1 -travo/nbgrader_utils.py:121:89: E501 line too long (99 > 88 characters) -travo/nbgrader_utils.py:128:89: E501 line too long (118 > 88 characters) -travo/nbgrader_utils.py:131:89: E501 line too long (98 > 88 characters) -travo/nbgrader_utils.py:136:89: E501 line too long (100 > 88 characters) -travo/nbgrader_utils.py:150:9: E722 do not use bare 'except' -travo/nbgrader_utils.py:164:89: E501 line too long (95 > 88 characters) -travo/nbgrader_utils.py:185:1: E302 expected 2 blank lines, found 1 -travo/nbgrader_utils.py:388:89: E501 line too long (105 > 88 characters) -travo/nbgrader_utils.py:389:89: E501 line too long (96 > 88 characters) -travo/nbgrader_utils.py:390:89: E501 line too long (99 > 88 characters) -travo/script.py:325:89: E501 line too long (114 > 88 characters) -travo/travo.py:3:1: F401 '.gitlab.GitLab' imported but unused -travo/utils.py:1:1: F401 'os' imported but unused -travo/utils.py:7:16: E261 at least two spaces before inline comment -travo/utils.py:10:1: E302 expected 2 blank lines, found 0 -travo/utils.py:20:1: E302 expected 2 blank lines, found 1 -travo/utils.py:29:38: E231 missing whitespace after ':' -travo/utils.py:31:1: E302 expected 2 blank lines, found 1 -travo/utils.py:47:1: E302 expected 2 blank lines, found 1 -travo/utils.py:53:89: E501 line too long (112 > 88 characters) -travo/utils.py:60:89: E501 line too long (99 > 88 characters) -- GitLab From f1651fc20ff2426f423fc953ede7b73ec965e76a Mon Sep 17 00:00:00 2001 From: Tchaps Dev Date: Sun, 25 Jun 2023 08:06:50 -0400 Subject: [PATCH 08/17] OPTIONAL URL --- .gitignore | 4 +++- travo/gitlab.py | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 6ba59f75..cde465b0 100644 --- a/.gitignore +++ b/.gitignore @@ -14,4 +14,6 @@ SonarQube-reports/ coverage-reports/ .scannerwork/ .pytest_cache/ -flake8-reports/ \ No newline at end of file +flake8-reports/ +understand/ +travo.und/ \ No newline at end of file diff --git a/travo/gitlab.py b/travo/gitlab.py index 4b201d30..f9923011 100644 --- a/travo/gitlab.py +++ b/travo/gitlab.py @@ -941,7 +941,7 @@ class ResourceRef: # see e.g. https://groups.google.com/forum/#!topic/dev-python/7vBAZn_jEfQ forge: 'Forge' = field(default=cast('Forge', None)) path: str = field(default=cast('str', None)) - url: InitVar[Optional[str]] + url: InitVar[Optional[str]] = None def __post_init__(self, url: Optional[str] = None) -> None: if (self.forge is None) == (url is None): -- GitLab From 95475d201d7a38a182ae69f5505bee90facb87b2 Mon Sep 17 00:00:00 2001 From: Tchaps Dev Date: Mon, 26 Jun 2023 07:22:19 -0400 Subject: [PATCH 09/17] const --- travo/dashboards.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/travo/dashboards.py b/travo/dashboards.py index 976693bc..e6041af7 100644 --- a/travo/dashboards.py +++ b/travo/dashboards.py @@ -1027,7 +1027,7 @@ class CourseGradeDashboard(VBox): layout=border_layout) if self.course.student_groups is not None: self.student_group_UI = Dropdown( - description=_(ASSIGNMENT_STATUS_NOT_RELEASE), + description=_('student group'), value=None, options=["all"] + list(self.course.student_groups), ) -- GitLab From 88830aa8720214579ef8382db37ad0a08c7f1a70 Mon Sep 17 00:00:00 2001 From: Audrey Chapda Date: Sun, 2 Jul 2023 15:57:02 +0000 Subject: [PATCH 10/17] sonar cube integration --- .gitignore | 3 +++ .gitlab-ci.yml | 24 ++++++++++++++++++++++-- sonar-project.properties | 25 +++++++++++++++++++++++++ sonar.sh | 29 +++++++++++++++++++++++++++++ 4 files changed, 79 insertions(+), 2 deletions(-) create mode 100644 sonar-project.properties create mode 100644 sonar.sh diff --git a/.gitignore b/.gitignore index cc31b2ab..4312e2e6 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,6 @@ __pycache__ .travo travo.egg-info report.xml + +.vs/ +flake8-reports/ \ No newline at end of file diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 57a9f6ac..d0fecd2d 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,5 +1,6 @@ stages: - test + - sonarqube before_script: # - apt-get update @@ -7,8 +8,8 @@ before_script: # - wget https://download.docker.com/linux/debian/dists/jessie/pool/stable/amd64/docker-ce_18.06.3~ce~3-0~debian_amd64.deb # - dpkg -i docker-ce_18.06.3~ce~3-0~debian_amd64.deb - - pip install tox - - pip install . + - pip3 install tox --ignore-installed + - pip3 install . tests_python39: image: python:3.9 @@ -49,3 +50,22 @@ tests_python36: # Also parallel runs currently tend to fail due to reaching the # rate limit of the test gitlab instance. needs: [tests_python39] + +sonarqube-check: + stage: sonarqube + image: + name: sonarsource/sonar-scanner-cli:latest + entrypoint: [""] + variables: + SONAR_USER_HOME: "${CI_PROJECT_DIR}/.sonar" # Defines the location of the analysis task cache + GIT_DEPTH: "0" # Tells git to fetch all the branches of the project, required by the analysis task + cache: + key: "${CI_JOB_NAME}" + paths: + - .sonar/cache + script: + - chmod 755 sonar.sh + - ./sonar.sh + allow_failure: true + rules: + - if: $CI_COMMIT_REF_NAME == 'master' || $CI_PIPELINE_SOURCE == 'merge_request_event' diff --git a/sonar-project.properties b/sonar-project.properties new file mode 100644 index 00000000..a35ceb55 --- /dev/null +++ b/sonar-project.properties @@ -0,0 +1,25 @@ +sonar.projectKey=tchapsdev_travo-classroom_AYkXEFkvwSgLzWhExlmG + +sonar.qualitygate.wait=true +sonar.qualitygate.timeout=900 + +sonar.organization=UQAM + +# This is the name and version displayed in the SonarCloud UI. + sonar.projectName=Travo Classroom +# sonar.projectVersion=1.0 + +# Path is relative to the sonar-project.properties file. Replace "\" by "/" on Windows. + sonar.sources=. + +# Encoding of the source code. Default is default system encoding +# sonar.sourceEncoding=UTF-8 + +sonar.host.url=http://72.167.48.165:9000 + +sonar.login=admin +sonar.password=hX8^]*[yAq + +sonar.token=sqp_e4cbd578d908625af088d9fe4318c477f3e01c5b + +sonar.gitlab.max_major_issues_gate=0 diff --git a/sonar.sh b/sonar.sh new file mode 100644 index 00000000..fd640d08 --- /dev/null +++ b/sonar.sh @@ -0,0 +1,29 @@ +#!/bin/bash + + sonar-scanner -X -Dsonar.projectKey=tchapsdev_travo-classroom_AYkXEFkvwSgLzWhExlmG:Timesheet -Dsonar.analysis.mode=publish -Dsonar.scanner.metadataFilePath='analysis.txt' + + export status=$(cat analysis.txt | jq -r '.task.status') #Status as SUCCESS, CANCELED or FAILED + + export analysisId=$(cat analysis.txt | jq -r '.task.analysisId') #Get the analysis Id + + curl -k -u "$Sonarqube_Project_Key":"" http://72.167.48.165:9000/api/qualitygates/project_status?analysisId=$analysisId -o result.txt; #Analysis result like critical, major and minor issues + + export result=$(cat result.txt | jq -r '.projectStatus.status'); + + if [ "$result" == "ERROR" ];then + + echo -e "91mSONAR RESULTS FAILED"; + + echo "$(cat result.txt | jq -r '.projectStatus.conditions')"; #prints the critical, major and minor violations + + exit 1 #breaks the build for violations + + else + + echo -e "SONAR RESULTS SUCCESSFUL"; + + echo "$(cat result.txt | jq -r '.projectStatus.conditions')"; + + exit 0 + + fi -- GitLab From 4cb09a75bcaa51a83b6cd79c7e289ae554ad5d23 Mon Sep 17 00:00:00 2001 From: Audrey Chapda Date: Tue, 4 Jul 2023 20:19:00 +0000 Subject: [PATCH 11/17] Sonnar cube integration coverage --- .gitlab-ci.yml | 35 +++++++++++++++++++++++++++++------ conftest.py | 1 + setup.py | 2 +- sonar-project.properties | 21 +++++++++++++++++++++ tox.ini | 10 +++++++++- 5 files changed, 61 insertions(+), 8 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d0fecd2d..28420d76 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,5 +1,6 @@ stages: - test + - linting - sonarqube before_script: @@ -16,11 +17,18 @@ tests_python39: stage: test script: - tox -e py39 + variables: + CI_DEBUG_TRACE: "false" artifacts: when: always + paths: + - "${CI_PROJECT_DIR}" reports: junit: - report.xml + coverage_report: + coverage_format: cobertura + path: coverage.xml # tests_python38: # image: python:3.8 @@ -39,6 +47,8 @@ tests_python36: stage: test script: - tox -e py36 + variables: + CI_DEBUG_TRACE: "false" artifacts: when: always reports: @@ -51,7 +61,20 @@ tests_python36: # rate limit of the test gitlab instance. needs: [tests_python39] -sonarqube-check: + +pylint: + stage: linting + image: registry.gitlab.com/pipeline-components/pylint:latest + script: + - pylint --exit-zero --load-plugins=pylint_gitlab --output-format=gitlab-codeclimate:codeclimate.json **/*.py + artifacts: + paths: + - "${CI_PROJECT_DIR}" + reports: + codequality: codeclimate.json + when: always + +sonarqube_check: stage: sonarqube image: name: sonarsource/sonar-scanner-cli:latest @@ -59,13 +82,13 @@ sonarqube-check: variables: SONAR_USER_HOME: "${CI_PROJECT_DIR}/.sonar" # Defines the location of the analysis task cache GIT_DEPTH: "0" # Tells git to fetch all the branches of the project, required by the analysis task + CI_DEBUG_TRACE: "false" cache: key: "${CI_JOB_NAME}" paths: - .sonar/cache script: - - chmod 755 sonar.sh - - ./sonar.sh - allow_failure: true - rules: - - if: $CI_COMMIT_REF_NAME == 'master' || $CI_PIPELINE_SOURCE == 'merge_request_event' + - sonar-scanner + # - chmod 755 sonar.sh + # - ./sonar.sh + when: on_success diff --git a/conftest.py b/conftest.py index 3fbd365b..28d368af 100644 --- a/conftest.py +++ b/conftest.py @@ -197,3 +197,4 @@ def assignment_personal_repo( @pytest.fixture def student_work_dir(course: Course) -> str: return course.ensure_work_dir() + diff --git a/setup.py b/setup.py index 8eae2d1b..daa80827 100644 --- a/setup.py +++ b/setup.py @@ -33,4 +33,4 @@ setup( "travo-echo-travo-token = travo.console_scripts:travo_echo_travo_token", ], }, -) +) \ No newline at end of file diff --git a/sonar-project.properties b/sonar-project.properties index a35ceb55..2405295b 100644 --- a/sonar-project.properties +++ b/sonar-project.properties @@ -12,6 +12,8 @@ sonar.organization=UQAM # Path is relative to the sonar-project.properties file. Replace "\" by "/" on Windows. sonar.sources=. +#sonar.tests=/conftest.py + # Encoding of the source code. Default is default system encoding # sonar.sourceEncoding=UTF-8 @@ -23,3 +25,22 @@ sonar.password=hX8^]*[yAq sonar.token=sqp_e4cbd578d908625af088d9fe4318c477f3e01c5b sonar.gitlab.max_major_issues_gate=0 + +# Source File Exclusions +sonar.exclusions=/build/**/* #, build/**/*, build/lib/travo/* + +#sonar.projectBaseDir=/home/ftpdrop/cobol/project1 + +sonar.python.version=3.6,3.7, 3.8, 3.9 + +# Path to coverage report(s) +#List of paths pointing to coverage reports. Ant patterns are accepted for relative path. The reports have to conform to the Cobertura XML format. +#Key: sonar.python.coverage.reportPaths +sonar.python.coverage.reportPaths=coverage.xml, **/*coverage*.xml + +#Flake8 Report Files +#Paths (absolute or relative) to report files with Flake8 issues. +#sonar.python.flake8.reportPaths=flake8-report.txt, **/*flake8-report.txt + +# Paths (absolute or relative) to report files with Pylint issues. +sonar.python.pylint.reportPaths=codeclimate.json, **/*codeclimate.json \ No newline at end of file diff --git a/tox.ini b/tox.ini index 7f825d98..dfebfee8 100644 --- a/tox.ini +++ b/tox.ini @@ -14,11 +14,19 @@ deps = types-toml tqdm ipydatagrid + coverage + pytest-cov + flake8 commands = mypy - pytest --junitxml=report.xml + pytest --junitxml=report.xml --cov --cov-report term --cov-report xml:coverage.xml + coverage xml -o coverage.xml [testenv:py36] commands = pytest --junitxml=report.xml + +[coverage:run] +relative_files = True +branch = True \ No newline at end of file -- GitLab From f2984bc7ff81cd04583f0db0550b78307b6a8a54 Mon Sep 17 00:00:00 2001 From: Tchaps Dev Date: Tue, 4 Jul 2023 16:35:31 -0400 Subject: [PATCH 12/17] clean up --- sonar-project.properties | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/sonar-project.properties b/sonar-project.properties index ad16c7d4..ceffa518 100644 --- a/sonar-project.properties +++ b/sonar-project.properties @@ -44,7 +44,5 @@ sonar.python.coverage.reportPaths=coverage.xml, **/*coverage*.xml # Paths (absolute or relative) to report files with Pylint issues. sonar.python.pylint.reportPaths=codeclimate.json, **/*codeclimate.json -sonar.python.file.suffixes=py -sonar.python.coverage.reportPaths=coverage-reports/*coverage*.xml -sonar.python.xunit.reportPath=xunit-reports/xunit-result-*.xml +# sonar.python.file.suffixes=py sonar.exclusions=understand/*,coverage-reports/*,travo.und/*,flake8*.*,SonarQube-reports/* \ No newline at end of file -- GitLab From 182f9413e61b031bdf94ef3bd987f0cde107d68f Mon Sep 17 00:00:00 2001 From: Tchaps Dev Date: Tue, 4 Jul 2023 16:37:00 -0400 Subject: [PATCH 13/17] clean CI --- sonar-project.properties | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sonar-project.properties b/sonar-project.properties index ceffa518..0a9dcb58 100644 --- a/sonar-project.properties +++ b/sonar-project.properties @@ -27,7 +27,7 @@ sonar.token=sqp_e4cbd578d908625af088d9fe4318c477f3e01c5b sonar.gitlab.max_major_issues_gate=0 # Source File Exclusions -sonar.exclusions=/build/**/* #, build/**/*, build/lib/travo/* +sonar.exclusions=/build/**/* #sonar.projectBaseDir=/home/ftpdrop/cobol/project1 @@ -36,13 +36,13 @@ sonar.python.version=3.6,3.7, 3.8, 3.9 # Path to coverage report(s) #List of paths pointing to coverage reports. Ant patterns are accepted for relative path. The reports have to conform to the Cobertura XML format. #Key: sonar.python.coverage.reportPaths -sonar.python.coverage.reportPaths=coverage.xml, **/*coverage*.xml +sonar.python.coverage.reportPaths=coverage.xml #Flake8 Report Files #Paths (absolute or relative) to report files with Flake8 issues. #sonar.python.flake8.reportPaths=flake8-report.txt, **/*flake8-report.txt # Paths (absolute or relative) to report files with Pylint issues. -sonar.python.pylint.reportPaths=codeclimate.json, **/*codeclimate.json +sonar.python.pylint.reportPaths=codeclimate.json # sonar.python.file.suffixes=py sonar.exclusions=understand/*,coverage-reports/*,travo.und/*,flake8*.*,SonarQube-reports/* \ No newline at end of file -- GitLab From 26ef63a3f567ed4057de1078e87d64e8fb732f45 Mon Sep 17 00:00:00 2001 From: Tchaps Dev Date: Tue, 4 Jul 2023 17:27:11 -0400 Subject: [PATCH 14/17] sonar.exclusions duplication fixed --- sonar-project.properties | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/sonar-project.properties b/sonar-project.properties index 0a9dcb58..a9c95a81 100644 --- a/sonar-project.properties +++ b/sonar-project.properties @@ -27,9 +27,7 @@ sonar.token=sqp_e4cbd578d908625af088d9fe4318c477f3e01c5b sonar.gitlab.max_major_issues_gate=0 # Source File Exclusions -sonar.exclusions=/build/**/* - -#sonar.projectBaseDir=/home/ftpdrop/cobol/project1 +sonar.exclusions=/build/**/*,understand/*,coverage-reports/*,travo.und/*,flake8*.*,SonarQube-reports/* sonar.python.version=3.6,3.7, 3.8, 3.9 @@ -38,11 +36,6 @@ sonar.python.version=3.6,3.7, 3.8, 3.9 #Key: sonar.python.coverage.reportPaths sonar.python.coverage.reportPaths=coverage.xml -#Flake8 Report Files -#Paths (absolute or relative) to report files with Flake8 issues. -#sonar.python.flake8.reportPaths=flake8-report.txt, **/*flake8-report.txt - # Paths (absolute or relative) to report files with Pylint issues. sonar.python.pylint.reportPaths=codeclimate.json -# sonar.python.file.suffixes=py -sonar.exclusions=understand/*,coverage-reports/*,travo.und/*,flake8*.*,SonarQube-reports/* \ No newline at end of file +# sonar.python.file.suffixes=py \ No newline at end of file -- GitLab From bf145434a3cf9c9d01d9100e540d2b04a25a7b86 Mon Sep 17 00:00:00 2001 From: Tchaps Dev Date: Tue, 4 Jul 2023 18:37:02 -0400 Subject: [PATCH 15/17] gitignore --- .gitignore | 3 - .scannerwork/.sonar_lock | 0 .scannerwork/report-task.txt | 6 - coverage-reports/coverage.xml | 3252 --------------------------------- 4 files changed, 3261 deletions(-) delete mode 100644 .scannerwork/.sonar_lock delete mode 100644 .scannerwork/report-task.txt delete mode 100644 coverage-reports/coverage.xml diff --git a/.gitignore b/.gitignore index 6f7af5d7..b1709598 100644 --- a/.gitignore +++ b/.gitignore @@ -9,12 +9,9 @@ __pycache__ .travo travo.egg-info report.xml - .vs/ flake8-reports/ - SonarQube-reports/ -coverage-reports/ .scannerwork/ .pytest_cache/ flake8-reports/ diff --git a/.scannerwork/.sonar_lock b/.scannerwork/.sonar_lock deleted file mode 100644 index e69de29b..00000000 diff --git a/.scannerwork/report-task.txt b/.scannerwork/report-task.txt deleted file mode 100644 index 882862fb..00000000 --- a/.scannerwork/report-task.txt +++ /dev/null @@ -1,6 +0,0 @@ -projectKey=Travo -serverUrl=http://localhost:9000 -serverVersion=10.0.0.68432 -dashboardUrl=http://localhost:9000/dashboard?id=Travo -ceTaskId=AYiGpRgUjFrrcy7i8Pk_ -ceTaskUrl=http://localhost:9000/api/ce/task?id=AYiGpRgUjFrrcy7i8Pk_ diff --git a/coverage-reports/coverage.xml b/coverage-reports/coverage.xml deleted file mode 100644 index e7f6a5e4..00000000 --- a/coverage-reports/coverage.xml +++ /dev/null @@ -1,3252 +0,0 @@ - - - - - - D:\ws\Travo\travo - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -- GitLab From a87a6c367bf54f7558e59389198080cb4d5b1d24 Mon Sep 17 00:00:00 2001 From: Tchaps Dev Date: Tue, 4 Jul 2023 18:56:45 -0400 Subject: [PATCH 16/17] gitignore coverage file --- .gitignore | 5 +- coverage.xml | 3252 ------------------------------ sonar.sh | 29 - travo.und/id.txt | 1 - travo.und/settings.xml | 62 - understand/travo-metrics-oop.csv | 358 ---- understand/travo-metrics.csv | 358 ---- 7 files changed, 3 insertions(+), 4062 deletions(-) delete mode 100644 coverage.xml delete mode 100644 sonar.sh delete mode 100644 travo.und/id.txt delete mode 100644 travo.und/settings.xml delete mode 100644 understand/travo-metrics-oop.csv delete mode 100644 understand/travo-metrics.csv diff --git a/.gitignore b/.gitignore index b1709598..5af49d68 100644 --- a/.gitignore +++ b/.gitignore @@ -15,5 +15,6 @@ SonarQube-reports/ .scannerwork/ .pytest_cache/ flake8-reports/ -understand/ -travo.und/ \ No newline at end of file +.understand/ +.travo.und/ +.coverage.xml \ No newline at end of file diff --git a/coverage.xml b/coverage.xml deleted file mode 100644 index 2225d67b..00000000 --- a/coverage.xml +++ /dev/null @@ -1,3252 +0,0 @@ - - - - - - D:\ws\Travo\travo - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/sonar.sh b/sonar.sh deleted file mode 100644 index fd640d08..00000000 --- a/sonar.sh +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/bash - - sonar-scanner -X -Dsonar.projectKey=tchapsdev_travo-classroom_AYkXEFkvwSgLzWhExlmG:Timesheet -Dsonar.analysis.mode=publish -Dsonar.scanner.metadataFilePath='analysis.txt' - - export status=$(cat analysis.txt | jq -r '.task.status') #Status as SUCCESS, CANCELED or FAILED - - export analysisId=$(cat analysis.txt | jq -r '.task.analysisId') #Get the analysis Id - - curl -k -u "$Sonarqube_Project_Key":"" http://72.167.48.165:9000/api/qualitygates/project_status?analysisId=$analysisId -o result.txt; #Analysis result like critical, major and minor issues - - export result=$(cat result.txt | jq -r '.projectStatus.status'); - - if [ "$result" == "ERROR" ];then - - echo -e "91mSONAR RESULTS FAILED"; - - echo "$(cat result.txt | jq -r '.projectStatus.conditions')"; #prints the critical, major and minor violations - - exit 1 #breaks the build for violations - - else - - echo -e "SONAR RESULTS SUCCESSFUL"; - - echo "$(cat result.txt | jq -r '.projectStatus.conditions')"; - - exit 0 - - fi diff --git a/travo.und/id.txt b/travo.und/id.txt deleted file mode 100644 index 5a957170..00000000 --- a/travo.und/id.txt +++ /dev/null @@ -1 +0,0 @@ -{2dfcb915-d541-4cf7-9cd2-edaf97aaafda} \ No newline at end of file diff --git a/travo.und/settings.xml b/travo.und/settings.xml deleted file mode 100644 index 57e4bfc3..00000000 --- a/travo.und/settings.xml +++ /dev/null @@ -1,62 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - diff --git a/understand/travo-metrics-oop.csv b/understand/travo-metrics-oop.csv deleted file mode 100644 index c5dc2413..00000000 --- a/understand/travo-metrics-oop.csv +++ /dev/null @@ -1,358 +0,0 @@ -Kind,Name,CountClassDerived,CountClassCoupled,CountDeclMethodAll,MaxInheritanceTree,SumCyclomatic,CountDeclInstanceMethod,CountPath,Essential -Abstract Class,travo.gitlab.Project,0,12,46,4,109,27,, -Class,travo.assignment.Assignment,1,13,23,0,61,22,, -Class,travo.assignment.Submission,0,7,6,0,29,6,, -Class,travo.assignment.SubmissionStatus,0,1,1,0,1,1,, -Class,travo.course.Course,1,10,21,0,47,21,, -Class,travo.course.CourseAssignment,0,5,29,1,12,6,, -Class,travo.dashboards.AssignmentInstructorDashboard,0,8,15,1,34,15,, -Class,travo.dashboards.AssignmentStudentDashboard,0,7,5,1,21,5,, -Class,travo.dashboards.AuthenticationWidget,0,4,6,1,8,6,, -Class,travo.dashboards.CourseGradeDashboard,0,7,10,1,32,10,, -Class,travo.dashboards.CourseInstructorDashboard,0,7,3,1,7,3,, -Class,travo.dashboards.CourseStudentDashboard,0,10,3,1,12,3,, -Class,travo.dashboards.StatusBar,0,5,3,1,9,3,, -Class,travo.gitlab.AnonymousUser,0,0,0,0,0,0,, -Class,travo.gitlab.AuthenticationError,0,0,11,4,0,0,, -Class,travo.gitlab.ClassCallMetaclass,1,1,14,2,3,1,, -Class,travo.gitlab.GitLab,1,15,32,0,83,32,, -Class,travo.gitlab.GitLabTest,0,3,35,1,3,3,, -Class,travo.gitlab.Group,0,7,23,4,19,4,, -Class,travo.gitlab.Namespace,0,0,19,4,0,0,, -Class,travo.gitlab.Resource,4,3,19,3,15,5,, -Class,travo.gitlab.Resource.AccessLevels,0,0,0,1,0,0,, -Class,travo.gitlab.ResourceNotFoundError,0,0,11,4,0,0,, -Class,travo.gitlab.ResourceRef,0,4,1,0,7,1,, -Class,travo.gitlab.Unknown,0,1,1,1,1,1,, -Class,travo.gitlab.User,0,2,20,4,1,1,, -Class,travo.homework.Homework,0,6,6,0,46,6,, -Class,travo.jupyter_course.JupyterCourse,0,9,47,1,95,24,, -Class,travo.nbgrader_utils.BadgeGradebookExporter,1,2,5,1,8,2,, -Class,travo.nbgrader_utils.CSVGradebookExporter,0,1,8,2,1,1,, -Class,travo.nbgrader_utils.DataFrameGradebookExporter,1,2,7,1,7,4,, -Class,travo.nbgrader_utils.FormatedGradebookExporter,2,2,7,1,7,4,, -Class,travo.nbgrader_utils.GradebookExporter,3,2,3,0,3,3,, -Class,travo.nbgrader_utils.HTMLGradebookExporter,0,0,7,2,0,0,, -Class,travo.nbgrader_utils.MDGradebookExporter,0,0,7,2,0,0,, -Class,travo.nbgrader_utils.SVGGradebookExporter,0,1,6,2,1,1,, -File,__init__.py,,,,,1,,1,1 -Function,conftest.assignment_name,,,,,,,1,1 -Function,conftest.assignment_path,,,,,,,1,1 -Function,conftest.assignment_personal_repo,,,,,,,1,1 -Function,conftest.assignment_repo,,,,,,,1,1 -Function,conftest.course,,,,,,,1,1 -Function,conftest.course_assignment_group,,,,,,,1,1 -Function,conftest.fork_name,,,,,,,1,1 -Function,conftest.fork_path,,,,,,,1,1 -Function,conftest.gitlab,,,,,,,1,1 -Function,conftest.group,,,,,,,1,1 -Function,conftest.group_name,,,,,,,1,1 -Function,conftest.group_path,,,,,,,1,1 -Function,conftest.other_user,,,,,,,1,1 -Function,conftest.project,,,,,,,1,1 -Function,conftest.project_name,,,,,,,1,1 -Function,conftest.project_path,,,,,,,1,1 -Function,conftest.rich_course,,,,,,,1,1 -Function,conftest.standalone_assignment,,,,,,,1,1 -Function,conftest.standalone_assignment_dir,,,,,,,1,1 -Function,conftest.standalone_assignment_namespace,,,,,,,1,1 -Function,conftest.standalone_assignment_submission,,,,,,,1,1 -Function,conftest.student_work_dir,,,,,,,1,1 -Function,conftest.test_run_id,,,,,,,1,1 -Function,conftest.user,,,,,,,1,1 -Function,conftest.user_name,,,,,,,1,1 -Function,travo.assignment.Assignment.assignment_clone,,,,,,,8,1 -Function,travo.assignment.Assignment.check_assignment_dir,,,,,,,4,3 -Function,travo.assignment.Assignment.collect_status,,,,,,,1,1 -Function,travo.assignment.Assignment.ensure_clone_configuration,,,,,,,2,1 -Function,travo.assignment.Assignment.ensure_personal_repo,,,,,,,10,1 -Function,travo.assignment.Assignment.fetch,,,,,,,20,5 -Function,travo.assignment.Assignment.fetch.git,,,,,,,1,1 -Function,travo.assignment.Assignment.fetch_branch,,,,,,,8,4 -Function,travo.assignment.Assignment.fetch_branch.git,,,,,,,1,1 -Function,travo.assignment.Assignment.from_url,,,,,,,2,1 -Function,travo.assignment.Assignment.get_submission_username,,,,,,,2,1 -Function,travo.assignment.Assignment.get_username,,,,,,,3,3 -Function,travo.assignment.Assignment.has_personal_repo,,,,,,,2,1 -Function,travo.assignment.Assignment.personal_repo,,,,,,,1,1 -Function,travo.assignment.Assignment.personal_repo_name,,,,,,,1,1 -Function,travo.assignment.Assignment.personal_repo_path,,,,,,,1,1 -Function,travo.assignment.Assignment.remove_personal_repo,,,,,,,1,1 -Function,travo.assignment.Assignment.repo,,,,,,,2,1 -Function,travo.assignment.Assignment.status,,,,,,,3,1 -Function,travo.assignment.Assignment.submission,,,,,,,2,1 -Function,travo.assignment.Assignment.submissions,,,,,,,1,1 -Function,travo.assignment.Assignment.submissions_forked_from_missing,,,,,,,1,1 -Function,travo.assignment.Assignment.submissions_forked_from_path,,,,,,,2,1 -Function,travo.assignment.Assignment.submissions_search_from,,,,,,,1,1 -Function,travo.assignment.Assignment.submit,,,,,,,8,1 -Function,travo.assignment.Assignment.submit.git,,,,,,,1,1 -Function,travo.assignment.Submission.__post_init__,,,,,,,1,1 -Function,travo.assignment.Submission.ensure_autograded,,,,,,,481,10 -Function,travo.assignment.Submission.force_autograde,,,,,,,4,3 -Function,travo.assignment.Submission.get_autograde_job,,,,,,,3,3 -Function,travo.assignment.Submission.get_leader_and_team,,,,,,,12,1 -Function,travo.assignment.Submission.status,,,,,,,5,1 -Function,travo.assignment.SubmissionStatus.is_submitted,,,,,,,1,1 -Function,travo.assignment.job_status_priority,,,,,,,1,1 -Function,travo.assignment_test.test_fetch_from_empty_personal_repo,,,,,,,1,1 -Function,travo.course.Course.__post_init__,,,,,,,24,1 -Function,travo.course.Course.assignment,,,,,,,1,1 -Function,travo.course.Course.assignment_personal_repo,,,,,,,1,1 -Function,travo.course.Course.assignment_personal_repo_name,,,,,,,1,1 -Function,travo.course.Course.assignment_personal_repo_path,,,,,,,1,1 -Function,travo.course.Course.assignment_repo_name,,,,,,,1,1 -Function,travo.course.Course.assignment_repo_path,,,,,,,4,1 -Function,travo.course.Course.check_assignment,,,,,,,1,1 -Function,travo.course.Course.check_student_group,,,,,,,4,3 -Function,travo.course.Course.collect,,,,,,,1,1 -Function,travo.course.Course.ensure_instructor_access,,,,,,,4,1 -Function,travo.course.Course.ensure_work_dir,,,,,,,2,1 -Function,travo.course.Course.fetch,,,,,,,1,1 -Function,travo.course.Course.get_released_assignments,,,,,,,2,1 -Function,travo.course.Course.release,,,,,,,8,1 -Function,travo.course.Course.remove_assignment,,,,,,,4,1 -Function,travo.course.Course.remove_assignment_personal_repo,,,,,,,1,1 -Function,travo.course.Course.run,,,,,,,1,1 -Function,travo.course.Course.share_with,,,,,,,2,1 -Function,travo.course.Course.submit,,,,,,,1,1 -Function,travo.course.Course.work_dir,,,,,,,5,1 -Function,travo.course.CourseAssignment.get_submission_username,,,,,,,2,1 -Function,travo.course.CourseAssignment.personal_repo_name,,,,,,,2,1 -Function,travo.course.CourseAssignment.personal_repo_path,,,,,,,2,1 -Function,travo.course.CourseAssignment.submissions_forked_from_missing,,,,,,,1,1 -Function,travo.course.CourseAssignment.submissions_forked_from_path,,,,,,,3,3 -Function,travo.course.CourseAssignment.submissions_search_from,,,,,,,2,1 -Function,travo.course.missing_course,,,,,,,1,1 -Function,travo.dashboards.AssignmentInstructorDashboard.__init__,,,,,,,4,1 -Function,travo.dashboards.AssignmentInstructorDashboard.collect,,,,,,,1,1 -Function,travo.dashboards.AssignmentInstructorDashboard.collect_cmd,,,,,,,2,1 -Function,travo.dashboards.AssignmentInstructorDashboard.count_submissions_cmd,,,,,,,2,1 -Function,travo.dashboards.AssignmentInstructorDashboard.count_submissions_need_manual_grade_cmd,,,,,,,9,1 -Function,travo.dashboards.AssignmentInstructorDashboard.feedback,,,,,,,1,1 -Function,travo.dashboards.AssignmentInstructorDashboard.feedback_cmd,,,,,,,2,1 -Function,travo.dashboards.AssignmentInstructorDashboard.formgrader,,,,,,,1,1 -Function,travo.dashboards.AssignmentInstructorDashboard.generate,,,,,,,1,1 -Function,travo.dashboards.AssignmentInstructorDashboard.generate_status_cmd,,,,,,,2,1 -Function,travo.dashboards.AssignmentInstructorDashboard.open_formgrader_cmd,,,,,,,2,1 -Function,travo.dashboards.AssignmentInstructorDashboard.release,,,,,,,2,1 -Function,travo.dashboards.AssignmentInstructorDashboard.release_feedback_status_cmd,,,,,,,2,1 -Function,travo.dashboards.AssignmentInstructorDashboard.release_status_cmd,,,,,,,2,1 -Function,travo.dashboards.AssignmentInstructorDashboard.update,,,,,,,10,1 -Function,travo.dashboards.AssignmentStudentDashboard.__init__,,,,,,,4,1 -Function,travo.dashboards.AssignmentStudentDashboard.fetch,,,,,,,1,1 -Function,travo.dashboards.AssignmentStudentDashboard.open_work_dir,,,,,,,6,4 -Function,travo.dashboards.AssignmentStudentDashboard.submit,,,,,,,1,1 -Function,travo.dashboards.AssignmentStudentDashboard.update,,,,,,,37,1 -Function,travo.dashboards.AssignmentStudentDashboard.update.annotation,,,,,,,5,1 -Function,travo.dashboards.AuthenticationWidget.__init__,,,,,,,1,1 -Function,travo.dashboards.AuthenticationWidget.hide_widget,,,,,,,1,1 -Function,travo.dashboards.AuthenticationWidget.login,,,,,,,3,1 -Function,travo.dashboards.AuthenticationWidget.on_login,,,,,,,1,1 -Function,travo.dashboards.AuthenticationWidget.on_missing_credentials,,,,,,,1,1 -Function,travo.dashboards.AuthenticationWidget.show_widget,,,,,,,1,1 -Function,travo.dashboards.CourseGradeDashboard.__init__,,,,,,,8,1 -Function,travo.dashboards.CourseGradeDashboard.clear_csv,,,,,,,1,1 -Function,travo.dashboards.CourseGradeDashboard.clear_csv_cmd,,,,,,,1,1 -Function,travo.dashboards.CourseGradeDashboard.copy_cmd,,,,,,,1,1 -Function,travo.dashboards.CourseGradeDashboard.copy_dataframe,,,,,,,1,1 -Function,travo.dashboards.CourseGradeDashboard.get_scores,,,,,,,1,1 -Function,travo.dashboards.CourseGradeDashboard.get_scores_cmd,,,,,,,696,9 -Function,travo.dashboards.CourseGradeDashboard.make_grid,,,,,,,4,1 -Function,travo.dashboards.CourseGradeDashboard.refresh_scores,,,,,,,2,1 -Function,travo.dashboards.CourseGradeDashboard.update,,,,,,,1,1 -Function,travo.dashboards.CourseInstructorDashboard.__init__,,,,,,,4,1 -Function,travo.dashboards.CourseInstructorDashboard.make_grid,,,,,,,4,1 -Function,travo.dashboards.CourseInstructorDashboard.update,,,,,,,1,1 -Function,travo.dashboards.CourseStudentDashboard.__init__,,,,,,,4,1 -Function,travo.dashboards.CourseStudentDashboard.update,,,,,,,30,1 -Function,travo.dashboards.CourseStudentDashboard.update_student_group,,,,,,,2,1 -Function,travo.dashboards.HTML,,,,,,,1,1 -Function,travo.dashboards.StatusBar.__init__,,,,,,,1,1 -Function,travo.dashboards.StatusBar.__init__.set_log_level,,,,,,,1,1 -Function,travo.dashboards.StatusBar.__init__.set_log_show,,,,,,,2,1 -Function,travo.dashboards.StatusBar.run,,,,,,,8,1 -Function,travo.dashboards.StatusBar.run_in_subthread,,,,,,,1,1 -Function,travo.dashboards._format_note,,,,,,,1,1 -Function,travo.dashboards._format_status,,,,,,,3,3 -Function,travo.gitlab.ClassCallMetaclass.__call__,,,,,,,3,1 -Function,travo.gitlab.GitLab.__init__,,,,,,,8,1 -Function,travo.gitlab.GitLab.__repr__,,,,,,,1,1 -Function,travo.gitlab.GitLab.collect_forks,,,,,,,10,4 -Function,travo.gitlab.GitLab.confirm,,,,,,,1,1 -Function,travo.gitlab.GitLab.delete,,,,,,,1,1 -Function,travo.gitlab.GitLab.ensure_group,,,,,,,1,1 -Function,travo.gitlab.GitLab.ensure_local_git_configuration,,,,,,,3,1 -Function,travo.gitlab.GitLab.ensure_project,,,,,,,1,1 -Function,travo.gitlab.GitLab.ensure_resource,,,,,,,3,3 -Function,travo.gitlab.GitLab.get,,,,,,,1,1 -Function,travo.gitlab.GitLab.get_current_user,,,,,,,2,1 -Function,travo.gitlab.GitLab.get_group,,,,,,,1,1 -Function,travo.gitlab.GitLab.get_json,,,,,,,8,5 -Function,travo.gitlab.GitLab.get_namespace,,,,,,,1,1 -Function,travo.gitlab.GitLab.get_project,,,,,,,1,1 -Function,travo.gitlab.GitLab.get_resource,,,,,,,5,4 -Function,travo.gitlab.GitLab.get_status,,,,,,,1,1 -Function,travo.gitlab.GitLab.get_user,,,,,,,4,4 -Function,travo.gitlab.GitLab.git,,,,,,,3,1 -Function,travo.gitlab.GitLab.http_url_to_repo,,,,,,,1,1 -Function,travo.gitlab.GitLab.login,,,,,,,63,11 -Function,travo.gitlab.GitLab.logout,,,,,,,8,1 -Function,travo.gitlab.GitLab.namespace_id,,,,,,,4,4 -Function,travo.gitlab.GitLab.post,,,,,,,1,1 -Function,travo.gitlab.GitLab.post_json,,,,,,,2,1 -Function,travo.gitlab.GitLab.put,,,,,,,1,1 -Function,travo.gitlab.GitLab.put_json,,,,,,,2,1 -Function,travo.gitlab.GitLab.remove_group,,,,,,,1,1 -Function,travo.gitlab.GitLab.remove_project,,,,,,,1,1 -Function,travo.gitlab.GitLab.remove_resource,,,,,,,9,4 -Function,travo.gitlab.GitLab.set_token,,,,,,,6,1 -Function,travo.gitlab.GitLab.token_file,,,,,,,1,1 -Function,travo.gitlab.GitLabTest.__init__,,,,,,,1,1 -Function,travo.gitlab.GitLabTest.confirm,,,,,,,1,1 -Function,travo.gitlab.GitLabTest.login,,,,,,,1,1 -Function,travo.gitlab.Group.export,,,,,,,2176,9 -Function,travo.gitlab.Group.get_members,,,,,,,1,1 -Function,travo.gitlab.Group.get_projects,,,,,,,2,1 -Function,travo.gitlab.Group.get_subgroups,,,,,,,1,1 -Function,travo.gitlab.Project.add_origin,,,,,,,1,1 -Function,travo.gitlab.Project.archive,,,,,,,1,1 -Function,travo.gitlab.Project.clone_or_pull,,,,,,,23,7 -Function,travo.gitlab.Project.ensure_badge,,,,,,,3,3 -Function,travo.gitlab.Project.ensure_branch,,,,,,,8,1 -Function,travo.gitlab.Project.ensure_file,,,,,,,204,5 -Function,travo.gitlab.Project.ensure_fork,,,,,,,155,6 -Function,travo.gitlab.Project.export,,,,,,,8,1 -Function,travo.gitlab.Project.fetch_artifact,,,,,,,1,1 -Function,travo.gitlab.Project.fetch_artifacts,,,,,,,3,1 -Function,travo.gitlab.Project.get_badges,,,,,,,2,1 -Function,travo.gitlab.Project.get_branch,,,,,,,2,1 -Function,travo.gitlab.Project.get_branches,,,,,,,1,1 -Function,travo.gitlab.Project.get_compare,,,,,,,4,1 -Function,travo.gitlab.Project.get_file,,,,,,,2,1 -Function,travo.gitlab.Project.get_forks,,,,,,,12,1 -Function,travo.gitlab.Project.get_forks_ssh_url_to_repo,,,,,,,1,1 -Function,travo.gitlab.Project.get_members,,,,,,,1,1 -Function,travo.gitlab.Project.get_origin_commit,,,,,,,4,1 -Function,travo.gitlab.Project.get_owners,,,,,,,11,5 -Function,travo.gitlab.Project.get_pipelines,,,,,,,1,1 -Function,travo.gitlab.Project.get_possible_forks,,,,,,,299,5 -Function,travo.gitlab.Project.get_reports,,,,,,,57,4 -Function,travo.gitlab.Project.protect_branch,,,,,,,2,1 -Function,travo.gitlab.Project.remove_pipelines,,,,,,,2,1 -Function,travo.gitlab.Project.share_with,,,,,,,6,4 -Function,travo.gitlab.Project.unprotect_branch,,,,,,,3,3 -Function,travo.gitlab.Resource.__post_init__,,,,,,,1,1 -Function,travo.gitlab.Resource.__setattr__,,,,,,,1,1 -Function,travo.gitlab.Resource.get_api_url,,,,,,,1,1 -Function,travo.gitlab.Resource.get_attributes,,,,,,,2,1 -Function,travo.gitlab.Resource.setattributes,,,,,,,42,5 -Function,travo.gitlab.ResourceRef.__post_init__,,,,,,,32,3 -Function,travo.gitlab.Unknown.__repr__,,,,,,,1,1 -Function,travo.gitlab.User.get_projects,,,,,,,1,1 -Function,travo.gitlab.get_type_hints,,,,,,,2,1 -Function,travo.gitlab.request_credentials_basic,,,,,,,8,1 -Function,travo.homework.Homework.__init__,,,,,,,1,1 -Function,travo.homework.Homework.check_student,,,,,,,31200,8 -Function,travo.homework.Homework.get_copies,,,,,,,2,1 -Function,travo.homework.Homework.get_group,,,,,,,1,1 -Function,travo.homework.Homework.get_project,,,,,,,4,4 -Function,travo.homework.Homework.print_info,,,,,,,242,3 -Function,travo.i18n._,,,,,,,1,1 -Function,travo.jupyter_course.JupyterCourse.autograde,,,,,,,3,3 -Function,travo.jupyter_course.JupyterCourse.clear_needs_manual_grade,,,,,,,7,1 -Function,travo.jupyter_course.JupyterCourse.collect_autograded,,,,,,,9,4 -Function,travo.jupyter_course.JupyterCourse.collect_for_nbgrader,,,,,,,1,1 -Function,travo.jupyter_course.JupyterCourse.collect_gradebooks,,,,,,,5,4 -Function,travo.jupyter_course.JupyterCourse.collect_scores,,,,,,,3,3 -Function,travo.jupyter_course.JupyterCourse.collect_status,,,,,,,1,1 -Function,travo.jupyter_course.JupyterCourse.convert_from_ipynb_to_md,,,,,,,2,1 -Function,travo.jupyter_course.JupyterCourse.convert_from_md_to_ipynb,,,,,,,3,3 -Function,travo.jupyter_course.JupyterCourse.ensure_autograded,,,,,,,6,3 -Function,travo.jupyter_course.JupyterCourse.export_scores,,,,,,,1,1 -Function,travo.jupyter_course.JupyterCourse.fetch_feedback,,,,,,,6,1 -Function,travo.jupyter_course.JupyterCourse.force_autograde,,,,,,,6,3 -Function,travo.jupyter_course.JupyterCourse.formgrader,,,,,,,6,1 -Function,travo.jupyter_course.JupyterCourse.generate_assignment,,,,,,,32,1 -Function,travo.jupyter_course.JupyterCourse.generate_feedback,,,,,,,2,1 -Function,travo.jupyter_course.JupyterCourse.get_nbgrader_config,,,,,,,2,1 -Function,travo.jupyter_course.JupyterCourse.grade_dashboard,,,,,,,1,1 -Function,travo.jupyter_course.JupyterCourse.instructor_dashboard,,,,,,,1,1 -Function,travo.jupyter_course.JupyterCourse.jupyter,,,,,,,3,3 -Function,travo.jupyter_course.JupyterCourse.merge_autograded_db,,,,,,,20,1 -Function,travo.jupyter_course.JupyterCourse.nbgrader_update_student_list,,,,,,,13,6 -Function,travo.jupyter_course.JupyterCourse.release_feedback,,,,,,,4,4 -Function,travo.jupyter_course.JupyterCourse.student_autograde,,,,,,,192,6 -Function,travo.jupyter_course.JupyterCourse.student_dashboard,,,,,,,1,1 -Function,travo.jupyter_course.JupyterCourse.validate,,,,,,,42,1 -Function,travo.jupyter_course.TrivialContextManager,,,,,,,1,1 -Function,travo.jupyter_course.jupyter_notebook,,,,,,,2,1 -Function,travo.jupyter_course.jupyter_notebook_in_hub,,,,,,,4,1 -Function,travo.nbgrader_utils.BadgeGradebookExporter.export,,,,,,,1,1 -Function,travo.nbgrader_utils.BadgeGradebookExporter.record_assignment,,,,,,,20,1 -Function,travo.nbgrader_utils.CSVGradebookExporter.export,,,,,,,1,1 -Function,travo.nbgrader_utils.DataFrameGradebookExporter.__init__,,,,,,,1,1 -Function,travo.nbgrader_utils.DataFrameGradebookExporter.export,,,,,,,1,1 -Function,travo.nbgrader_utils.DataFrameGradebookExporter.record,,,,,,,8,1 -Function,travo.nbgrader_utils.DataFrameGradebookExporter.record_assignment,,,,,,,1,1 -Function,travo.nbgrader_utils.FormatedGradebookExporter.__init__,,,,,,,1,1 -Function,travo.nbgrader_utils.FormatedGradebookExporter.export,,,,,,,1,1 -Function,travo.nbgrader_utils.FormatedGradebookExporter.record,,,,,,,8,1 -Function,travo.nbgrader_utils.FormatedGradebookExporter.record_assignment,,,,,,,1,1 -Function,travo.nbgrader_utils.GradebookExporter.export,,,,,,,1,1 -Function,travo.nbgrader_utils.GradebookExporter.record,,,,,,,1,1 -Function,travo.nbgrader_utils.GradebookExporter.record_assignment,,,,,,,1,1 -Function,travo.nbgrader_utils.SVGGradebookExporter.export,,,,,,,1,1 -Function,travo.nbgrader_utils.export_scores,,,,,,,140,4 -Function,travo.nbgrader_utils.merge_assignment_gradebook,,,,,,,17,1 -Function,travo.nbgrader_utils.merge_submission_gradebook,,,,,,,728,10 -Function,travo.nbgrader_utils.remove_assignment_gradebook,,,,,,,26,5 -Function,travo.nbgrader_utils.remove_submission_gradebook,,,,,,,3,3 -Function,travo.nbgrader_utils.to_args,,,,,,,2,1 -Function,travo.script.CLI,,,,,,,21,4 -Function,travo.script.add_object_parser,,,,,,,2,1 -Function,travo.script.add_object_parser.add_subobject,,,,,,,1,1 -Function,travo.script.add_parser_arguments_for_function,,,,,,,9,1 -Function,travo.script.add_subparsers_for_object_methods,,,,,,,9,4 -Function,travo.script.dummy,,,,,,,1,1 -Function,travo.script.main,,,,,,,1,1 -Function,travo.script.main.git,,,,,,,1,1 -Function,travo.utils.getLogger,,,,,,,2,1 -Function,travo.utils.git_get_origin,,,,,,,4,3 -Function,travo.utils.run,,,,,,,2,1 -Function,travo.utils.urlencode,,,,,,,1,1 -Module File,assignment.py,,,,,93,,1,1 -Module File,assignment_test.py,,,,,1,,0,0 -Module File,conftest.py,,,,,25,,0,0 -Module File,course.py,,,,,60,,0,0 -Module File,dashboards.py,,,,,130,,1,1 -Module File,gitlab.py,,,,,248,,1,1 -Module File,homework.py,,,,,46,,0,0 -Module File,i18n.py,,,,,2,,1,1 -Module File,jupyter_course.py,,,,,102,,1,1 -Module File,nbgrader_utils.py,,,,,78,,1,1 -Module File,script.py,,,,,29,,1,1 -Module File,setup.py,,,,,1,,1,1 -Module File,travo.py,,,,,0,,0,0 -Module File,utils.py,,,,,9,,1,1 -Package,travo,,,,,0,,, -Package,travo,,,,,1,,, -Package,travo,,,,,93,,, -Package,travo,,,,,0,,, -Package,travo,,,,,1,,, -Package,travo,,,,,0,,, -Package,travo,,,,,60,,, -Package,travo,,,,,0,,, -Package,travo,,,,,0,,, -Package,travo,,,,,130,,, -Package,travo,,,,,248,,, -Package,travo,,,,,0,,, -Package,travo,,,,,46,,, -Package,travo,,,,,2,,, -Package,travo,,,,,0,,, -Package,travo,,,,,0,,, -Package,travo,,,,,102,,, -Package,travo,,,,,78,,, -Package,travo,,,,,29,,, -Package,travo,,,,,0,,, -Package,travo,,,,,9,,, diff --git a/understand/travo-metrics.csv b/understand/travo-metrics.csv deleted file mode 100644 index c5f2d166..00000000 --- a/understand/travo-metrics.csv +++ /dev/null @@ -1,358 +0,0 @@ -Kind,Name,CountClassDerived,CountClassCoupled,CountDeclMethodAll,CountLine,CountLineCode,CountPath,Essential,CountLineComment,CountLineBlank,MaxInheritanceTree,SumCyclomatic,CountDeclInstanceMethod -File,"__init__.py",,,,6,5,1,1,0,1,,1, -Module File,"assignment.py",,,,863,482,1,1,240,144,,93, -Module File,"assignment_test.py",,,,36,21,0,0,6,9,,1, -Function,"conftest.assignment_name",,,,2,2,1,1,0,0,,, -Function,"conftest.assignment_path",,,,2,2,1,1,0,0,,, -Function,"conftest.assignment_personal_repo",,,,6,6,1,1,0,0,,, -Function,"conftest.assignment_repo",,,,13,13,1,1,0,0,,, -Function,"conftest.course",,,,7,7,1,1,0,0,,, -Function,"conftest.course_assignment_group",,,,5,5,1,1,0,0,,, -Function,"conftest.fork_name",,,,2,2,1,1,0,0,,, -Function,"conftest.fork_path",,,,2,2,1,1,0,0,,, -Function,"conftest.gitlab",,,,4,4,1,1,0,0,,, -Function,"conftest.group",,,,3,3,1,1,0,0,,, -Function,"conftest.group_name",,,,2,2,1,1,0,0,,, -Function,"conftest.group_path",,,,2,2,1,1,0,0,,, -Function,"conftest.other_user",,,,2,2,1,1,0,0,,, -Function,"conftest.project",,,,6,5,1,1,1,0,,, -Function,"conftest.project_name",,,,2,2,1,1,0,0,,, -Function,"conftest.project_path",,,,2,2,1,1,0,0,,, -Module File,"conftest.py",,,,199,146,0,0,6,48,,25, -Function,"conftest.rich_course",,,,9,9,1,1,0,0,,, -Function,"conftest.standalone_assignment",,,,17,17,1,1,0,0,,, -Function,"conftest.standalone_assignment_dir",,,,2,2,1,1,0,0,,, -Function,"conftest.standalone_assignment_namespace",,,,6,6,1,1,0,0,,, -Function,"conftest.standalone_assignment_submission",,,,6,6,1,1,0,0,,, -Function,"conftest.student_work_dir",,,,2,2,1,1,0,0,,, -Function,"conftest.test_run_id",,,,8,5,1,1,3,0,,, -Function,"conftest.user",,,,2,2,1,1,0,0,,, -Function,"conftest.user_name",,,,2,2,1,1,0,0,,, -Module File,"course.py",,,,657,312,0,0,239,110,,60, -Module File,"dashboards.py",,,,1173,957,1,1,120,125,,130, -Module File,"gitlab.py",,,,2546,1214,1,1,932,418,,248, -Module File,"homework.py",,,,245,163,0,0,44,45,,46, -Module File,"i18n.py",,,,31,10,1,1,16,6,,2, -Module File,"jupyter_course.py",,,,773,575,1,1,137,72,,102, -Module File,"nbgrader_utils.py",,,,428,345,1,1,23,66,,78, -Module File,"script.py",,,,414,131,1,1,213,70,,29, -Module File,"setup.py",,,,40,31,1,1,13,1,,1, -Package,"travo",,,,0,0,,,0,0,,0, -Package,"travo",,,,6,5,,,0,1,,1, -Package,"travo",,,,863,482,,,240,144,,93, -Package,"travo",,,,0,0,,,0,0,,0, -Package,"travo",,,,36,21,,,6,9,,1, -Package,"travo",,,,0,0,,,0,0,,0, -Package,"travo",,,,657,312,,,239,110,,60, -Package,"travo",,,,0,0,,,0,0,,0, -Package,"travo",,,,0,0,,,0,0,,0, -Package,"travo",,,,1173,957,,,120,125,,130, -Package,"travo",,,,2546,1214,,,932,418,,248, -Package,"travo",,,,0,0,,,0,0,,0, -Package,"travo",,,,245,163,,,44,45,,46, -Package,"travo",,,,31,10,,,16,6,,2, -Package,"travo",,,,0,0,,,0,0,,0, -Package,"travo",,,,0,0,,,0,0,,0, -Package,"travo",,,,773,575,,,137,72,,102, -Package,"travo",,,,428,345,,,23,66,,78, -Package,"travo",,,,414,131,,,213,70,,29, -Package,"travo",,,,3,1,,,2,0,,0, -Package,"travo",,,,65,34,,,24,8,,9, -Class,"travo.assignment.Assignment",1,13,23,616,310,,,200,106,0,61,22 -Function,"travo.assignment.Assignment.assignment_clone",,,,34,21,8,1,8,5,,, -Function,"travo.assignment.Assignment.check_assignment_dir",,,,20,14,4,3,4,2,,, -Function,"travo.assignment.Assignment.collect_status",,,,6,3,1,1,3,0,,, -Function,"travo.assignment.Assignment.ensure_clone_configuration",,,,77,16,2,1,45,16,,, -Function,"travo.assignment.Assignment.ensure_personal_repo",,,,80,46,10,1,20,14,,, -Function,"travo.assignment.Assignment.fetch",,,,66,44,20,5,16,6,,, -Function,"travo.assignment.Assignment.fetch.git",,,,2,2,1,1,0,0,,, -Function,"travo.assignment.Assignment.fetch_branch",,,,54,31,8,4,15,8,,, -Function,"travo.assignment.Assignment.fetch_branch.git",,,,2,2,1,1,0,0,,, -Function,"travo.assignment.Assignment.from_url",,,,28,21,2,1,2,5,,, -Function,"travo.assignment.Assignment.get_submission_username",,,,20,5,2,1,12,3,,, -Function,"travo.assignment.Assignment.get_username",,,,15,8,3,3,6,1,,, -Function,"travo.assignment.Assignment.has_personal_repo",,,,21,6,2,1,13,2,,, -Function,"travo.assignment.Assignment.personal_repo",,,,2,2,1,1,0,0,,, -Function,"travo.assignment.Assignment.personal_repo_name",,,,13,2,1,1,8,3,,, -Function,"travo.assignment.Assignment.personal_repo_path",,,,14,5,1,1,7,2,,, -Function,"travo.assignment.Assignment.remove_personal_repo",,,,5,2,1,1,3,0,,, -Function,"travo.assignment.Assignment.repo",,,,4,4,2,1,0,0,,, -Function,"travo.assignment.Assignment.status",,,,16,13,3,1,3,0,,, -Function,"travo.assignment.Assignment.submission",,,,12,7,2,1,4,1,,, -Function,"travo.assignment.Assignment.submissions",,,,18,7,1,1,10,1,,, -Function,"travo.assignment.Assignment.submissions_forked_from_missing",,,,2,2,1,1,0,0,,, -Function,"travo.assignment.Assignment.submissions_forked_from_path",,,,11,4,2,1,6,1,,, -Function,"travo.assignment.Assignment.submissions_search_from",,,,5,2,1,1,3,0,,, -Function,"travo.assignment.Assignment.submit",,,,50,31,8,1,9,10,,, -Function,"travo.assignment.Assignment.submit.git",,,,2,2,1,1,0,0,,, -Class,"travo.assignment.Submission",0,7,6,207,145,,,37,27,0,29,6 -Function,"travo.assignment.Submission.__post_init__",,,,3,3,1,1,0,0,,, -Function,"travo.assignment.Submission.ensure_autograded",,,,76,58,481,10,10,9,,, -Function,"travo.assignment.Submission.force_autograde",,,,27,19,4,3,7,1,,, -Function,"travo.assignment.Submission.get_autograde_job",,,,39,20,3,3,14,6,,, -Function,"travo.assignment.Submission.get_leader_and_team",,,,27,19,12,1,6,2,,, -Function,"travo.assignment.Submission.status",,,,25,22,5,1,0,3,,, -Class,"travo.assignment.SubmissionStatus",0,1,1,11,10,,,1,1,0,1,1 -Function,"travo.assignment.SubmissionStatus.is_submitted",,,,2,2,1,1,0,0,,, -Function,"travo.assignment.job_status_priority",,,,2,2,1,1,0,0,,, -Function,"travo.assignment_test.test_fetch_from_empty_personal_repo",,,,31,19,1,1,6,6,,, -Class,"travo.course.Course",1,10,21,517,255,,,181,83,0,47,21 -Function,"travo.course.Course.__post_init__",,,,16,13,24,1,1,2,,, -Function,"travo.course.Course.assignment",,,,29,24,1,1,4,1,,, -Function,"travo.course.Course.assignment_personal_repo",,,,9,6,1,1,3,0,,, -Function,"travo.course.Course.assignment_personal_repo_name",,,,5,2,1,1,3,0,,, -Function,"travo.course.Course.assignment_personal_repo_path",,,,9,6,1,1,3,0,,, -Function,"travo.course.Course.assignment_repo_name",,,,13,2,1,1,8,3,,, -Function,"travo.course.Course.assignment_repo_path",,,,34,12,4,1,17,5,,, -Function,"travo.course.Course.check_assignment",,,,11,2,1,1,7,2,,, -Function,"travo.course.Course.check_student_group",,,,21,14,4,3,5,2,,, -Function,"travo.course.Course.collect",,,,28,11,1,1,12,5,,, -Function,"travo.course.Course.ensure_instructor_access",,,,20,16,4,1,3,1,,, -Function,"travo.course.Course.ensure_work_dir",,,,32,7,2,1,17,8,,, -Function,"travo.course.Course.fetch",,,,10,7,1,1,3,0,,, -Function,"travo.course.Course.get_released_assignments",,,,11,11,2,1,0,0,,, -Function,"travo.course.Course.release",,,,66,39,8,1,16,11,,, -Function,"travo.course.Course.remove_assignment",,,,24,16,4,1,6,3,,, -Function,"travo.course.Course.remove_assignment_personal_repo",,,,7,4,1,1,3,0,,, -Function,"travo.course.Course.run",,,,3,2,1,1,1,0,,, -Function,"travo.course.Course.share_with",,,,11,11,2,1,0,0,,, -Function,"travo.course.Course.submit",,,,14,11,1,1,3,0,,, -Function,"travo.course.Course.work_dir",,,,59,12,5,1,36,11,,, -Class,"travo.course.CourseAssignment",0,5,29,117,41,,,57,20,1,12,6 -Function,"travo.course.CourseAssignment.get_submission_username",,,,20,5,2,1,11,4,,, -Function,"travo.course.CourseAssignment.personal_repo_name",,,,19,6,2,1,10,3,,, -Function,"travo.course.CourseAssignment.personal_repo_path",,,,26,10,2,1,13,3,,, -Function,"travo.course.CourseAssignment.submissions_forked_from_missing",,,,5,3,1,1,2,0,,, -Function,"travo.course.CourseAssignment.submissions_forked_from_path",,,,22,7,3,3,13,2,,, -Function,"travo.course.CourseAssignment.submissions_search_from",,,,10,7,2,1,3,0,,, -Function,"travo.course.missing_course",,,,2,2,1,1,0,0,,, -Class,"travo.dashboards.AssignmentInstructorDashboard",0,8,15,309,270,,,31,23,1,34,15 -Function,"travo.dashboards.AssignmentInstructorDashboard.__init__",,,,106,98,4,1,3,7,,, -Function,"travo.dashboards.AssignmentInstructorDashboard.collect",,,,8,8,1,1,1,0,,, -Function,"travo.dashboards.AssignmentInstructorDashboard.collect_cmd",,,,11,11,2,1,0,0,,, -Function,"travo.dashboards.AssignmentInstructorDashboard.count_submissions_cmd",,,,7,7,2,1,1,0,,, -Function,"travo.dashboards.AssignmentInstructorDashboard.count_submissions_need_manual_grade_cmd",,,,31,26,9,1,6,0,,, -Function,"travo.dashboards.AssignmentInstructorDashboard.feedback",,,,9,9,1,1,1,0,,, -Function,"travo.dashboards.AssignmentInstructorDashboard.feedback_cmd",,,,9,7,2,1,2,0,,, -Function,"travo.dashboards.AssignmentInstructorDashboard.formgrader",,,,8,8,1,1,1,0,,, -Function,"travo.dashboards.AssignmentInstructorDashboard.generate",,,,9,9,1,1,1,0,,, -Function,"travo.dashboards.AssignmentInstructorDashboard.generate_status_cmd",,,,9,9,2,1,0,0,,, -Function,"travo.dashboards.AssignmentInstructorDashboard.open_formgrader_cmd",,,,26,20,2,1,11,1,,, -Function,"travo.dashboards.AssignmentInstructorDashboard.release",,,,12,12,2,1,1,0,,, -Function,"travo.dashboards.AssignmentInstructorDashboard.release_feedback_status_cmd",,,,8,8,2,1,0,0,,, -Function,"travo.dashboards.AssignmentInstructorDashboard.release_status_cmd",,,,7,7,2,1,0,0,,, -Function,"travo.dashboards.AssignmentInstructorDashboard.update",,,,34,30,10,1,3,1,,, -Class,"travo.dashboards.AssignmentStudentDashboard",0,7,5,193,167,,,16,14,1,21,5 -Function,"travo.dashboards.AssignmentStudentDashboard.__init__",,,,68,64,4,1,1,4,,, -Function,"travo.dashboards.AssignmentStudentDashboard.fetch",,,,8,8,1,1,1,0,,, -Function,"travo.dashboards.AssignmentStudentDashboard.open_work_dir",,,,26,22,6,4,5,0,,, -Function,"travo.dashboards.AssignmentStudentDashboard.submit",,,,8,8,1,1,1,0,,, -Function,"travo.dashboards.AssignmentStudentDashboard.update",,,,75,64,37,1,6,5,,, -Function,"travo.dashboards.AssignmentStudentDashboard.update.annotation",,,,10,10,5,1,0,0,,, -Class,"travo.dashboards.AuthenticationWidget",0,4,6,74,53,,,13,8,1,8,6 -Function,"travo.dashboards.AuthenticationWidget.__init__",,,,24,20,1,1,4,0,,, -Function,"travo.dashboards.AuthenticationWidget.hide_widget",,,,2,2,1,1,0,0,,, -Function,"travo.dashboards.AuthenticationWidget.login",,,,16,16,3,1,0,0,,, -Function,"travo.dashboards.AuthenticationWidget.on_login",,,,2,2,1,1,0,0,,, -Function,"travo.dashboards.AuthenticationWidget.on_missing_credentials",,,,11,8,1,1,3,0,,, -Function,"travo.dashboards.AuthenticationWidget.show_widget",,,,3,3,1,1,0,0,,, -Class,"travo.dashboards.CourseGradeDashboard",0,7,10,217,176,,,20,26,1,32,10 -Function,"travo.dashboards.CourseGradeDashboard.__init__",,,,57,49,8,1,0,8,,, -Function,"travo.dashboards.CourseGradeDashboard.clear_csv",,,,8,8,1,1,1,0,,, -Function,"travo.dashboards.CourseGradeDashboard.clear_csv_cmd",,,,3,3,1,1,0,0,,, -Function,"travo.dashboards.CourseGradeDashboard.copy_cmd",,,,3,3,1,1,0,0,,, -Function,"travo.dashboards.CourseGradeDashboard.copy_dataframe",,,,8,8,1,1,1,0,,, -Function,"travo.dashboards.CourseGradeDashboard.get_scores",,,,8,8,1,1,1,0,,, -Function,"travo.dashboards.CourseGradeDashboard.get_scores_cmd",,,,86,70,696,9,11,5,,, -Function,"travo.dashboards.CourseGradeDashboard.make_grid",,,,16,14,4,1,1,2,,, -Function,"travo.dashboards.CourseGradeDashboard.refresh_scores",,,,9,9,2,1,1,0,,, -Function,"travo.dashboards.CourseGradeDashboard.update",,,,3,3,1,1,0,0,,, -Class,"travo.dashboards.CourseInstructorDashboard",0,7,3,107,88,,,9,10,1,7,3 -Function,"travo.dashboards.CourseInstructorDashboard.__init__",,,,60,54,4,1,0,6,,, -Function,"travo.dashboards.CourseInstructorDashboard.make_grid",,,,31,31,4,1,0,0,,, -Function,"travo.dashboards.CourseInstructorDashboard.update",,,,2,2,1,1,0,0,,, -Class,"travo.dashboards.CourseStudentDashboard",0,10,3,101,84,,,6,11,1,12,3 -Function,"travo.dashboards.CourseStudentDashboard.__init__",,,,47,42,4,1,0,5,,, -Function,"travo.dashboards.CourseStudentDashboard.update",,,,38,34,30,1,2,2,,, -Function,"travo.dashboards.CourseStudentDashboard.update_student_group",,,,4,4,2,1,0,0,,, -Function,"travo.dashboards.HTML",,,,9,4,1,1,4,1,,, -Class,"travo.dashboards.StatusBar",0,5,3,80,73,,,1,7,1,9,3 -Function,"travo.dashboards.StatusBar.__init__",,,,44,39,1,1,0,5,,, -Function,"travo.dashboards.StatusBar.__init__.set_log_level",,,,2,2,1,1,0,0,,, -Function,"travo.dashboards.StatusBar.__init__.set_log_show",,,,9,9,2,1,0,0,,, -Function,"travo.dashboards.StatusBar.run",,,,23,23,8,1,1,0,,, -Function,"travo.dashboards.StatusBar.run_in_subthread",,,,10,10,1,1,0,0,,, -Function,"travo.dashboards._format_note",,,,2,2,1,1,0,0,,, -Function,"travo.dashboards._format_status",,,,7,7,3,3,0,0,,, -Class,"travo.gitlab.AnonymousUser",0,0,0,2,2,,,0,0,0,0,0 -Class,"travo.gitlab.AuthenticationError",0,0,11,2,2,,,0,0,4,0,0 -Class,"travo.gitlab.ClassCallMetaclass",1,1,14,9,9,,,3,0,2,3,1 -Function,"travo.gitlab.ClassCallMetaclass.__call__",,,,8,8,3,1,3,0,,, -Class,"travo.gitlab.GitLab",1,15,32,824,349,,,326,150,0,83,32 -Function,"travo.gitlab.GitLab.__init__",,,,18,18,8,1,0,0,,, -Function,"travo.gitlab.GitLab.__repr__",,,,2,2,1,1,0,0,,, -Function,"travo.gitlab.GitLab.collect_forks",,,,39,23,10,4,13,3,,, -Function,"travo.gitlab.GitLab.confirm",,,,9,4,1,1,4,1,,, -Function,"travo.gitlab.GitLab.delete",,,,5,4,1,1,1,0,,, -Function,"travo.gitlab.GitLab.ensure_group",,,,35,10,1,1,18,7,,, -Function,"travo.gitlab.GitLab.ensure_local_git_configuration",,,,18,13,3,1,4,1,,, -Function,"travo.gitlab.GitLab.ensure_project",,,,57,8,1,1,36,13,,, -Function,"travo.gitlab.GitLab.ensure_resource",,,,49,28,3,3,14,7,,, -Function,"travo.gitlab.GitLab.get",,,,5,4,1,1,1,0,,, -Function,"travo.gitlab.GitLab.get_current_user",,,,25,5,2,1,14,6,,, -Function,"travo.gitlab.GitLab.get_group",,,,22,4,1,1,13,5,,, -Function,"travo.gitlab.GitLab.get_json",,,,33,21,8,5,8,4,,, -Function,"travo.gitlab.GitLab.get_namespace",,,,2,2,1,1,0,0,,, -Function,"travo.gitlab.GitLab.get_project",,,,26,2,1,1,19,5,,, -Function,"travo.gitlab.GitLab.get_resource",,,,21,13,5,4,6,2,,, -Function,"travo.gitlab.GitLab.get_status",,,,3,2,1,1,1,0,,, -Function,"travo.gitlab.GitLab.get_user",,,,40,16,4,4,17,7,,, -Function,"travo.gitlab.GitLab.git",,,,44,17,3,1,20,7,,, -Function,"travo.gitlab.GitLab.http_url_to_repo",,,,11,2,1,1,7,2,,, -Function,"travo.gitlab.GitLab.login",,,,120,38,63,11,59,23,,, -Function,"travo.gitlab.GitLab.logout",,,,20,13,8,1,6,1,,, -Function,"travo.gitlab.GitLab.namespace_id",,,,45,12,4,4,26,7,,, -Function,"travo.gitlab.GitLab.post",,,,5,4,1,1,1,0,,, -Function,"travo.gitlab.GitLab.post_json",,,,16,8,2,1,5,3,,, -Function,"travo.gitlab.GitLab.put",,,,5,4,1,1,1,0,,, -Function,"travo.gitlab.GitLab.put_json",,,,16,8,2,1,5,3,,, -Function,"travo.gitlab.GitLab.remove_group",,,,8,4,1,1,3,1,,, -Function,"travo.gitlab.GitLab.remove_project",,,,7,3,1,1,3,1,,, -Function,"travo.gitlab.GitLab.remove_resource",,,,28,19,9,4,6,3,,, -Function,"travo.gitlab.GitLab.set_token",,,,31,22,6,1,6,3,,, -Function,"travo.gitlab.GitLab.token_file",,,,8,5,1,1,3,0,,, -Class,"travo.gitlab.GitLabTest",0,3,35,27,17,,,5,5,1,3,3 -Function,"travo.gitlab.GitLabTest.__init__",,,,3,3,1,1,0,0,,, -Function,"travo.gitlab.GitLabTest.confirm",,,,2,2,1,1,0,0,,, -Function,"travo.gitlab.GitLabTest.login",,,,8,8,1,1,0,0,,, -Class,"travo.gitlab.Group",0,7,23,185,120,,,46,20,4,19,4 -Function,"travo.gitlab.Group.export",,,,97,61,2176,9,27,9,,, -Function,"travo.gitlab.Group.get_members",,,,6,5,1,1,1,0,,, -Function,"travo.gitlab.Group.get_projects",,,,40,20,2,1,15,6,,, -Function,"travo.gitlab.Group.get_subgroups",,,,6,5,1,1,1,0,,, -Class,"travo.gitlab.Namespace",0,0,19,14,12,,,2,0,4,0,0 -Abstract Class,"travo.gitlab.Project",0,12,46,1123,514,,,446,172,4,109,27 -Function,"travo.gitlab.Project.add_origin",,,,7,3,1,1,3,1,,, -Function,"travo.gitlab.Project.archive",,,,4,3,1,1,1,0,,, -Function,"travo.gitlab.Project.clone_or_pull",,,,95,62,23,7,26,7,,, -Function,"travo.gitlab.Project.ensure_badge",,,,94,14,3,3,72,8,,, -Function,"travo.gitlab.Project.ensure_branch",,,,20,15,8,1,5,0,,, -Function,"travo.gitlab.Project.ensure_file",,,,100,43,204,5,48,12,,, -Function,"travo.gitlab.Project.ensure_fork",,,,144,49,155,6,76,21,,, -Function,"travo.gitlab.Project.export",,,,48,22,8,1,18,8,,, -Function,"travo.gitlab.Project.fetch_artifact",,,,12,7,1,1,4,1,,, -Function,"travo.gitlab.Project.fetch_artifacts",,,,12,10,3,1,2,0,,, -Function,"travo.gitlab.Project.get_badges",,,,13,7,2,1,5,1,,, -Function,"travo.gitlab.Project.get_branch",,,,9,5,2,1,4,0,,, -Function,"travo.gitlab.Project.get_branches",,,,36,2,1,1,31,3,,, -Function,"travo.gitlab.Project.get_compare",,,,18,8,4,1,5,5,,, -Function,"travo.gitlab.Project.get_file",,,,15,14,2,1,1,0,,, -Function,"travo.gitlab.Project.get_forks",,,,72,23,12,1,38,12,,, -Function,"travo.gitlab.Project.get_forks_ssh_url_to_repo",,,,3,3,1,1,0,0,,, -Function,"travo.gitlab.Project.get_members",,,,6,2,1,1,3,1,,, -Function,"travo.gitlab.Project.get_origin_commit",,,,19,11,4,1,6,2,,, -Function,"travo.gitlab.Project.get_owners",,,,28,17,11,5,5,6,,, -Function,"travo.gitlab.Project.get_pipelines",,,,5,2,1,1,3,0,,, -Function,"travo.gitlab.Project.get_possible_forks",,,,55,34,299,5,13,9,,, -Function,"travo.gitlab.Project.get_reports",,,,48,29,57,4,11,10,,, -Function,"travo.gitlab.Project.protect_branch",,,,50,5,2,1,33,12,,, -Function,"travo.gitlab.Project.remove_pipelines",,,,6,3,2,1,3,0,,, -Function,"travo.gitlab.Project.share_with",,,,64,29,6,4,27,8,,, -Function,"travo.gitlab.Project.unprotect_branch",,,,11,7,3,3,3,1,,, -Class,"travo.gitlab.Resource",4,3,19,129,56,,,50,24,3,15,5 -Class,"travo.gitlab.Resource.AccessLevels",0,0,0,6,6,,,0,0,1,0,0 -Function,"travo.gitlab.Resource.__post_init__",,,,2,2,1,1,0,0,,, -Function,"travo.gitlab.Resource.__setattr__",,,,32,2,1,1,24,6,,, -Function,"travo.gitlab.Resource.get_api_url",,,,2,2,1,1,0,0,,, -Function,"travo.gitlab.Resource.get_attributes",,,,6,6,2,1,0,0,,, -Function,"travo.gitlab.Resource.setattributes",,,,59,26,42,5,25,8,,, -Class,"travo.gitlab.ResourceNotFoundError",0,0,11,2,2,,,0,0,4,0,0 -Class,"travo.gitlab.ResourceRef",0,4,1,78,24,,,42,12,0,7,1 -Function,"travo.gitlab.ResourceRef.__post_init__",,,,21,20,32,3,1,0,,, -Class,"travo.gitlab.Unknown",0,1,1,4,4,,,0,0,1,1,1 -Function,"travo.gitlab.Unknown.__repr__",,,,2,2,1,1,0,0,,, -Class,"travo.gitlab.User",0,2,20,57,50,,,3,4,4,1,1 -Function,"travo.gitlab.User.get_projects",,,,12,8,1,1,3,1,,, -Function,"travo.gitlab.get_type_hints",,,,6,6,2,1,0,0,,, -Function,"travo.gitlab.request_credentials_basic",,,,15,12,8,1,3,0,,, -Class,"travo.homework.Homework",0,6,6,238,157,,,44,44,0,46,6 -Function,"travo.homework.Homework.__init__",,,,8,4,1,1,3,1,,, -Function,"travo.homework.Homework.check_student",,,,85,62,31200,8,12,11,,, -Function,"travo.homework.Homework.get_copies",,,,23,13,2,1,6,4,,, -Function,"travo.homework.Homework.get_group",,,,6,2,1,1,3,1,,, -Function,"travo.homework.Homework.get_project",,,,30,22,4,4,3,5,,, -Function,"travo.homework.Homework.print_info",,,,57,45,242,3,4,8,,, -Function,"travo.i18n._",,,,21,2,1,1,15,4,,, -Class,"travo.jupyter_course.JupyterCourse",0,9,47,650,487,,,119,53,1,95,24 -Function,"travo.jupyter_course.JupyterCourse.autograde",,,,17,13,3,3,4,0,,, -Function,"travo.jupyter_course.JupyterCourse.clear_needs_manual_grade",,,,22,16,7,1,5,1,,, -Function,"travo.jupyter_course.JupyterCourse.collect_autograded",,,,55,30,9,4,21,4,,, -Function,"travo.jupyter_course.JupyterCourse.collect_for_nbgrader",,,,17,9,1,1,6,2,,, -Function,"travo.jupyter_course.JupyterCourse.collect_gradebooks",,,,28,23,5,4,4,1,,, -Function,"travo.jupyter_course.JupyterCourse.collect_scores",,,,32,26,3,3,6,2,,, -Function,"travo.jupyter_course.JupyterCourse.collect_status",,,,6,6,1,1,0,0,,, -Function,"travo.jupyter_course.JupyterCourse.convert_from_ipynb_to_md",,,,15,14,2,1,2,0,,, -Function,"travo.jupyter_course.JupyterCourse.convert_from_md_to_ipynb",,,,18,16,3,3,3,0,,, -Function,"travo.jupyter_course.JupyterCourse.ensure_autograded",,,,25,17,6,3,7,1,,, -Function,"travo.jupyter_course.JupyterCourse.export_scores",,,,15,12,1,1,4,0,,, -Function,"travo.jupyter_course.JupyterCourse.fetch_feedback",,,,31,25,6,1,3,3,,, -Function,"travo.jupyter_course.JupyterCourse.force_autograde",,,,21,18,6,3,3,0,,, -Function,"travo.jupyter_course.JupyterCourse.formgrader",,,,23,19,6,1,6,1,,, -Function,"travo.jupyter_course.JupyterCourse.generate_assignment",,,,39,33,32,1,7,0,,, -Function,"travo.jupyter_course.JupyterCourse.generate_feedback",,,,16,12,2,1,4,0,,, -Function,"travo.jupyter_course.JupyterCourse.get_nbgrader_config",,,,6,6,2,1,0,0,,, -Function,"travo.jupyter_course.JupyterCourse.grade_dashboard",,,,10,5,1,1,4,1,,, -Function,"travo.jupyter_course.JupyterCourse.instructor_dashboard",,,,10,5,1,1,4,1,,, -Function,"travo.jupyter_course.JupyterCourse.jupyter",,,,8,7,3,3,1,0,,, -Function,"travo.jupyter_course.JupyterCourse.merge_autograded_db",,,,46,33,20,1,10,3,,, -Function,"travo.jupyter_course.JupyterCourse.nbgrader_update_student_list",,,,23,21,13,6,2,0,,, -Function,"travo.jupyter_course.JupyterCourse.release_feedback",,,,22,22,4,4,0,0,,, -Function,"travo.jupyter_course.JupyterCourse.student_autograde",,,,60,51,192,6,5,4,,, -Function,"travo.jupyter_course.JupyterCourse.student_dashboard",,,,10,5,1,1,4,1,,, -Function,"travo.jupyter_course.JupyterCourse.validate",,,,32,29,42,1,3,0,,, -Function,"travo.jupyter_course.TrivialContextManager",,,,2,2,1,1,0,0,,, -Function,"travo.jupyter_course.jupyter_notebook",,,,11,6,2,1,4,1,,, -Function,"travo.jupyter_course.jupyter_notebook_in_hub",,,,40,26,4,1,10,5,,, -Class,"travo.nbgrader_utils.BadgeGradebookExporter",1,2,5,41,34,,,1,7,1,8,2 -Function,"travo.nbgrader_utils.BadgeGradebookExporter.export",,,,2,2,1,1,0,0,,, -Function,"travo.nbgrader_utils.BadgeGradebookExporter.record_assignment",,,,36,31,20,1,1,5,,, -Class,"travo.nbgrader_utils.CSVGradebookExporter",0,1,8,3,3,,,0,0,2,1,1 -Function,"travo.nbgrader_utils.CSVGradebookExporter.export",,,,2,2,1,1,0,0,,, -Class,"travo.nbgrader_utils.DataFrameGradebookExporter",1,2,7,46,42,,,3,3,1,7,4 -Function,"travo.nbgrader_utils.DataFrameGradebookExporter.__init__",,,,2,2,1,1,0,0,,, -Function,"travo.nbgrader_utils.DataFrameGradebookExporter.export",,,,12,11,1,1,2,0,,, -Function,"travo.nbgrader_utils.DataFrameGradebookExporter.record",,,,22,22,8,1,1,0,,, -Function,"travo.nbgrader_utils.DataFrameGradebookExporter.record_assignment",,,,6,6,1,1,0,0,,, -Class,"travo.nbgrader_utils.FormatedGradebookExporter",2,2,7,46,41,,,0,5,1,7,4 -Function,"travo.nbgrader_utils.FormatedGradebookExporter.__init__",,,,2,2,1,1,0,0,,, -Function,"travo.nbgrader_utils.FormatedGradebookExporter.export",,,,2,2,1,1,0,0,,, -Function,"travo.nbgrader_utils.FormatedGradebookExporter.record",,,,22,22,8,1,0,0,,, -Function,"travo.nbgrader_utils.FormatedGradebookExporter.record_assignment",,,,10,10,1,1,0,0,,, -Class,"travo.nbgrader_utils.GradebookExporter",3,2,3,17,15,,,0,2,0,3,3 -Function,"travo.nbgrader_utils.GradebookExporter.export",,,,2,2,1,1,0,0,,, -Function,"travo.nbgrader_utils.GradebookExporter.record",,,,6,6,1,1,0,0,,, -Function,"travo.nbgrader_utils.GradebookExporter.record_assignment",,,,6,6,1,1,0,0,,, -Class,"travo.nbgrader_utils.HTMLGradebookExporter",0,0,7,6,6,,,0,0,2,0,0 -Class,"travo.nbgrader_utils.MDGradebookExporter",0,0,7,5,5,,,0,0,2,0,0 -Class,"travo.nbgrader_utils.SVGGradebookExporter",0,1,6,3,3,,,0,0,2,1,1 -Function,"travo.nbgrader_utils.SVGGradebookExporter.export",,,,2,2,1,1,0,0,,, -Function,"travo.nbgrader_utils.export_scores",,,,70,62,140,4,4,4,,, -Function,"travo.nbgrader_utils.merge_assignment_gradebook",,,,26,18,17,1,5,3,,, -Function,"travo.nbgrader_utils.merge_submission_gradebook",,,,69,54,728,10,7,8,,, -Function,"travo.nbgrader_utils.remove_assignment_gradebook",,,,34,28,26,5,0,6,,, -Function,"travo.nbgrader_utils.remove_submission_gradebook",,,,14,14,3,3,0,0,,, -Function,"travo.nbgrader_utils.to_args",,,,6,6,2,1,0,0,,, -Module File,"travo.py",,,,3,1,0,0,2,0,,0, -Function,"travo.script.CLI",,,,129,54,21,4,55,20,,, -Function,"travo.script.add_object_parser",,,,92,11,2,1,67,14,,, -Function,"travo.script.add_object_parser.add_subobject",,,,4,4,1,1,0,0,,, -Function,"travo.script.add_parser_arguments_for_function",,,,80,27,9,1,44,9,,, -Function,"travo.script.add_subparsers_for_object_methods",,,,43,14,9,4,24,5,,, -Function,"travo.script.dummy",,,,2,2,1,1,0,0,,, -Function,"travo.script.main",,,,29,15,1,1,10,4,,, -Function,"travo.script.main.git",,,,5,2,1,1,3,0,,, -Function,"travo.utils.getLogger",,,,9,9,2,1,0,0,,, -Function,"travo.utils.git_get_origin",,,,19,7,4,3,11,1,,, -Function,"travo.utils.run",,,,15,8,2,1,6,1,,, -Function,"travo.utils.urlencode",,,,10,2,1,1,6,2,,, -Module File,"utils.py",,,,65,34,1,1,24,8,,9, -- GitLab From 50587033147259ba752559f88aed07814449b1c2 Mon Sep 17 00:00:00 2001 From: Tchaps Dev Date: Wed, 5 Jul 2023 08:10:34 -0400 Subject: [PATCH 17/17] sonar login aacount --- sonar-project.properties | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sonar-project.properties b/sonar-project.properties index a9c95a81..88915d3d 100644 --- a/sonar-project.properties +++ b/sonar-project.properties @@ -19,8 +19,9 @@ sonar.organization=UQAM sonar.host.url=http://72.167.48.165:9000 -sonar.login=admin -sonar.password=hX8^]*[yAq +# Account for login to the SonarQube Server +sonar.login=travo +sonar.password=travo123 sonar.token=sqp_e4cbd578d908625af088d9fe4318c477f3e01c5b -- GitLab