Skip to content

Commit

Permalink
dvc.yaml: rename stages -> pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
efiop committed May 4, 2020
1 parent 415a85c commit 2439d6c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
10 changes: 5 additions & 5 deletions dvc/dvcfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,13 +197,13 @@ def _dump_pipeline_file(self, stage):
else:
open(self.path, "w+").close()

data["stages"] = data.get("stages", {})
data["pipeline"] = data.get("pipeline", {})
stage_data = serialize.to_pipeline_file(stage)
if data["stages"].get(stage.name):
orig_stage_data = data["stages"][stage.name]
if data["pipeline"].get(stage.name):
orig_stage_data = data["pipeline"][stage.name]
apply_diff(stage_data[stage.name], orig_stage_data)
else:
data["stages"].update(stage_data)
data["pipeline"].update(stage_data)

dump_stage_file(self.path, data)
self.repo.scm.track_file(relpath(self.path))
Expand All @@ -218,7 +218,7 @@ def stage(self):
def stages(self):
data, _ = self._load()
lockfile_data = self._lockfile.load()
return StageLoader(self, data.get("stages", {}), lockfile_data)
return StageLoader(self, data.get("pipeline", {}), lockfile_data)

def remove(self, force=False):
if not force:
Expand Down
4 changes: 2 additions & 2 deletions dvc/schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from voluptuous import Any, Schema, Optional, Required


STAGES = "stages"
PIPELINE = "pipeline"
SINGLE_STAGE_SCHEMA = {
StageParams.PARAM_MD5: output.CHECKSUM_SCHEMA,
StageParams.PARAM_CMD: Any(str, None),
Expand Down Expand Up @@ -38,7 +38,7 @@
**{Optional(p.value): [str] for p in OutputParams},
}
}
MULTI_STAGE_SCHEMA = {STAGES: SINGLE_PIPELINE_STAGE_SCHEMA}
MULTI_STAGE_SCHEMA = {PIPELINE: SINGLE_PIPELINE_STAGE_SCHEMA}

COMPILED_SINGLE_STAGE_SCHEMA = Schema(SINGLE_STAGE_SCHEMA)
COMPILED_MULTI_STAGE_SCHEMA = Schema(MULTI_STAGE_SCHEMA)
Expand Down

0 comments on commit 2439d6c

Please sign in to comment.