Skip to content

Fixed Streamlit startup without API keys#42

Merged
mounacheikho-cmd merged 3 commits into
climateandtech:mainfrom
mounacheikho-cmd:fix/streamlit-deploy-byok-hint
Jul 2, 2026
Merged

Fixed Streamlit startup without API keys#42
mounacheikho-cmd merged 3 commits into
climateandtech:mainfrom
mounacheikho-cmd:fix/streamlit-deploy-byok-hint

Conversation

@mounacheikho-cmd

Copy link
Copy Markdown
Collaborator

Summary

  • Removed unused lingua-language-detector dependency
  • Allowed Streamlit to start when API keys are missing
  • Added clearer Settings guidance for missing or placeholder API keys
  • Reinitialized the analyzer after a key is entered

Tests

  • python -m pytest tests/test_api_key_manager.py tests/test_streamlit_app_basic.py tests/test_analyzer.py::test_document_analyzer_starts_without_api_keys -q

@suung suung 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.

Hey @mounacheikho-cmd - really cool work.
I left a few comments after our discussion before it's not clear for me if we still have the your-api-key "hacks" in there or if it works without them when the keys are just empty and the env.example is updated...

Pls let me know if you conclude we should keep it like that.

Comment thread report_analyst/core/analyzer.py
Comment thread tests/test_analyzer.py
Comment thread tests/test_api_key_manager.py Outdated
Comment thread tests/test_api_key_manager.py Outdated
Comment thread tests/test_api_key_manager.py Outdated
Comment thread report_analyst/core/api_key_manager.py Outdated

@suung suung 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.

Great work, only MINOR: the comment wether we still need the tests checking for keys with your- can be checked

@mounacheikho-cmd mounacheikho-cmd merged commit e46e2b6 into climateandtech:main Jul 2, 2026
6 checks passed
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