Skip to content

Libkernelbot#316

Merged
msaroufim merged 14 commits intomainfrom
fix/remove-pythonpath-setup
Jul 23, 2025
Merged

Libkernelbot#316
msaroufim merged 14 commits intomainfrom
fix/remove-pythonpath-setup

Conversation

@msaroufim
Copy link
Copy Markdown
Member

@msaroufim msaroufim commented Jul 23, 2025

Going off #308

Copilot AI review requested due to automatic review settings July 23, 2025 17:15
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 libkernelbot as a proper Python package containing all core bot functionality
  • Removes manual sys.path manipulation 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.

Comment thread src/libkernelbot/task.py
@@ -5,8 +5,10 @@
from pathlib import Path
from typing import Dict, Optional, Union

Copy link

Copilot AI Jul 23, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The yaml import should be moved to the top of the file with other imports for better code organization.

Suggested change

Copilot uses AI. Check for mistakes.
@msaroufim msaroufim changed the title fix/remove pythonpath setup Libkernelbot Jul 23, 2025
@msaroufim msaroufim merged commit 895c116 into main Jul 23, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants