Skip to content

798: Action to check engine against published rules#1700

Open
alexfurmenkov wants to merge 16 commits into
mainfrom
798-test-against-published
Open

798: Action to check engine against published rules#1700
alexfurmenkov wants to merge 16 commits into
mainfrom
798-test-against-published

Conversation

@alexfurmenkov
Copy link
Copy Markdown
Collaborator

@alexfurmenkov alexfurmenkov commented Apr 22, 2026

workflow to run validation for all published rules, comparing with benchmark validation results

cdisc-org/cdisc-open-rules#22 with changes to allow validation from this repo

Comment on lines +48 to +60
- name: Checkout cdisc-open-rules
uses: actions/checkout@v6
with:
repository: cdisc-org/cdisc-open-rules
ref: ${{ inputs.rules_ref || 'main' }}
path: open-rules
# If cdisc-open-rules is private, add a PAT secret:
# token: ${{ secrets.CDISC_OPEN_RULES_TOKEN }}

# -----------------------------------------------------------------------
# 3. Set up Python
# -----------------------------------------------------------------------
- name: Set up Python 3.12
Copy link
Copy Markdown
Collaborator

@gerrycampion gerrycampion left a comment

Choose a reason for hiding this comment

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

This is looking really nice, but I have some comments

Comment thread .github/workflows/validate-published-rules.yml Outdated
Comment thread .github/workflows/validate-published-rules.yml Outdated
uses: actions/checkout@v6
with:
repository: cdisc-org/cdisc-rules-engine
ref: ${{ inputs.engine_ref || github.sha }}
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.

remove ref for engine checkout. It should use whatever the default is.

Comment thread .github/workflows/validate-published-rules.yml Outdated
Copy link
Copy Markdown
Collaborator

@gerrycampion gerrycampion left a comment

Choose a reason for hiding this comment

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

The summary and detailed outputs look awesome. I have one comment, sorry I didn't pickup on this earlier. Hopefully it is an easy conversion for ai.

Comment thread .github/workflows/validate-published-rules.yml Outdated
@alexfurmenkov alexfurmenkov marked this pull request as ready for review May 11, 2026 12:42
@alexfurmenkov alexfurmenkov changed the title WIP: action to check engine against published rules Action to check engine against published rules May 11, 2026
repository: cdisc-org/cdisc-open-rules
ref: ${{ inputs.rules_ref || 'rules_2' }}
path: open-rules
# If cdisc-open-rules is private, add a PAT secret:
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.

I think instead of leaving a comment like this we should either use it or totally remove to basedon the requirement.

uses: actions/checkout@v6
with:
repository: cdisc-org/cdisc-open-rules
ref: ${{ inputs.rules_ref || 'rules_2' }}
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.

here the system will always fallback to using branch rules_2 when it is auto triggered because of push to main. Input.rules_ref is set on manual override. Please let me know if I am misunderstanding the logic.

Comment thread scripts/validate_published_rules.py Outdated

if not os.path.isdir(published_dir):
print(f"WARNING: Published/ not found under {rules_root}", file=sys.stderr)
return False
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.

Do you think it would be better to fail the test when published rule folder is missing, instead of printing. a warning and silently passing the test? Silently passing might create a false positive here.

@RamilCDISC
Copy link
Copy Markdown
Collaborator

Thanks for the updates. The PR seems ready to me for merge now, this s this PR depends on changes in PR we will wait for it to be merged before approving this one.

@alexfurmenkov alexfurmenkov changed the title Action to check engine against published rules 798: Action to check engine against published rules May 15, 2026
Comment thread scripts/validate_published_rules.py Outdated
Comment on lines +182 to +183
"Expected": "\u2014",
"Got": "\u2014",
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.

We are a bit inconsistent with naming and it can be a little confusing.
This applies to both the summary table and detailed report. I think we should name these "Expected" and "Actual". This also applies to the diff results which has "committed" and "generated". We should use "Expected" and "Actual" here as well.

@SFJohnson24
Copy link
Copy Markdown
Collaborator

SFJohnson24 commented May 18, 2026

made this PR to remove the .csv file extension in the results.csv as requested cdisc-org/cdisc-open-rules#38

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.

Action to run all published rules' tests

5 participants