-
Notifications
You must be signed in to change notification settings - Fork 27
fixes #1619
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fixes #1619
Changes from all commits
0e2af26
d38d932
77014a7
2fd4ce7
e910858
b8b2143
8a45d80
70b30b5
5302bb7
71404bc
281c6f5
f3c839f
b3de2bd
2302357
bc6e5de
b04f8c3
871b2be
2d77354
73bc619
524a59c
71e514d
1c0963b
71c75a4
7339967
de3ea9f
b090426
5bab3c7
a48c69e
7e82db0
11004a0
22fd726
7bac61c
1254757
8077ec4
1d60d17
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,3 @@ | ||
| # flake8: noqa | ||
| from typing import Type | ||
|
|
||
| from cdisc_rules_engine.dataset_builders.json_schema_check_dataset_builder import ( | ||
|
|
@@ -23,15 +22,9 @@ | |
| from cdisc_rules_engine.dataset_builders.domain_list_dataset_builder import ( | ||
| DomainListDatasetBuilder, | ||
| ) | ||
| from cdisc_rules_engine.dataset_builders.define_variables_dataset_builder import ( | ||
| DefineVariablesDatasetBuilder, | ||
| ) | ||
| from cdisc_rules_engine.dataset_builders.variables_metadata_with_define_dataset_builder import ( | ||
| VariablesMetadataWithDefineDatasetBuilder, | ||
| ) | ||
| from cdisc_rules_engine.dataset_builders.define_item_group_dataset_builder import ( | ||
| DefineItemGroupDatasetBuilder, | ||
| ) | ||
| from cdisc_rules_engine.dataset_builders.contents_define_variables_dataset_builder import ( | ||
| ContentsDefineVariablesDatasetBuilder, | ||
| ) | ||
|
|
@@ -65,17 +58,14 @@ | |
|
|
||
| class DatasetBuilderFactory(FactoryInterface): | ||
| _builders_map = { | ||
| RuleTypes.RECORD_CHECK.value: ContentsDatasetBuilder, | ||
| RuleTypes.DATASET_CONTENTS_CHECK_AGAINST_DEFINE.value: ContentsDefineDatasetBuilder, | ||
| RuleTypes.DATASET_METADATA_CHECK.value: ContentMetadataDatasetBuilder, | ||
| RuleTypes.DATASET_METADATA_CHECK_AGAINST_DEFINE.value: DatasetMetadataDefineDatasetBuilder, | ||
| RuleTypes.VARIABLE_METADATA_CHECK.value: VariablesMetadataDatasetBuilder, | ||
| RuleTypes.DOMAIN_PRESENCE_CHECK.value: DomainListDatasetBuilder, | ||
| RuleTypes.DOMAIN_PRESENCE_CHECK_AGAINST_DEFINE.value: DomainListWithDefineDatasetBuilder, | ||
| RuleTypes.DEFINE_ITEM_METADATA_CHECK.value: DefineVariablesDatasetBuilder, | ||
gerrycampion marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| RuleTypes.VARIABLE_METADATA_CHECK_AGAINST_DEFINE.value: VariablesMetadataWithDefineDatasetBuilder, | ||
| RuleTypes.DATASET_CONTENTS_CHECK_AGAINST_DEFINE_AND_LIBRARY.value: ContentsDatasetBuilder, | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Could you please update the documentation of Rule Type to remove this from there too?
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Are we planning to keep it in the documentation and remove form code? @SFJohnson24
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. odd I had though I removed it. It is done @RamilCDISC |
||
| RuleTypes.VALUE_LEVEL_METADATA_CHECK_AGAINST_DEFINE.value: ContentsDatasetBuilder, | ||
| RuleTypes.DEFINE_ITEM_GROUP_METADATA_CHECK.value: DefineItemGroupDatasetBuilder, | ||
| RuleTypes.VALUE_CHECK_AGAINST_DEFINE_XML_VARIABLE.value: ContentsDefineVariablesDatasetBuilder, | ||
| RuleTypes.VALUE_CHECK_AGAINST_DEFINE_XML_VLM.value: ContentsDefineVLMDatasetBuilder, | ||
| RuleTypes.VARIABLE_METADATA_CHECK_AGAINST_LIBRARY.value: VariablesMetadataWithLibraryMetadataDatasetBuilder, | ||
|
|
@@ -106,7 +96,11 @@ def get_service( | |
| """ | ||
| Get instance of dataset builder by name. | ||
| """ | ||
| builder = self._builders_map.get(name, ContentsDatasetBuilder)( | ||
| builder_class = self._builders_map.get(name) | ||
| if builder_class is None: | ||
| raise ValueError(f"Invalid Rule Type Entered: '{name}'") | ||
|
|
||
| return builder_class( | ||
| kwargs.get("rule"), | ||
| kwargs.get("data_service"), | ||
| kwargs.get("cache_service"), | ||
|
|
@@ -121,4 +115,3 @@ def get_service( | |
| kwargs.get("standard_substandard", None), | ||
| kwargs.get("library_metadata"), | ||
| ) | ||
| return builder | ||
This file was deleted.
This file was deleted.
Uh oh!
There was an error while loading. Please reload this page.