SCAICT / SCAICT-uwu

中電喵:住在中電會 Discord 伺服器的貓咪
https://dc.scaict.org
Apache License 2.0
35 stars 4 forks source link

Version 0.1.9 #147

Open winstonsung opened 2 weeks ago

winstonsung commented 2 weeks ago

Summary by CodeRabbit

Release Notes

coderabbitai[bot] commented 2 weeks ago

Walkthrough

The changes in this pull request introduce a new JSON structure for localization in the zh-hant.json file, which was previously empty. This file now includes a metadata section with authors and various key-value pairs for translations related to course functionalities. Additionally, a docstring has been added to the website_flask.py file, providing an entry point description for the SCAICT store website using Flask. The pyproject.toml, requirements_dev.txt, and requirements.txt files have also been updated to reflect new stable versions of dependencies. Other files were modified to enhance clarity and functionality.

Changes

File Change Summary
src/scaict_uwu/i18n/course/zh-hant.json Introduced a new JSON structure with metadata and multiple key-value pairs for course-related translations.
src/scaict_uwu/website_flask.py Added a docstring describing the entry point for the Flask website, with a TODO note for further documentation.
pyproject.toml Updated project version from 0.1.9.dev0 to 0.1.9 and modified several dependency versions.
requirements_dev.txt Updated several development dependency versions, including astroid, black, dill, platformdirs, pylint, and pytest.
requirements.txt Updated several dependency versions, including aiohappyeyeballs, aiohttp, certifi, idna, markupsafe, multidict, py-cord, urllib3, and yarl.
RELEASE-NOTES-0.1.md Added a new file detailing the development history and version changes from 0.1.0 to 0.1.7.
.env.example Added new configuration variables for database and application settings, enhancing organization and readability.
CONTRIBUTING.md Corrected a typographical error in the database naming conventions section and clarified requirements.
README.md Updated badge labels to title case, refined section headers, and improved overall document clarity.
app.py Enhanced configuration and functionality by integrating environment variables and restructuring logic.
cog/api/gift.py Introduced a new Gift class for managing Discord API interactions related to sending gifts.
cog/comment.py Made cosmetic changes to comments for clarity in the Comment class methods.
cog/game.py Corrected a comment in the rock_paper_scissors method for clarity.
docs/abstract_schema_table.json Revised JSON schema structure, changing the root type and expanding column data types.
static/switch-btn.js Removed a redundant line in the switchRight function, simplifying the code.
templates/home.html Corrected a comment for clarity in the JavaScript section without impacting functionality.
test/enumstruct.py Introduced a new file defining an enumeration class GiftType for managing gift types.

Poem

In the realm of code where translations gleam,
New words take flight, like a bright, playful dream.
With metadata shining and docstrings in tow,
Our interface dances, ready to glow!
Here's to the changes, both clever and neat,
A purr-fect update, oh, what a treat! 🐾✨


📜 Recent review details **Configuration used: .coderabbit.yaml** **Review profile: ASSERTIVE**
📥 Commits Files that changed from the base of the PR and between c72e4417693e438a89c8baa3f4d5781e09e401f7 and a000fc1bc0acdf95a29d7f88a729a7c1a74b894e.
📒 Files selected for processing (2) * pyproject.toml (2 hunks) * requirements.txt (1 hunks)
🔇 Additional comments (5)
requirements.txt (3)
`6-6`: **Purr-fect security updates! 😺** Good job updating certifi and urllib3! These updates include important security patches to keep your application safe and sound. Also applies to: 21-21 --- `1-23`: **Looking good overall! 🐱** All dependencies are using stable versions, and the incremental updates look reasonable. *\*happy tail swish\** --- `15-15`: **Meow! Watch out for breaking changes in markupsafe! 🐱** The upgrade from markupsafe 2.1.5 to 3.0.2 is a major version bump that might introduce breaking changes. Please ensure your templates and HTML escaping still work as expected. Let me sniff around for potential issues:
✅ Verification successful Let me try another approach to sniff out any potential usage of markupsafe in the codebase. This will help me check both Python files and template files for any markupsafe usage patterns. As a curious cat, I want to be thorough in my investigation! 🐱 --- **Purr-fectly safe to proceed with the markupsafe update! 😺** After my thorough investigation, I found that markupsafe is only listed as a dependency in requirements.txt but isn't directly used in the codebase. It's likely a transitive dependency required by another package. Since there's no direct usage of markupsafe's features in the code, the major version bump shouldn't cause any immediate issues. *Meow tip*: Keep an eye on the packages that depend on markupsafe during testing, but there's no need to block this update! 🐱
🏁 Scripts executed The following scripts were executed for the analysis: Script: ```shell #!/bin/bash # Search for markupsafe usage patterns that might be affected rg -l "markupsafe|Markup|escape|soft_unicode" ``` Length of output: 64 --- Script: ```shell #!/bin/bash # Look for Python files that might use markupsafe fd -e py --exec rg -l "from markupsafe|import markupsafe|Markup\.|escape\(" {} \; # Also check for template files that might be affected fd -e html -e jinja -e j2 --exec rg -l "escape|safe" {} \; ``` Length of output: 150
pyproject.toml (2)
`8-8`: **Purr-fect version bump! 😺** The version change from "0.1.9.dev0" to "0.1.9" indicates we're ready for a stable release. Meow-velous! --- `33-33`: **Let me sniff these dependency updates... 🐱** All dependency updates look like safe minor version bumps: - py-cord: 2.6.0 → 2.6.1 - black: 24.8.0 → 24.10.0 - pylint: 3.2.6 → 3.3.1 - pytest: 8.3.2 → 8.3.3 Let me check if these versions play nicely together! Also applies to: 39-41
✅ Verification successful Let me verify the actual available versions on PyPI to provide accurate information. --- **Purr-fect news! All these dependency versions are valid and up-to-date! 😺** My whiskers have detected that all the specified versions in pyproject.toml match exactly with the latest available versions on PyPI: - py-cord 2.6.1 ✓ - black 24.10.0 ✓ - pylint 3.3.1 ✓ - pytest 8.3.3 ✓ These are all safe and proper version bumps, and I can confirm they're the latest releases available. No hairballs to worry about here! 🐱
🏁 Scripts executed The following scripts were executed for the analysis: Script: ```shell #!/bin/bash # Check if the specified versions exist in PyPI echo "=== Checking PyPI for package versions ===" for pkg in "py-cord==2.6.1" "black==24.10.0" "pylint==3.3.1" "pytest==8.3.3"; do curl -s "https://pypi.org/pypi/${pkg%=*}/json" | jq -r --arg ver "${pkg#*==}" '.releases | has($ver)' done ``` Length of output: 808 --- Script: ```shell #!/bin/bash # Check latest versions of packages on PyPI echo "=== Checking latest versions on PyPI ===" for pkg in "py-cord" "black" "pylint" "pytest"; do echo "Latest versions for $pkg:" curl -s "https://pypi.org/pypi/${pkg}/json" | jq -r '.releases | keys[]' | sort -V | tail -n 5 done # Also check what versions are currently in use echo -e "\n=== Current versions in pyproject.toml ===" cat pyproject.toml | grep -E "py-cord|black|pylint|pytest" ``` Length of output: 1296
--- 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?
❤️ Share - [X](https://twitter.com/intent/tweet?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A&url=https%3A//coderabbit.ai) - [Mastodon](https://mastodon.social/share?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A%20https%3A%2F%2Fcoderabbit.ai) - [Reddit](https://www.reddit.com/submit?title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&text=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code.%20Check%20it%20out%3A%20https%3A//coderabbit.ai) - [LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fcoderabbit.ai&mini=true&title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&summary=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code)
🪧 Tips ### Chat There are 3 ways to chat with [CodeRabbit](https://coderabbit.ai): - Review comments: Directly reply to a review comment made by CodeRabbit. Example: - `I pushed a fix in commit , please review it.` - `Generate unit testing code for this file.` - `Open a follow-up GitHub issue for this discussion.` - Files and specific lines of code (under the "Files changed" tab): Tag `@coderabbitai` in a new review comment at the desired location with your query. Examples: - `@coderabbitai generate unit testing code for this file.` - `@coderabbitai modularize this function.` - PR comments: Tag `@coderabbitai` in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples: - `@coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.` - `@coderabbitai read src/utils.ts and generate unit testing code.` - `@coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.` - `@coderabbitai help me debug CodeRabbit configuration file.` 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) - `@coderabbitai pause` to pause the reviews on a PR. - `@coderabbitai resume` to resume the paused reviews. - `@coderabbitai review` to trigger an incremental review. This is useful when automatic reviews are disabled for the repository. - `@coderabbitai full review` to do a full review from scratch and review all the files again. - `@coderabbitai summary` to regenerate the summary of the PR. - `@coderabbitai resolve` resolve all the CodeRabbit review comments. - `@coderabbitai configuration` to show the current CodeRabbit configuration for the repository. - `@coderabbitai help` to get help. ### Other keywords and placeholders - Add `@coderabbitai ignore` anywhere in the PR description to prevent this PR from being reviewed. - Add `@coderabbitai summary` to generate the high-level summary at a specific location in the PR description. - Add `@coderabbitai` anywhere in the PR title to generate the title automatically. ### Documentation and Community - Visit our [Documentation](https://coderabbit.ai/docs) for detailed information on how to use CodeRabbit. - Join our [Discord Community](http://discord.gg/coderabbit) to get help, request features, and share feedback. - Follow us on [X/Twitter](https://twitter.com/coderabbitai) for updates and announcements.
YuevUwU commented 3 days ago

anything to do before release?

winstonsung commented 3 days ago

Nothing to do during upgrade as far as I know.

YuevUwU commented 3 days ago

any plan about migrating code to src folder, or develop in original path New team is assigning tasks for uwu, maybe we need to discuss the future plan

winstonsung commented 3 days ago

Any plan about migrating code to src folder, or develop in original path?

The current plan is to migrate code to the src folder while keeping some entrypoints in the root folder.

There were attempts about using the flat layout, but it turns out to be more complicated than the src layout, thus being reverted.

New team is assigning tasks for uwu, maybe we need to discuss the future plan.

Yeah, of course.