From 30469a32111307de7db10f2bf4859d074f2b015e Mon Sep 17 00:00:00 2001 From: Arthur Lu Date: Mon, 12 Apr 2021 15:13:54 -0700 Subject: [PATCH] removed matplotlib import removed plotting pit analysis fixed warning supression for win exe superscript v 0.8.6 --- src/requirements.txt | 1 - src/superscript.py | 33 +++++++-------------------------- src/superscript.spec | 2 +- 3 files changed, 8 insertions(+), 28 deletions(-) diff --git a/src/requirements.txt b/src/requirements.txt index a8f7063..a3d30e7 100644 --- a/src/requirements.txt +++ b/src/requirements.txt @@ -12,7 +12,6 @@ numpy scipy scikit-learn six -matplotlib pyparsing pandas diff --git a/src/superscript.py b/src/superscript.py index d93f7e0..b408369 100644 --- a/src/superscript.py +++ b/src/superscript.py @@ -3,10 +3,12 @@ # Notes: # setup: -__version__ = "0.8.5" +__version__ = "0.8.6" # changelog should be viewed using print(analysis.__changelog__) __changelog__ = """changelog: + 0.8.6: + - added proper main function 0.8.5: - added more gradeful KeyboardInterrupt exiting - redirected stderr to errorlog.txt @@ -140,7 +142,6 @@ from os import system, name from pathlib import Path from multiprocessing import Pool import platform -import matplotlib.pyplot as plt import sys from concurrent.futures import ThreadPoolExecutor import time @@ -574,29 +575,6 @@ def get_team_metrics(apikey, tbakey, competition): return {"elo-ranks": elo_ranked, "glicko2-ranks": gl2_ranked} -def graph_pit_histogram(apikey, competition, figsize=(80,15)): - - pit = d.get_pit_variable_formatted(apikey, competition) - - fig, ax = plt.subplots(1, len(pit), sharey=True, figsize=figsize) - - i = 0 - - for variable in pit: - - ax[i].hist(pit[variable]) - ax[i].invert_xaxis() - - ax[i].set_xlabel('') - ax[i].set_ylabel('Frequency') - ax[i].set_title(variable) - - plt.yticks(np.arange(len(pit[variable]))) - - i+=1 - - plt.show() - sample_json = """{ "max-threads": 0.5, "team": "", @@ -644,4 +622,7 @@ sample_json = """{ } }""" -main() \ No newline at end of file +if __name__ == "__main__": + if sys.platform.startswith('win'): + multiprocessing.freeze_support() + main() \ No newline at end of file diff --git a/src/superscript.spec b/src/superscript.spec index b9f9ca7..5ffc4bf 100644 --- a/src/superscript.spec +++ b/src/superscript.spec @@ -26,7 +26,7 @@ exe = EXE(pyz, a.binaries, a.zipfiles, a.datas, - [], + [('W ignore', None, 'OPTION')], name='superscript', debug=False, bootloader_ignore_signals=False,