Skip to content

fix(validation): convert ASK queries to SELECT for both CM and imported - #442

Open
schivmeister wants to merge 1 commit into
developfrom
feature/custom-assertion-fix
Open

fix(validation): convert ASK queries to SELECT for both CM and imported#442
schivmeister wants to merge 1 commit into
developfrom
feature/custom-assertion-fix

Conversation

@schivmeister

Copy link
Copy Markdown
Contributor

Imported SPARQL test files failed validation because the importer only set content (raw file), not query (validation query).

  • Add convert_ask_to_select() to sparql_test_suite/services/data.py
  • Guard against converting queries that already start with SELECT
  • Use shared converter in importer for imported SPARQL files
  • Use shared converter in CM assertions (replaces duplicate template calls)
  • Add unit tests for ASK->SELECT conversion edge cases

Imported SPARQL test files failed validation because the importer only
set `content` (raw file), not `query` (validation query).

- Add convert_ask_to_select() to sparql_test_suite/services/data.py
- Guard against converting queries that already start with SELECT
- Use shared converter in importer for imported SPARQL files
- Use shared converter in CM assertions (replaces duplicate template
  calls)
- Add unit tests for ASK->SELECT conversion edge cases
@codecov

codecov Bot commented Jul 10, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 81.81818% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 55.71%. Comparing base (c4048a1) to head (d47b391).
⚠️ Report is 16 commits behind head on develop.

Files with missing lines Patch % Lines
.../backend/package_importer/adapters/importer_abc.py 50.00% 1 Missing ⚠️
...package_validator/services/sparql_cm_assertions.py 50.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #442      +/-   ##
===========================================
+ Coverage    55.63%   55.71%   +0.07%     
===========================================
  Files          200      200              
  Lines         8309     8333      +24     
===========================================
+ Hits          4623     4643      +20     
- Misses        3686     3690       +4     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@schivmeister

Copy link
Copy Markdown
Contributor Author

For the record, this has not worked to solve custom SPARQL validation. The queries are not run. Something else must be afoot.

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.

1 participant