cqframework / cqf-tooling

Tooling for CQL and IG Authors
Apache License 2.0
19 stars 23 forks source link

BUG FIX (Issue 537): ExtractMatBundle Non-IG Folder Structure Handling #539

Open echicoine-icf opened 2 days ago

echicoine-icf commented 2 days ago

When ExtractMATBundle operation is ran against bundle inside non-IG structured directory, errors were encountered and the processed terminated.

This change enhances the bundles folder identification process, and if no bundle folder is found where a parent folder structure can be established, the output folder becomes same as the location of the bundle file itself.

Other modifications include using Paths and File.separator for OS compatibility, and creating a directory where none exists only when outputResourceByName is called or CQL is extracted.

New test moves files from "bundles_small" test folder to temporary folder NOT named with "bundles", and does not specify an output folder. The result are all files extracted within that same temporary folder (source of bundle json.)

By creating this PR you acknowledge that your contribution will be licensed under Apache 2.0

codecov[bot] commented 1 day ago

Codecov Report

Attention: Patch coverage is 58.82353% with 14 lines in your changes missing coverage. Please review.

Project coverage is 21.90%. Comparing base (955f07e) to head (fd1f3d8).

Files with missing lines Patch % Lines
...f/tooling/operation/ExtractMatBundleOperation.java 52.00% 6 Missing and 6 partials :warning:
...g/opencds/cqf/tooling/utilities/ResourceUtils.java 77.77% 1 Missing and 1 partial :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #539 +/- ## ============================================ + Coverage 21.87% 21.90% +0.02% - Complexity 1673 1680 +7 ============================================ Files 297 297 Lines 25412 25430 +18 Branches 4008 4015 +7 ============================================ + Hits 5560 5571 +11 - Misses 18931 18936 +5 - Partials 921 923 +2 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.


🚨 Try these New Features: