Initial step for PGN uploading
1. Create the interface code to allow for it. 2. Create pgn_util to strip and compress PGNs
This commit is contained in:
1 parent
1ac76bdcc1
commit
ca630c80f2
8 files changed
+113
-6
No files matched your search
@@ -126,6 +126,7 @@ def verify_engine_test_preset(test_preset):
|
||||
'test_max_games',
|
||||
|
||||
'book_name',
|
||||
'upload_pgns',
|
||||
'priority',
|
||||
'throughput',
|
||||
'workload_size',
|
||||
@@ -159,6 +160,7 @@ def verify_engine_tune_preset(tune_preset):
|
||||
'spsa_pairs_per',
|
||||
|
||||
'book_name',
|
||||
'upload_pgns',
|
||||
'priority',
|
||||
'throughput',
|
||||
'syzygy_wdl',
|
||||
|
||||
+5
-1
@@ -90,7 +90,8 @@ class Result(Model):
|
||||
class Test(Model):
|
||||
|
||||
# Misc information
|
||||
author = CharField(max_length=64)
|
||||
author = CharField(max_length=64)
|
||||
upload_pgns = CharField(max_length=16, default='FALSE')
|
||||
|
||||
# Opening book settings
|
||||
book_name = CharField(max_length=32)
|
||||
@@ -194,3 +195,6 @@ class Network(Model):
|
||||
|
||||
def __str__(self):
|
||||
return '[{}] {} ({})'.format(self.engine, self.name, self.sha256)
|
||||
|
||||
class PGN(Model):
|
||||
pass
|
||||
@@ -105,6 +105,7 @@ def create_new_test(request):
|
||||
test = Test()
|
||||
test.author = request.user.username
|
||||
test.book_name = request.POST['book_name']
|
||||
test.upload_pgns = request.POST['upload_pgns']
|
||||
|
||||
test.dev = get_engine(*dev_info)
|
||||
test.dev_repo = request.POST['dev_repo']
|
||||
@@ -169,6 +170,7 @@ def create_new_tune(request):
|
||||
test = Test()
|
||||
test.author = request.user.username
|
||||
test.book_name = request.POST['book_name']
|
||||
test.upload_pgns = request.POST['upload_pgns']
|
||||
|
||||
test.dev = test.base = get_engine(*dev_info)
|
||||
test.dev_repo = test.base_repo = request.POST['dev_repo']
|
||||
|
||||
@@ -82,6 +82,7 @@ def verify_test_creation(errors, request):
|
||||
|
||||
# Verify everything about the Test Settings
|
||||
(verify_configuration , 'book_name', 'Book', 'books'),
|
||||
(verify_upload_pgns , 'upload_pgns', 'Upload PGNs'),
|
||||
(verify_test_mode , 'test_mode'),
|
||||
(verify_sprt_bounds , 'test_bounds'),
|
||||
(verify_sprt_conf , 'test_confidence'),
|
||||
@@ -124,6 +125,7 @@ def verify_tune_creation(errors, request):
|
||||
|
||||
# Verify everything about the Test Settings
|
||||
(verify_configuration , 'book_name', 'Book', 'books'),
|
||||
(verify_upload_pgns , 'upload_pgns', 'Upload PGNs'),
|
||||
|
||||
# Verify everything about the General Settings
|
||||
(verify_integer , 'priority', 'Priority'),
|
||||
@@ -270,6 +272,10 @@ def verify_spsa_distribution_type(errors, request, field, field_name):
|
||||
try: assert request.POST[field] in candidates
|
||||
except: errors.append('%s must be in %s' % (field_name, ', '.join(candidates)))
|
||||
|
||||
def verify_upload_pgns(errors, request, field, field_name):
|
||||
try: request.POST[field] in ['FALSE', 'COMPACT', 'VERBOSE']
|
||||
except: errors.append('"%s" must be FALSE, COMPACT, or VERBOSE' % (field_name))
|
||||
|
||||
|
||||
def collect_github_info(errors, request, field):
|
||||
|
||||
|
||||
Reference in new issue
Block a user