Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions etc/load_scan_into_dataframe/load_results_package.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,9 +220,9 @@ def save_schema_num(self, schema_series):
self.df_io.store_dataframe_to_hdf5(
schema_df, file_path, df_key='schema', h5_format='table', is_append=True)

def assert_dataframe_schema(self, path_json_dataframe):
def validate_dataframe_schema(self, path_json_dataframe):
"""
This function takes a DataFrame containing columns 'path' and 'json_content', extracts info from path.
This function takes a DataFrame containing columns 'path' and 'json_content', extracts info from path,
uses schema info to only keep schemaVersion 3.2.2, and saves the schema count which are deleted.

:param path_json_dataframe : pd.DatFrame
Expand Down Expand Up @@ -340,8 +340,8 @@ def create_package_level_dataframe(self, json_filename=None, path_json_dataframe
else:
path_json_dataframe = self.convert_records_to_json()

# Asserts if Scancode SchemaVersion is desired value, from path
path_json_dataframe = self.assert_dataframe_schema(path_json_dataframe)
# Validate that Scancode SchemaVersion is desired value, from path
path_json_dataframe = self.validate_dataframe_schema(path_json_dataframe)

# Converts information multiple levels inside dicts into columns
# Package Level Data, TimeStamp, 'license_clarity_score' values,'files' list -> `New Columns`.
Expand Down