deleted config.json

changed superscript config lookup to relative path
added additional requirements to requirements.txt
added build spec file for superscript
This commit is contained in:
Arthur Lu 2021-04-02 21:35:05 +00:00
parent 8ede63ed04
commit 70afd23f2c
7 changed files with 114 additions and 157 deletions

View File

@ -1,2 +1,7 @@
FROM python FROM ubuntu:20.04
WORKDIR ~/ WORKDIR /
RUN apt-get -y update
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends tzdata
RUN apt-get install -y python3 python3-dev git python3-pip python3-kivy python-is-python3 libgl1-mesa-dev build-essential
RUN ln -s $(which pip3) /usr/bin/pip
RUN pip install pymongo pandas numpy scipy scikit-learn matplotlib pylint kivy

View File

@ -0,0 +1,2 @@
FROM titanscout2022/tra-analysis-base:latest
WORKDIR /

View File

@ -1,7 +1,7 @@
{ {
"name": "TRA Analysis Development Environment", "name": "TRA Analysis Development Environment",
"build": { "build": {
"dockerfile": "Dockerfile", "dockerfile": "dev-dockerfile",
}, },
"settings": { "settings": {
"terminal.integrated.shell.linux": "/bin/bash", "terminal.integrated.shell.linux": "/bin/bash",
@ -24,5 +24,5 @@
"ms-python.python", "ms-python.python",
"waderyan.gitblame" "waderyan.gitblame"
], ],
"postCreateCommand": "apt install vim -y ; pip install -r src/requirements.txt ; pip install pylint ; pip install tra-analysis; pip install pytest" "postCreateCommand": "/usr/bin/pip3 install -r /workspaces/tra-data-analysis/src/requirements.txt && /usr/bin/pip3 install --no-cache-dir pylint && /usr/bin/pip3 install pytest"
} }

View File

@ -1,101 +0,0 @@
{
"max-threads": 0.5,
"team": "",
"competition": "",
"key": {
"database": "",
"tba": ""
},
"statistics": {
"match": {
"balls-blocked": [
"basic_stats",
"historical_analysis",
"regression_linear",
"regression_logarithmic",
"regression_exponential",
"regression_polynomial",
"regression_sigmoidal"
],
"balls-collected": [
"basic_stats",
"historical_analysis",
"regression_linear",
"regression_logarithmic",
"regression_exponential",
"regression_polynomial",
"regression_sigmoidal"
],
"balls-lower-teleop": [
"basic_stats",
"historical_analysis",
"regression_linear",
"regression_logarithmic",
"regression_exponential",
"regression_polynomial",
"regression_sigmoidal"
],
"balls-lower-auto": [
"basic_stats",
"historical_analysis",
"regression_linear",
"regression_logarithmic",
"regression_exponential",
"regression_polynomial",
"regression_sigmoidal"
],
"balls-started": [
"basic_stats",
"historical_analysis",
"regression_linear",
"regression_logarithmic",
"regression_exponential",
"regression_polynomial",
"regression_sigmoidal"
],
"balls-upper-teleop": [
"basic_stats",
"historical_analysis",
"regression_linear",
"regression_logarithmic",
"regression_exponential",
"regression_polynomial",
"regression_sigmoidal"
],
"balls-upper-auto": [
"basic_stats",
"historical_analysis",
"regression_linear",
"regression_logarithmic",
"regression_exponential",
"regression_polynomial",
"regression_sigmoidal"
]
},
"metric": {
"elo": {
"score": 1500,
"N": 400,
"K": 24
},
"gl2": {
"score": 1500,
"rd": 250,
"vol": 0.06
},
"ts": {
"mu": 25,
"sigma": 8.33
}
},
"pit": {
"wheel-mechanism": true,
"low-balls": true,
"high-balls": true,
"wheel-success": true,
"strategic-focus": true,
"climb-mechanism": true,
"attitude": true
}
}
}

View File

@ -2,4 +2,18 @@ requests
pymongo pymongo
pandas pandas
tra-analysis tra-analysis
dnspython
pyinstaller
requests
pymongo
numpy
scipy
scikit-learn
six
matplotlib
pyparsing
pandas
kivy==2.0.0rc2 kivy==2.0.0rc2

View File

@ -143,12 +143,12 @@ def main():
warnings.filterwarnings("ignore") warnings.filterwarnings("ignore")
# while (True): while (True):
current_time = time.time() current_time = time.time()
print("[OK] time: " + str(current_time)) print("[OK] time: " + str(current_time))
config = load_config("red-alliance-analysis\data-analysis\config.json") config = load_config("config.json")
competition = config["competition"] competition = config["competition"]
match_tests = config["statistics"]["match"] match_tests = config["statistics"]["match"]
pit_tests = config["statistics"]["pit"] pit_tests = config["statistics"]["pit"]
@ -169,8 +169,8 @@ def main():
else: else:
print("[Err] Invalid number of processes, must be between -" + str(sys_max_threads) + " and " + str(sys_max_threads)) print("[Err] Invalid number of processes, must be between -" + str(sys_max_threads) + " and " + str(sys_max_threads))
exit() exit()
# exec_threads = Pool(processes = alloc_processes) exec_threads = Pool(processes = alloc_processes)
# print("[OK] " + str(alloc_processes) + " threads started") print("[OK] " + str(alloc_processes) + " threads started")
apikey = config["key"]["database"] apikey = config["key"]["database"]
tbakey = config["key"]["tba"] tbakey = config["key"]["tba"]

37
src/superscript.spec Normal file
View File

@ -0,0 +1,37 @@
# -*- 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",
"requests",
],
hookspath=[],
runtime_hooks=[],
excludes=[],
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,
[],
name='superscript',
debug=False,
bootloader_ignore_signals=False,
strip=False,
upx=True,
upx_exclude=[],
runtime_tmpdir=None,
console=True )