-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(wordcloud): add wordcloud_chineseize #15
Conversation
WalkthroughThe pull request introduces support for Chinese font configuration in the word cloud functionality of the zhplot library. A new function Changes
Assessment against linked issues
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
🧹 Nitpick comments (1)
tests/test_wordcloud.py (1)
3-3
: Specify the reason for noqa comment.Please specify which error is being suppressed with the noqa comment. For example:
# noqa: F401
for unused import.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
tests/test_wordcloud.py
(1 hunks)zhplot/__init__.py
(1 hunks)zhplot/wordcloud.py
(1 hunks)
✅ Files skipped from review due to trivial changes (1)
- zhplot/wordcloud.py
🔇 Additional comments (1)
zhplot/__init__.py (1)
2-6
: LGTM! Clean and consistent implementation.
The import statement and __all__
list update follow the existing pattern and properly expose the new wordcloud_chineseize
function.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #15 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 2 3 +1
Lines 21 28 +7
=========================================
+ Hits 21 28 +7 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (3)
README.md (1)
42-44
: Consider adding a wordcloud usage example.Since this PR introduces Chinese word cloud support, it would be helpful to add a usage example demonstrating the
wordcloud_chineseize
functionality, similar to the matplotlib example below it.Example addition:
### 支持的框架 - [x] [matplotlib](https://github.com/matplotlib/matplotlib) - [x] [wordcloud](https://github.com/amueller/word_cloud) + ### Word Cloud示例 + ```python + import zhplot + from wordcloud import WordCloud + + # Chinese text example + text = "中文 文字 云 示例" + wordcloud = WordCloud().generate(text) + + # Display the word cloud + plt.figure(figsize=(10, 5)) + plt.imshow(wordcloud, interpolation='bilinear') + plt.axis('off') + plt.show() + ```CHANGELOG.md (2)
7-7
: Fix grammar in changelog entry.The changelog entry is missing a preposition.
- Support chinese display in `wordcloud` + Support for Chinese display in `wordcloud`🧰 Tools
🪛 LanguageTool
[uncategorized] ~7-~7: Possible missing preposition found.
Context: ... ## [Unreleased] ### Added - Support chinese display inwordcloud
## [0.1.1] - 2...(AI_HYDRA_LEO_MISSING_TO)
6-8
: Consider adding more details to the changelog entry.The changelog entry could be more specific about what functionality was added.
### Added - Support chinese display in `wordcloud` + ### Added + - Added `wordcloud_chineseize()` function to support Chinese text display in word clouds using Noto Sans SC font🧰 Tools
🪛 LanguageTool
[uncategorized] ~7-~7: Possible missing preposition found.
Context: ... ## [Unreleased] ### Added - Support chinese display inwordcloud
## [0.1.1] - 2...(AI_HYDRA_LEO_MISSING_TO)
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
CHANGELOG.md
(1 hunks)README.md
(2 hunks)
🧰 Additional context used
🪛 LanguageTool
CHANGELOG.md
[uncategorized] ~7-~7: Possible missing preposition found.
Context: ... ## [Unreleased] ### Added - Support chinese display in wordcloud
## [0.1.1] - 2...
(AI_HYDRA_LEO_MISSING_TO)
🔇 Additional comments (1)
README.md (1)
42-44
: LGTM! Clear documentation of supported frameworks.
The new section clearly lists the supported frameworks with proper links to their repositories.
Close #10
Summary by CodeRabbit
New Features
zhplot
and list supported frameworks.Chores