presidio icon indicating copy to clipboard operation
presidio copied to clipboard

Refactor nlp_engine_provider.py to improve configuration handling and…

Open RonShakutai opened this issue 11 months ago • 12 comments

Error Reporting #1556

In this update, we have:

  • Introduced stricter file-not-found handling. If a user-supplied configuration file is missing, a FileNotFoundError is raised rather than silently defaulting.
  • For the default configuration file (default.yaml), if it’s missing we now log a warning and fall back to an internal built-in default.

Change Description

Describe your changes here, for example:

  • Updated _read_nlp_conf to raise an exception when a user-provided config file does not exist.
  • Catch FileNotFoundError for the default config file and use a built-in configuration if it’s missing.
  • Added or updated unit tests to ensure correct behavior for user-provided vs. default config files.

Issue Reference

This PR fixes issue #XX

Checklist

  • [x] I have reviewed the contribution guidelines
  • [x] I have signed the CLA (if required)
  • [x] My code includes unit tests
  • [x] All unit tests and lint checks pass locally
  • [x] My PR contains documentation updates/additions if required

RonShakutai avatar Mar 25 '25 15:03 RonShakutai

/azp run

SharonHart avatar Mar 30 '25 09:03 SharonHart

Azure Pipelines successfully started running 1 pipeline(s).

azure-pipelines[bot] avatar Mar 30 '25 09:03 azure-pipelines[bot]

/azp run

RonShakutai avatar Mar 30 '25 12:03 RonShakutai

Azure Pipelines successfully started running 1 pipeline(s).

azure-pipelines[bot] avatar Mar 30 '25 12:03 azure-pipelines[bot]

/azp run

RonShakutai avatar Apr 21 '25 09:04 RonShakutai

Azure Pipelines successfully started running 1 pipeline(s).

azure-pipelines[bot] avatar Apr 21 '25 09:04 azure-pipelines[bot]

/azp run

RonShakutai avatar Apr 27 '25 07:04 RonShakutai

Azure Pipelines successfully started running 1 pipeline(s).

azure-pipelines[bot] avatar Apr 27 '25 07:04 azure-pipelines[bot]

/azp run

RonShakutai avatar Apr 27 '25 09:04 RonShakutai

Azure Pipelines successfully started running 1 pipeline(s).

azure-pipelines[bot] avatar Apr 27 '25 09:04 azure-pipelines[bot]

/azp run

RonShakutai avatar Apr 27 '25 10:04 RonShakutai

Azure Pipelines successfully started running 1 pipeline(s).

azure-pipelines[bot] avatar Apr 27 '25 10:04 azure-pipelines[bot]

/azp run

omri374 avatar Jul 16 '25 15:07 omri374

Azure Pipelines successfully started running 1 pipeline(s).

azure-pipelines[bot] avatar Jul 16 '25 15:07 azure-pipelines[bot]

@omri374
Should i close this PR ? as other PRS cover some parts of it ?

RonShakutai avatar Sep 28 '25 10:09 RonShakutai

@omri374 @SharonHart Most of the content of this PR was included in other PRS. Closing it.

RonShakutai avatar Oct 30 '25 09:10 RonShakutai