Skip to content
Merged
Changes from 1 commit
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
13 changes: 13 additions & 0 deletions app/commands/progress/reset.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import os
import sys
from datetime import datetime
from pathlib import Path

import click
import pytz
Expand Down Expand Up @@ -69,6 +70,18 @@ def reset() -> None:

if exercise_config.exercise_repo.repo_type != "ignore":
with ExercisesRepo() as repo:
formatted_exercise_name = exercise_config.formatted_exercise_name
if len(exercise_config.base_files) > 0:
info("Re-downloading exercise base files...")
for resource, path in exercise_config.base_files.items():
os.makedirs(Path(path).parent, exist_ok=True)
is_binary = Path(path).suffix in [".png", ".jpg", ".jpeg", ".gif"]
repo.download_file(
f"{formatted_exercise_name}/res/{resource}",
exercise_config.path / path,
Comment thread
jovnc marked this conversation as resolved.
Outdated
is_binary,
)

Comment thread
jovnc marked this conversation as resolved.
Outdated
Comment thread
jovnc marked this conversation as resolved.
Outdated
setup_exercise_folder(repo, download_time, exercise_config)
info(
click.style(
Expand Down
Loading