removing unused code and reverting tests to python 3.9

This commit is contained in:
LeonOstrez
2024-04-25 11:30:50 +01:00
parent d9d07c0f05
commit 92239d043b
2 changed files with 2 additions and 47 deletions

View File

@@ -30,17 +30,12 @@ jobs:
matrix:
# Test latest and oldest supported Python releases
# See https://devguide.python.org/versions/
python-version: ['3.11', '3.12']
python-version: ['3.9', '3.12']
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- uses: actions/checkout@v4
- name: Set up Node.js 20
uses: actions/setup-node@v3
with:
node-version: 20
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:

View File

@@ -48,41 +48,6 @@ def trace_code_event(name: str, data: dict):
def get_path_id():
return telemetry.telemetry_id
def ask_to_store_prompt(project, path_id):
init_prompt = project.main_prompt if project is not None and project.main_prompt else None
if init_prompt is None:
return
# Prepare the prompt data
telemetry_data = {
"pathId": path_id,
"event": "pilot-prompt",
"data": init_prompt
}
question = ('We would appreciate if you let us store your initial app prompt. If you are OK with that, please just '
'press ENTER')
try:
answer = ask_user(project, question, ignore_user_input_count=True, require_some_input=False)
if answer == '':
telemetry.set("initial_prompt", init_prompt)
response = requests.post("https://api.pythagora.io/telemetry", json=telemetry_data)
response.raise_for_status()
except requests.RequestException as err:
print(f"Failed to store prompt: {err}")
except KeyboardInterrupt:
pass
def ask_user_feedback(project, path_id, ask_feedback):
question = ('Were you able to create any app that works? Please write any feedback you have or just press ENTER to exit:')
feedback = None
if ask_feedback:
feedback = ask_user(project, question, ignore_user_input_count=True, require_some_input=False)
if feedback: # only send if user provided feedback
telemetry.set("user_feedback", feedback)
send_feedback(feedback, path_id)
def ask_user_email(project):
question = (
@@ -98,18 +63,13 @@ def ask_user_email(project):
pass
return False
def exit_gpt_pilot(project, ask_feedback=True):
terminate_running_processes()
# path_id = get_path_id()
if ask_feedback:
# ask_to_store_prompt(project, path_id)
ask_user_email(project)
# TODO: Turned off for now because we're asking for email, and we don't want to
# annoy people.
# ask_user_feedback(project, path_id, ask_feedback)
telemetry.set("num_commands", project.command_runs_count if project is not None else 0)
telemetry.set("num_inputs", project.user_inputs_count if project is not None else 0)