Merged
Conversation
3bba6b0 to
0e31c7c
Compare
mamo3gr
commented
Mar 7, 2025
Contributor
There was a problem hiding this comment.
PR Overview
This PR gathers and exposes various error classes by centralizing exception definitions and providing descriptive docstrings to aid users in understanding the error context. Key changes include:
- Introducing the new module gokart/errors/init.py that aliases several error classes.
- Adding descriptive docstrings to existing exceptions in gokart/pandas_type_config.py, gokart/build.py, and gokart/task.py.
- Updating gokart/slack/init.py to include new error types along with existing components.
Reviewed Changes
| File | Description |
|---|---|
| gokart/errors/init.py | Created to re-export error classes from various modules. |
| gokart/slack/init.py | Updated to import and expose new Slack-related error types. |
| gokart/pandas_type_config.py | Added a docstring to the PandasTypeError for clarity. |
| gokart/build.py | Added a docstring for GokartBuildError and HasLockedTaskException; note a potential typo in parameter naming. |
| gokart/task.py | Updated the EmptyDumpError docstring to improve clarity. |
Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.
Comments suppressed due to low confidence (1)
gokart/build.py:44
- Typo in parameter name 'messsage'. It should be corrected to 'message' to ensure clarity and consistency.
def __init__(self, messsage, raised_exceptions: dict[str, list[Exception]]):
kitagry
approved these changes
Mar 8, 2025
kitagry
reviewed
Mar 24, 2025
Contributor
Author
|
Thank you for reviewers! |
Collaborator
|
@mamo3gr Merged! Thank you for contribution! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
Gokart users catch some errors to deal with them according to the errors' details in their applications. But exceptions of this library exist (and will be created in the future) in each sub-module. Users would need to locate their desired exception and keep it in mind.
Proposal
Errors should be gathered and exposed in
gokart.errorsmodule.Descriptions would be helpful for the users.
Discussion
Moving actual implementations or aliasing
By now, I think it is sufficient to just alias the exceptions (import them from
gokart.errorsmodule) because existing exceptions are raised from a single source in many cases, and they are located near the source (raiser).Location to gather
As an alternative way, exceptions can be located under
gokartmodule. In that casegokart.__init__.pywould be a little messy.