SCAICT / SCAICT-uwu

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

Version 0.2.0 #147

Open winstonsung opened 1 month ago

winstonsung commented 1 month ago

Summary by CodeRabbit

Release Notes

coderabbitai[bot] commented 1 month ago

Walkthrough

The changes encompass a variety of updates across multiple files, including the introduction of localization for Chinese in zh-hant.json, updates to project dependencies in pyproject.toml, requirements.txt, and requirements_dev.txt, and the addition of new classes and methods in the application code. Notably, new configuration variables were added to .env.example, and several new files were introduced to enhance the functionality of the SCAICT-uwu project. The updates also include corrections to documentation and comments, ensuring clarity and consistency throughout the codebase.

Changes

File Path Change Summary
src/scaict_uwu/i18n/course/zh-hant.json New localization JSON structure added with metadata and translations for course functionalities.
pyproject.toml Project version updated to 0.2.0, dependencies upgraded for flask, mysql-connector-python, and py-cord.
requirements_dev.txt Updated versions for astroid, black, dill, packaging, platformdirs, pylint, and pytest.
requirements.txt Updated versions for several dependencies including aiohttp, flask, mysql-connector-python, and others.
.env.example New configuration variables added for database and application settings.
CONTRIBUTING.md Typographical error corrected and clarification added in coding conventions.
README.md Badge labels updated, section headers refined, and minor grammatical corrections made.
app.py Integrated environment variables, refactored user permission checks, and improved error handling.
cog/api/gift.py New Gift class introduced for managing gift sending via Discord.
cog/comment.py Minor comment corrections for clarity in the Comment class.
cog/game.py Comment corrected in the rock_paper_scissors method for clarity.
docs/abstract_schema_table.json JSON schema revised to change root type from "object" to "array" and added "enum" type.
static/switch-btn.js Removed redundant line from switchRight function.
templates/home.html Minor textual correction in JavaScript comments.
test/enumstruct.py New file introduced defining GiftType enumeration.
.github/workflows/pylint.yml Conditional statement added for build job execution based on pull request origin.
src/scaict_uwu/service_container.py Enhanced ServiceContainer class with new methods for service management.
src/scaict_uwu/service_wiring.py New module for default service implementations introduced.
src/scaict_uwu/bot.py New entry point for Discord bot with a placeholder function.
src/scaict_uwu/core/config/config.py New Config class with options and methods for option retrieval.
src/scaict_uwu/core/config/config_factory.py New ConfigFactory class introduced for creating Config instances.
src/scaict_uwu/core/config/config_names.py New ConfigNames class added as a placeholder.
src/scaict_uwu/core/config/config_schema.py New ConfigSchema class added as a placeholder.
src/scaict_uwu/core/maintenance/maintenance.py New abstract Maintenance class introduced for maintenance scripts.
src/scaict_uwu/core/maintenance/parameters.py New MaintenanceParameters class for handling command line parameters.
src/scaict_uwu/core/maintenance/scripts/update.py New UpdateMaintenance class for handling database schema updates.
src/scaict_uwu/libs/language/language_tag.py New LanguageTag class for managing language data.
src/scaict_uwu/libs/language/language_tag_factory.py New LanguageTagFactory class for creating LanguageTag objects.
src/scaict_uwu/libs/language/language_utils.py Enhanced LanguageUtils class with new methods for language code handling.
src/scaict_uwu/libs/system_message/message.py New Message class for fetching and processing system messages.
src/scaict_uwu/website.py New entry point for the SCAICT store website with a placeholder function.
src/scaict_uwu/data/tables.json New JSON schema defining multiple database tables and their attributes.
src/scaict_uwu/data/tables_diagram_layout.json New JSON structure for diagram layout of database tables.
HISTORY.md New file added to document change notes for the SCAICT-uwu project.
RELEASE-NOTES-0.2.md New document created to outline changes and updates for version 0.2.
.github/workflows/pytest.yml New workflow added for automating the testing process with Pylint.
.github/workflows/unittest.yml New workflow added for automating linting and unit testing.
tests/pytest/test_service_wiring.py New unit test file for testing the service_wiring module functionality.
tests/unittest/test_language_tag_factory.py New unit test suite for the LanguageTagFactory class.

🐾 In the code where changes are made,
New features and fixes are laid.
From JSON files to classes anew,
Each line of code, a fresh debut!
With every update, we purr with glee,
Crafting a project as fine as can be! 🐱✨

[!WARNING]

Rate limit exceeded

@winstonsung has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 17 minutes and 29 seconds before requesting another review.

⌛ How to resolve this issue? After the wait time has elapsed, a review can be triggered using the `@coderabbitai review` command as a PR comment. Alternatively, push new commits to this PR. We recommend that you space out your commits to avoid hitting the rate limit.
🚦 How do rate limits work? CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our [FAQ](https://docs.coderabbit.ai/faq) for further information.
📥 Commits Reviewing files that changed from the base of the PR and between 32a1029865d0dd90bfe6df247d4222997e529eb5 and c786866427585b8e7accae72e640f77e643c8c28.

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://docs.coderabbit.ai) 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 1 month ago

anything to do before release?

winstonsung commented 1 month ago

Nothing to do during upgrade as far as I know.

YuevUwU commented 1 month 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 1 month 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.

YuevUwU commented 1 week ago

Please remember to mark [BREAKING CHANGE] in the Changelog for changes of configuration

winstonsung commented 1 week ago

Then I guess we should bump version number to 0.2.0 instead?

YuevUwU commented 1 week ago

I just thought, if we add Docker, will it bump to 0.3.0 😅

winstonsung commented 1 week ago

I don't think so, as that's not a breaking change.

But it's a breaking change when we completely migrated to the src layout.

YuevUwU commented 1 week ago

so, is migration to src layout in this version our goal? or wait for next version?

winstonsung commented 1 week ago

Should we migrate to src layout in this version?

We're already migrating. It's just haven't complete yet.

Should we completely migrate to src layout in this version?

I don't think this could be done in weeks.