mirror of
https://github.com/titanscouting/tra-superscript.git
synced 2024-12-29 02:59:08 +00:00
tests: New unit tests for submoduling (#66)
* feat: created kivy gui boilerplate * migrated docker base image to debian Signed-off-by: ltcptgeneral <learthurgo@gmail.com> * migrated to ubuntu Signed-off-by: ltcptgeneral <learthurgo@gmail.com> * fixed issues Signed-off-by: ltcptgeneral <learthurgo@gmail.com> * fix: docker build? * fix: use ubuntu bionic * fix: get kivy installed * @ltcptgeneral can't spell * optim dockerfile for not installing unused packages * install basic stuff while building the container * use prebuilt image for development * install pylint on base image * rename and use new kivy * tests: added tests for Array and CorrelationTest Both are not working due to errors * fix: Array no longer has *args and CorrelationTest functions no longer have self in the arguments * use new thing * use 20.04 base * symlink pip3 to pip * use pip instead of pip3 * tra_analysis v 2.1.0-alpha.2 SVM v 1.0.1 added unvalidated SVM unit tests Signed-off-by: ltcptgeneral <learthurgo@gmail.com> * fixed version number Signed-off-by: ltcptgeneral <learthurgo@gmail.com> * tests: added tests for ClassificationMetric * partially fixed and commented out svm unit tests * fixed some SVM unit tests * added installing pytest to devcontainer.json * fix: small fixes to KNN Namely, removing self from parameters and passing correct arguments to KNeighborsClassifier constructor * fix, test: Added tests for KNN and NaiveBayes. Also made some small fixes in KNN, NaiveBayes, and RegressionMetric * test: finished unit tests except for StatisticalTest Also made various small fixes and style changes * StatisticalTest v 1.0.1 * fixed RegressionMetric unit test temporarily disabled CorrelationTest unit tests * tra_analysis v 2.1.0-alpha.3 * readded __all__ * fix: floating point issues in unit tests for CorrelationTest Co-authored-by: AGawde05 <agawde05@gmail.com> Co-authored-by: ltcptgeneral <learthurgo@gmail.com> Co-authored-by: Dev Singh <dev@devksingh.com> Co-authored-by: jzpan1 <panzhenyu2014@gmail.com>
This commit is contained in:
parent
8772ef38e3
commit
21bbf21b4b
46
design.kv
Normal file
46
design.kv
Normal file
@ -0,0 +1,46 @@
|
||||
<HomeScreen>:
|
||||
GridLayout:
|
||||
cols: 1
|
||||
GridLayout:
|
||||
cols: 1
|
||||
padding: 15, 15
|
||||
spacing: 20, 20
|
||||
Label:
|
||||
text: "User Login"
|
||||
font_size: "20sp"
|
||||
TextInput:
|
||||
id: username
|
||||
hint_text: "Username"
|
||||
TextInput:
|
||||
id: password
|
||||
password: True
|
||||
hint_text: "Password"
|
||||
RelativeLayout:
|
||||
Button:
|
||||
text: "Login"
|
||||
on_press: root.login(root.ids.username.text, root.ids.password.text)
|
||||
size_hint: 0.3, 0.5
|
||||
pos_hint: {"center_x": 0.5, "center_y": 0.6}
|
||||
Label:
|
||||
id: login_wrong
|
||||
text: ""
|
||||
GridLayout:
|
||||
cols: 2
|
||||
size_hint: 0.2, 0.2
|
||||
padding: 10, 10
|
||||
spacing: 10, 0
|
||||
Button:
|
||||
text: "Forgot Password?"
|
||||
background_color: 1, 1, 1, 0
|
||||
opacity: 1 if self.state == "normal" else 0.5
|
||||
color: 0.1, 0.7, 1, 1
|
||||
Button:
|
||||
text: "Sign Up"
|
||||
on_press: root.sign_up()
|
||||
background_color: 1, 1, 1 , 0
|
||||
opacity: 1 if self.state == "normal" else 0.5
|
||||
color: 0.1, 0.7, 1, 1
|
||||
|
||||
<RootWidget>:
|
||||
HomeScreen:
|
||||
name: "home_screen"
|
41
main.py
Normal file
41
main.py
Normal file
@ -0,0 +1,41 @@
|
||||
from kivy.app import App
|
||||
from kivy.lang import Builder
|
||||
from kivy.uix.screenmanager import ScreenManager , Screen
|
||||
from kivy.animation import Animation
|
||||
from hoverable import HoverBehavior
|
||||
from kivy.uix.image import Image
|
||||
from kivy.uix.behaviors import ButtonBehavior
|
||||
import json
|
||||
from datetime import datetime
|
||||
import glob
|
||||
from pathlib import Path
|
||||
import random
|
||||
|
||||
import superscript as ss
|
||||
|
||||
Builder.load_file('design.kv')
|
||||
|
||||
class HomeScreen(Screen):
|
||||
# def sign_up(self):
|
||||
# self.manager.transition.direction = "left"
|
||||
# self.manager.current = "sign_up_screen"
|
||||
|
||||
# def login(self, uname, pword):
|
||||
# with open ("users.json") as file:
|
||||
# users = json.load(file)
|
||||
# if uname in users and users[uname]["password"] == pword:
|
||||
# self.manager.transition.direction = "left"
|
||||
# self.manager.current = "login_screen_success"
|
||||
# else:
|
||||
# self.ids.login_wrong.text = "Incorrect Username or Password"
|
||||
|
||||
|
||||
class RootWidget(ScreenManager):
|
||||
pass
|
||||
|
||||
class MainApp(App):
|
||||
def build(self):
|
||||
return RootWidget()
|
||||
|
||||
if __name__ == "__main__":
|
||||
MainApp().run()
|
Loading…
Reference in New Issue
Block a user