3be2f44cb1
Feature/global lesser of * Merge remote-tracking branch 'origin/feature/reimb-primary-updates' * First try at global "lesser of" * Generate reimb_ids further upstream * Implement global lesser of injection and extraction logic in file processing * Update logic to change LESSER_OF_IND in-place for global affected rows; add docstrings * Refactor global lesser of injection logic to create new rows for REIMB_IDs lacking lesser of logic; update original rows in place and improve tracking flags. * Merge remote-tracking branch 'origin/main' into feature/global-lesser-of * Add logging for global lesser of logic injection and update handling of original rows * Refactor global lesser of logic: move functions to one_to_one_funcs.py and update inject_global_lesser_of_rows to use new implementations * Move imports for METHODOLOGY_BREAKOUT_QUESTIONS and REIMB_TERM_BREAKOUT to the top of one_to_one_funcs.py for better organization and to remove prototype comments. * isort * Refactor import statement for generate_reimb_ids to use the full module path for clarity * load field from JSON instead of hardcoded values * Update logging levels in investment_field_testing notebook * Merged main into feature/global-lesser-of * Remove unnecessary comment from investment_postprocessing_funcs import statement for clarity * Merge branch 'feature/global-lesser-of' of https://bitbucket.org/aarete/doczy.ai into feature/global-lesser-of * Merge remote-tracking branch 'origin/main' into feature/global-lesser-of * Remove debug print statement from process_file function * fix call to Field.load_from_file * Merge remote-tracking branch 'origin/main' into feature/global-lesser-of * Add tracking flag for global lesser of logic when none is found * explicitly sort by FILE_NAME, EXHIBIT_PAGE, and REIMB_LESSER_OF_ID columns * Add new field type, "full_context_separate", to make sure that we don't run it twice. Also formatting fix * Fix iteration over separate fields in run_full_context_fields function 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 .