Files
doczyai-pipelines/fieldExtraction
Alex Galarce ae4eda6f25 Merged in feature/one-to-n-docs (pull request #715)
Feature/one to n docs

* Refactor function signatures and improve imports in one_to_n_funcs.py

* Enhance type hints and documentation for carveout_check and methodology_breakout functions

* Add docstring to methodology_breakout_secondary function for clarity on parameters and return values

* Add docstring to special_case_breakout function for clarity on parameters and return values

* Enhance docstring for deduplicate_with_accumulator function to clarify behavior and parameters

* Enhance docstring for filter_services_without_reimbursements function to clarify validation process and answer structure

* Enhance docstring for filter_services_without_reimbursements function to clarify filtering criteria and validation process

* Enhance docstring for split_compound_reimbursements function to clarify the splitting process and provide an example

* Enhance docstring for split_reimb_dates function to clarify date processing, parameters, return values, and provide an example

* Remove unused regex import from one_to_n_funcs.py

* Remove unused Delimiter import from one_to_n_funcs.py


Approved-by: Katon Minhas
2025-09-30 14:04:47 +00:00
..

Field Extraction

Running the Code

This project uses Python's module system for imports. To run the code properly:

  1. DO NOT run files directly like this:

    python src/client/main.py  # ❌ This won't work
    
  2. 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 -m flag
  • 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 .