Skip to content

2 fixes#1802

Open
SFJohnson24 wants to merge 12 commits into
mainfrom
usdm
Open

2 fixes#1802
SFJohnson24 wants to merge 12 commits into
mainfrom
usdm

Conversation

@SFJohnson24

@SFJohnson24 SFJohnson24 commented Jul 9, 2026

Copy link
Copy Markdown
Collaborator

this PR fixes 2 issues found in the test data--

  • catches when no rules are selected to execute (in test, usually due to .env vs rule standard/version scoping; instead return an error)
  • if -d is given for USDM and multiple json files are found this it will execute the first json file, now logs an error and returns blank.

removes 1 QA test that was not executing any rules and was now returning an error; added unit test

Comment thread core.py Outdated
Comment thread scripts/run_validation.py Outdated
engine_logger.info(
f"Running {len(rules)} rules against {len(datasets)} datasets"
)
if len(rules) == 0:

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The check is happening after the engine_logger has already logged length of the rules, that would show running 0 rules against number of datasets. It also happens after the datasets has been loaded/converted to parquet if needed. With zero rules it will just end up getting aborted. If we move this check a bit higher, it can help save extra work done on datasets.

Comment thread scripts/run_validation.py Outdated
f"Running {len(rules)} rules against {len(datasets)} datasets"
)
if len(rules) == 0:
raise ValueError(

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From the content of the error message it seems the intention is to print one line instead of full trace. But raise ValueError here will actually print whole python trace as it is not caught or handled anywhere in this file or core.py file. If full trace is intentional please let me know.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@RamilCDISC i think a stacktrace here is fine. It will be 2 lines core.py -> run_validation then the actual log.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants