bugfix: update view code params to take constant not constants#2575
bugfix: update view code params to take constant not constants#2575matthewoneill7-nhs wants to merge 3 commits intoaehrc:mainfrom
Conversation
constants gets passed to the JVM which is then ignored. This then causes any query that uses constants to fail with an 'Unknown variable' error
|
linked to #2574 |
Fix three bugs in test_view_with_constants: use "path" instead of "value" for the column key, use FHIRPath %constant syntax instead of $constant, and use the named ResultRow factory for consistency. Also fix PEP 8 style issues and add a matching R test.
| {"path": "name.first().family", "name": "family_name"}, | ||
| ] | ||
| } | ||
| ], | ||
| where=[{"path": "id = $filter_id"}], | ||
| where=[{"path": "id = %filter_id"}], | ||
| ) | ||
| assert result.collect() == [ | ||
| Row("8ee183e2-b3c0-4151-be94-b945d6aa8c6d", "Krajcik437"), | ||
| ResultRow("8ee183e2-b3c0-4151-be94-b945d6aa8c6d", "Krajcik437"), |
There was a problem hiding this comment.
oh no, how embarrassing.
Apologies, I installed uv but couldn't get the tests to run
There was a problem hiding this comment.
No problem at all!
If you let us know what you had trouble with, we will try to improve the documentation in CONTRIBUTING.md.
There was a problem hiding this comment.
I made sure to have java 21 installed, and python with UV
then i ran mvn clean install -pl lib/python -am but it kept ending in a killed process. when i cdd into the python library folder and ran pytest through uv it failed with missing libraries.
i'm not familiar with the java tooling so i don't know which knobs and dials to turn to make it less likely to crash on me. It could also be my machine, i've had wsl crash on me a fair bit while using pyspark and pathling.
Secrets are not available for PRs from external contributors, causing the sonar step to fail. Split the install and SonarCloud steps so the analysis is skipped when SONAR_TOKEN is absent.
constants gets passed to the JVM which is then ignored. This then causes any query that uses constants to fail with an 'Unknown variable' error