Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow Configurable Project Name #109

Open
wants to merge 14 commits into
base: main
Choose a base branch
from
Prev Previous commit
Next Next commit
feature: pass checks and imp format
  • Loading branch information
burgess01 committed Dec 7, 2022
commit a3ef28fc18ae0a6ca604928ea8b463d6c23fc04b
6 changes: 3 additions & 3 deletions gatorgrade/input/in_file_path.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,17 +40,17 @@ def get_assignment_name(file: Path) -> (str):
"""Get the name for the project the YAML is set up for."""
# set the base assignment name to display, the file path.
assignment_name = str(file)
config_search_key = "{'name':"

# change the file path into data to look through
data = parse_yaml_file(file)

# if they have a name field
if len(data) > 1:
for i in range(len(data)):
if "'name':" in str(data[i]):
if config_search_key in str(data[i]):
# ex. need to go from {'name': 'top\n'} to top: split by space
unedited_assignment_name = str(data[i])[9:].split("\\")[0]
print(data)
assignment_name = str(data[i])[10:].split("\\")[0]

return assignment_name

Expand Down