#1442 fix dataset filtering when -dp is provided#1645
Conversation
RamilCDISC
left a comment
There was a problem hiding this comment.
In cases when -dp points to a file that is not mentioned by -ft then the message should state the reason why no files were processed.
Right now if I mention only one dataset file using -dp and use -ft to point to a different type of file. The message is unclear. The excel file mentioned with -dp flag is valid and does exist in the system. The reason it was not used because -ft flag was specified to use only json files.
python core.py validate -s sdtmig -v 3.4 -dp tests/resources/report_test_data/test_datasets.xlsx -ft json
[ERROR 2026-03-02 14:29:57,900 - core.py:184] - No valid dataset files provided.
Supported formats: SAS V5 XPT, Dataset-JSON (JSON or NDJSON), or Excel (XLSX)
README.md
Outdated
| -jcf, --jsonata-custom-functions Pair containing a variable name and a Path to directory containing a set of custom JSONata functions. Can be specified multiple times | ||
| -e, --encoding TEXT File encoding for reading datasets. If not specified, defaults to utf-8. Supported encodings: utf-8, utf-16, utf-32, cp1252, latin-1, etc. | ||
| -e, --encoding TEXT File encoding for reading datasets. If not specified, defaults to utf-8. Supported encodings: utf-8, utf-16, utf-32, cp1252, latin-1, etc. | ||
| -ft, --filetype TEXT File extension to filter datasets. Has higher priority then --dataset-path parameter. |
There was a problem hiding this comment.
A small typo. I believe it should be higher priority 'than' instead of 'then' --dataset-path parameter
… with -ft parameter
RamilCDISC
left a comment
There was a problem hiding this comment.
The PR fixes the dataset filtering using -ft parameter when dataset is specified using -dp parameter. The validation was done by:
- Review the PR for any unwanted code or comments.
- Review the PR in accordance with AC.
- Ensuring all unit and regression testing pass.
- Ensuring relevant testing is updated.
- Running manual validation using CLI covering cases such as:
- file with -dp and same -ft extension
- file with -dp with different 0ft extension
- -ft extension with multiple files in a folder specified by -d
- missing file specified with -dp where -ft is of same extension
- missing file specified with -dp where -ft is of different extension
SFJohnson24
left a comment
There was a problem hiding this comment.
PR correctly addresses issue
No description provided.