diff --git a/dp_wizard/tmp/.gitignore b/dp_wizard/tmp/.gitignore new file mode 100644 index 0000000..88c42d9 --- /dev/null +++ b/dp_wizard/tmp/.gitignore @@ -0,0 +1 @@ +demo.csv diff --git a/dp_wizard/utils/argparse_helpers.py b/dp_wizard/utils/argparse_helpers.py index 4b6dd9d..36bf603 100644 --- a/dp_wizard/utils/argparse_helpers.py +++ b/dp_wizard/utils/argparse_helpers.py @@ -81,10 +81,10 @@ def _get_demo_csv_contrib(): """ random.seed(0) # So the mock data will be stable across runs. - csv_path = "/tmp/demo.csv" + csv_path = Path(__file__).parent.parent / "tmp" / "demo.csv" contributions = 10 - with open(csv_path, "w", newline="") as demo_handle: + with csv_path.open("w", newline="") as demo_handle: fields = ["student_id", "class_year", "hw_number", "grade"] writer = csv.DictWriter(demo_handle, fieldnames=fields) writer.writeheader()