Skip to content

Commit

Permalink
fix spelling of rea*d*_all_json function
Browse files Browse the repository at this point in the history
  • Loading branch information
sherwoodf committed Aug 2, 2024
1 parent b36017d commit 56362fe
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions bia-export/bia_export/website_conversion.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def read_api_json_file(file_path: Path, object_type: Type[BaseModel]) -> BaseMod
return object_type(**object_dict)


def real_all_json(directory_path: Path, object_type: Type[BaseModel]) -> List[BaseModel]:
def read_all_json(directory_path: Path, object_type: Type[BaseModel]) -> List[BaseModel]:
object_list = []
file_paths = glob(str(directory_path))
for file_path in file_paths:
Expand All @@ -38,7 +38,7 @@ def find_associated_objects(typed_associations: set, directory_path: Path, objec
if len(typed_associations) == 0:
return linked_object

typed_object_in_study: List[bia_data_model.UserIdentifiedObject] = real_all_json(directory_path, object_type)
typed_object_in_study: List[bia_data_model.UserIdentifiedObject] = read_all_json(directory_path, object_type)
for object in typed_object_in_study:
if object.title_id in typed_associations:
linked_object.append(object)
Expand Down Expand Up @@ -72,7 +72,7 @@ def create_experimental_imaging_datasets(accession_id: str, root_directory: Path

eid_directory = root_directory.joinpath(f'experimental_imaging_datasets/{accession_id}/*.json')

api_eids: List[bia_data_model.ExperimentalImagingDataset] = real_all_json(eid_directory, bia_data_model.ExperimentalImagingDataset)
api_eids: List[bia_data_model.ExperimentalImagingDataset] = read_all_json(eid_directory, bia_data_model.ExperimentalImagingDataset)

for eid in api_eids:
eid_dict = eid.model_dump()
Expand Down

0 comments on commit 56362fe

Please sign in to comment.