Skip to content

Commit

Permalink
opxrd: Used patterndb_logger for init logging
Browse files Browse the repository at this point in the history
  • Loading branch information
Somerandomguy10111 committed Dec 14, 2024
1 parent 20a19a7 commit 10dc419
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions opxrd/wrapper/opxrd.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ def load(cls, dirpath : str, download : bool = True, download_in_situ : bool = F
if not os.path.isdir(dirpath) and download:
cls._prepare_files(root_dirpath=dirpath, include_in_situ=download_in_situ)


return super().load(dirpath=dirpath, strict=True)


Expand Down Expand Up @@ -65,8 +64,8 @@ def _download_zenodo_opxrd(cls, output_fpath : str, filename : str = 'opxrd.zip'
if not file_response.status_code == 200:
raise ValueError(f'Response returned error status code {file_response.status_code}. Reason: {file_response.reason}')

print(f'- Downloading opXRD database from Zenodo ({zenodo_url})')
print(f'- Download chunk progress (Chunk size = 1kB):')
patterdb_logger.info(f'Downloading opXRD database from Zenodo ({zenodo_url})')
patterdb_logger.info(f'Download chunk progress (Chunk size = 1kB):')
time.sleep(0.01)
tracked_int = TrackedInt(start_value=0, finish_value=total_chunks)
with open(output_fpath, 'wb') as f:
Expand Down

0 comments on commit 10dc419

Please sign in to comment.