Commit Graph

15 Commits

Author SHA1 Message Date
Siddhant Medar 04d268a2f8 Merged in task/unit-tests-investment-and-client (pull request #354)
Task/unit tests investment and client

* move io_utils.py

* add __init__.py

* refactor: move string_funcs and update import paths to use utils namespace

* rename string_funcs to string_utils

* move and rename table_utils.py

* refactor: rename claude_funcs to llm_utils in multiple files

* update unit tests

* added unit tests for src/string_utils.py

* added unit tests for src/table_utils.py

* added unit tests for src/llm_utils.py

* added unit tests for src/io_utils.py

* Merge branch 'main' into task/unit-tests-investment-and-client; TODO: fix unit tests

* Unit tests to fix

* fix unit tests

* fix invalid references

* add unit tests for preprocessing_funcs.py

* move pytest-mock to test dependencies

* Merge remote-tracking branch 'origin/main' into task/unit-tests-investment-and-client

* add tests/string_utils_test.py

* removed filename parameters for a few functions

* save postprocessing_funcs_test midway

* save postprocessing_funcs_test

* postprocessing_funcs unit tests complete

* Merge branch 'main' into task/unit-tests-investment-and-client


Approved-by: Katon Minhas
2025-01-17 17:15:32 +00:00
Katon Minhas dfbe47ef28 Merged in refactor/prompt_refactor (pull request #353)
READY: Refactor/prompt refactor

* Prompt refactor

* refactor imports

* Prompt refactor

* Import refactor

* Remove excess prompts from investment_prompts.py


Approved-by: Alex Galarce
2025-01-13 21:11:36 +00:00
Katon Minhas 3bb6abbcef Merged in feature/simplify-b-field-chunking (pull request #348)
feature/simplify b field chunking

* Add chunk_by_exhibit function and unit tests

* Refactor preprocess

* Updated to run BU primary on entire Exhibit

* Makes BU secondary compatible with exhibit chunk mapping

* Added unit tests for get_exhibit_chunk

* Trimmed TD funcs

* Downstream changes to run_top_down

* Removed conditional funcs

* Merged main into feature/simplify-b-field-chunking

* removed conditional funcs import

* Merged main into feature/simplify-b-field-chunking

* Fixed run_bottom_up_primary arguments

* Fixed TD primary input

* Fixed grouped keyword mappings

* Remove filename tracking until postprocessing

* Removed postprocessing for client columns

* Removed col-based postprocessing

* Merged main into feature/simplify-b-field-chunking

* Fixed NoneType

* Add docstrings

* Updated unit tests for removal of 'Filename'

* Updated comments


Approved-by: Alex Galarce
2025-01-10 17:24:44 +00:00
Alex Galarce 53b38ea15c Merged in refactor/split-investment-and-client (pull request #347)
Refactor/split investment and client

* refactor: clean up tests

* Renamed tests/qcqa to tests/qa_qc for consistency

* comment out faulty test - see docstring note at top

* split to client/investment

* add __init__.py to investment and client to avoid mypy confusion

* fix imports

* update imports for consistency across investment module

* move back to one config

* try changing import to relative

* add init.py to src

* try relative import

* try one more sys.path.append

* fix path for client main

* fix imports in file_processing

* make prompts common

* move keywords out to `src`

* move smart_chunking_funcs to `src`

* fix mypy error

* start moving to explicit imports

* remove old keywords and fix imports for keywords and prompts

* change all imports to full paths

* fix unit tests

* add readme for new way of running things

* isort after all that import work

* remove unused sys.path.append from some tests


Approved-by: Katon Minhas
2025-01-08 21:59:47 +00:00
Katon Minhas 8c3c674e75 Merged in feature/daip2-33-optimize-exhibit-start-prompt (pull request #343)
Feature/daip2 33 optimize exhibit start prompt

* Updated Exhibit Check prompt

* Updated prompt, reorg

* Switch to claude 3 haiku for new exhibit check prompt


Approved-by: Alex Galarce
2025-01-06 21:08:56 +00:00
Alex Galarce 3740588efa Merged in refactor/daip-2-9-code-refactor (pull request #339)
Refactor/daip2-9 code refactor

* add missing import

* refactor ac_smart_chunking.py

* update tests

* removed old and unused imports

* removed outdated import

* forgot to import re

* refactor bottom up funcs

* remove unused imports from file_processing.py

* refactor dict_operations.py

* remove unused import from conditional_funcs.py

* replace top_down_funcs with one_to_n_funcs and remove top_down_funcs.py

* remove duplicate import from one_to_n_funcs.py

* refactor all utils.py imports

* refactor error handling by removing last code in utils and integrating InvalidDateException into postprocessing_funcs

* refactor import in claude_funcs.py to use string_funcs directly and (hopefully) resolve circular import

* refactor regex_funcs.py to use postprocessing_funcs for add_hyphen_if_needed calls

* refactor hotfix_helper_funcs.py to use postprocessing_funcs for add_hyphen_if_needed calls

* refactor postprocess.py to remove unused imports

* add numpy import to string_funcs

* fix tests after utils refactor

* move adhoc from tests to scripts

* remove unused imports

* remove scripts from mypy checking

* isort

* Merged main into refactor/daip-2-9-code-refactor


Approved-by: Katon Minhas
2025-01-06 15:39:29 +00:00
Alex Galarce 5b88185611 Merged in refactor/daip2-9-basic-code-refactor (pull request #337)
[daip2-9] basic code refactor - unreferenced functions and reorganize existing files

* remove unreferenced functions in ac_funcs.py

* move compare_output.py

* move file_counting.py

* move merge_issue_regex.py

* remove unreferenced functions in postprocessing_funcs.py

* clean up preprocessing_funcs.py

* move prerun.py

* move table_analysis.py and textract_template.py to scripts

* remove unreferenced functions in table_funcs.py

* moved tin_pull.py to scripts

* move detect_complex.py and remove merge_funcs.py

* clean up dict operations and utils, mark functions in utils for destinations

* removed errant import


Approved-by: Katon Minhas
2024-12-30 21:41:21 +00:00
Alex Galarce 47a01e13f0 Merged in chore/contract_effective_date (pull request #307)
New Prompt Method (starting with contract effective date)

* add todos for Siddhant

* moved effective date prompts to prompts.py and added docstring and type hints

* moved effective date prompts to prompts.py and added docstring and type hints

* fixed conflict

Co-authored-by: Alex Galarce <agalarce@aarete.com>

* modified contract effective date logic in existing smart chunking

* Merged main into chore/contract_effective_date

* updated extract_text_from_delimiters function and unit tests for it

* Merge remote-tracking branch 'origin/main' into chore/contract_effective_date

* added comments to preprocessing_funcs

* preprocessing_funcs.py edited online with Bitbucket
* utils.py edited online with Bitbucket
* add debug line

* add NA handling into fix_date_formatting()

* add debug print statements

* worked on review comments

* fixed date checking

* fixed date checking and added unit tests

* Merged main into chore/contract_effective_date

* added logic to handle case when smart chunking returns empty context for effective date

* added comments to file_processing.py

* optimized imports and removed a TODO

* Merged main into chore/contract_effective_date

* made prompt changes for effective date

* keywords.py edited online with Bitbucket
* Removed excess print statements


Approved-by: Katon Minhas
2024-12-05 22:46:41 +00:00
Alex Galarce 56e3fdd1f8 Merged in bugfix/all_cnc_hotfixes (pull request #302)
DRAFT: Bugfix/all cnc hotfixes

* Pipeline fix - health plan state

* Update for prompt vs non-prompt fixes

* Revert utils.find_regex_matches()

* Remove prints

* Non-prompt run

* Health Plan State, IRS, NPI, LOB, Lesser, Prov 2, Default, Rate Standard, Contract Effective Date, Term Group

* Merged in bugfix/agreement_name (pull request #294)

contract title fixed

* contract title fixed

* Merged bugfix/all_cnc_hotfixes into bugfix/agreement_name


Approved-by: Katon Minhas

* All hotfixes added

* Fixed utils

* fix for clean_contract_effective_date
* Merged in default-fix (pull request #296)

moved default funcs to the top, dropped intermediate columns

* moved default funcs to the top, dropped intermediate columns


Approved-by: Katon Minhas

* quick fix to dropping extra columns

* Merged in bugfix/effective_date_meridian (pull request #297)

fixed effective date for meridian contracts

* fixed effective date for meridian contracts


Approved-by: Katon Minhas

* Default rate and Lesser fix

* Merged in hotfix/irs_npi_updated (pull request #298)

updated irs and npi hotfix funcs

* updated irs and npi hotfix funcs

* Merged bugfix/all_cnc_hotfixes into hotfix/irs_npi_updated


Approved-by: Katon Minhas

* non-functional commit - default only

* debug commit - premerge

* Batch 1 Dup File Reconciliation

* Default rate fix

* Full CNC 1A Run Config

* Standard column refactor

* Working stitching for 1A

* Merged in Alex-Galarce/cnc_hotfix_effective_date_utilspy-edited-1732659983687 (pull request #301)

Remove "license" from effective date smart chunking

* Remove "license" from effective date smart chunking
* Merged bugfix/all_cnc_hotfixes into Alex-Galarce/cnc_hotfix_effective_date_utilspy-edited-1732659983687


Approved-by: Katon Minhas

* Merged in hotfix/irs_batch2_feedback (pull request #300)

IRS fix for feedback on batch2

* IRS fix for feedback on batch2

* Merged bugfix/all_cnc_hotfixes into hotfix/irs_batch2_feedback


Approved-by: Katon Minhas

* Merged main into bugfix/all_cnc_hotfixes


Approved-by: Katon Minhas
2024-11-27 15:08:04 +00:00
Katon Minhas cb18f90a85 Merged in feature/topSheetConditional (pull request #281)
Initial top sheet conditional commit

* Initial top sheet conditional commit

* Merged main into feature/topSheetConditional

* preprocessing_funcs.py edited online with Bitbucket
* Updated quick review docstring


Approved-by: Alex Galarce
2024-11-22 15:30:01 +00:00
Karan Desai af4f94b995 Merged in bugfix/smart_chunk_ac_inputs (pull request #277)
update inputs for smart chunking

* update inputs for smart chunking

* updated test case inputs

* updated test case inputs

* Add keywords back to argument for ac smart chunking

* Test case fix


Approved-by: Katon Minhas
2024-11-20 19:01:26 +00:00
Katon Minhas 73020bdc10 Merged in bugfix/full_context_check (pull request #270)
Update for full-context AC chunks to return exact contract_text instead of concatenated text_dict pages

* Update for full-context AC chunks to return exact contract_text instead of concatenated text_dict pages

* Updated test cases

* Updated case 1

* Merged main into bugfix/full_context_check


Approved-by: Alex Galarce
2024-11-14 21:16:43 +00:00
Karan Desai dfff68e9c8 Merged in bugfix/clean_full_context_in_smart_chunking (pull request #269)
Bugfix/clean full context in smart chunking

* move full context bugfix to clean branch

* took out commented code

* black formating

* Add explanatory comments to file_processing.py

Approved-by: Alex Galarce
2024-11-13 21:33:17 +00:00
Karan Desai 1098be5cf5 Merged in feature_ac_chunking_clean (pull request #265)
grouped keywords and IRS regex chunking

* abandon old branch and rebuild

* removed print for field names, prompts

* pushing as part of  leftovers

* IRS regex chunking

* Merged in feature/chunk_term_clean (pull request #262)

chunk_log_added

* chunk_log_added

* Merge remote-tracking branch 'remotes/origin/feature_ac_chunking_clean' into feature/chunk_term_clean


Approved-by: Alex Galarce

* added function for regex based IRS chunking

* shifted regex_match_chunk function to utils

* added helper functions for regex based chunking

* replaced tin_regex function to ac_funcs

* removed prompt for irs_others

* added regex chunking for irs

* removed irs group from smart chunking

* testing functionality for regex based irs fields

* updated return N/A condition

* Merged main into feature_ac_chunking_clean

* file_processing.py edited online with Bitbucket
* added back conditional prompts

* minor fixed for PR

* remove install types

* mering clean branch

* with passed test casses

* added flag for regex based tin execution


Approved-by: Michael McGuinness
2024-11-13 17:08:19 +00:00
Michael McGuinness ee3e3eb538 Merged in feature/mergeIntoMain (pull request #249)
Merge Prep

* mergePRep


Approved-by: Katon Minhas
2024-10-28 23:39:36 +00:00