Skip to content

Checks abbreviations press and reports#759

Open
LapshinAE0 wants to merge 41 commits intodevfrom
555_check_abbreviations
Open

Checks abbreviations press and reports#759
LapshinAE0 wants to merge 41 commits intodevfrom
555_check_abbreviations

Conversation

@LapshinAE0
Copy link
Copy Markdown
Collaborator

No description provided.

@github-actions github-actions Bot added the has conflicts if new merge has conflicts label Nov 21, 2025
@github-actions github-actions Bot removed the has conflicts if new merge has conflicts label Dec 4, 2025
@HadronCollider HadronCollider changed the base branch from master to dev December 7, 2025 11:22
Copy link
Copy Markdown
Collaborator

@HadronCollider HadronCollider left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Подтяните изменения из dev
  • Отформатируйте код по pep8

Comment thread app/main/checks/check_abbreviations.py Outdated
@@ -0,0 +1,80 @@
import re
from pymorphy2 import MorphAnalyzer
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Подтяните изменения из dev и перейдите на pymorphy3

Comment on lines +6 to +9
class PresAbbreviationsCheck(BasePresCriterion):
label = "Проверка расшифровки аббревиатур в презентации"
description = "Все аббревиатуры должны быть расшифрованы при первом использовании"
id = 'abbreviations_check_pres'
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Придерживайтесь шаблона именований

  • для классов Pres<>Check
  • для id pres_<>_check
  • для отчетов - аналогично, но report*

Comment thread app/main/checks/check_abbreviations.py Outdated
Comment on lines +48 to +50
filtered_abbr = [abbr for abbr in abbreviations if abbr not in common_abbr and morph.parse(abbr.lower())[0].score != 0]

return list(set(filtered_abbr))
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Можно сразу формировать set в конструкции вида {i for i in array}

Comment thread app/main/checks/report_checks/abbreviations_check.py
@github-actions github-actions Bot added the has conflicts if new merge has conflicts label Feb 15, 2026
@github-actions github-actions Bot removed the has conflicts if new merge has conflicts label Feb 15, 2026
Copy link
Copy Markdown
Collaborator

@HadronCollider HadronCollider left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Вероятно из-за индексации неверно указывается страница для презентаций

  • Image

Срабатывает на "календарный план" (возможно и ещё что-то, проверьте на ВКР), на гигабайты (ГБ) и содержимое списка литературы (а там сокращений полно и их не нужно расшифровывать)

  • Image

@github-actions github-actions Bot added the has conflicts if new merge has conflicts label Mar 16, 2026
@github-actions github-actions Bot removed the has conflicts if new merge has conflicts label Mar 27, 2026
@github-actions github-actions Bot added the has conflicts if new merge has conflicts label Apr 11, 2026
@github-actions github-actions Bot removed the has conflicts if new merge has conflicts label Apr 14, 2026
Copy link
Copy Markdown
Collaborator

@HadronCollider HadronCollider left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Внёс небольшие изменения - пометил критерий как warning (= не влияет на итоговый балл), поскольку работа нестабильна
  • доработайте по комментарию ниже (вынести common_abbr в конфиг/переменную модуля) и можно мержить PR

Comment thread app/main/checks/check_abbreviations.py Outdated
Comment on lines +73 to +94
common_abbr = {
'СССР', 'РФ', 'США', 'ВКР', 'ИТ', 'ПО', 'ООО', 'ЗАО', 'ОАО', 'HTML', 'CSS',
'JS', 'ЛЭТИ', 'МОЕВМ', 'ЭВМ', 'ГОСТ', 'DVD',
'ЦПУ',
'SSD', 'PC', 'HDD',
'AX', 'BX', 'CX', 'DX', 'SI', 'DI', 'BP', 'SP',
'AH', 'AL', 'BH', 'BL', 'CH', 'CL', 'DH', 'DL',
'CS', 'DS', 'ES', 'SS', 'FS', 'GS',
'IP', 'EIP', 'RIP', 'URL',
'CF', 'PF', 'AF', 'ZF', 'SF', 'TF', 'IF', 'DF', 'OF',
'EAX', 'EBX', 'ECX', 'EDX', 'ESI', 'EDI', 'EBP', 'ESP',
'RAX', 'RBX', 'RCX', 'RDX', 'RSI', 'RDI', 'RBP', 'RSP',
'DOS', 'OS', 'BIOS', 'UEFI', 'MBR', 'GPT',
'ASCII', 'UTF', 'UNICODE', 'ANSI',
'ЭВМ', 'МОЭВМ',
'CPU', 'GPU', 'APU', 'RAM', 'ROM', 'PROM', 'EPROM', 'EEPROM',
'USB', 'SATA', 'PCI', 'PCIe', 'AGP', 'ISA', 'VGA', 'HDMI', 'DP',
'LAN', 'WAN', 'WLAN', 'VPN', 'ISP', 'DNS', 'DHCP', 'TCP', 'UDP', 'IP',
'HTTP', 'HTTPS', 'FTP', 'SSH', 'SSL', 'TLS',
'API', 'GUI', 'CLI', 'IDE', 'SDK', 'SQL', 'NoSQL', 'XML', 'JSON', 'YAML',
'MAC', 'IBM', 'ГОСТ', 'ООП', 'ЛР', 'КР', 'ОТЧЕТ', 'ПЛАН', 'СЛОВА'
}
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Вынесите список аббревиатур в отдельную глобальную переменную модуля, которую заполняете из json-конфига (в идеале в будущем - из БД, чтобы можно было динамически менять его вместо хардкода, но это уже другая задача)
  • Дополните упомянутыми ранее аббревиатурами и новыми
    • Image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Критерий для презентаций и отчетов - нерасшифрованные аббревиатуры

3 participants