diff --git a/app/services/admin_data.py b/app/services/admin_data.py index f66b98a..875c8d2 100644 --- a/app/services/admin_data.py +++ b/app/services/admin_data.py @@ -23,9 +23,12 @@ EMPLOYEE_SORTS = { _TRAINING_LABEL = "повышение квалификации" _TRAINING_KIND = re.compile(r",\s*повышение квалификации\s*(?:,|$)", re.IGNORECASE) -_TRAINING_MENTION = re.compile(r"\bповышени[еяю] квалификации\b", re.IGNORECASE) +_TRAINING_MENTION = re.compile( + r"\b(?:повышение квалификации|(?:курс|программ)[а-яё]* (?:повышения|по повышению) квалификации)\b", + re.IGNORECASE, +) _QUOTED_TEXT = re.compile(r'«[^»]*»|"[^"]*"') -_TRAINING_YEAR = re.compile(r"^(\d{4})(?!\d)|(? bool: diff --git a/app/version.py b/app/version.py index 4885a71..3029be4 100644 --- a/app/version.py +++ b/app/version.py @@ -1,3 +1,3 @@ -APP_VERSION = "1.7.1" -FRONTEND_VERSION = "1.7.1" -BACKEND_VERSION = "1.7.1" +APP_VERSION = "1.7.2" +FRONTEND_VERSION = "1.7.2" +BACKEND_VERSION = "1.7.2" diff --git a/pyproject.toml b/pyproject.toml index a83a7a8..99b3128 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "miem-workers" -version = "1.7.1" +version = "1.7.2" description = "MIEM employees parser, admin API, and web admin" requires-python = ">=3.11" dependencies = [ diff --git a/tests/test_api.py b/tests/test_api.py index 5f11000..553b046 100644 --- a/tests/test_api.py +++ b/tests/test_api.py @@ -18,7 +18,7 @@ def test_health_returns_versions(): response = TestClient(app).get("/api/health") assert response.status_code == 200 - assert response.json()["backend_version"] == "1.7.1" + assert response.json()["backend_version"] == "1.7.2" def test_api_employees_and_stats_require_admin_session(): diff --git a/tests/test_council.py b/tests/test_council.py index 8f63645..4a9b311 100644 --- a/tests/test_council.py +++ b/tests/test_council.py @@ -230,7 +230,7 @@ def test_public_page_data_minimization_and_safe_links(db_session, export): assert "javascript:" not in fragment.text and "private@example.org" not in fragment.text assert "javascript:" not in response.text and "private@example.org" not in response.text assert "/admin/employees/" not in response.text and "/admin/logout" not in response.text - assert "Backend 1.7.1 · Frontend 1.7.1" in response.text + assert "Backend 1.7.2 · Frontend 1.7.2" in response.text assert "Вход в систему" in response.text assert client.get("/admin/directory", follow_redirects=False).status_code in (302, 303, 401, 403) assert "Сотрудники не найдены" in client.get("/admin/council?q=missing").text diff --git a/tests/test_training_filter.py b/tests/test_training_filter.py index 8e0da24..0451836 100644 --- a/tests/test_training_filter.py +++ b/tests/test_training_filter.py @@ -16,10 +16,12 @@ from app.services.admin_data import list_employees_page [ ('
2024 (11 декабря), НИУ ВШЭ. Программа повышения квалификации «ИИ».
', True, True), ('Курс повышения квалификации «ДПО», 7 сентября 2024 год.
', True, True), ('Курсы повышения квалификации: «Технологии 2025 г.», 2023г.
', True, False), ('Программа повышения квалификации «Технологии 2025 г.»
', True, False), ('2025. Стажировка «Технологии».
', False, False), ('2025. Стажировка «Повышение квалификации педагогов».
', False, False), + ('2025. Стажировка в Институте повышения квалификации.
', False, False), ], ) def test_training_filter_reads_courses_from_profile_paragraphs_and_lists(