{"id":13305852,"url":"https://github.com/raoulnormand/easygrader","last_synced_at":"2025-03-10T14:32:16.631Z","repository":{"id":191266181,"uuid":"498875528","full_name":"raoulnormand/easygrader","owner":"raoulnormand","description":"A library to easily calculate course grades.","archived":false,"fork":false,"pushed_at":"2022-06-15T19:45:59.000Z","size":19,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2023-08-29T04:54:02.537Z","etag":null,"topics":["gradebook","gradescope","numpy","pandas","teaching-tool"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/raoulnormand.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2022-06-01T19:40:25.000Z","updated_at":"2023-08-29T04:54:10.890Z","dependencies_parsed_at":"2023-08-29T05:08:23.201Z","dependency_job_id":null,"html_url":"https://github.com/raoulnormand/easygrader","commit_stats":null,"previous_names":["raoulnormand/easygrader"],"tags_count":null,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raoulnormand%2Feasygrader","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raoulnormand%2Feasygrader/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raoulnormand%2Feasygrader/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raoulnormand%2Feasygrader/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/raoulnormand","download_url":"https://codeload.github.com/raoulnormand/easygrader/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242868485,"owners_count":20198490,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["gradebook","gradescope","numpy","pandas","teaching-tool"],"created_at":"2024-07-29T17:54:36.785Z","updated_at":"2025-03-10T14:32:16.310Z","avatar_url":"https://github.com/raoulnormand.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Easygrader, a library for easy grade computation\n\nThis library is meant to help compute grades obtained from different platforms, such as Gradescope, WebAssign, Brightspace, etc. In essence, it takes different gradebooks, merges them as a pandas DataFrame, computes the final grade according to a given grading scheme, and computes a letter grade.\n\n## Technologies\n\nProject created with:\n- Python 3.10.4\n- numpy 1.21.5\n- pandas 1.4.2\n\n## Requirements\n\nTo install the requirements for the project, run\n```\npip install -r requirements.txt\n```\n\n## Example\n\nSee a detailed example in the example.py file. Details are below.\n\n## Documentation\n\n### Standard columns\n\nThe easygrader module gives access to several classes. More options than the ones discussed below are availale: please see the code for details.\n\nSeveral classes can take an argument info_col. This is a dictionary that describes the headers used for the columns containing the first name, last name, ID, and email of the students. Default to\n```\ninfo_col = {'last': 'Last Name',\n            'first' = 'First Name',\n            'id', = 'ID',\n            'email' = 'Email'}\n```\nIf a gradebook only has one column for the full name, then the name is split (see Gradebook class).\n\nFor all gradeboks and for merging them, the ID column is used as a unique identifier for students. If no ID is given, it is inferred  to be the username of the email. If both are missing, an exception is raised.\n\n### Gradebook class\n\nA Gradebok is a DataFrame obtained from a .csv file, with a standard formatting. The file should have\n- headers on the first row;\n- either a full name column, or a first name + a last name column;\n- an ID column and / or an email column.\n\nFor instance, a .csv file obtained from Gradescope is already formatted correctly, but a WebAssign file needs a bit of clean up.\n\nThe headers used in the files should be provided. n alternative if to provide a file_type 'GS' (for Gradescope headers) or 'WA' (WebAssign).\n\n### Test class\n\nA Test is describes a specific test, such as 'Quiz 1' or 'HW 2', with its max number of points. It can have several versions. For instance, if\n```\n- name = 'Quiz 5'\n- nb_versions = 2\n- max_points = 10\n```\nthen the grades for this test should appear in the columns 'Quiz 5 - v1' and 'Quiz 5 - v2' of one of the Gradebooks, and each is graded out of 10. When creating a Course (see below), the grades of each version are then merged together into a single 'Quiz 5' column.\n\nA Test should never be used by itself, and is \"hidden\" inside an Assignment.\n\n### Assignment class\n\nAn Assignment describes a specific type of assignment, such as 'Quiz' or 'HW'. In essence, it consists of a sequence of tests. For instance, if\n```\n- name = 'Quiz'\n- nb_versions = 3\n- nb_tests = 6\n```\nthen the corresponding Assignment will have an attibute `tests` that is a list of 6 Tests with name 'Quiz 1', ..., 'Quiz 6', and 3 versions each. \n\nAdditionally, an Assignment should contain a GradingScheme that describes how the average of the Tests it contains is calculated.\n\n### GradingScheme class\n\nA GradingScheme is essentially a function applied to some rows of the DataFrame in order to compute an average. It can be applied to an assignment or to a Course.\n- for an Assignment, it is applied to the Tests it contains;\n- for a Course, it is applied to the average of each Assignment (where the average is calculated using the Assignment's GradingScheme).\nAn instance of a GradingScheme returns the unweighted average by default, but it can be used to drop the $k$ lowest grades, weighted averages, or use any user-defined function.\n\n### Course class\n\nA Course contains Gradebooks and Assignments. It has a `gradebook` attribute which contains a concatenation of all the Gradebooks.  It is important to note that the first Gradebook is used as a reference containing all the students. The other gradebooks will be appended to the first Gradebook, using their ID as index. If there are students in other Gradebooks that do not appear in the first Gradebook they will not be added. This is meant to avoid adding extra students who dropped out. Typically, the first Gradebook would be synchronized from the class list.\n\nIt also has a `grades` attribute that contains a summary of the grades of all the tests, with different versions of each test merged.\n\nThe roster can be recovered with the `roster` attribute.\n\nThe most useful feature of a Course is the `compute_grades` method, which can be called with\n\n```\ngrades = course.compute_grades(grading_scheme, thresholds, letters, include, include_others)\n```\n\nThis returns a DataFrame whose index is the ID of the students, and with their names and grades.\n- `grading_scheme` is a GradingScheme that is applied to the average of each Assignment.\n- `thresholds` are the thresholds for the letter grades, in decreasing order.\n- `letters` are the letter grades, in decreaing order.\n- `include` are the columns to include, out of 'tests' (grades of each test), 'averages' (averages of each assignment), 'final' (final grade calculated with the Course GradinScheme), 'letter' (letter grades), 'missed' (number of each assignment missed). Does not include 'tests' by default,\n- `include_others` are the name of other columns to include, e.g. 'Comments'.\n\nYou can then import this file as a csv with\n```\ngrades.to_csv(path_to_grades_file, index=False)\n```\n\n### create_import function\n\nThis function take a .csv file and creates a .csv file to import directly to the Brightspace gradebook. For instance, to obtain an import file that contains the letter grades directly, do\n```\ncreate_import(path_to_grades_file, path_to_import_file)\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fraoulnormand%2Feasygrader","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fraoulnormand%2Feasygrader","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fraoulnormand%2Feasygrader/lists"}