Skip to content

Add grades_summary.json data#4

Merged
kowyo-bot merged 6 commits intoHITSZ-OpenAuto:mainfrom
kowyo-bot:chore/add-grades-summary-json
Jan 31, 2026
Merged

Add grades_summary.json data#4
kowyo-bot merged 6 commits intoHITSZ-OpenAuto:mainfrom
kowyo-bot:chore/add-grades-summary-json

Conversation

@kowyo-bot
Copy link
Contributor

@kowyo-bot kowyo-bot commented Jan 31, 2026

Migrates grades_summary.toml from HITSZ-OpenAuto/repos-management into this repo as JSON at src/hoa_majors/data/grades_summary.json.

Conventions / schema:

  • Removed course_name for all courses.
  • Top-level JSON is a mapping: {<course_code>: {<entry_key>: <grade_items>}}
  • Each course contains SAME-LEVEL entries keyed by one of:
    • default
    • 入学年份_default (e.g. 2024_default)
    • 入学年份_专业 (e.g. 2021_自动化)
      CLI lookup order: 入学年份_专业 -> 入学年份_default -> default.
  • grade_items is a flat ordered list of objects:
    • parseable: {"name": str, "percent": str}
    • unparseable: {"name": str} (percent key omitted)

A helper script is included to regenerate the JSON:

  • uv run python scripts/update_grades_summary.py

Non-year variants in the upstream file (e.g. teacher names, 大一/大二) are dropped; if a course only has such variants, ONE representative value is kept under "default".

@gemini-code-assist
Copy link

Summary of Changes

Hello @kowyo-bot, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request integrates essential course grade information into the repository by adding a new grades_summary.json file. The data, sourced from an external repository, has been carefully transformed to ensure a standardized and structured format, particularly for complex grade breakdowns. This enhancement provides a centralized and easily consumable resource for understanding course grading policies.

Highlights

  • New Data File Added: A new file, src/hoa_majors/data/grades_summary.json, has been added to the repository.
  • Course Grade Data Migration: This pull request migrates comprehensive course grade summary data from the HITSZ-OpenAuto/repos-management repository.
  • Data Transformation Applied: The migrated data underwent a transformation process where specific grade strings were converted into structured JSON objects for improved data representation and consistency.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request migrates course grading information into a new JSON data file. While this is a valuable addition, the data in the new file has several inconsistencies, structural issues, and potential errors. I've provided specific comments on these issues, including a suggestion for a structural simplification to improve maintainability, pointing out a critical data error, and highlighting various inconsistencies. Addressing these points will significantly improve the quality and usability of this new dataset.

"COMP2050": {
"2021": {
"default": {
"grade": "作业 10% + 实验 20% + 作业 70%"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

critical

The grade breakdown for COMP2050 in 2021 lists "作业" (homework) twice. This is very likely a data error. Please verify and correct the grading components. The percentages (10% + 20% + 70%) sum to 100%, but the components are ambiguous.

Comment on lines 5 to 9
"default": {
"default": {
"grade": "作业 10% + 课堂实验 30%+ 机器人考核 30% + 期末考试 30%"
}
}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

The nested structure with two default keys, like default: { default: { grade: ... } }, seems redundant and is repeated throughout the file. Simplifying this to default: { grade: ... } would make the structure cleaner and easier to parse. This simplification should be applied consistently across the file for all entries.

      "default": {
        "grade": "作业 10% + 课堂实验 30% + 机器人考核 30% + 期末考试 30%"
      }

"course_name": "自动化认知与实践",
"default": {
"default": {
"grade": "作业 10% + 课堂实验 30%+ 机器人考核 30% + 期末考试 30%"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

There are some formatting inconsistencies in the grade strings throughout the file.

  • On this line, there's no space before the + sign: ...30%+ 机器人....
  • A similar issue exists on line 89: ...25%+ 实验....
  • Some lines have trailing whitespace (e.g., line 55).

For consistency and to prevent potential parsing issues, it would be best to have a consistent format, for example: ... 30% + .... Applying this consistently would improve data quality.

          "grade": "作业 10% + 课堂实验 30% + 机器人考核 30% + 期末考试 30%"

Comment on lines 188 to 200
"AUTO3028": {
"2021": {
"default": {
"grade": "作业 30% + 期末考试 70%"
}
},
"2023": {
"default": {
"grade": "作业 40% + 期末考试 60%"
}
},
"course_name": "数学规划与数值优化"
},

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

This course has year-specific grading information but lacks a top-level default entry. This is inconsistent with other courses like AUTO3002B (lines 67-84). Adding a default entry, perhaps by using the most recent year's data as the default, would improve consistency and prevent potential issues for data consumers that expect a default scheme. A similar issue exists for COMP2050, EE1007, PHYS1001, etc.

Comment on lines 696 to 698
"EE3015": {
"course_name": "电力系统分析"
},

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The entry for EE3015 only contains the course name and has no grading information. If this is a placeholder, it might be better to indicate that explicitly. If the data is missing, it should be added for completeness.

Comment on lines 811 to 815
"大一": {
"default": {
"grade": "作业 40% + 期末考试 60%"
}
},

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The entry for "大一" is identical to the default entry for LANG100X. This is redundant. If they are the same, the "大一" entry can be removed to simplify the data.

@kowyo-bot kowyo-bot merged commit 99da33c into HITSZ-OpenAuto:main Jan 31, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant