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

Fix weird windows filepath issue #55

Merged
merged 3 commits into from
Feb 26, 2023
Merged
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
70 changes: 0 additions & 70 deletions .vscode/launch.json

This file was deleted.

4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,15 +43,15 @@ There are two methods to select students to grade: By section number, or via a l

<details><summary>Select by Section Number</summary>

To use the `--section` flag, a file named `students.csv` must be downloaded to the project directory. This file contains information about students in the course, including each students' section number.
To use the `--section` flag, a file named `all_students.csv` must be downloaded to the project directory. This file contains information about students in the course, including each students' section number.
### Download Student Data

1. Navigate to the course gradebook on Canvas.
2. Click "Actions > Export" as shown in the below image.

![Image showing the highlighted export button the user should press in the Canvas gradebook to download a CSV of students in the course](images/export-students.png)

Save this file as `students.csv` in the root directory (the same directory as this README file). It should be structured similarly to `all_students_example.csv`, but may include additional information, like assignment grades.
Save this file as `all_students.csv` in the root directory (the same directory as this README file). It should be structured similarly to `all_students_example.csv`, but may include additional information, like assignment grades.

When running the grader, use `--section <section number>` to specify a section number you wish to grade. Section numbers are 5-digit numbers seen in the parentheses on a students' section ID string. For example, in the class/section identifier `EEL4712C-0001(11624)`, `11624` is the section number.
</details>
Expand Down
4 changes: 2 additions & 2 deletions scripts/generate_tcl.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

def get_testbench_paths(lab_name: str) -> List[str]:
lab_tb_dir = Path("lab-testbenches") / lab_name
tb_paths = [str(path.resolve()) for path in lab_tb_dir.glob("*.vhd")]
tb_paths = [str(path.resolve().as_posix()) for path in lab_tb_dir.glob("*.vhd")]
return tb_paths

def generate_tcl(
Expand Down Expand Up @@ -49,7 +49,7 @@ def generate_tcl(
tcl = (
ORIGINAL_TCL
.replace("<PY_LAB_TESTBENCHES>", LAB_TCL)
.replace("<PY_PROJ_HOMEDIR>", str(SIM_DIR))
.replace("<PY_PROJ_HOMEDIR>", SIM_DIR.resolve().as_posix())
.replace("<PY_PROJ_NAME>", f"{student.name}_{lab_name}")
.replace("<PY_STUDENT_SRC_FILES>", file_add_cmds)
.replace("<PY_STUDENT_NAME>", tcl_name)
Expand Down
8 changes: 7 additions & 1 deletion tcl-templates/common.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ set proj_name "<PY_PROJ_NAME>"

# make the directory first, so that GUI mode (if used)
# doesn't prompt you asking to create it.
mkdir -p $proj_homedir
if {[catch {mkdir $proj_homedir}]} {
puts "Dir already exists. Moving on..."
}

# Create a new project
project new $proj_homedir $proj_name
Expand Down Expand Up @@ -52,6 +54,10 @@ proc currStudent {student} {

project calculateorder

puts "==============================================================="
puts "Running simulations..."
puts "==============================================================="

# Beginning of lab-specific tcl
<PY_LAB_TESTBENCHES>
# End of lab-specific tcl
Expand Down