Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR refactors the codebase by creating a proper Python package structure and removing path manipulation hacks. The changes consolidate all core functionality into a libkernelbot library package while updating all import statements throughout the codebase.
- Creates
libkernelbotas a proper Python package containing all core bot functionality - Removes manual
sys.pathmanipulation in favor of proper package imports - Updates all import statements to use the new package structure
- Adds proper packaging configuration with
pyproject.toml
Reviewed Changes
Copilot reviewed 33 out of 59 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/libkernelbot/* | New package structure containing all core bot functionality |
| src/kernelbot/* | Updated Discord bot code with corrected imports |
| src/runners/* | Updated runner scripts with new import paths |
| scripts/* | Updated test scripts removing path hacks |
| pyproject.toml | New packaging configuration file |
Comments suppressed due to low confidence (6)
src/kernelbot/main.py:244
- [nitpick] The change from 'bot' to 'kernelbot' is inconsistent with other references to 'bot' in the codebase. Consider using 'bot' for consistency.
logger.info("Starting kernelbot and API server...")
src/kernelbot/cogs/admin_cog.py:74
- [nitpick] The change from 'bot' to 'kernelbot' in comments is inconsistent. The codebase generally refers to this as a 'bot'.
# create-local should only be used for the development kernelbot
src/kernelbot/cogs/admin_cog.py:90
- [nitpick] The change from 'bot' to 'kernelbot' in user-facing descriptions is inconsistent with other command descriptions that still use 'bot'.
name="start", description="Make the kernelbot accept new submissions"
src/kernelbot/cogs/admin_cog.py:94
- [nitpick] The change from 'bot' to 'kernelbot' in user-facing descriptions is inconsistent with other command descriptions that still use 'bot'.
name="stop", description="Make the kernelbot stop accepting new submissions"
src/kernelbot/cogs/admin_cog.py:102
- [nitpick] The change from 'bot' to 'kernelbot' in user-facing descriptions is inconsistent with other command descriptions that still use 'bot'.
name="show-stats", description="Show stats for the kernelbot"
src/kernelbot/api/main.py:313
- [nitpick] The change from 'bot' to 'kernelbot' in API documentation is inconsistent with typical usage.
HTTPException: If the kernelbot is not initialized, or header/input is invalid.
| @@ -5,8 +5,10 @@ | |||
| from pathlib import Path | |||
| from typing import Dict, Optional, Union | |||
|
|
|||
There was a problem hiding this comment.
The yaml import should be moved to the top of the file with other imports for better code organization.
Suggested change
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.
Going off #308