Skip to content

Commit

Permalink
linting fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
leifdenby committed Aug 23, 2022
1 parent d97158d commit 75eb7a1
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 4 deletions.
17 changes: 15 additions & 2 deletions genesis/utils/pipeline/data/extraction.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,13 @@ def requires(self):
# TODO remove hardcoded orientation
base_name = meta.get("experiment_name", self.base_name)
dest_path = get_workdir() / self.base_name / "cross_sections" / "runtime_slices"
task = fn(dataset_meta=meta, var_name=self.var_name, orientation="xy", dest_path=str(dest_path), base_name=base_name)
task = fn(
dataset_meta=meta,
var_name=self.var_name,
orientation="xy",
dest_path=str(dest_path),
base_name=base_name,
)
return task

def _extract_and_symlink_local_file(self):
Expand Down Expand Up @@ -395,7 +401,14 @@ def output(self):

fn = ".".join(name_parts)

p = get_workdir() / self.base_name / "cross_sections" / "runtime_slices" / "by_time" / fn
p = (
get_workdir()
/ self.base_name
/ "cross_sections"
/ "runtime_slices"
/ "by_time"
/ fn
)
return XArrayTarget(str(p))


Expand Down
6 changes: 4 additions & 2 deletions genesis/utils/pipeline/data_sources/uclales/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ def _build_block_extraction_task(dataset_meta, field_name):
source_path=raw_data_path,
file_prefix=dataset_meta["experiment_name"],
tn=dataset_meta["timestep"],
kind="3d"
kind="3d",
)

if field_name in ["u", "v", "w"]:
Expand All @@ -143,7 +143,9 @@ def _build_block_extraction_task(dataset_meta, field_name):
return task


def build_runtime_cross_section_extraction_task(dataset_meta, var_name, orientation, base_name, dest_path):
def build_runtime_cross_section_extraction_task(
dataset_meta, var_name, orientation, base_name, dest_path
):
raw_data_path = Path(dataset_meta["path"]) / "raw_data"

task_kwargs = {}
Expand Down

0 comments on commit 75eb7a1

Please sign in to comment.