The project supports Python 3.10 or newer. Runtime dependencies are declared in
pyproject.toml; Pytest is included in the optional dev dependency group.
git clone https://github.com/beastofbayarea/financial-wellness-lab.git
cd financial-wellness-lab
python -m venv .venv
source .venv/bin/activate
python -m pip install --upgrade pip
python -m pip install -e ".[dev]"On Windows PowerShell, replace the activation command with:
.\.venv\Scripts\Activate.ps1If PowerShell blocks local activation scripts, the environment can still be used without activation:
.\.venv\Scripts\python.exe -m pip install -e ".[dev]"
.\.venv\Scripts\python.exe -m pytestRun the fast smoke suite and both executable examples from the repository root:
python -m pytest
python -m eligibility.demo
python -m card_economics.compareLaunch the combined dashboard:
streamlit run dashboard.pyStreamlit prints the local address (normally http://localhost:8501) and opens
it in the default browser. Use the sidebar or home-page cards to open each workflow
on its own page. Stop the server with Ctrl+C.
Run the full validation suite before a release or after changing domain logic:
python -m pytest eligibility card_economics testsThe examples and dashboard work offline and use deterministic fallback text when narration is unavailable.
The explanation layer uses the Google Gen AI SDK with Gemini on Vertex AI. Copy
the checked-in template, then keep the resulting .env local:
Copy-Item .env.example .envcp .env.example .envThe Cent-compatible defaults are:
GCP_PROJECT_ID=cent-capital-472820GCP_REGION=globalGEMINI_MODEL=gemini-flash-latest
Authentication uses Google Application Default Credentials. For local user
credentials, use gcloud auth application-default login. For a service
account, set GOOGLE_APPLICATION_CREDENTIALS to a JSON key stored outside this
repository. The project must have Vertex AI access and the authenticated
identity must be authorized to generate content.
If a deployment-only credential path is inherited on another operating system and the file does not exist, the app safely uses the standard local gcloud ADC file instead. It never reads or copies credentials into the repository.
The app loads .env automatically and gives its values precedence over settings
inherited from another project's terminal. Never commit .env, credential JSON,
access tokens, or private keys. If configuration or authentication is
unavailable, the LLM call returns no text and the deterministic fallback remains
available.
- Eligibility thresholds and limits:
eligibility/rules_config.yaml - Card portfolio, revenue, path, and walk-away assumptions:
card_economics/assumptions.yaml
Configuration is loaded when the relevant module is imported or executed. Restart a Python process after changing eligibility configuration.