-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4fd8174
commit 99df8c8
Showing
8 changed files
with
48 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
from .base_criterion_pack import BaseCriterionPack | ||
from .pack_config import BASE_PACKS, DEFAULT_TYPE, DEFAULT_TYPE_INFO, DEFAULT_PRES_TYPE_INFO, DEFAULT_REPORT_TYPE_INFO, \ | ||
REPORT_TYPES | ||
REPORT_TYPES, POINT_LEVELS | ||
from .utils import init_criterions |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -288,6 +288,19 @@ def update_database(cls, collections, prev_version): | |
raise Exception(f'Неподдерживаемый переход с версии {prev_version}') | ||
|
||
|
||
class Version41(Version): | ||
VERSION_NAME = '4.1' | ||
CHANGES = 'В коллекцию criteria_pack добавлен атрибут point_levels' | ||
|
||
@classmethod | ||
def update_database(cls, collections, prev_version): | ||
if prev_version in (Version31.VERSION_NAME,): | ||
collections['criteria_pack'].update_many({}, { | ||
'$set': {'point_levels': {"0.2": "Message1", "0.5": "Message2", "0.7": "Message3", "0.929": "Допущен с рекомендацией снизить оценку", "1.0": "Допущен"}}}) | ||
This comment has been minimized.
Sorry, something went wrong.
zmm
Contributor
|
||
else: | ||
raise Exception(f'Неподдерживаемый переход с версии {prev_version}') | ||
|
||
|
||
VERSIONS = { | ||
'1.0': Version10, | ||
'1.1': Version11, | ||
|
@@ -296,8 +309,9 @@ def update_database(cls, collections, prev_version): | |
'2.2': Version22, | ||
'3.0': Version30, | ||
'3.1': Version31, | ||
'4.1': Version41, | ||
} | ||
LAST_VERSION = '3.1' | ||
LAST_VERSION = '4.1' | ||
|
||
for _, ver in VERSIONS.items(): | ||
print(ver.to_dict()) |
Я бы в целом заменил весь блок h6 на вывод results.point_levels - то есть, пусть выводится в лоб сообщение соответствующего уровня баллов. Почему так - потому что задачи разные и навязывать им семантику допуска на защиту ВКР не нужно (они могут быть вообще из другой области)