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

add some print statements for easier debugs for new comers #1

Merged
merged 1 commit into from
Oct 8, 2024
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
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# data files
*.json
4 changes: 3 additions & 1 deletion main.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,12 @@ def setup_folders(self):

def check_datafile_exists(self):
files = []
print(f"Please put your data files in {self.running_folder}.")
for file in os.listdir(self.running_folder):
if file.endswith(".json"):
print("There is a file here.")
files.append(os.path.join(self.running_folder, file))
print(f"Found {len(files)} files.")
print(f"Found {len(files)} files in {self.running_folder}.")
return files

def data_read_and_increment(self, file_name):
Expand Down Expand Up @@ -77,6 +78,7 @@ def send_to_new_person(self, to_send_email, datum):
/ "running"
/ "data.json"
)
print(f"Writing to {output_path}.")
self.data_writer(output_path, datum)

def terminate_ring(self):
Expand Down