Skip to content

Commit

Permalink
Merge branch 'develop' of https://github.com/ecmwf-lab/ecml-tools int…
Browse files Browse the repository at this point in the history
…o develop
  • Loading branch information
floriankrb committed Mar 19, 2024
2 parents 89b6c5d + 3f528db commit 44fdf77
Show file tree
Hide file tree
Showing 18 changed files with 461 additions and 175 deletions.
21 changes: 19 additions & 2 deletions ecml_tools/commands/copy.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,9 +154,26 @@ def copy_group(self, source, target, transfers, block_size, _copy, progress, rec
for name in sorted(source.keys()):
if isinstance(source[name], zarr.hierarchy.Group):
group = target[name] if name in target else target.create_group(name)
self.copy_group(source[name], group, transfers, block_size, _copy, progress, rechunking)
self.copy_group(
source[name],
group,
transfers,
block_size,
_copy,
progress,
rechunking,
)
else:
self.copy_array(name, source, target, transfers, block_size, _copy, progress, rechunking)
self.copy_array(
name,
source,
target,
transfers,
block_size,
_copy,
progress,
rechunking,
)

def copy(self, source, target, transfers, block_size, progress, rechunking):
import zarr
Expand Down
1 change: 0 additions & 1 deletion ecml_tools/commands/scan.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ def add_arguments(self, command_parser):
command_parser.add_argument("paths", nargs="+", help="Paths to scan")

def run(self, args):

def match(path):
return fnmatch.fnmatch(path, args.match)

Expand Down
5 changes: 4 additions & 1 deletion ecml_tools/create/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,10 @@ def load(self, parts=None):

with self._cache_context():
loader = ContentLoader.from_dataset_config(
path=self.path, statistics_tmp=self.statistics_tmp, print=self.print, parts=parts
path=self.path,
statistics_tmp=self.statistics_tmp,
print=self.print,
parts=parts,
)
loader.load()

Expand Down
1 change: 0 additions & 1 deletion ecml_tools/create/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,6 @@ def statistics(self):


class LoadersConfig(Config):

def __init__(self, config, *args, **kwargs):
if "build" not in config:
config["build"] = {}
Expand Down
Loading

0 comments on commit 44fdf77

Please sign in to comment.