Skip to content

Created an example environment variable file#2521

Merged
anth-volk merged 2 commits into
masterfrom
fix/issue-2443
Jun 19, 2025
Merged

Created an example environment variable file#2521
anth-volk merged 2 commits into
masterfrom
fix/issue-2443

Conversation

@v-lerie

@v-lerie v-lerie commented May 29, 2025

Copy link
Copy Markdown
Collaborator

Fixes #2443

@codecov

codecov Bot commented May 29, 2025

Copy link
Copy Markdown

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 63.64%. Comparing base (8b08421) to head (32c30d1).
Report is 64 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2521      +/-   ##
==========================================
+ Coverage   63.62%   63.64%   +0.02%     
==========================================
  Files          56       56              
  Lines        2161     2220      +59     
  Branches      287      296       +9     
==========================================
+ Hits         1375     1413      +38     
- Misses        729      744      +15     
- Partials       57       63       +6     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@anth-volk anth-volk left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks @v-lerie! Just a couple quick things before proceeding.

Comment thread Makefile Outdated
@@ -1,5 +1,6 @@
install:
pip install -e ".[dev]" --config-settings editable_mode=compat
if [ ! -f .env ]; then cp .env.example .env; fi

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

nit, probably not blocking: Bash scripts in Makefiles & GH Actions are a personal peeve of mine; could we place this in a separate .sh file in the GitHub directory then run the script?

Comment thread .env.example
Comment on lines +14 to +15
# API Key for OpenAI
OPENAI_API_KEY=policyengine_openai_api_key

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

question: Could you confirm if this is still used? I thought we had removed the code that needed this key.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I checked the codebase, and OPENAI_API_KEY is still actively used in several files, including gpt4_api_user.py, export.py, Dockerfile, __init__.py, client.py, azure.py, METADATA, pr.yml, and push.yml.
For example, in gpt4_api_user.py it’s used like this:

# Point OpenAI to the API key
openai.api_key = os.environ["OPENAI_API_KEY"]

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I see. It does appear that it isn't used for the most part in prod, only in some old code that isn't run, but I can see value in including.

@anth-volk anth-volk marked this pull request as ready for review June 19, 2025 02:04

@anth-volk anth-volk left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks for your work on this @v-lerie! This looks ready to merge.

Comment thread .env.example
Comment on lines +14 to +15
# API Key for OpenAI
OPENAI_API_KEY=policyengine_openai_api_key

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I see. It does appear that it isn't used for the most part in prod, only in some old code that isn't run, but I can see value in including.

@anth-volk anth-volk merged commit b224728 into master Jun 19, 2025
7 checks passed
@anth-volk anth-volk deleted the fix/issue-2443 branch June 19, 2025 02:05
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.

Create an example environment variable file

3 participants