-
Notifications
You must be signed in to change notification settings - Fork 179
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(abr-testing): Automated ABR data collection Make command
- Loading branch information
1 parent
2633162
commit 24c5174
Showing
3 changed files
with
62 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
from protocol_simulation import simulation_metrics | ||
import os | ||
import traceback | ||
from pathlib import Path | ||
|
||
def run(file_to_simulate: Path): | ||
protocol_name = file_to_simulate.stem | ||
try: | ||
simulation_metrics.main(file_to_simulate, False) | ||
except Exception as e: | ||
print(f"Error in protocol: {protocol_name}") | ||
traceback.print_exc() | ||
|
||
|
||
|
||
|
||
if __name__ == "__main__": | ||
# Directory to search | ||
root_dir = 'abr_testing/protocols' | ||
|
||
exclude = [ | ||
'__init__.py', | ||
'shared_vars_and_funcs.py', | ||
] | ||
# Walk through the root directory and its subdirectories | ||
for root, dirs, files in os.walk(root_dir): | ||
for file in files: | ||
if file.endswith(".py"): # If it's a Python file | ||
if file in exclude: | ||
continue | ||
file_path = os.path.join(root, file) | ||
print(f"Simulating protocol: {file_path}") | ||
run(Path(file_path)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters