Skip to content

Commit

Permalink
Added ctype option to scan so it carries through to compute
Browse files Browse the repository at this point in the history
  • Loading branch information
dwest77a committed Jan 20, 2025
1 parent 5f5fd6e commit 0023e63
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions padocc/phases/scan.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ def help(self, fn=print):
fn('Scan Options:')
fn(' > project.run() - Run a scan for this project')

def _run(self, mode: str = 'kerchunk') -> None:
def _run(self, mode: str = 'kerchunk', ctype: Union[str,None] = None) -> None:
"""Main process handler for scanning phase"""

self.logger.info(f'Starting scan-{mode} operation for {self.proj_code}')
Expand All @@ -171,7 +171,7 @@ def _run(self, mode: str = 'kerchunk') -> None:
if mode == 'zarr':
self._scan_zarr(limiter=limiter)
elif mode == 'kerchunk':
self._scan_kerchunk(limiter=limiter)
self._scan_kerchunk(limiter=limiter, ctype=ctype)
elif mode == 'cfa':
self._scan_cfa(limiter=limiter)
else:
Expand All @@ -183,7 +183,7 @@ def _run(self, mode: str = 'kerchunk') -> None:
self.update_status('scan','Success',jobid=self._logid)
return 'Success'

def _scan_kerchunk(self, limiter: Union[int,None] = None):
def _scan_kerchunk(self, limiter: Union[int,None] = None, ctype: Union[str,None] = None):
"""
Function to perform scanning with output Kerchunk format.
"""
Expand All @@ -200,7 +200,7 @@ def _scan_kerchunk(self, limiter: Union[int,None] = None):
limiter=limiter,
is_trial=True)

mini_ds.create_refs()
mini_ds.create_refs(ctype=ctype)

if mini_ds.extra_properties is not None:
self.base_cfg['data_properties'].update(mini_ds.extra_properties)
Expand Down

0 comments on commit 0023e63

Please sign in to comment.