feat: enhance holiday data handling and add 2024/2025 holiday JSON files#236
feat: enhance holiday data handling and add 2024/2025 holiday JSON files#236deepin-bot[bot] merged 1 commit into
Conversation
- Updated DbusHuangLiRequest to process holiday data from new JSON structure. - Modified lunardatastruct.h to adjust HolidayInfo structure. - Added new holiday JSON files for 2024 and 2025 to resources. - Refactored DHuangLiDataBase to read holiday data from JSON files instead of SQL queries. Log: enhance holiday data handling and add 2024/2025 holiday JSON files Bug: https://pms.uniontech.com/bug-view-298927.html
Reviewer's Guide by SourceryThis pull request enhances the holiday data handling by switching from SQL queries to JSON files, adds holiday data for 2024 and 2025, and updates translations. The changes involve modifying the data processing logic, adding new JSON files, and adjusting the structure of the HolidayInfo struct. No diagrams generated as the changes look simple and do not need a visual representation. File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Hey @dengzhongyuan365-dev - I've reviewed your changes - here's some feedback:
Overall Comments:
- Consider using a more robust JSON parsing library to handle potential variations in the JSON structure.
- Ensure the date format string "yyyy-MM-dd" is consistent across all JSON files to avoid parsing errors.
Here's what I looked at during the review
- 🟡 General issues: 1 issue found
- 🟢 Security: all looks good
- 🟢 Testing: all looks good
- 🟢 Complexity: all looks good
- 🟢 Documentation: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
|
Note
详情{
"calendar-service/assets/holiday-cn/2022.json": [
{
"line": " \"$schema\": \"https://raw.githubusercontent.com/NateScarlet/holiday-cn/master/schema.json\",",
"line_number": 2,
"rule": "S35",
"reason": "Url link | a43bfa6ba7"
},
{
"line": " \"$id\": \"https://raw.githubusercontent.com/NateScarlet/holiday-cn/master/2022.json\",",
"line_number": 3,
"rule": "S35",
"reason": "Url link | 335e709177"
},
{
"line": " \"http://www.gov.cn/zhengce/zhengceku/2021-10/25/content_5644835.htm\"",
"line_number": 6,
"rule": "S35",
"reason": "Url link | 90da8a89b3"
}
],
"calendar-service/assets/holiday-cn/2020.json": [
{
"line": " \"$schema\": \"https://raw.githubusercontent.com/NateScarlet/holiday-cn/master/schema.json\",",
"line_number": 2,
"rule": "S35",
"reason": "Url link | a43bfa6ba7"
},
{
"line": " \"$id\": \"https://raw.githubusercontent.com/NateScarlet/holiday-cn/master/2020.json\",",
"line_number": 3,
"rule": "S35",
"reason": "Url link | 843c84a738"
},
{
"line": " \"http://www.gov.cn/zhengce/zhengceku/2019-11/21/content_5454164.htm\",",
"line_number": 6,
"rule": "S35",
"reason": "Url link | a4827650b4"
},
{
"line": " \"http://www.gov.cn/zhengce/zhengceku/2020-01/27/content_5472352.htm\"",
"line_number": 7,
"rule": "S35",
"reason": "Url link | e13024345b"
}
],
"calendar-service/assets/holiday-cn/2025.json": [
{
"line": " \"$schema\": \"https://raw.githubusercontent.com/NateScarlet/holiday-cn/master/schema.json\",",
"line_number": 2,
"rule": "S35",
"reason": "Url link | a43bfa6ba7"
},
{
"line": " \"$id\": \"https://raw.githubusercontent.com/NateScarlet/holiday-cn/master/2025.json\",",
"line_number": 3,
"rule": "S35",
"reason": "Url link | feef2d31dc"
},
{
"line": " \"https://www.gov.cn/zhengce/zhengceku/202411/content_6986383.htm\"",
"line_number": 6,
"rule": "S35",
"reason": "Url link | f187f32d0d"
}
],
"calendar-service/assets/holiday-cn/2021.json": [
{
"line": " \"$schema\": \"https://raw.githubusercontent.com/NateScarlet/holiday-cn/master/schema.json\",",
"line_number": 2,
"rule": "S35",
"reason": "Url link | a43bfa6ba7"
},
{
"line": " \"$id\": \"https://raw.githubusercontent.com/NateScarlet/holiday-cn/master/2021.json\",",
"line_number": 3,
"rule": "S35",
"reason": "Url link | 3b8fb29762"
},
{
"line": " \"http://www.gov.cn/zhengce/zhengceku/2020-11/25/content_5564127.htm\"",
"line_number": 6,
"rule": "S35",
"reason": "Url link | 274f5033e2"
}
],
"calendar-service/assets/holiday-cn/2019.json": [
{
"line": " \"$schema\": \"https://raw.githubusercontent.com/NateScarlet/holiday-cn/master/schema.json\",",
"line_number": 2,
"rule": "S35",
"reason": "Url link | a43bfa6ba7"
},
{
"line": " \"$id\": \"https://raw.githubusercontent.com/NateScarlet/holiday-cn/master/2019.json\",",
"line_number": 3,
"rule": "S35",
"reason": "Url link | 13160397df"
},
{
"line": " \"http://www.gov.cn/zhengce/zhengceku/2018-12/06/content_5346276.htm\",",
"line_number": 6,
"rule": "S35",
"reason": "Url link | 0383e0fa1e"
},
{
"line": " \"http://www.gov.cn/zhengce/zhengceku/2019-03/22/content_5375877.htm\"",
"line_number": 7,
"rule": "S35",
"reason": "Url link | 8ff6055cb1"
}
],
"calendar-service/src/dbmanager/dhuanglidatabase.cpp": [
{
"line": "const QString HolidayUpdateURLPrefix =\"https://cdn-nu-common.uniontech.com/deepin-calendar\";",
"line_number": 21,
"rule": "S35",
"reason": "Url link | 0b2e847e1f"
}
]
} |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: dengzhongyuan365-dev, lzwind The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
/forcemerge |
|
This pr force merged! (status: unstable) |
65b152f
into
linuxdeepin:develop/snipe
Log: enhance holiday data handling and add 2024/2025 holiday JSON files
Bug: https://pms.uniontech.com/bug-view-298927.html
Summary by Sourcery
Enhance holiday data handling by migrating from SQL queries to JSON-based holiday data processing for 2024 and 2025
New Features:
Enhancements:
Chores: