Skip to content

Add Google Financial News Analysis Prompt generator#39

Open
ewdlop wants to merge 1 commit intomainfrom
feature/google-financial-news-prompt-10113856596980622387
Open

Add Google Financial News Analysis Prompt generator#39
ewdlop wants to merge 1 commit intomainfrom
feature/google-financial-news-prompt-10113856596980622387

Conversation

@ewdlop
Copy link
Owner

@ewdlop ewdlop commented Jan 27, 2026

Implemented a Python script to generate a standardized Google Financial News Analysis prompt. The script accepts command-line arguments for keyword, time range, region, and focus, and outputs a structured prompt in Traditional Chinese. This allows for consistent and professional financial news analysis requests to AI models. Also included a unit test suite to verify the script's functionality.


PR created automatically by Jules for task 10113856596980622387 started by @ewdlop

Added `Finance/generate_news_prompt.py` to generate a structured prompt for analyzing financial news based on user input.
Added `Finance/test_generate_news_prompt.py` to test the generator script.

Co-authored-by: ewdlop <25368970+ewdlop@users.noreply.github.com>
@google-labs-jules
Copy link
Contributor

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

Copilot AI review requested due to automatic review settings January 27, 2026 04:12
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 adds a reusable Python script and accompanying tests to generate a standardized Traditional Chinese prompt for Google financial news analysis, aligning with the existing written prompt specification.

Changes:

  • Implemented Finance/generate_news_prompt.py to render the financial news analysis prompt from a parameterized template and expose a CLI for keyword/time-range/region/focus inputs.
  • Added Finance/test_generate_news_prompt.py to validate prompt content substitution and CLI behavior, including default and explicit argument handling.

Reviewed changes

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

File Description
Finance/generate_news_prompt.py Defines the parameterized Traditional Chinese prompt template and a CLI entrypoint to generate prompts for different keywords, time ranges, regions, and focuses.
Finance/test_generate_news_prompt.py Adds unit tests for direct function usage and CLI execution to ensure correct interpolation of parameters and default values.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@@ -0,0 +1,113 @@
import argparse
import sys
Copy link

Copilot AI Jan 27, 2026

Choose a reason for hiding this comment

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

The imported sys module is never used in this file; consider removing it to avoid unused-import warnings and keep dependencies minimal.

Suggested change
import sys

Copilot uses AI. Check for mistakes.
# Add parent directory to path to allow importing the script
sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))

from Finance.generate_news_prompt import generate_prompt, PROMPT_TEMPLATE
Copy link

Copilot AI Jan 27, 2026

Choose a reason for hiding this comment

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

PROMPT_TEMPLATE is imported but not used in these tests; removing the unused import will keep the test module clean and avoid linter warnings.

Suggested change
from Finance.generate_news_prompt import generate_prompt, PROMPT_TEMPLATE
from Finance.generate_news_prompt import generate_prompt

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