feat: ж/д слой + cant_swim в скоринг + профили вне модели

Определение специфических рекомендаций (матрица профилей §8):

1. Ж/д слой (закрыт мёртвый railway ×2.5 у РАС):
   - /api/v1/water/{case_id} отдаёт railway=rail как LineString
     (без service/industrial/military веток), кэш общий v2;
   - railway_warning «перекрыть/проверить немедленно» по профилям;
   - SearchMap: Polyline слой ж/д (тёмно-красный), счётчики 💧/🚂.

2. cant_swim → профиль не_умеет_плавать (water ×3.0, без изменения
   радиуса, critical_warning «обследовать водоёмы НЕМЕДЛЕННО»):
   - раньше чекбокс влиял только на текст, в скоринге был пробел;
   - derive в analyze._derive_profiles — работает и для closed_cases.

3. unmodeled_profiles: ДЦП/слабое зрение/слух — честная пометка
   «вне поведенческой модели» с пояснением (vector_tasks B12:
   профили без аналога не выдавать за учтённые); блок на фронте
   в карточке здоровья.

Площадь воды: сферический эксцесс, проверен на квадрате 53° (744017 м²
vs 743272 точного). Тесты: 202 passed (новый test_cant_swim_profile).
This commit is contained in:
2026-09-09 13:12:55 +03:00
parent 98e8e58023
commit f20080305d
2069 changed files with 803865 additions and 97 deletions
@@ -0,0 +1,143 @@
"""
pygments.styles.night_owl
~~~~~~~~~~~~~~~~~~~~~~~~~
Pygments version of the `Night Owl` theme by Sarah Drasner.
Based on https://github.com/sdras/night-owl-vscode-theme.
:copyright: Copyright 2006-present by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
from pygments.style import Style
from pygments.token import Comment, Error, Generic, Keyword, Name, Number, \
Operator, Punctuation, String, Text, Token, Whitespace
__all__ = ['NightOwlStyle']
# Night Owl color palette
background = '#011627'
foreground = '#d6deeb'
selection = '#1d3b53'
cyan = '#7fdbca'
blue = '#82aaff'
purple = '#c792ea'
green = '#addb67'
yellow = '#ecc48d'
orange = '#f78c6c'
red = '#ef5350'
comment = '#637777'
pink = '#ff869a'
class NightOwlStyle(Style):
"""
Night Owl theme by Sarah Drasner.
A theme for the night owls amongst us. Fine-tuned for those of us who
like to code late into the night. Color choices have also taken into
consideration what is accessible to those with color blindness and in
low-light circumstances.
Based on the VS Code Night Owl theme:
https://github.com/sdras/night-owl-vscode-theme
.. versionadded:: 2.21
"""
name = 'night-owl'
background_color = background
highlight_color = selection
line_number_color = comment
line_number_background_color = background
line_number_special_color = foreground
line_number_special_background_color = selection
styles = {
Token: foreground,
Whitespace: foreground,
Text: foreground,
# Comments
Comment: 'italic ' + comment,
Comment.Multiline: 'italic ' + comment,
Comment.Preproc: cyan,
Comment.Single: 'italic ' + comment,
Comment.Special: 'italic ' + comment,
# Keywords
Keyword: 'italic ' + purple,
Keyword.Constant: 'italic ' + purple,
Keyword.Declaration: 'italic ' + purple,
Keyword.Namespace: 'italic ' + purple,
Keyword.Reserved: 'italic ' + purple,
Keyword.Type: cyan,
# Names
Name: foreground,
Name.Attribute: yellow,
Name.Builtin: cyan,
Name.Builtin.Pseudo: 'italic ' + blue,
Name.Class: yellow,
Name.Constant: orange,
Name.Decorator: blue,
Name.Entity: orange,
Name.Exception: red,
Name.Function: blue,
Name.Function.Magic: cyan,
Name.Label: foreground,
Name.Namespace: foreground,
Name.Other: foreground,
Name.Property: cyan,
Name.Tag: pink,
Name.Variable: foreground,
Name.Variable.Class: yellow,
Name.Variable.Global: orange,
Name.Variable.Instance: yellow,
# Literals
Number: orange,
Number.Float: orange,
Number.Hex: orange,
Number.Integer: orange,
Number.Oct: orange,
# Strings
String: green,
String.Affix: cyan,
String.Char: green,
String.Doc: 'italic ' + comment,
String.Escape: yellow,
String.Heredoc: green,
String.Interpol: cyan,
String.Other: green,
String.Regex: cyan,
String.Symbol: cyan,
# Operators
Operator: cyan,
Operator.Word: 'italic ' + purple,
# Punctuation
Punctuation: foreground,
# Errors
Error: red,
# Generic tokens (used by diffs, prompts, etc.)
Generic: foreground,
Generic.Deleted: red,
Generic.Emph: 'italic',
Generic.Error: red,
Generic.Heading: 'bold ' + blue,
Generic.Inserted: green,
Generic.Output: comment,
Generic.Prompt: 'bold ' + cyan,
Generic.Strong: 'bold',
Generic.EmphStrong: 'bold italic',
Generic.Subheading: 'bold ' + cyan,
Generic.Traceback: red,
}