Skip to content

Commit

Permalink
chore: fixes comments in sync_upstreams_task.py
Browse files Browse the repository at this point in the history
Signed-off-by: Jennifer Power <[email protected]>
  • Loading branch information
jpower432 committed Jan 8, 2024
1 parent 985e4ee commit b40e212
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions trestlebot/tasks/sync_upstreams_task.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,8 @@ def _copy_validate_models(
) -> None:
"""Copy models from upstream source to trestle workspace."""
model_search_path = source_trestle_root.joinpath(model_dir)
# The model directories are created by default with trestle init, but
# they can be deleted.
if not model_search_path.exists():
return
logger.debug(f"Copying models from {model_search_path}")
Expand All @@ -159,9 +161,9 @@ def _copy_validate_models(
f"Model {model_path} from {model_search_path} is not valid"
)

# Write to model to disk as JSON
# Write model to disk as JSON.
# The only format supported by the trestle authoring
# process is JSON
# process is JSON.
model_name = model_path.name
ModelUtils.save_top_level_model(
model, destination_trestle_root, model_name, FileContentType.JSON
Expand Down

0 comments on commit b40e212

Please sign in to comment.