SETI / rms-pds4indextools

PDS4 index tools Python module
Apache License 2.0
0 stars 0 forks source link

Fixing pattern matching for `--limit-xpaths-file` #32

Closed esimpsons3ti closed 1 month ago

esimpsons3ti commented 1 month ago

Due to the use of fnmatch in the filter_dict_by_glob_patterns function, any use of ** was considered two separate *, and not as the recursive wildcard **. A new helper function has been added to simulate the "match zero or more directories" logic to the pattern matching function. I also fixed a unit test file to more accurately find the intended pattern, as well as fixed a typo in a docstring.

Fixes #23

codecov[bot] commented 1 month ago

Codecov Report

Attention: Patch coverage is 94.73684% with 2 lines in your changes missing coverage. Please review.

Project coverage is 71.84%. Comparing base (037d4f6) to head (40ebf25).

Files Patch % Lines
pds4indextools/pds4_create_xml_index.py 94.73% 0 Missing and 2 partials :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #32 +/- ## ========================================== + Coverage 70.96% 71.84% +0.88% ========================================== Files 1 1 Lines 589 611 +22 Branches 137 142 +5 ========================================== + Hits 418 439 +21 Misses 143 143 - Partials 28 29 +1 ```

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

esimpsons3ti commented 1 month ago

I was planning on working on unit tests after this is resolved, anyway. I would like that to be a part of a different pull request.