diff --git a/README.md b/README.md index 39883c5c2..f501b42ac 100644 --- a/README.md +++ b/README.md @@ -204,7 +204,6 @@ This will show the list of validation options. if both .env and -me are specified, the larger value will be used. If either sets the per_dataset_flag to true, it will be true If limit is set to 0, no maximum will be enforced. No maximum is the default behavior. - -dv, --define-version TEXT Define-XML version used for validation -dxp, --define-xml-path Path to define-xml file. -vx, --validate-xml Enable XML validation (default 'y' to enable, otherwise disable). --whodrug TEXT Path to directory with WHODrug dictionary diff --git a/cdisc_rules_engine/models/validation_args.py b/cdisc_rules_engine/models/validation_args.py index bf1d60083..713560eed 100644 --- a/cdisc_rules_engine/models/validation_args.py +++ b/cdisc_rules_engine/models/validation_args.py @@ -16,7 +16,6 @@ "output", "output_format", "raw_report", - "define_version", "external_dictionaries", "rules", "exclude_rules", diff --git a/cdisc_rules_engine/services/reporting/sdtm_report_data.py b/cdisc_rules_engine/services/reporting/sdtm_report_data.py index b197c8cf8..5ab0d8e7a 100644 --- a/cdisc_rules_engine/services/reporting/sdtm_report_data.py +++ b/cdisc_rules_engine/services/reporting/sdtm_report_data.py @@ -50,10 +50,9 @@ def __init__( ) define_xml_path = args.define_xml_path dictionary_versions = self._dictionary_versions or {} - if define_xml_path: - define_version = self.get_define_version([define_xml_path]) - else: - define_version: str = self._args.define_version + define_version = ( + self.get_define_version([define_xml_path]) if define_xml_path else None + ) controlled_terminology = self._args.controlled_terminology_package if not controlled_terminology and define_version: if define_xml_path and define_version: diff --git a/core.py b/core.py index ffd451e7e..9d13312bc 100644 --- a/core.py +++ b/core.py @@ -315,12 +315,6 @@ def _validate_no_arguments(logger) -> None: "This flag must be used only with --output-format JSON." ), ) -@click.option( - "-dv", - "--define-version", - type=click.Choice(["2-1", "2-0", "2.0", "2.1"]), - help="Define-XML version used for validation", -) @click.option("--whodrug", help="Path to directory with WHODrug dictionary files") @click.option("--meddra", help="Path to directory with MedDRA dictionary files") @click.option("--loinc", help="Path to directory with LOINC dictionary files") @@ -443,7 +437,6 @@ def validate( # noqa output: str, output_format: tuple[str], raw_report: bool, - define_version: str, whodrug: str, meddra: str, loinc: str, @@ -558,7 +551,6 @@ def validate( # noqa output, set(output_format), raw_report, - define_version, external_dictionaries, rules, exclude_rules, @@ -930,7 +922,6 @@ def test_validate(filetype): output, output_format, False, - None, external_dictionaries, [], [], diff --git a/tests/QARegressionTests/test_Issues/test_CoreIssue1345.py b/tests/QARegressionTests/test_Issues/test_CoreIssue1345.py index 5ac320c88..2b66a4e3a 100644 --- a/tests/QARegressionTests/test_Issues/test_CoreIssue1345.py +++ b/tests/QARegressionTests/test_Issues/test_CoreIssue1345.py @@ -18,8 +18,6 @@ def generate_report(): "sdtmig", "-v", "3-4", - "-dv", - "2-1", "-dxp", os.path.join( "tests", diff --git a/tests/QARegressionTests/test_core/test_validate.py b/tests/QARegressionTests/test_core/test_validate.py index 14748fd3e..54fa64310 100644 --- a/tests/QARegressionTests/test_core/test_validate.py +++ b/tests/QARegressionTests/test_core/test_validate.py @@ -156,7 +156,7 @@ def test_validate_all_options(self): "-of", "json", "-rr", - "-dv", + "-dxp", os.path.join("tests", "resources", "report_test_data", "define.xml"), "--whodrug", os.path.join("tests", "resources", "dictionaries", "whodrug"), @@ -513,7 +513,6 @@ def test_validate_dummy_with_all_options_one_data_source(self): f"--meddra {os.path.join('tests', 'resources', 'dictionaries', 'meddra')} " f"-s sdtmig " f"-v 3.4 " - f"-dv 2.1 " f"-dxp {os.path.join('tests', 'resources', 'define.xml')} " f"-l error" ) @@ -534,7 +533,6 @@ def test_validate_dummy_with_all_options(self): f"--meddra {os.path.join('tests', 'resources', 'dictionaries', 'meddra')} " f"-s sdtmig " f"-v 3.4 " - f"-dv 2.1 " f"-dxp {os.path.join('tests', 'resources', 'define.xml')} " f"-l error" ) @@ -621,7 +619,6 @@ def test_validate_dummy_with_vx_as_no(self): f"python core.py validate " f"-s sendig " f"-v 3.1 " - f"-dv 2.1 " f"-lr {os.path.join('tests', 'resources', 'CoreIssue295', 'SEND4.json')} " f"-dp {os.path.join('tests', 'resources', 'CoreIssue295', 'dm.json')} " f"-vx no" @@ -634,7 +631,6 @@ def test_validate_dummy_with_vx_as_yes(self): f"python core.py validate " f"-s sendig " f"-v 3.1 " - f"-dv 2.1 " f"-lr {os.path.join('tests', 'resources', 'CoreIssue295', 'SEND4.json')} " f"-dp {os.path.join('tests', 'resources', 'CoreIssue295', 'dm.json')} " f"-vx y" diff --git a/tests/unit/test_services/test_data_service/test_data_service.py b/tests/unit/test_services/test_data_service/test_data_service.py index c3316d4d2..37584bfbb 100644 --- a/tests/unit/test_services/test_data_service/test_data_service.py +++ b/tests/unit/test_services/test_data_service/test_data_service.py @@ -195,7 +195,6 @@ def test_get_dataset_class(dataset_metadata, data, expected_class): "", "", False, - "", None, None, "", @@ -281,7 +280,6 @@ def test_get_dataset_class_associated_domains(): "", "", False, - "", None, None, "",