Skip to content

Conversation

@Ulthran
Copy link
Contributor

@Ulthran Ulthran commented Sep 9, 2025

No description provided.

Copilot AI review requested due to automatic review settings September 9, 2025 19:27
Copy link
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 enhances the AI rule generation functionality by improving the prompt system and adding context file support. The main goal is to provide better namespacing and context to the AI model when generating Snakemake rules.

  • Converts static prompts to parameterized functions that accept extension names for better rule namespacing
  • Adds context file support to provide existing Sunbeam rules as examples to the AI model
  • Improves environment extraction logic from generated rules

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.

File Description
sunbeam/scripts/generate.py Adds default context files and passes extension name to rule creation function
sunbeam/ai/rule_creator.py Updates function signature, adds debugging output, and improves environment parsing
sunbeam/ai/prompts.py Converts static prompts to parameterized functions for better customization

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment on lines +103 to +104
print("System prompt: ", system)
print("User prompt: ", user_content)
Copy link

Copilot AI Sep 9, 2025

Choose a reason for hiding this comment

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

Debug print statements should be removed from production code or replaced with proper logging using the logger module.

Copilot uses AI. Check for mistakes.
Comment on lines +140 to +141
print("Out path: ", out_path)
print("Envs path: ", envs_path)
Copy link

Copilot AI Sep 9, 2025

Choose a reason for hiding this comment

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

Debug print statements should be removed from production code or replaced with proper logging using the logger module.

Copilot uses AI. Check for mistakes.
for env_name, env_text in env_texts.items():
(envs_path / f"{env_name}.yaml").write_text(env_text)
env_fp = envs_path / f"{env_name}.yaml"
print("Writing env: ", env_fp)
Copy link

Copilot AI Sep 9, 2025

Choose a reason for hiding this comment

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

Debug print statements should be removed from production code or replaced with proper logging using the logger module.

Copilot uses AI. Check for mistakes.
.replace(",", "")
.split("/")[-1]
)
print(env_name)
Copy link

Copilot AI Sep 9, 2025

Choose a reason for hiding this comment

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

Debug print statements should be removed from production code or replaced with proper logging using the logger module.

Copilot uses AI. Check for mistakes.
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.

2 participants