cdapython 2.0.8__tar.gz → 2.0.9__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {cdapython-2.0.8 → cdapython-2.0.9}/CHANGELOG.md +2 -0
- {cdapython-2.0.8 → cdapython-2.0.9}/PKG-INFO +1 -1
- {cdapython-2.0.8 → cdapython-2.0.9}/cdapython/discover.py +29 -13
- {cdapython-2.0.8 → cdapython-2.0.9}/pyproject.toml +1 -1
- {cdapython-2.0.8 → cdapython-2.0.9}/LICENSE +0 -0
- {cdapython-2.0.8 → cdapython-2.0.9}/README.md +0 -0
- {cdapython-2.0.8 → cdapython-2.0.9}/cdapython/__init__.py +0 -0
- {cdapython-2.0.8 → cdapython-2.0.9}/cdapython/application_utilities.py +0 -0
- {cdapython-2.0.8 → cdapython-2.0.9}/cdapython/config/__init__.py +0 -0
- {cdapython-2.0.8 → cdapython-2.0.9}/cdapython/config/logger_default_config.yml +0 -0
- {cdapython-2.0.8 → cdapython-2.0.9}/cdapython/get_data.py +0 -0
- {cdapython-2.0.8 → cdapython-2.0.9}/cdapython/logging_wrappers.py +0 -0
- {cdapython-2.0.8 → cdapython-2.0.9}/cdapython/summarize.py +0 -0
- {cdapython-2.0.8 → cdapython-2.0.9}/cdapython/validation.py +0 -0
|
@@ -834,20 +834,36 @@ def column_values(
|
|
|
834
834
|
# Let's not care about case, and remove any whitespace before it can do any damage.
|
|
835
835
|
data_source = re.sub( r'\s+', r'', data_source ).upper()
|
|
836
836
|
|
|
837
|
-
#
|
|
838
|
-
#
|
|
839
|
-
#
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
837
|
+
# Cache valid labels for upstream data sources. The data structure coming back from
|
|
838
|
+
# release_metadata() is a list of dicts, with each dict looking like
|
|
839
|
+
#
|
|
840
|
+
# {
|
|
841
|
+
# 'cda_table': 'file',
|
|
842
|
+
# 'cda_column': 'access',
|
|
843
|
+
# 'data_source': 'GDC',
|
|
844
|
+
# 'data_source_version': 'March 2025',
|
|
845
|
+
# 'data_source_extraction_date': '2025-03-21',
|
|
846
|
+
# 'data_source_row_count': 3025352,
|
|
847
|
+
# 'data_source_unique_value_count': 4,
|
|
848
|
+
# 'data_source_null_count': 407714
|
|
849
|
+
# }
|
|
850
|
+
|
|
851
|
+
try:
|
|
852
|
+
cached_release_metadata = release_metadata()
|
|
853
|
+
except Exception as e:
|
|
854
|
+
log.critical( e )
|
|
855
|
+
return
|
|
856
|
+
|
|
857
|
+
valid_data_sources = set()
|
|
858
|
+
|
|
859
|
+
for column_record in cached_release_metadata:
|
|
860
|
+
record_data_source = column_record['data_source']
|
|
861
|
+
# Let's not care about case.
|
|
862
|
+
if record_data_source.upper() != 'CDA':
|
|
863
|
+
valid_data_sources.add( record_data_source.upper() )
|
|
848
864
|
|
|
849
|
-
if data_source != '' and data_source not in
|
|
850
|
-
log.error( f"The 'data_source' parameter must be one of
|
|
865
|
+
if data_source != '' and data_source not in valid_data_sources:
|
|
866
|
+
log.error( f"The 'data_source' parameter must be one of { sorted( valid_data_sources ) }. You supplied '{data_source}', which is not." )
|
|
851
867
|
return
|
|
852
868
|
|
|
853
869
|
#############################################################################################################################
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|