Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement Implies Operator and update to cql2elm 3.12.0 #320

Merged
merged 12 commits into from
Jul 31, 2024

Conversation

hossenlopp
Copy link
Contributor

@hossenlopp hossenlopp commented Jul 11, 2024

Implements the implies operator and updates CQL translator to 3.12.0. Also updates gradle wrapper to latest 8.x for Java 21 support. Enables the spec-tests for Implies operator.

Note: The translator has a bug with choice types in the output that caused issues with some tests. This issue was manually edited out in the ELM after running the build:test-data command. cqframework/clinical_quality_language#1380

Pull requests into cql-execution require the following.
Submitter and reviewer should ✔ when done.
For items that are not-applicable, mark "N/A" and ✔.

CDS Connect and Bonnie are the main users of this repository.
It is strongly recommended to include a person from each of those projects as a reviewer.

Submitter:

  • This pull request describes why these changes were made
  • Code diff has been done and been reviewed (it does not contain: additional white space, not applicable code changes, debug statements, etc.)
  • Tests are included and test edge cases
  • Tests have been run locally and pass
  • Code coverage has not gone down and all code touched or added is covered.
  • Code passes lint and prettier (hint: use npm run test:plus to run tests, lint, and prettier)
  • All dependent libraries are appropriately updated or have a corresponding PR related to this change
  • cql4browsers.js built with npm run build:browserify if source changed.

Reviewer:

Name:

  • Code is maintainable and reusable, reuses existing code and infrastructure where appropriate, and accomplishes the task’s purpose
  • The tests appropriately test the new code, including edge cases
  • You have tried to break the code

Copy link
Member

@cmoesel cmoesel 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 a drive-by review. I did not look at it closely (sorry), but I wanted to make one suggestion. Given that you had to hand edit some of the generated JSON for tests to pass, it might be helpful to put a comment in the source code near the tests that it affects. I can picture myself updating the translator in the future, re-running the build:test-data command, getting broken tests, and being confused as to why they're breaking (because, of course, I will forget that you needed to hand-edit the JSON). So a little comment might help forgetful people like me to remember: If this test breaks, check the generated JSON for a repeated type element.

BTW -- nice job figuring out the mysteries of the translator 2.x to 3.x changes so you could get the test generator working again. That's not fun. Thanks for taking it on!

@p9g
Copy link

p9g commented Jul 12, 2024

@hossenlopp hossenlopp requested a review from cmoesel July 12, 2024 20:14
Copy link
Member

@cmoesel cmoesel 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 great stuff, @hossenlopp. Thank you!

I've left some comments about the tests that expect the context localId entries to be populated. My comments suggest fixing something that doesn't cause problems, but is technically incorrect (and was there previously, so not your fault) -- and an idea about how we can keep test maintenance easier in the future.

Since this was a previously existing issue, and you did not introduce any regression, I'm not "requesting changes", because it's valid for you to tell me it's out of scope for this PR and should be handled as a separate issue. But if you have the time and want to tackle it now rather than later, that's good too.

test/elm/list/list-test.ts Outdated Show resolved Hide resolved
test/elm/query/query-test.ts Outdated Show resolved Hide resolved
test/spec-tests/skip-list.txt Show resolved Hide resolved
@p9g
Copy link

p9g commented Jul 15, 2024

@hossenlopp hossenlopp requested a review from cmoesel July 18, 2024 19:12
Copy link
Member

@cmoesel cmoesel left a comment

Choose a reason for hiding this comment

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

Nice job, @hossenlopp -- and thanks for implementing that test helper for getting local ids. It was probably a little tedious up front, but it will probably save us a lot of tediousness going forward!

I left one comment for something to consider, but honestly, it's totally optional -- this is really good as it is. So... I'm approving. Thanks again for this great work!

test/elm/list/list-test.ts Outdated Show resolved Hide resolved
test/elm/list/list-test.ts Outdated Show resolved Hide resolved
@hossenlopp hossenlopp requested a review from cmoesel July 29, 2024 20:18
Copy link
Member

@cmoesel cmoesel left a comment

Choose a reason for hiding this comment

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

Perfect. Thank you, @hossenlopp!

@cmoesel cmoesel merged commit 039f795 into master Jul 31, 2024
8 checks passed
@cmoesel cmoesel deleted the implies-operator branch July 31, 2024 18:03
This was referenced Aug 9, 2024
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.

4 participants