Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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