From e595435ec3ad1a2ce62e739bc0906ccc7b0baa83 Mon Sep 17 00:00:00 2001 From: Bloodmallet Date: Fri, 22 Feb 2019 23:18:40 +0100 Subject: [PATCH 001/135] what happens now? this file should've been on ignore already! --- bloodmallet/db.sqlite3 | Bin 0 -> 221184 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/bloodmallet/db.sqlite3 b/bloodmallet/db.sqlite3 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..6ba97b31e3747431957f981f3284753ed4570e6a 100644 GIT binary patch literal 221184 zcmeI5dvF`udDyW4NDw4|)$`(B@#+eK#7n^x$z3cKz*4@JArhh}k)TLX5AsIcE`TMu zBwhl*mu}sJyt+3TH=U`Qnanh89?eYhPyC1DN$VtI|6@<4X+3Qob=ryRc&2IG#CEP9 zabkO7JJau+U0@e4lG2qN-P;c&53%Qb-*>+6cg`N{*|XTaH8-tQ)xdJGoL8y=!FI&P zFt!f|0ydki41ZDMkAeSr_;bQv?M3nqdX;U%KPq>Dl%4%9ksV@xz<#&yyM3?r{f_%j zTz}{O)$Y%BtvEmC_?rDk_F3j%+y3w%g9nxGUOwjXuMac36|Im}x0Q|Rs=QHA%koOO zxKXO;@3pMHDZ?8nB8Xgu%g7rA?Lo8n@$va&Vj&s0otm1voeWH+CX)98!Dgugj0OX< zsaB<6;6ji(re%W{13~H@_!A86jvaORS0rXvF(c4ROKLf0N6^q}dH0eK03gG4~ zugkwP#O$$Vlb9+k6=aH8wV>oxnd6nT5EB)%HB2pE=Vma44r%((kw6R7oC}8b?s;7P zM1pyAsj8%N`hH6Hewvt0RLrrZxx{M(v5>ejowSZ8&4L6g3?u;!8gxZ12U4>Ofz<8k z>A=nTshPz5V&Fz{F_5^uFguk3lQYTG0=P+f=~D<#w1fxE*?dT_e}iV% zl)_4};ltZ->EI8i`scGbGI17PLc7HBi=Y|W zU1VJT(NShkv9il+D`llhCSwK{GsE6sH`r4CMAU$b`MDDo8$Wm&$BX7tP|a!9PZt;h z{Ffm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gl&*%b7UOWukCwP|zM66w;s(((TmL-0fuG5RrAR z>+mtwY>=Us?6aiNc0YL6cmEcz0@Ruya47;>3B~ zg4_Aa@uHj4F&F0sNNWC^yV=Z9f93aOBW_w;DZ+?{zKke`4C@*Cv@= zwWI$eRPvy(3QY<4uo#oFsw%bvUzZjR4x%pGV!3k^bsf?Q#4R$+hjwq>aQQ0`#?E2F zpbujthDc+?meVjcXZMXI{8+KHGk@5CEV{wap6z;%f7d(7?8P28EQ5?3;}uDXMdO{v z>RRjaMvR9TsB0>mJxs#}H*h|+X67<%)AS6%+gmzlR+9goDQg?9av77QDK>~m;bccJYu z=6(mphGxUTBLqOR;q-}qxYS&#ZkIH85TmTXp_F+%49DP&q3?gR+b&*%8-Yo7{sWJH z^f+Cn7v`zMwTMW+Y62SEhSGxyK$Z(HqKMBML6XLlg0WZg|n0g^np0!WxoU8|Njdc z``7GWke}y%qK^(D0VIF~kN^@u0!RP}AOR$R1dsp{Kmu(EbUU3khOyhb9Pr<52N|!M zA^*DFZhHMc`<4xU@r4AC01`j~NB{{S0VIF~kN^@u0!RP}JWB#Qc9$)aNiauDW*=@BH?o!FqPTN00|%g zB!C2v01`j~NB{{S0VIF~9-qMODe^Fnv%6mJuGe@Vgz+!1$ z{7_5A)m!6AI=Ljo*4OhlrRz86uIHy7#1`Y#>b1?p&Rq1)jyQQWc2!!7R3fp>?VUur zFfneOHGs8kmf7bmdDq}wc+g4wdw56RQcif&cf~4^rAQ)pQ!M+ z9xhEymUBx>t8pQ}y`0bA;`3YE8)EpLGI1*-XvZt`wrCv`;@)vbpyRoRRtrYqZp z;^y?^w3=MFQNER!ma8`(UMt;Alqy Date: Fri, 22 Feb 2019 23:21:22 +0100 Subject: [PATCH 002/135] remove local db from gitignore --- .gitignore | 1 - 1 file changed, 1 deletion(-) diff --git a/.gitignore b/.gitignore index 142392a0..f9b48889 100644 --- a/.gitignore +++ b/.gitignore @@ -4,7 +4,6 @@ env/ *.zip debug.log secrets.py -bloodmallet/db.sqlite3 compute_api/ bloodmallet/static/ .gcloudignore From 4b660ba96e66473790712265203f8bd1ca752f8a Mon Sep 17 00:00:00 2001 From: Bloodmallet Date: Fri, 22 Feb 2019 23:22:14 +0100 Subject: [PATCH 003/135] remove db.sqlite3 --- bloodmallet/db.sqlite3 | Bin 221184 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 bloodmallet/db.sqlite3 diff --git a/bloodmallet/db.sqlite3 b/bloodmallet/db.sqlite3 deleted file mode 100644 index 6ba97b31e3747431957f981f3284753ed4570e6a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 221184 zcmeI5dvF`udDyW4NDw4|)$`(B@#+eK#7n^x$z3cKz*4@JArhh}k)TLX5AsIcE`TMu zBwhl*mu}sJyt+3TH=U`Qnanh89?eYhPyC1DN$VtI|6@<4X+3Qob=ryRc&2IG#CEP9 zabkO7JJau+U0@e4lG2qN-P;c&53%Qb-*>+6cg`N{*|XTaH8-tQ)xdJGoL8y=!FI&P zFt!f|0ydki41ZDMkAeSr_;bQv?M3nqdX;U%KPq>Dl%4%9ksV@xz<#&yyM3?r{f_%j zTz}{O)$Y%BtvEmC_?rDk_F3j%+y3w%g9nxGUOwjXuMac36|Im}x0Q|Rs=QHA%koOO zxKXO;@3pMHDZ?8nB8Xgu%g7rA?Lo8n@$va&Vj&s0otm1voeWH+CX)98!Dgugj0OX< zsaB<6;6ji(re%W{13~H@_!A86jvaORS0rXvF(c4ROKLf0N6^q}dH0eK03gG4~ zugkwP#O$$Vlb9+k6=aH8wV>oxnd6nT5EB)%HB2pE=Vma44r%((kw6R7oC}8b?s;7P zM1pyAsj8%N`hH6Hewvt0RLrrZxx{M(v5>ejowSZ8&4L6g3?u;!8gxZ12U4>Ofz<8k z>A=nTshPz5V&Fz{F_5^uFguk3lQYTG0=P+f=~D<#w1fxE*?dT_e}iV% zl)_4};ltZ->EI8i`scGbGI17PLc7HBi=Y|W zU1VJT(NShkv9il+D`llhCSw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)I{>$zTKO40En<|IvAKu?XN*9 zAdOM$We|w{U-@@tn7x+{45YSW$gl&*%b7UOWukCwP|zM66w;s(((TmL-0fuG5RrAR z>+mtwY>=Us?6aiNc0YL6cmEcz0@Ruya47;>3B~ zg4_Aa@uHj4F&F0sNNWC^yV=Z9f93aOBW_w;DZ+?{zKke`4C@*Cv@= zwWI$eRPvy(3QY<4uo#oFsw%bvUzZjR4x%pGV!3k^bsf?Q#4R$+hjwq>aQQ0`#?E2F zpbujthDc+?meVjcXZMXI{8+KHGk@5CEV{wap6z;%f7d(7?8P28EQ5?3;}uDXMdO{v z>RRjaMvR9TsB0>mJxs#}H*h|+X67<%)AS6%+gmzlR+9goDQg?9av77QDK>~m;bccJYu z=6(mphGxUTBLqOR;q-}qxYS&#ZkIH85TmTXp_F+%49DP&q3?gR+b&*%8-Yo7{sWJH z^f+Cn7v`zMwTMW+Y62SEhSGxyK$Z(HqKMBML6XLlg0WZg|n0g^np0!WxoU8|Njdc z``7GWke}y%qK^(D0VIF~kN^@u0!RP}AOR$R1dsp{Kmu(EbUU3khOyhb9Pr<52N|!M zA^*DFZhHMc`<4xU@r4AC01`j~NB{{S0VIF~kN^@u0!RP}JWB#Qc9$)aNiauDW*=@BH?o!FqPTN00|%g zB!C2v01`j~NB{{S0VIF~9-qMODe^Fnv%6mJuGe@Vgz+!1$ z{7_5A)m!6AI=Ljo*4OhlrRz86uIHy7#1`Y#>b1?p&Rq1)jyQQWc2!!7R3fp>?VUur zFfneOHGs8kmf7bmdDq}wc+g4wdw56RQcif&cf~4^rAQ)pQ!M+ z9xhEymUBx>t8pQ}y`0bA;`3YE8)EpLGI1*-XvZt`wrCv`;@)vbpyRoRRtrYqZp z;^y?^w3=MFQNER!ma8`(UMt;Alqy Date: Fri, 22 Feb 2019 23:22:30 +0100 Subject: [PATCH 004/135] readd bloodmallet/db.sqlite3 to gitignore --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index f9b48889..d52ca066 100644 --- a/.gitignore +++ b/.gitignore @@ -5,6 +5,7 @@ env/ debug.log secrets.py compute_api/ +bloodmallet/db.sqlite3 bloodmallet/static/ .gcloudignore __pycache__/ From 76fa631dce660ea4a84f83327595b3f21944ca55 Mon Sep 17 00:00:00 2001 From: Bloodmallet Date: Sat, 23 Feb 2019 03:20:15 +0100 Subject: [PATCH 005/135] add new models Race, WowClass, WowSpec, FightStyle, SimulationType, Simulation, SimulationQueue, SimulationResult --- bloodmallet/general_website/models.py | 78 +++++++++++++++++++++++++++ 1 file changed, 78 insertions(+) diff --git a/bloodmallet/general_website/models.py b/bloodmallet/general_website/models.py index 470cb525..5cf51195 100644 --- a/bloodmallet/general_website/models.py +++ b/bloodmallet/general_website/models.py @@ -1,6 +1,7 @@ from django.db import models from django.db.models.signals import post_save from django.dispatch import receiver +from django.conf import settings from django.contrib.auth.signals import user_logged_in from django.contrib.auth.models import User @@ -117,3 +118,80 @@ def emergency_create_user_profile(sender, request, user, **kwargs): user.profile except Exception: Profile.objects.create(user=user) # pylint: disable=no-member + + +class Race(models.Model): + """Wow race like dwarf, troll, pandaren + """ + + faction = models.ForeignKey(Faction, on_delete=models.CASCADE, related_name='races') + name = models.CharField(max_length=32) + + +class WowClass(models.Model): + """Wow classes like death knight, rogue, mage + """ + + races = models.ManyToManyField(Race, related_name='classes') + name = models.CharField(max_length=16) + + +class WowSpec(models.Model): + """Wow spec like feral, fire, frost + """ + + wow_class = models.ForeignKey(WowClass, on_delete=models.CASCADE, related_name='wow_specs') + name = models.CharField(max_length=16) + + +class FightStyle(models.Model): + """SimulationCraft fight_style inputs. + """ + name = models.CharField(max_length=16) + description = models.TextField(max_length=512, blank=True) + + +class SimulationType(models.Model): + """Essentially already implemented commands/modes for bloodytools. + """ + + +class Simulation(models.Model): + """Data necessary to do a simulation. + """ + + user = models.ForeignKey(User, on_delete=models.CASCADE, related_name='simulations') + wow_class = models.ForeignKey(WowClass, on_delete=models.CASCADE, related_name='simulations') + wow_spec = models.ForeignKey(WowSpec, on_delete=models.CASCADE, related_name='simulations') + simulation_type = models.ForeignKey(SimulationType, on_delete=models.CASCADE, related_name='simulations') + fight_style = models.ForeignKey(FightStyle, on_delete=models.CASCADE, related_name='simulations') + character_input = models.TextField( + max_length=2048, + blank=True, + help_text="Define your own character here, instead of using the standard profile (your input will overwrite the standard profile)." + ) + fight_style_input = models.TextField(max_length=2048, blank=True, help_text="Define your own fight_style.") + simc_hash = models.CharField( + max_length=40, + blank=True, + help_text="SimulationCraft commit hash to identify the used version. (Allows reproduction of a result.)" + ) + + +class SimulationQueue(models.Model): + """Waiting for a worker to pick it up. + """ + simulation = models.OneToOneField(Simulation, on_delete=models.CASCADE) + state = models.CharField(max_length=16, blank=True, help_text="Pending, in progress, done, aborted, crashed.") + progress = models.SmallIntegerField( + help_text="0-100, but 100 doesn't mean, that the data is available. Simulation reached 100%, though." + ) + log = models.TextField(blank=True, help_text="Log messages from the responsible worker.") + + +class SimulationResult(models.Model): + """Result of a simulation + """ + + simulation = models.OneToOneField(Simulation, on_delete=models.CASCADE) + result = models.FilePathField(path=settings.FILE_PATH_FIELD_DIRECTORY) From 896ddb8aa74ef2340d19d337b2c6c84eb5a3ef0e Mon Sep 17 00:00:00 2001 From: Bloodmallet Date: Sat, 23 Feb 2019 03:20:29 +0100 Subject: [PATCH 006/135] add more styling --- .style.yapf | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.style.yapf b/.style.yapf index a70735eb..ff055bf2 100644 --- a/.style.yapf +++ b/.style.yapf @@ -6,3 +6,5 @@ DEDENT_CLOSING_BRACKETS = true JOIN_MULTIPLE_LINES = true CONTINUATION_INDENT_WIDTH = 4 COLUMN_LIMIT = 119 +COALESCE_BRACKETS = true +INDENT_DICTIONARY_VALUE = true From 20e4d427d35a0ff1ad9fddca09cd12d14754951e Mon Sep 17 00:00:00 2001 From: Bloodmallet Date: Sat, 23 Feb 2019 03:21:31 +0100 Subject: [PATCH 007/135] clean up settings init --- bloodmallet/bloodmallet/settings/__init__.py | 16 ++--------- bloodmallet/bloodmallet/settings/common.py | 18 ++++++------ .../bloodmallet/settings/development.py | 27 ++++++++++-------- .../bloodmallet/settings/production.py | 28 +++++++++++-------- 4 files changed, 41 insertions(+), 48 deletions(-) diff --git a/bloodmallet/bloodmallet/settings/__init__.py b/bloodmallet/bloodmallet/settings/__init__.py index 1de4d828..415542a9 100644 --- a/bloodmallet/bloodmallet/settings/__init__.py +++ b/bloodmallet/bloodmallet/settings/__init__.py @@ -1,18 +1,6 @@ import os -from .common import * - if os.getenv('GAE_APPLICATION', None): - from .production import * + from .production import * else: - from .development import * - -# secrets -try: - from .secrets import * -except: - pass -try: - from .secrets import SECRET_KEY -except: - pass + from .development import * diff --git a/bloodmallet/bloodmallet/settings/common.py b/bloodmallet/bloodmallet/settings/common.py index 51c0a654..3ef66eec 100644 --- a/bloodmallet/bloodmallet/settings/common.py +++ b/bloodmallet/bloodmallet/settings/common.py @@ -58,16 +58,14 @@ os.path.join(BASE_DIR, 'general_website', 'templates', 'allauth') # allauth templates ], 'APP_DIRS': True, - 'OPTIONS': - { - 'context_processors': - [ - 'django.template.context_processors.debug', - 'django.template.context_processors.request', - 'django.contrib.auth.context_processors.auth', - 'django.contrib.messages.context_processors.messages', - ], - }, + 'OPTIONS': { + 'context_processors': [ + 'django.template.context_processors.debug', + 'django.template.context_processors.request', + 'django.contrib.auth.context_processors.auth', + 'django.contrib.messages.context_processors.messages', + ], + }, }, ] diff --git a/bloodmallet/bloodmallet/settings/development.py b/bloodmallet/bloodmallet/settings/development.py index 9d618483..7a9b8915 100644 --- a/bloodmallet/bloodmallet/settings/development.py +++ b/bloodmallet/bloodmallet/settings/development.py @@ -1,6 +1,8 @@ # -*- coding: utf-8 -*- import os +from .common import * # pylint: disable=unused-wildcard-import + # SECURITY WARNING: don't run with debug turned on in production! DEBUG = True @@ -69,18 +71,17 @@ from .secrets import DB_HOST, DB_NAME, DB_USER, DB_PASSWORD DATABASES = { - 'default': - { - 'ENGINE': 'django.db.backends.mysql', - 'HOST': '127.0.0.1', - 'PORT': '3306', - 'NAME': DB_NAME, - 'USER': DB_USER, - 'PASSWORD': DB_PASSWORD, - 'OPTIONS': { - 'charset': 'utf8mb4' - }, - } + 'default': { + 'ENGINE': 'django.db.backends.mysql', + 'HOST': '127.0.0.1', + 'PORT': '3306', + 'NAME': DB_NAME, + 'USER': DB_USER, + 'PASSWORD': DB_PASSWORD, + 'OPTIONS': { + 'charset': 'utf8mb4' + }, + } } # used to serve files from this path in non-debug production @@ -91,3 +92,5 @@ SASS_PROCESSOR_ROOT = 'general_website/static/' # SASS_PROCESSOR_INCLUDE_FILE_PATTERN = r'^.+\.scss$' # SASS_PROCESSOR_ENABLED = True + +from .secrets import FILE_PATH_FIELD_DIRECTORY_DEV as FILE_PATH_FIELD_DIRECTORY diff --git a/bloodmallet/bloodmallet/settings/production.py b/bloodmallet/bloodmallet/settings/production.py index d7d301f5..4f7853af 100644 --- a/bloodmallet/bloodmallet/settings/production.py +++ b/bloodmallet/bloodmallet/settings/production.py @@ -1,8 +1,11 @@ # -*- coding: utf-8 -*- + +from .common import * # pylint: disable=unused-wildcard-import + # SECURITY WARNING: don't run with debug turned on in production! DEBUG = False -ALLOWED_HOSTS = ['*'] +ALLOWED_HOSTS = ['dev.bloodmallet.com'] # logging LOGGING = { @@ -52,17 +55,16 @@ from .secrets import DB_HOST, DB_NAME, DB_USER, DB_PASSWORD DATABASES = { - 'default': - { - 'ENGINE': 'django.db.backends.mysql', - 'HOST': '/cloudsql/{}'.format(DB_HOST), - 'NAME': DB_NAME, - 'USER': DB_USER, - 'PASSWORD': DB_PASSWORD, - 'OPTIONS': { - 'charset': 'utf8mb4' - }, - } + 'default': { + 'ENGINE': 'django.db.backends.mysql', + 'HOST': '/cloudsql/{}'.format(DB_HOST), + 'NAME': DB_NAME, + 'USER': DB_USER, + 'PASSWORD': DB_PASSWORD, + 'OPTIONS': { + 'charset': 'utf8mb4' + }, + } } # used to serve files from this path in non-debug production @@ -73,3 +75,5 @@ SASS_PROCESSOR_ROOT = STATIC_ROOT # SASS_PROCESSOR_INCLUDE_FILE_PATTERN = r'^.+\.scss$' SASS_PROCESSOR_ENABLED = False + +from .secrets import FILE_PATH_FIELD_DIRECTORY From bb0eebd3f9396f6a0576f19d0452dab19221c32d Mon Sep 17 00:00:00 2001 From: Bloodmallet Date: Sat, 23 Feb 2019 03:21:51 +0100 Subject: [PATCH 008/135] enable https for tooltip script --- .../general_website/templates/general_website/index.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bloodmallet/general_website/templates/general_website/index.html b/bloodmallet/general_website/templates/general_website/index.html index d925bf6a..c7f139e4 100644 --- a/bloodmallet/general_website/templates/general_website/index.html +++ b/bloodmallet/general_website/templates/general_website/index.html @@ -114,8 +114,8 @@

blood{% if not bloodyfil - - + + {% endblock %} From 32418a42a646da3dcb585da00054f571d5b7aec4 Mon Sep 17 00:00:00 2001 From: Bloodmallet Date: Thu, 28 Feb 2019 21:23:51 +0100 Subject: [PATCH 009/135] add space formatting rule for comments --- .style.yapf | 1 + 1 file changed, 1 insertion(+) diff --git a/.style.yapf b/.style.yapf index ff055bf2..86f44443 100644 --- a/.style.yapf +++ b/.style.yapf @@ -1,6 +1,7 @@ [style] based_on_style = chromium indent_width = 4 +SPACES_BEFORE_COMMENT = 5 BLANK_LINE_BEFORE_NESTED_CLASS_OR_DEF = true DEDENT_CLOSING_BRACKETS = true JOIN_MULTIPLE_LINES = true From 355f1dab595f74030ce7629bda1f57b1e0c80570 Mon Sep 17 00:00:00 2001 From: Bloodmallet Date: Thu, 28 Feb 2019 21:25:50 +0100 Subject: [PATCH 010/135] readd secret key --- bloodmallet/bloodmallet/settings/common.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/bloodmallet/bloodmallet/settings/common.py b/bloodmallet/bloodmallet/settings/common.py index 3ef66eec..4accdf8e 100644 --- a/bloodmallet/bloodmallet/settings/common.py +++ b/bloodmallet/bloodmallet/settings/common.py @@ -89,6 +89,8 @@ }, ] +from .secrets import SECRET_KEY + # Internationalization # https://docs.djangoproject.com/en/2.1/topics/i18n/ From 2ea4bc3289c30970ffea6b7a0903ecdbb0ccaef9 Mon Sep 17 00:00:00 2001 From: Bloodmallet Date: Thu, 28 Feb 2019 21:29:10 +0100 Subject: [PATCH 011/135] add __str__ to all models, add tokenized_name to many models Add life to SimulationType Add meta information to Simulation Improve Result by uuid, simc_hash, and created_at Add GeneralResult to collect the bloodmallet standard data. --- bloodmallet/general_website/models.py | 120 ++++++++++++++++++++++---- 1 file changed, 101 insertions(+), 19 deletions(-) diff --git a/bloodmallet/general_website/models.py b/bloodmallet/general_website/models.py index 5cf51195..cd163dbb 100644 --- a/bloodmallet/general_website/models.py +++ b/bloodmallet/general_website/models.py @@ -8,6 +8,7 @@ from allauth.socialaccount.signals import pre_social_login, social_account_updated from typing import Tuple +import uuid # Create your models here. @@ -25,7 +26,7 @@ def update_pledge_level(sender, sociallogin, **kwargs): print(sender) print(sociallogin) try: - print(sociallogin.account) # read social allauth models.py + print(sociallogin.account) # read social allauth models.py except Exception: print("No social.account could be found yet. Probably linking in progress.") @@ -60,6 +61,9 @@ class Faction(models.Model): name = models.CharField(max_length=30) + def __str__(self): + return self.name + class Teleporter(models.Model): """Collection of fixed position Teleporters. @@ -82,22 +86,25 @@ def coordinates(self) -> Tuple[float, float]: return (self.x, self.y) + def __str__(self): + return "{} -> {}".format(self.location, self.target) + class Profile(models.Model): """Extension of the standard Django User - - Arguments: - models {[type]} -- [description] """ user = models.OneToOneField(User, on_delete=models.CASCADE) bloodyfiller = models.CharField(max_length=10, null=True, blank=True) + def __str__(self): + return self.user + @receiver(post_save, sender=User) def create_user_profile(sender, instance, created, **kwargs): if created: - Profile.objects.create(user=instance) # pylint: disable=no-member + Profile.objects.create(user=instance) # pylint: disable=no-member @receiver(post_save, sender=User) @@ -117,7 +124,7 @@ def emergency_create_user_profile(sender, request, user, **kwargs): try: user.profile except Exception: - Profile.objects.create(user=user) # pylint: disable=no-member + Profile.objects.create(user=user) # pylint: disable=no-member class Race(models.Model): @@ -125,7 +132,15 @@ class Race(models.Model): """ faction = models.ForeignKey(Faction, on_delete=models.CASCADE, related_name='races') - name = models.CharField(max_length=32) + pretty_name = models.CharField(max_length=32) + tokenized_name = models.CharField(max_length=32) + + @property + def name(self): + return self.pretty_name + + def __str__(self): + return self.name class WowClass(models.Model): @@ -133,7 +148,15 @@ class WowClass(models.Model): """ races = models.ManyToManyField(Race, related_name='classes') - name = models.CharField(max_length=16) + tokenized_name = models.CharField(max_length=16) + pretty_name = models.CharField(max_length=16) + + @property + def name(self): + return self.pretty_name + + def __str__(self): + return self.name class WowSpec(models.Model): @@ -141,20 +164,44 @@ class WowSpec(models.Model): """ wow_class = models.ForeignKey(WowClass, on_delete=models.CASCADE, related_name='wow_specs') - name = models.CharField(max_length=16) + pretty_name = models.CharField(max_length=16) + tokenized_name = models.CharField(max_length=16) + + @property + def name(self): + return self.pretty_name + + def __str__(self): + return self.name class FightStyle(models.Model): """SimulationCraft fight_style inputs. """ - name = models.CharField(max_length=16) + tokenized_name = models.CharField(max_length=16) + pretty_name = models.CharField(max_length=16) description = models.TextField(max_length=512, blank=True) + @property + def name(self): + return self.pretty_name + + def __str__(self): + return self.name + class SimulationType(models.Model): - """Essentially already implemented commands/modes for bloodytools. + """Commands/modes for bloodytools. """ + name = models.CharField(max_length=32, help_text="Name of the simulation type. Like 'trinket simulations'.") + command = models.CharField( + max_length=32, help_text="Actual command for bloodytools to do the simulation type. E.g. 'trinkets'" + ) + + def __str__(self): + return self.name + class Simulation(models.Model): """Data necessary to do a simulation. @@ -171,15 +218,20 @@ class Simulation(models.Model): help_text="Define your own character here, instead of using the standard profile (your input will overwrite the standard profile)." ) fight_style_input = models.TextField(max_length=2048, blank=True, help_text="Define your own fight_style.") - simc_hash = models.CharField( - max_length=40, - blank=True, - help_text="SimulationCraft commit hash to identify the used version. (Allows reproduction of a result.)" + created_at = models.DateTimeField(auto_now_add=True) + failed = models.BooleanField( + default=False, + help_text="If Simulation failed somehow this bool is set to True. Otherwise stays False forever." ) + def __str__(self): + return "{simulation_type} {wow_spec} {wow_class}".format( + simulation_type=self.simulation_type, wow_spec=self.wow_spec, wow_class=self.wow_class + ) -class SimulationQueue(models.Model): - """Waiting for a worker to pick it up. + +class Queue(models.Model): + """Waiting for a worker to pick the simulation up. """ simulation = models.OneToOneField(Simulation, on_delete=models.CASCADE) state = models.CharField(max_length=16, blank=True, help_text="Pending, in progress, done, aborted, crashed.") @@ -189,9 +241,39 @@ class SimulationQueue(models.Model): log = models.TextField(blank=True, help_text="Log messages from the responsible worker.") -class SimulationResult(models.Model): +class Result(models.Model): """Result of a simulation """ simulation = models.OneToOneField(Simulation, on_delete=models.CASCADE) - result = models.FilePathField(path=settings.FILE_PATH_FIELD_DIRECTORY) + uuid = models.UUIDField( + default=uuid.uuid4, editable=False, help_text="Uuid used to identify a specific simulation." + ) + result = models.FileField(upload_to=save_result) + simc_hash = models.CharField( + max_length=40, + blank=True, + help_text="SimulationCraft commit hash to identify the used version. (Allows reproduction of a result.)" + ) + created_at = models.DateTimeField(auto_now_add=True) + + # file upload/save: https://cloud.google.com/python/getting-started/using-cloud-storage + + def save_result(self, instance, filename): + return instance.simulation.user + + def __str__(self): + return self.simulation + + +class GeneralResult(models.Model): + """Latest standard simulation result. + """ + wow_class = models.ForeignKey(WowClass, on_delete=models.CASCADE, related_name='general_results') + wow_spec = models.OneToOneField(WowSpec, on_delete=models.CASCADE, related_name='general_result') + simulation_type = models.ForeignKey(SimulationType, on_delete=models.CASCADE, related_name='general_results') + fight_style = models.ForeignKey(FightStyle, on_delete=models.CASCADE, related_name='general_results') + result = models.OneToOneField(Result, on_delete=models.CASCADE, related_name='general_result') + + def __str__(self): + return self.result.simulation # pylint: disable=no-member From 2c7ec1befac91fdbe66c428b05a90b3db7317f96 Mon Sep 17 00:00:00 2001 From: Bloodmallet Date: Thu, 28 Feb 2019 22:21:07 +0100 Subject: [PATCH 012/135] use standard login page for admin login --- bloodmallet/bloodmallet/urls.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/bloodmallet/bloodmallet/urls.py b/bloodmallet/bloodmallet/urls.py index c558a465..462bc040 100644 --- a/bloodmallet/bloodmallet/urls.py +++ b/bloodmallet/bloodmallet/urls.py @@ -16,9 +16,12 @@ from django.contrib import admin from django.urls import include, path +from general_website.views import login as app_login + urlpatterns = [ - path('admin/', admin.site.urls), path('', include('general_website.urls')), + path('admin/login/', app_login), + path('admin/', admin.site.urls), path('compute_api/', include('compute_api.urls')), ] From 9cec0986fba74ebd4e257d9f3c661cbbd6132d5d Mon Sep 17 00:00:00 2001 From: Bloodmallet Date: Thu, 28 Feb 2019 22:21:23 +0100 Subject: [PATCH 013/135] fix Result model --- bloodmallet/general_website/models.py | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/bloodmallet/general_website/models.py b/bloodmallet/general_website/models.py index cd163dbb..f869a7f2 100644 --- a/bloodmallet/general_website/models.py +++ b/bloodmallet/general_website/models.py @@ -241,6 +241,20 @@ class Queue(models.Model): log = models.TextField(blank=True, help_text="Log messages from the responsible worker.") +def save_simulation_result(instance, filename) -> str: + """Create URL of savelocation for simulation result. + + Arguments: + instance {[type]} -- [description] + filename {[type]} -- [description] + + Returns: + str -- [description] + """ + + return "{}{}/".format(settings.FILE_PATH_FIELD_DIRECTORY, instance.simulation.user) + + class Result(models.Model): """Result of a simulation """ @@ -249,7 +263,7 @@ class Result(models.Model): uuid = models.UUIDField( default=uuid.uuid4, editable=False, help_text="Uuid used to identify a specific simulation." ) - result = models.FileField(upload_to=save_result) + result = models.FileField(upload_to=save_simulation_result) simc_hash = models.CharField( max_length=40, blank=True, @@ -259,9 +273,6 @@ class Result(models.Model): # file upload/save: https://cloud.google.com/python/getting-started/using-cloud-storage - def save_result(self, instance, filename): - return instance.simulation.user - def __str__(self): return self.simulation From c8763e257d83e1249f8b1c6ae5e83226b1bae3b2 Mon Sep 17 00:00:00 2001 From: Bloodmallet Date: Thu, 28 Feb 2019 22:21:34 +0100 Subject: [PATCH 014/135] migration --- .../migrations/0002_auto_20190228_2145.py | 149 ++++++++++++++++++ 1 file changed, 149 insertions(+) create mode 100644 bloodmallet/general_website/migrations/0002_auto_20190228_2145.py diff --git a/bloodmallet/general_website/migrations/0002_auto_20190228_2145.py b/bloodmallet/general_website/migrations/0002_auto_20190228_2145.py new file mode 100644 index 00000000..d5073116 --- /dev/null +++ b/bloodmallet/general_website/migrations/0002_auto_20190228_2145.py @@ -0,0 +1,149 @@ +# Generated by Django 2.1.5 on 2019-02-28 20:45 + +from django.conf import settings +from django.db import migrations, models +import django.db.models.deletion +import general_website.models +import uuid + + +class Migration(migrations.Migration): + + dependencies = [ + migrations.swappable_dependency(settings.AUTH_USER_MODEL), + ('general_website', '0001_initial'), + ] + + operations = [ + migrations.CreateModel( + name='FightStyle', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('tokenized_name', models.CharField(max_length=16)), + ('pretty_name', models.CharField(max_length=16)), + ('description', models.TextField(blank=True, max_length=512)), + ], + ), + migrations.CreateModel( + name='GeneralResult', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('fight_style', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='general_results', to='general_website.FightStyle')), + ], + ), + migrations.CreateModel( + name='Queue', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('state', models.CharField(blank=True, help_text='Pending, in progress, done, aborted, crashed.', max_length=16)), + ('progress', models.SmallIntegerField(help_text="0-100, but 100 doesn't mean, that the data is available. Simulation reached 100%, though.")), + ('log', models.TextField(blank=True, help_text='Log messages from the responsible worker.')), + ], + ), + migrations.CreateModel( + name='Race', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('pretty_name', models.CharField(max_length=32)), + ('tokenized_name', models.CharField(max_length=32)), + ('faction', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='races', to='general_website.Faction')), + ], + ), + migrations.CreateModel( + name='Result', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('uuid', models.UUIDField(default=uuid.uuid4, editable=False, help_text='Uuid used to identify a specific simulation.')), + ('result', models.FileField(upload_to=general_website.models.save_simulation_result)), + ('simc_hash', models.CharField(blank=True, help_text='SimulationCraft commit hash to identify the used version. (Allows reproduction of a result.)', max_length=40)), + ('created_at', models.DateTimeField(auto_now_add=True)), + ], + ), + migrations.CreateModel( + name='Simulation', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('character_input', models.TextField(blank=True, help_text='Define your own character here, instead of using the standard profile (your input will overwrite the standard profile).', max_length=2048)), + ('fight_style_input', models.TextField(blank=True, help_text='Define your own fight_style.', max_length=2048)), + ('created_at', models.DateTimeField(auto_now_add=True)), + ('failed', models.BooleanField(default=False, help_text='If Simulation failed somehow this bool is set to True. Otherwise stays False forever.')), + ('fight_style', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='simulations', to='general_website.FightStyle')), + ], + ), + migrations.CreateModel( + name='SimulationType', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('name', models.CharField(help_text="Name of the simulation type. Like 'trinket simulations'.", max_length=32)), + ('command', models.CharField(help_text="Actual command for bloodytools to do the simulation type. E.g. 'trinkets'", max_length=32)), + ], + ), + migrations.CreateModel( + name='WowClass', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('tokenized_name', models.CharField(max_length=16)), + ('pretty_name', models.CharField(max_length=16)), + ('races', models.ManyToManyField(related_name='classes', to='general_website.Race')), + ], + ), + migrations.CreateModel( + name='WowSpec', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('pretty_name', models.CharField(max_length=16)), + ('tokenized_name', models.CharField(max_length=16)), + ('wow_class', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='wow_specs', to='general_website.WowClass')), + ], + ), + migrations.AddField( + model_name='simulation', + name='simulation_type', + field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='simulations', to='general_website.SimulationType'), + ), + migrations.AddField( + model_name='simulation', + name='user', + field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='simulations', to=settings.AUTH_USER_MODEL), + ), + migrations.AddField( + model_name='simulation', + name='wow_class', + field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='simulations', to='general_website.WowClass'), + ), + migrations.AddField( + model_name='simulation', + name='wow_spec', + field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='simulations', to='general_website.WowSpec'), + ), + migrations.AddField( + model_name='result', + name='simulation', + field=models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to='general_website.Simulation'), + ), + migrations.AddField( + model_name='queue', + name='simulation', + field=models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to='general_website.Simulation'), + ), + migrations.AddField( + model_name='generalresult', + name='result', + field=models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='general_result', to='general_website.Result'), + ), + migrations.AddField( + model_name='generalresult', + name='simulation_type', + field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='general_results', to='general_website.SimulationType'), + ), + migrations.AddField( + model_name='generalresult', + name='wow_class', + field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='general_results', to='general_website.WowClass'), + ), + migrations.AddField( + model_name='generalresult', + name='wow_spec', + field=models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='general_result', to='general_website.WowSpec'), + ), + ] From acfcda45efd033a1a58dc1f15651c8036de7e057 Mon Sep 17 00:00:00 2001 From: Bloodmallet Date: Thu, 28 Feb 2019 22:21:51 +0100 Subject: [PATCH 015/135] formatting only --- bloodmallet/bloodmallet/settings/common.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/bloodmallet/bloodmallet/settings/common.py b/bloodmallet/bloodmallet/settings/common.py index 4accdf8e..72b7ed24 100644 --- a/bloodmallet/bloodmallet/settings/common.py +++ b/bloodmallet/bloodmallet/settings/common.py @@ -27,7 +27,7 @@ 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', - 'django.contrib.sites', # required by django-allauth + 'django.contrib.sites', # required by django-allauth 'allauth', 'allauth.account', 'allauth.socialaccount', @@ -55,7 +55,7 @@ { 'BACKEND': 'django.template.backends.django.DjangoTemplates', 'DIRS': [ - os.path.join(BASE_DIR, 'general_website', 'templates', 'allauth') # allauth templates + os.path.join(BASE_DIR, 'general_website', 'templates', 'allauth') # allauth templates ], 'APP_DIRS': True, 'OPTIONS': { @@ -121,17 +121,17 @@ # TODO: Check https://django-allauth.readthedocs.io/en/latest/faq.html for patreon connection # django-allauth AUTHENTICATION_BACKENDS = ( - # Needed to login by username in Django admin, regardless of `allauth` + # Needed to login by username in Django admin, regardless of `allauth` 'django.contrib.auth.backends.ModelBackend', - # `allauth` specific authentication methods, such as login by e-mail + # `allauth` specific authentication methods, such as login by e-mail 'allauth.account.auth_backends.AuthenticationBackend', ) SITE_ID = 1 # we can either use crispy or bootstrap4 -CRISPY_TEMPLATE_PACK = 'bootstrap4' # automatic bootstrap form frontend generator +CRISPY_TEMPLATE_PACK = 'bootstrap4' # automatic bootstrap form frontend generator # from where is this? LOGIN_URL = 'login' From 4fb64da82ec79f63cd332c06ae40521ad00779e6 Mon Sep 17 00:00:00 2001 From: Bloodmallet Date: Thu, 28 Feb 2019 22:28:53 +0100 Subject: [PATCH 016/135] add models to admin --- bloodmallet/general_website/admin.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/bloodmallet/general_website/admin.py b/bloodmallet/general_website/admin.py index 8c38f3f3..f84efe67 100644 --- a/bloodmallet/general_website/admin.py +++ b/bloodmallet/general_website/admin.py @@ -1,3 +1,17 @@ from django.contrib import admin +from general_website.models import Faction, Teleporter, Profile, Race, WowClass, WowSpec, FightStyle, SimulationType, Simulation, Queue, Result, GeneralResult + # Register your models here. +admin.site.register(Faction) +admin.site.register(Teleporter) +admin.site.register(Profile) +admin.site.register(Race) +admin.site.register(WowClass) +admin.site.register(WowSpec) +admin.site.register(FightStyle) +admin.site.register(SimulationType) +admin.site.register(Simulation) +admin.site.register(Queue) +admin.site.register(Result) +admin.site.register(GeneralResult) From 63d2a708a7a99a29a0eb960e8661b34f591e5ac2 Mon Sep 17 00:00:00 2001 From: Bloodmallet Date: Thu, 28 Feb 2019 22:45:51 +0100 Subject: [PATCH 017/135] fix Profile in admin view --- bloodmallet/general_website/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bloodmallet/general_website/models.py b/bloodmallet/general_website/models.py index f869a7f2..809b2e45 100644 --- a/bloodmallet/general_website/models.py +++ b/bloodmallet/general_website/models.py @@ -98,7 +98,7 @@ class Profile(models.Model): bloodyfiller = models.CharField(max_length=10, null=True, blank=True) def __str__(self): - return self.user + return self.user.username # pylint: disable=no-member @receiver(post_save, sender=User) From 71e1d4313e8a88a9921792965f3195815d6e4db5 Mon Sep 17 00:00:00 2001 From: Bloodmallet Date: Thu, 28 Feb 2019 22:46:04 +0100 Subject: [PATCH 018/135] add admin link for superusers --- .../templates/general_website/layout_top_nav.html | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/bloodmallet/general_website/templates/general_website/layout_top_nav.html b/bloodmallet/general_website/templates/general_website/layout_top_nav.html index c5b613d6..0c8c3b22 100644 --- a/bloodmallet/general_website/templates/general_website/layout_top_nav.html +++ b/bloodmallet/general_website/templates/general_website/layout_top_nav.html @@ -1,4 +1,5 @@ {% load static %} + {% comment %}
{% endcomment %}