Skip to content

chore: remove huangli and lunar calendar components#141

Merged
mhduiy merged 1 commit into
linuxdeepin:masterfrom
mhduiy:huangli
Jul 17, 2025
Merged

chore: remove huangli and lunar calendar components#141
mhduiy merged 1 commit into
linuxdeepin:masterfrom
mhduiy:huangli

Conversation

@mhduiy
Copy link
Copy Markdown
Contributor

@mhduiy mhduiy commented Jul 17, 2025

Removed huangli database and generator along with lunar calendar functionality since the calendar now has built-in huangli support. This includes:

  1. Deleted huangli-generator tool and its database files
  2. Removed lunar-calendar service and related code
  3. Updated Makefile and spec file to reflect these removals
  4. Cleaned up no longer needed dependencies and configurations

The removal was done because the system calendar now natively includes huangli data, making these separate components redundant and unnecessary for maintenance.

chore: 移除黄历和农历日历组件

由于日历现已内置黄历支持,移除了黄历数据库和生成器以及农历日历功能。具体
包括:

  1. 删除了huangli-generator工具及其数据库文件
  2. 移除了lunar-calendar服务及相关代码
  3. 更新了Makefile和spec文件以反映这些变更
  4. 清理了不再需要的依赖项和配置

此次移除是因为系统日历现已原生包含黄历数据,使得这些独立组件变得冗余且无
需继续维护。

Summary by Sourcery

Remove deprecated huangli and lunar calendar components now covered by the system calendar

Build:

  • Update Makefile to drop huangli and lunar-calendar entries
  • Remove huangli data files from the RPM spec

Chores:

  • Delete huangli-generator tool, its database files, and related code
  • Remove lunar-calendar service and related code and tests
  • Clean up no longer needed dependencies and configurations

Removed huangli database and generator along with lunar calendar
functionality since the calendar now has built-in huangli support. This
includes:
1. Deleted huangli-generator tool and its database files
2. Removed lunar-calendar service and related code
3. Updated Makefile and spec file to reflect these removals
4. Cleaned up no longer needed dependencies and configurations

The removal was done because the system calendar now natively includes
huangli data, making these separate components redundant and unnecessary
for maintenance.

chore: 移除黄历和农历日历组件

由于日历现已内置黄历支持,移除了黄历数据库和生成器以及农历日历功能。具体
包括:
1. 删除了huangli-generator工具及其数据库文件
2. 移除了lunar-calendar服务及相关代码
3. 更新了Makefile和spec文件以反映这些变更
4. 清理了不再需要的依赖项和配置

此次移除是因为系统日历现已原生包含黄历数据,使得这些独立组件变得冗余且无
需继续维护。
Copy link
Copy Markdown

@sourcery-ai sourcery-ai Bot left a comment

Choose a reason for hiding this comment

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

Hey @mhduiy - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@deepin-ci-robot
Copy link
Copy Markdown

deepin pr auto review

这个提交移除了与黄历(huangli)和农历(lunar-calendar)相关的代码和文件。具体来说,移除了以下内容:

  1. Makefile 中与黄历和农历相关的测试和二进制文件。
  2. huangli-generator 目录及其所有文件,包括 .gitignoreMakefileREADME.org、数据库文件 huangli.dbhuangliBase.dbmain.gorequest.go
  3. lunar-calendar 目录及其所有文件,包括 .gitignorecalendar.goexported_methods_auto.gohuangli.golunar_calendar_test.gomain.gomanager.go
  4. rpm/dde-api.spec 中与黄历和农历相关的数据文件。

这个改动可能会影响依赖于黄历和农历功能的应用程序。如果这些功能不再需要,那么这个改动是合理的。否则,应该评估移除这些功能的影响,并确保其他应用程序能够正常工作。

此外,移除的代码中包含了一些数据库操作和HTTP请求的代码,这些代码可能涉及到数据库连接和HTTP请求的关闭操作。在移除这些代码时,应该确保没有资源泄漏,例如数据库连接和HTTP请求没有被正确关闭。

最后,这个提交没有包含任何新的测试代码,因此无法评估移除这些功能后,代码的健壮性是否受到影响。建议在移除这些功能后,添加相应的测试代码,以确保代码的稳定性和可靠性。

@sourcery-ai
Copy link
Copy Markdown

sourcery-ai Bot commented Jul 17, 2025

Reviewer's Guide

This PR eliminates the standalone huangli-generator and lunar-calendar modules and updates build and packaging scripts accordingly, leveraging the calendar’s native huangli support.

Entity relationship diagram for removed huangli database

erDiagram
    HUANGLI_DB {
        int id
        date date
        string auspicious
        string inauspicious
    }
    %% HUANGLI_DB table and its fields have been removed from the system.
Loading

Class diagram for removed huangli and lunar-calendar components

classDiagram
    %% huangli-generator (removed)
    class HuangliGenerator {
        +main()
        +request.go
    }
    %% huangli (removed)
    class HuangliDB {
        +Open()
        +Query()
        +Close()
    }
    %% lunar-calendar (removed)
    class LunarCalendar {
        +GetLunarDate()
        +GetHuangliInfo()
        +main()
    }
    class LunarCalendarManager {
        +Load()
        +Reload()
        +Get()
    }
    HuangliGenerator --> HuangliDB : uses
    LunarCalendar --> HuangliDB : queries
    LunarCalendar --> LunarCalendarManager : managed by
    %% All these classes and their relationships have been removed.
Loading

File-Level Changes

Change Details Files
Removed huangli-generator tool and database
  • Deleted huangli-generator directory and its Makefile, README, source and request files
  • Removed huangli/db.go and its test file
huangli-generator/.gitignore
huangli-generator/Makefile
huangli-generator/README.org
huangli-generator/main.go
huangli-generator/request.go
huangli/db.go
huangli/db_test.go
Removed lunar-calendar service and code
  • Deleted lunar-calendar directory and its source, manager and test files
  • Removed lunar-calendar binary entry from build targets
lunar-calendar/.gitignore
lunar-calendar/calendar.go
lunar-calendar/exported_methods_auto.go
lunar-calendar/huangli.go
lunar-calendar/lunar_calendar_test.go
lunar-calendar/main.go
lunar-calendar/manager.go
Updated build and packaging configurations
  • Removed huangli, huangli-generator and lunar-calendar from Makefile TESTS and BINARIES
  • Deleted huangli database file references from rpm spec
Makefile
rpm/dde-api.spec

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@deepin-ci-robot
Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: fly602, mhduiy

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@mhduiy mhduiy merged commit 6aa3897 into linuxdeepin:master Jul 17, 2025
14 of 16 checks 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.

3 participants