diff --git a/src/cli/module.py b/src/cli/module.py new file mode 100644 index 0000000..8f0e6d6 --- /dev/null +++ b/src/cli/module.py @@ -0,0 +1,44 @@ +import data as d +class Module: + config = None + data = None + results = None + def __init__(self, config, apikey, tbakey, timestamp): + pass + def validate_config(self): + pass + def load_data(self): + pass + def process_data(self, exec_threads): + pass + def push_results(self): + pass + +class Match: + config = None + apikey = None + tbakey = None + timestamp = None + teams = None + + data = None + results = None + + def __init__(self, config, apikey, tbakey, timestamp, teams): + self.config = config + self.apikey = apikey + self.tbakey = tbakey + self.timestamp = timestamp + self.teams = teams + + def validate_config(self): + return True + + def load_data(self): + pass + + def process_data(self, exec_threads): + pass + + def push_results(self): + pass \ No newline at end of file diff --git a/src/cli/superscript.py b/src/cli/superscript.py index 70f497f..0a139c8 100644 --- a/src/cli/superscript.py +++ b/src/cli/superscript.py @@ -170,8 +170,8 @@ config_path = "config.json" sample_json = """{ "persistent":{ "key":{ - "database":"mongodb+srv://analysis:MU2gPeEjEurRt2n@2022-scouting-4vfuu.mongodb.net/?retryWrites=true&w=majority", - "tba":"UDvKmPjPRfwwUdDX1JxbmkyecYBJhCtXeyVk9vmO2i7K0Zn4wqQPMfzuEINXJ7e5" + "database":"", + "tba":"" }, "config-preference":"local", "synchronize-config":false diff --git a/src/cli/testing.ipynb b/src/cli/testing.ipynb new file mode 100644 index 0000000..83cbfa6 --- /dev/null +++ b/src/cli/testing.ipynb @@ -0,0 +1,83 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": 1, + "metadata": {}, + "outputs": [], + "source": [ + "class C1:\n", + "\tval = 0\n", + "\tdef __init__(self, i):\n", + "\t\tself.val = i\n", + "\n", + "class C2:\n", + "\tval = 0\n", + "\tdef __init__(self, i):\n", + "\t\tself.val = 2*i\n", + "\n", + "class C3:\n", + "\tval = 0\n", + "\tdef __init__(self, i):\n", + "\t\tself.val = 3*i" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "[<__main__.C1 at 0x7fa84827afd0>,\n", + " <__main__.C2 at 0x7fa84827ae80>,\n", + " <__main__.C3 at 0x7fa8482020d0>]" + ] + }, + "execution_count": 3, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "classes = [C1, C2, C3]\n", + "initialized = []\n", + "for c in classes:\n", + "\tinitialized.append(c(10))\n", + "initialized" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [] + } + ], + "metadata": { + "interpreter": { + "hash": "e7370f93d1d0cde622a1f8e1c04877d8463912d04d973331ad4851f04de6915a" + }, + "kernelspec": { + "display_name": "Python 3.8.5 64-bit", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.8.5" + }, + "orig_nbformat": 4 + }, + "nbformat": 4, + "nbformat_minor": 2 +}