Skip to content

Commit 98677bb

Browse files
gerrycampiongithub-actions
andauthored
remove unused code (#1741)
* remove unused code * Update merged schema files with markdown descriptions --------- Co-authored-by: github-actions <github-actions@cdisc.org>
1 parent d6686aa commit 98677bb

37 files changed

Lines changed: 27 additions & 727 deletions

cdisc_rules_engine/check_operators/helpers.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -430,4 +430,3 @@ def flatten_list(data, items):
430430
vectorized_get_dict_key = np.vectorize(get_dict_key_val)
431431
vectorized_is_in = np.vectorize(is_in)
432432
vectorized_case_insensitive_is_in = np.vectorize(case_insensitive_is_in)
433-
vectorized_len = np.vectorize(len)

cdisc_rules_engine/constants/__init__.py

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,6 @@
22

33
# a message like: [INFO 2021-12-29 17:10:26,575 - module.py:44] - Log Message
44
LOG_FORMAT: str = "[%(levelname)s %(asctime)s - %(filename)s:%(lineno)s] - %(message)s"
5-
XPT_LABEL_PATTERN: str = (
6-
"HEADER RECORD\\*{7}MEMBER {2}HEADER RECORD!{7}0{17}160{8}140 "
7-
"{2}HEADER RECORD\\*{7}DSCRPTR HEADER RECORD!{7}0{30}"
8-
" SAS\\s{5}.{8}SASDATA .{16}\\s{24}.{16}.{16}\\s{16}(?P<label>.{40})"
9-
)
10-
11-
XPT_MODIFIED_DATE_PATTERN: str = (
12-
"HEADER RECORD\\*{7}MEMBER {2}HEADER RECORD!{7}0{17}160{8}140 "
13-
"{2}HEADER RECORD\\*{7}DSCRPTR HEADER RECORD!{7}0{30}"
14-
" SAS\\s{5}.{8}SASDATA .{16}\\s{24}.{16}(?P<modified_date>.{16})\\s{16}.{40}"
15-
)
165

176
NULL_FLAVORS = ["", None, {}, {None}, [], [None], np.nan]
187

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
SUPPLEMENTARY_DOMAINS = ("SUPP", "SQ")
2-
AP_DOMAIN_LENGTH: int = 4
32
AP_DOMAIN: str = "AP"
43
APFA_DOMAIN: str = "APFA"
54
APRELSUB_DOMAIN: str = "APRELSUB"

cdisc_rules_engine/constants/patterns.py

Lines changed: 0 additions & 11 deletions
This file was deleted.

cdisc_rules_engine/enums/default_file_paths.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ class DefaultFilePaths(BaseEnum):
1515
STANDARD_MODELS_CACHE_FILE = "standards_models.pkl"
1616
VARIABLE_METADATA_CACHE_FILE = "variables_metadata.pkl"
1717
VARIABLE_CODELIST_CACHE_FILE = "variable_codelist_maps.pkl"
18-
CODELIST_TERM_MAP_CACHE_FILE = "codelist_term_maps.pkl"
1918
CUSTOM_RULES_CACHE_FILE = "custom_rules.pkl"
2019
CUSTOM_RULES_DICTIONARY = "custom_rules_dictionary.pkl"
2120
LOCAL_XSD_FILE_DIR = join("resources", "schema", "xml")

cdisc_rules_engine/exceptions/__init__.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
DomainNotFoundInDefineXMLError,
1212
InvalidDatasetFormat,
1313
InvalidJSONFormat,
14-
NumberOfAttemptsExceeded,
1514
InvalidDictionaryVariable,
1615
UnsupportedDictionaryType,
1716
FailedSchemaValidation,
@@ -37,7 +36,6 @@
3736
"DomainNotFoundInDefineXMLError",
3837
"InvalidDatasetFormat",
3938
"InvalidJSONFormat",
40-
"NumberOfAttemptsExceeded",
4139
"InvalidDictionaryVariable",
4240
"UnsupportedDictionaryType",
4341
"FailedSchemaValidation",

cdisc_rules_engine/exceptions/custom_exceptions.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -87,10 +87,6 @@ class InvalidCSVFile(EngineError):
8787
description = "CSV data is malformed."
8888

8989

90-
class NumberOfAttemptsExceeded(EngineError):
91-
pass
92-
93-
9490
class InvalidDictionaryVariable(EngineError):
9591
description = (
9692
"Provided dictionary variable does not correspond to a dictionary term type"

cdisc_rules_engine/interfaces/data_service_interface.py

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -57,15 +57,6 @@ def get_variables_metadata(self, dataset_name: str) -> DatasetInterface:
5757
Gets variables metadata of a dataset.
5858
"""
5959

60-
@abstractmethod
61-
def get_dataset_by_type(
62-
self, dataset_name: str, dataset_type: str, **params
63-
) -> DatasetInterface:
64-
"""
65-
Generic function to return dataset based on the type.
66-
dataset_type param can be: contents, metadata, variables_metadata.
67-
"""
68-
6960
@abstractmethod
7061
def concat_split_datasets(
7162
self,

cdisc_rules_engine/models/dataset/dask_dataset.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -405,10 +405,6 @@ def partition_isin(partition):
405405
result = self._data.map_partitions(partition_isin)
406406
return result
407407

408-
def filter_by_value(self, column, values):
409-
mask = self._data[column].isin(values)
410-
return self.__class__(self._data[mask])
411-
412408
def max(self, *args, **kwargs):
413409
result = self._data.max(*args, **kwargs)
414410
return self.__class__(result)

cdisc_rules_engine/models/dataset_types.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,5 @@
33

44
class DatasetTypes(BaseEnum):
55
CONTENTS = "contents"
6-
METADATA = "metadata"
7-
RAW_METADATA = "raw_metadata"
6+
DATASET_METADATA = "dataset_metadata"
87
VARIABLES_METADATA = "variables_metadata"

0 commit comments

Comments
 (0)