mirror of
https://github.com/titanscouting/tra-superscript.git
synced 2024-12-30 19:39:09 +00:00
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:
parent
79689d69c8
commit
18dbc174bd
@ -1,2 +1,7 @@
|
||||
FROM python
|
||||
WORKDIR ~/
|
||||
FROM ubuntu:20.04
|
||||
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
|
2
.devcontainer/dev-dockerfile
Normal file
2
.devcontainer/dev-dockerfile
Normal file
@ -0,0 +1,2 @@
|
||||
FROM titanscout2022/tra-analysis-base:latest
|
||||
WORKDIR /
|
@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "TRA Analysis Development Environment",
|
||||
"build": {
|
||||
"dockerfile": "Dockerfile",
|
||||
"dockerfile": "dev-dockerfile",
|
||||
},
|
||||
"settings": {
|
||||
"terminal.integrated.shell.linux": "/bin/bash",
|
||||
@ -24,5 +24,5 @@
|
||||
"ms-python.python",
|
||||
"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"
|
||||
}
|
101
src/config.json
101
src/config.json
@ -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
|
||||
}
|
||||
}
|
||||
}
|
@ -2,4 +2,18 @@ requests
|
||||
pymongo
|
||||
pandas
|
||||
tra-analysis
|
||||
|
||||
dnspython
|
||||
pyinstaller
|
||||
requests
|
||||
pymongo
|
||||
|
||||
numpy
|
||||
scipy
|
||||
scikit-learn
|
||||
six
|
||||
matplotlib
|
||||
pyparsing
|
||||
pandas
|
||||
|
||||
kivy==2.0.0rc2
|
@ -143,12 +143,12 @@ def main():
|
||||
|
||||
warnings.filterwarnings("ignore")
|
||||
|
||||
# while (True):
|
||||
while (True):
|
||||
|
||||
current_time = time.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"]
|
||||
match_tests = config["statistics"]["match"]
|
||||
pit_tests = config["statistics"]["pit"]
|
||||
@ -169,8 +169,8 @@ def main():
|
||||
else:
|
||||
print("[Err] Invalid number of processes, must be between -" + str(sys_max_threads) + " and " + str(sys_max_threads))
|
||||
exit()
|
||||
# exec_threads = Pool(processes = alloc_processes)
|
||||
# print("[OK] " + str(alloc_processes) + " threads started")
|
||||
exec_threads = Pool(processes = alloc_processes)
|
||||
print("[OK] " + str(alloc_processes) + " threads started")
|
||||
|
||||
apikey = config["key"]["database"]
|
||||
tbakey = config["key"]["tba"]
|
||||
|
37
src/superscript.spec
Normal file
37
src/superscript.spec
Normal 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 )
|
Loading…
Reference in New Issue
Block a user