2630dfbede
Feature/multiple procedures * Add stop loss and multiple procedure reduction questions to investment prompts * Refactor field_type values in investment prompts for consistency * Refactor methodology breakout function to accept prompt templates as parameters * Update investment prompts to enhance clarity and add new (provisional) fields for NEVER events and experimental treatments * Merge remote-tracking branch 'origin/main' into feature/multiple-procedures * start consolidation of special_cases and carveouts into one omnifunction * Enhance carveout handling by adding support for additional question types and refactoring question retrieval * move term_key to individual cases * Fix casing for carveout term keys in get_carveout_fields function * Refactor carveout processing by introducing process_carveout_or_special_case function to streamline handling of various carveout types * Enhance process_carveout_or_special_case function documentation and clarify parameter descriptions * Add term_key parameter to get_carveout_fields function call * Enhance type annotations for methodology and fee schedule prompt templates in process_carveout_or_special_case function * Add SPECIAL_CASE_CONFIGS to streamline carveout processing logic * Remove deprecated print statements and special case handling from get_special_cases function * name carveout_config for clarity against config.py * Remove special case functions (deprecated) * Remove unused imports and deprecated print statements from get_special_cases function * remove print statements for debugging, check output of universal_string_load if it's a single dict, put it to a list * Add special case configurations for various question types in its own module * Refactor special case handling by consolidating configurations and removing deprecated constants and comments * Update descriptions for OUTLIER and STOP_LOSS in VALID_SPECIAL for clarity and detail * black formatting, changed one docstring description * isort * Merged main into feature/multiple-procedures Approved-by: Katon Minhas
Field Extraction
Running the Code
This project uses Python's module system for imports. To run the code properly:
-
DO NOT run files directly like this:
python src/client/main.py # ❌ This won't work -
INSTEAD, use Python's module flag (
-m) from the project root:python -m src.client.main # ✅ This is correct
Why?
The code uses absolute imports (e.g., from src.utils import llm_utils) to maintain a clear and consistent package structure. Running with python -m ensures Python can properly resolve these imports.
Development
- All imports should use the
src.prefix (e.g.,from src.utils import llm_utils) - Always run code from the project root directory using the
-mflag - Tests are configured to handle these imports automatically via pytest settings in pyproject.toml
Configuration
The project uses poetry for dependency management and pytest for testing. Key configurations in pyproject.toml:
[tool.pytest.ini_options]
pythonpath=["."]
testpaths = [
"tests"
]
Dependencies
To install dependencies:
poetry install
To run tests:
poetry run pytest
To run type checking:
poetry run mypy .