From 0fdf5edd2cc46155bbaa1ed3a81e359351a88762 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20Ho=CC=88nicke?= Date: Tue, 2 May 2023 23:24:24 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=A7=AA4=EF=B8=8F=E2=83=A3=20test:=20level?= =?UTF-8?q?=204=20gpt=20turbo=20stays?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/options/generate/generator.py | 7 +++++-- test/test_generator.py | 8 ++++---- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/src/options/generate/generator.py b/src/options/generate/generator.py index ae02e65..9dcadfe 100644 --- a/src/options/generate/generator.py +++ b/src/options/generate/generator.py @@ -547,8 +547,11 @@ Test scenario: # filter out complete package lists packages_list = [ packages for packages in packages_list if all([ - is_package_on_pypi(pkg) # all packages must be on pypi - and pkg not in BLACKLISTED_PACKAGES # no package is allowed to be blacklisted + pkg == 'gpt_3_5_turbo' + or ( + is_package_on_pypi(pkg) # all packages must be on pypi or it is gpt_3_5_turbo + and pkg not in BLACKLISTED_PACKAGES # no package is allowed to be blacklisted + ) for pkg in packages ]) ] diff --git a/test/test_generator.py b/test/test_generator.py index f0b0d67..7f7b022 100644 --- a/test/test_generator.py +++ b/test/test_generator.py @@ -71,8 +71,8 @@ def test_generation_level_2(tmpdir): def test_generation_level_3(tmpdir): """ Requirements: - coding challenge: ❌ - pip packages: ✅ (csv parser) + coding challenge: ✅ (calculate the average closing price) + pip packages: ❌ environment: ❌ GPT-3.5-turbo: ✅ (for processing the text) APIs: ✅ (financial data API) @@ -83,8 +83,8 @@ def test_generation_level_3(tmpdir): f'''The input is a stock symbol (e.g., AAPL for Apple Inc.). 1. Fetch stock data (open, high, low, close, volume) for the past 30 days using a financial data API Yahoo Finance. 2. Calculate the average closing price over the 30 days. -5. Generate a brief summary of the company's stock performance over the past 30 days, including the average closing price and the company name. -6. Return the summary as a string. +3. Generate a brief summary of the company's stock performance over the past 30 days, including the average closing price and the company name. +4. Return the summary as a string. Example input: 'AAPL' ''', str(tmpdir),