Skip to content

Commit f43cff9

Browse files
committed
Fix export
1 parent 091a062 commit f43cff9

File tree

6 files changed

+18
-18
lines changed

6 files changed

+18
-18
lines changed

app/commands/progress/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
__all__ = [
22
"progress",
3-
"LOCAL_FOLDER_NAME",
3+
"PROGRESS_LOCAL_FOLDER_NAME",
44
"PROGRESS_REPOSITORY_NAME",
55
"STUDENT_PROGRESS_FORK_NAME",
66
]
77

88
from .constants import (
9-
LOCAL_FOLDER_NAME,
9+
PROGRESS_LOCAL_FOLDER_NAME,
1010
PROGRESS_REPOSITORY_NAME,
1111
STUDENT_PROGRESS_FORK_NAME,
1212
)

app/commands/progress/reset.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
from app.commands.check.github import github
1111
from app.commands.download import setup_exercise_folder
1212
from app.commands.progress.constants import (
13-
LOCAL_FOLDER_NAME,
13+
PROGRESS_LOCAL_FOLDER_NAME,
1414
PROGRESS_REPOSITORY_NAME,
1515
)
1616
from app.utils.cli import rmtree
@@ -69,13 +69,13 @@ def reset() -> None:
6969
)
7070
)
7171

72-
if not os.path.isdir(gitmastery_config.path / LOCAL_FOLDER_NAME):
72+
if not os.path.isdir(gitmastery_config.path / PROGRESS_LOCAL_FOLDER_NAME):
7373
warn(
7474
f"Progress directory is missing. Set it up again using {click.style('gitmastery progress setup', bold=True, italic=True)}"
7575
)
7676
sys.exit(0)
7777

78-
os.chdir(gitmastery_config.path / LOCAL_FOLDER_NAME)
78+
os.chdir(gitmastery_config.path / PROGRESS_LOCAL_FOLDER_NAME)
7979
if not os.path.isfile("progress.json"):
8080
warn("Progress tracking file not created yet. No progress to reset.")
8181
return

app/commands/progress/show.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import click
55

66
from app.commands.check.github import github
7-
from app.commands.progress.constants import LOCAL_FOLDER_NAME
7+
from app.commands.progress.constants import PROGRESS_LOCAL_FOLDER_NAME
88
from app.utils.click import error, info, invoke_command
99
from app.utils.github_cli import get_username
1010
from app.utils.gitmastery import (
@@ -21,15 +21,15 @@ def show() -> None:
2121
if not config.progress_local:
2222
error("You do not have progress tracking supported.")
2323

24-
if not os.path.isdir(config.path / LOCAL_FOLDER_NAME):
24+
if not os.path.isdir(config.path / PROGRESS_LOCAL_FOLDER_NAME):
2525
error(
2626
f"Something strange has occurred, try to recreate the Git-Mastery exercise directory using {click.style('gitmastery setup', bold=True, italic=True)}"
2727
)
2828

2929
if config.progress_remote:
3030
invoke_command(github)
3131

32-
progress_file_path = config.path / LOCAL_FOLDER_NAME / "progress.json"
32+
progress_file_path = config.path / PROGRESS_LOCAL_FOLDER_NAME / "progress.json"
3333
all_progress = []
3434
if os.path.isfile(progress_file_path):
3535
with open(progress_file_path, "r") as file:

app/commands/progress/sync/on.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
from app.commands.check.git import git
77
from app.commands.check.github import github
88
from app.commands.progress.constants import (
9-
LOCAL_FOLDER_NAME,
9+
PROGRESS_LOCAL_FOLDER_NAME,
1010
PROGRESS_REPOSITORY_NAME,
1111
STUDENT_PROGRESS_FORK_NAME,
1212
)
@@ -57,13 +57,13 @@ def on() -> None:
5757
# before cloning again. This should automatically setup the origin and upstream
5858
# remotes as well
5959
local_progress = []
60-
local_progress_filepath = os.path.join(LOCAL_FOLDER_NAME, "progress.json")
60+
local_progress_filepath = os.path.join(PROGRESS_LOCAL_FOLDER_NAME, "progress.json")
6161
if os.path.isfile(local_progress_filepath):
6262
with open(local_progress_filepath, "r") as file:
6363
local_progress = json.load(file)
64-
rmtree(LOCAL_FOLDER_NAME)
64+
rmtree(PROGRESS_LOCAL_FOLDER_NAME)
6565

66-
clone_with_custom_name(f"{username}/{fork_name}", LOCAL_FOLDER_NAME)
66+
clone_with_custom_name(f"{username}/{fork_name}", PROGRESS_LOCAL_FOLDER_NAME)
6767

6868
# To reconcile the difference between local and remote progress, we merge by
6969
# (exercise_name, start_time) which should be unique
@@ -93,7 +93,7 @@ def on() -> None:
9393
# push the changes
9494
had_update = len(seen) > len(remote_progress)
9595
if had_update:
96-
os.chdir(LOCAL_FOLDER_NAME)
96+
os.chdir(PROGRESS_LOCAL_FOLDER_NAME)
9797
add_all()
9898
commit("Sync progress with local machine")
9999
push("origin", "main")

app/commands/setup_folder.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import click
55

66
from app.commands.check.git import git
7-
from app.commands.progress.constants import LOCAL_FOLDER_NAME
7+
from app.commands.progress.constants import PROGRESS_LOCAL_FOLDER_NAME
88
from app.utils.click import error, info, invoke_command, prompt
99

1010

@@ -35,7 +35,7 @@ def setup() -> None:
3535
os.chdir(directory_path)
3636

3737
info("Setting up your local progress tracker...")
38-
os.makedirs(LOCAL_FOLDER_NAME, exist_ok=True)
38+
os.makedirs(PROGRESS_LOCAL_FOLDER_NAME, exist_ok=True)
3939
with open(".gitmastery.json", "w") as gitmastery_file:
4040
gitmastery_file.write(
4141
json.dumps({"progress_local": True, "progress_remote": False})

app/commands/verify.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
from git_autograder.output import GitAutograderOutput
1616

1717
from app.commands.progress.constants import (
18-
LOCAL_FOLDER_NAME,
18+
PROGRESS_LOCAL_FOLDER_NAME,
1919
PROGRESS_REPOSITORY_NAME,
2020
)
2121
from app.utils.click import ClickColor, error, info, warn
@@ -77,13 +77,13 @@ def _submit_progress(output: GitAutograderOutput) -> None:
7777
)
7878
return
7979

80-
if not os.path.isdir(config.path / LOCAL_FOLDER_NAME):
80+
if not os.path.isdir(config.path / PROGRESS_LOCAL_FOLDER_NAME):
8181
error(
8282
f"Something strange has occurred, try to recreate the Git-Mastery exercise directory using {click.style('gitmastery setup', bold=True, italic=True)}"
8383
)
8484

8585
info("Saving progress of attempt")
86-
os.chdir(config.path / LOCAL_FOLDER_NAME)
86+
os.chdir(config.path / PROGRESS_LOCAL_FOLDER_NAME)
8787
if not os.path.isfile("progress.json"):
8888
warn("Progress tracking file not created yet, doing that now")
8989
with open("progress.json", "w") as progress_file:

0 commit comments

Comments
 (0)