Skip to content

Commit

Permalink
cleanup.. removed version_attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
siligam committed Jan 10, 2025
1 parent 6976f3f commit 536dd96
Show file tree
Hide file tree
Showing 6 changed files with 0 additions and 12 deletions.
1 change: 0 additions & 1 deletion examples/sample.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ pipelines:
- "pymorize.global_attributes.set_global_attributes"
- "pymorize.generic.trigger_compute"
- "pymorize.generic.show_data"
- "pymorize.generic.version_attribute"
- "pymorize.files.save_dataset"

# Settings for using dask-distributed
Expand Down
6 changes: 0 additions & 6 deletions src/pymorize/generic.py
Original file line number Diff line number Diff line change
Expand Up @@ -252,9 +252,3 @@ def trigger_compute(data, rule_spec, *args, **kwargs):
return data.compute()
# Data doesn't have a compute method, do nothing
return data


def version_attribute(data, rule_spec, *args, **kwargs):
if data.attrs.get("version"):
data.attrs["version"] = str(data.attrs.get("version"))
return data
2 changes: 0 additions & 2 deletions src/pymorize/pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,6 @@ class DefaultPipeline(FrozenPipeline):
"pymorize.caching.manual_checkpoint",
"pymorize.global_attributes.set_global_attributes",
"pymorize.generic.trigger_compute",
"pymorize.generic.version_attribute",
"pymorize.generic.show_data",
"pymorize.files.save_dataset",
)
Expand Down Expand Up @@ -251,7 +250,6 @@ class TestingPipeline(FrozenPipeline):
STEPS = (
"pymorize.generic.dummy_load_data",
"pymorize.generic.dummy_logic_step",
"pymorize.generic.version_attribute",
"pymorize.generic.dummy_save_data",
)

Expand Down
1 change: 0 additions & 1 deletion tests/configs/test_config_cmip6.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ pipelines:
steps:
- "pymorize.generic.dummy_load_data"
- "pymorize.units.handle_unit_conversion"
- "pymorize.generic.version_attribute"
- "pymorize.generic.dummy_save_data"
- name: "sleeper_pipeline"
steps:
Expand Down
1 change: 0 additions & 1 deletion tests/configs/test_config_cmip7.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ pipelines:
steps:
- "pymorize.generic.dummy_load_data"
- "pymorize.units.handle_unit_conversion"
- "pymorize.generic.version_attribute"
- "pymorize.generic.dummy_save_data"
- name: "sleeper_pipeline"
steps:
Expand Down
1 change: 0 additions & 1 deletion tests/unit/test_global_attributes.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
("experiment_id", True),
("forcing_index", True),
("frequency", True),
# ("further_info_url", True), # set on license, not explicitly req.
("grid", True),
("grid_label", True),
("initialization_index", True),
Expand Down

0 comments on commit 536dd96

Please sign in to comment.