Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set OpenAI Key #52

Merged
merged 7 commits into from
Dec 14, 2024
Merged

Set OpenAI Key #52

merged 7 commits into from
Dec 14, 2024

Conversation

Lucs1590
Copy link
Owner

This change is related to making life easier for users who do not have their OpenAI key linked to the project, as the documentation indicates. Often, users may not read the documentation and our goal is to make life easier for these users, so that they do not interrupt the execution to be able to define their key and have their detailed analysis, but rather that they have a complete experience so that the application itself makes it easier to use.

Enhancements to functionality:

  • Added a new function check_key() to verify if the OPENAI_API_KEY environment variable is set. If not, it prompts the user to enter the key and saves it to a .env file. (src/main.py)
  • Updated the main() function to call check_key() before performing LLM analysis. (src/main.py)

Improvements to code readability:

  • Modified the download_tcx_file() function to use multi-line string formatting for the URL. (src/main.py)

@Lucs1590 Lucs1590 added enhancement New feature or request python Pull requests that update Python code labels Dec 14, 2024
@Lucs1590 Lucs1590 self-assigned this Dec 14, 2024
@codecov-commenter
Copy link

codecov-commenter commented Dec 14, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.67%. Comparing base (bae22bd) to head (bd28ed4).

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #52      +/-   ##
==========================================
+ Coverage   98.58%   98.67%   +0.09%     
==========================================
  Files           2        2              
  Lines         423      454      +31     
==========================================
+ Hits          417      448      +31     
  Misses          6        6              
Flag Coverage Δ
unittests 98.67% <100.00%> (+0.09%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Lucs1590 Lucs1590 merged commit 91791e5 into main Dec 14, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request python Pull requests that update Python code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants