From e6e0351288a5cae41c118c914bc675e3412d33cc Mon Sep 17 00:00:00 2001 From: Arthur Lu Date: Fri, 2 Apr 2021 21:58:35 +0000 Subject: [PATCH] fixed .gitignore added build-CLI script fixed threading in superscript Former-commit-id: 1fa36e8694acfc485f727573d40382dd147b6470 --- .gitignore | 2 -- build/build-CLI.sh | 5 +++++ dist/superscript.REMOVED.git-id | 1 + src/superscript.py | 8 ++++---- 4 files changed, 10 insertions(+), 6 deletions(-) create mode 100644 build/build-CLI.sh create mode 100644 dist/superscript.REMOVED.git-id diff --git a/.gitignore b/.gitignore index dbe53f9..325f585 100644 --- a/.gitignore +++ b/.gitignore @@ -4,7 +4,5 @@ **/.pytest_cache/ **/*.pyc -**/build/ **/*.egg-info/ -**/dist/ **/config.json \ No newline at end of file diff --git a/build/build-CLI.sh b/build/build-CLI.sh new file mode 100644 index 0000000..8d8a0b8 --- /dev/null +++ b/build/build-CLI.sh @@ -0,0 +1,5 @@ +pathtospec="../src/superscript.spec" +pathtodist="../dist/" +pathtowork="/temp/" + +pyinstaller --onefile --clean --distpath ${pathtodist} --workpath ${pathtowork} ${pathtospec} \ No newline at end of file diff --git a/dist/superscript.REMOVED.git-id b/dist/superscript.REMOVED.git-id new file mode 100644 index 0000000..a7adaca --- /dev/null +++ b/dist/superscript.REMOVED.git-id @@ -0,0 +1 @@ +7fc1ccdee362692f0cfaf8a6ffe282ab8e47adca \ No newline at end of file diff --git a/src/superscript.py b/src/superscript.py index 1f4b511..4c80206 100644 --- a/src/superscript.py +++ b/src/superscript.py @@ -135,11 +135,11 @@ from concurrent.futures import ThreadPoolExecutor import time import warnings -# global exec_threads +global exec_threads def main(): - # global exec_threads + global exec_threads warnings.filterwarnings("ignore") @@ -203,7 +203,7 @@ def main(): set_current_time(apikey, current_time) print("[OK] finished all tests, looping") - # clear() + #clear() def clear(): @@ -314,7 +314,7 @@ def matchloop(apikey, competition, data, tests): # expects 3D array with [Team][ variable_data.append((data[team][variable], test)) test_filtered.append(test) - result_filtered = map(simplestats, variable_data) + result_filtered = exec_threads.map(simplestats, variable_data) i = 0 result_filtered = list(result_filtered)