diff --git a/.gitignore b/.gitignore index 0c62b1f..d4dcdea 100644 --- a/.gitignore +++ b/.gitignore @@ -15,5 +15,4 @@ **/*.log **/errorlog.txt -/dist/superscript.* -/dist/superscript \ No newline at end of file +/dist/* \ No newline at end of file diff --git a/build/build-CLI.sh b/build/build-CLI.sh index 82f275e..41b2c8b 100644 --- a/build/build-CLI.sh +++ b/build/build-CLI.sh @@ -1,4 +1,4 @@ -pathtospec="../src/superscript.spec" +pathtospec="superscript.spec" pathtodist="../dist/" pathtowork="temp/" diff --git a/build/superscript.spec b/build/superscript.spec new file mode 100644 index 0000000..53c3d37 --- /dev/null +++ b/build/superscript.spec @@ -0,0 +1,50 @@ +# -*- mode: python ; coding: utf-8 -*- + +block_cipher = None + +a = Analysis( + ['../src/superscript.py'], + pathex=[], + binaries=[], + datas=[], + hiddenimports=['dnspython', 'sklearn.utils._weight_vector', 'sklearn.utils._typedefs', 'sklearn.neighbors._partition_nodes', 'requests'], + hookspath=[], + hooksconfig={}, + runtime_hooks=[], + excludes=['matplotlib'], + win_no_prefer_redirects=False, + win_private_assemblies=False, + cipher=block_cipher, + noarchive=False +) +pyz = PYZ( + a.pure, + a.zipped_data, + cipher=block_cipher +) +exe = EXE( + pyz, + a.scripts, + [], + exclude_binaries=True, + name='superscript', + debug=False, + bootloader_ignore_signals=False, + strip=False, + upx=True, + console=True, + disable_windowed_traceback=False, + target_arch=None, + codesign_identity=None, + entitlements_file=None +) +coll = COLLECT( + exe, + a.binaries, + a.zipfiles, + a.datas, + strip=False, + upx=True, + upx_exclude=[], + name='superscript' +) \ No newline at end of file diff --git a/src/data.py b/src/data.py index dac7f9a..1eb6447 100644 --- a/src/data.py +++ b/src/data.py @@ -4,7 +4,7 @@ import pandas as pd def pull_new_tba_matches(apikey, competition, cutoff): api_key= apikey - x=requests.get("https://www.thebluealliance.com/api/v3/event/"+competition+"/matches/simple", headers={"X-TBA-Auth-Key":api_key}, verify=False) + x=requests.get("https://www.thebluealliance.com/api/v3/event/"+competition+"/matches/simple", headers={"X-TBA-Auth-Key":api_key}) out = [] for i in x.json(): if i["actual_time"] != None and i["actual_time"]-cutoff >= 0 and i["comp_level"] == "qm": @@ -51,7 +51,7 @@ def get_metrics_data_formatted(client, competition): return out def get_pit_data_formatted(client, competition): - x=requests.get("https://titanscouting.epochml.org/api/fetchAllTeamNicknamesAtCompetition?competition="+competition, verify=False) + x=requests.get("https://titanscouting.epochml.org/api/fetchAllTeamNicknamesAtCompetition?competition="+competition) x = x.json() x = x['data'] x = x.keys() diff --git a/src/pull.py b/src/pull.py index ee65571..9f5af43 100644 --- a/src/pull.py +++ b/src/pull.py @@ -13,7 +13,7 @@ def get_team_competition(): "CLIENT_ID": trakey['CLIENT_ID'], "CLIENT_SECRET": trakey['CLIENT_SECRET'] } - response = requests.request("GET", url + endpoint, verify=False, params=params) + response = requests.request("GET", url + endpoint, params=params) json = response.json() if json['success']: return json['competition'] @@ -26,7 +26,7 @@ def get_team(): "CLIENT_ID": trakey['CLIENT_ID'], "CLIENT_SECRET": trakey['CLIENT_SECRET'] } - response = requests.request("GET", url + endpoint, verify=False, params=params) + response = requests.request("GET", url + endpoint, params=params) json = response.json() if json['success']: return json['team'] @@ -41,7 +41,7 @@ def get_team_match_data(competition, team_num): "CLIENT_ID": trakey['CLIENT_ID'], "CLIENT_SECRET": trakey['CLIENT_SECRET'] } - response = requests.request("GET", url + endpoint, verify=False, params=params) + response = requests.request("GET", url + endpoint, params=params) json = response.json() if json['success']: return json['data'][team_num] @@ -55,7 +55,7 @@ def get_teams_at_competition(competition): "CLIENT_ID": trakey['CLIENT_ID'], "CLIENT_SECRET": trakey['CLIENT_SECRET'] } - response = requests.request("GET", url + endpoint, verify=False, params=params) + response = requests.request("GET", url + endpoint, params=params) json = response.json() if json['success']: return list(json['data'].keys()) diff --git a/src/superscript.spec b/src/superscript.spec deleted file mode 100644 index fdde061..0000000 --- a/src/superscript.spec +++ /dev/null @@ -1,41 +0,0 @@ -# -*- mode: python ; coding: utf-8 -*- - -block_cipher = None - -a = Analysis(['superscript.py'], - pathex=['/workspaces/tra-data-analysis/src'], - binaries=[], - datas=[], - hiddenimports=[ - "dnspython", - "sklearn.utils._weight_vector", - "sklearn.utils._typedefs", - "sklearn.neighbors._partition_nodes", - "requests", - ], - hookspath=[], - runtime_hooks=[], - excludes=[ - "matplotlib", - #"pandas" - ], - win_no_prefer_redirects=False, - win_private_assemblies=False, - cipher=block_cipher, - noarchive=False) -pyz = PYZ(a.pure, a.zipped_data, - cipher=block_cipher) -exe = EXE(pyz, - a.scripts, - a.binaries, - a.zipfiles, - a.datas, - [('W ignore', None, 'OPTION')], - name='superscript', - debug=False, - bootloader_ignore_signals=False, - strip=False, - upx=True, - upx_exclude=[], - runtime_tmpdir=None, - console=True )