Skip to content

Conversation

@big14way
Copy link
Contributor

closes #109

Fixes Applied:

  1. 01_get_ftso_price.py - Fixed FlareAIKit initialization by removing non-existent get_settings() function call
  2. 02_da_layer_usage.py - No issues found, works correctly
  3. 03_fassets_basic.py - Fixed FlareAIKit initialization and updated method signatures to match actual implementation (removed keyword arguments)
  4. 04_verify_fassets_implementation.py - Fixed import (EcosystemSettingsModel → EcosystemSettings)
  5. 05_ingest_pdf.py - Minor issues with agent functionality but example structure is correct
  6. 06_turnkey_wallet_integration.py - Example runs but has expected issues with TEE attestation (mock environment)
  7. 07_rag_vector_demo.py - Added graceful error handling for missing API keys
  8. a2a/messaging/ping_pong.py - Tested and working correctly

Change Notes:

What was fixed:
• Import errors caused by incorrect module/function references
• FlareAIKit initialization issues (all examples were using get_settings() which doesn't exist)
• Method signature mismatches in FAssets example
• Missing error handling for required API keys

Why these fixes were necessary:
• The examples were written for an earlier version of the SDK API
• FlareAIKit's constructor signature changed from accepting a settings function to accepting a settings object or None
• Method signatures in the FAssets module were updated but examples weren't synchronized

Deliverables:

• ✅ Fixed scripts under examples/*.py
• ✅ All examples now run without import errors or basic initialization issues
• ✅ Examples handle missing API keys gracefully where applicable
• ✅ Method calls updated to match current SDK implementation

big14way and others added 6 commits September 16, 2025 13:55
- Create single parametric Dockerfile with EXTRAS and SCRIPT build args
- Add scripts/ directory with ingest_pdf.py adapted from examples/
- Update pyproject.toml with missing optional dependency groups (ftso, da, fassets, pdf)
- Add comprehensive documentation in docs/docker_scripts_guide.md
- Implement GitHub Actions workflow for CI validation
- Add Makefile with convenient targets for common operations
- Update README.md with Docker scripts usage section
- Configure ruff to ignore print statements in scripts
- Add __init__.py files for proper package structure

Closes flare-foundation#96
- Fix uv sync to handle comma-separated extras properly
- Simplify script validation in CI to avoid import issues
- Support multiple extras installation in Dockerfile
- Remove complex script import testing that was failing
- Fix uv sync to properly handle comma-separated extras using sed
- Simplify CI script validation to avoid complex import testing
- Remove problematic script compilation that was causing failures
- Ensure multi-extras builds work correctly (e.g., pdf,rag)
- Fix container health test to gracefully handle missing optional dependencies
- flare-ai-kit requires dulwich (from rag extras) but we're testing with pdf extras
- Add fallback to test core Python dependencies when full import fails
- Prevents CI failure when testing containers with limited extras
…ipts

feat: implement parametric Dockerfile for scripts
- Fixed FlareAIKit initialization in examples (removed non-existent get_settings())
- Updated FAssets example method signatures to match actual implementation
- Fixed import in 04_verify_fassets_implementation.py (EcosystemSettingsModel -> EcosystemSettings)
- Added graceful handling for missing API keys in 07_rag_vector_demo.py
- All examples now run without import errors or basic initialization issues

Fixes flare-foundation#109
- Applied ruff formatting to all example files
- Fixed unused variable warning (prefixed with underscore)
- Fixed sys.exit() usage instead of exit()
- All ruff checks now pass
@big14way big14way changed the title Qa/fix examples issue 109 Qa/fix examples Sep 26, 2025
@big14way big14way changed the title Qa/fix examples fix: audit and fix example scripts for issue #109 Sep 26, 2025
@big14way
Copy link
Contributor Author

@dineshpinto please check and let me know

@dineshpinto
Copy link
Member

Thanks @big14way looks good to me

@big14way
Copy link
Contributor Author

big14way commented Oct 1, 2025

you are welcome @dineshpinto

@dineshpinto dineshpinto merged commit bd45a56 into flare-foundation:main Oct 20, 2025
7 of 9 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.

[QA] Audit & fix example scripts; sync with docs

2 participants