chore: add coverage reporting and improve documentation
All checks were successful
CI / lint-and-test (push) Successful in 19s

- Added `pytest-cov` as a development dependency for coverage reporting.
- Configured pytest to include coverage options, ensuring code coverage is reported and enforced.
- Updated the README to include contributing guidelines and logging policies, enhancing clarity for developers.
- Added a new section in the configuration documentation emphasizing the necessity of serving the application over HTTPS in production for security purposes.
- Introduced a new `.coverage` file to track test coverage metrics.
This commit is contained in:
2026-02-20 16:18:59 +03:00
parent 86f6d66865
commit 0ecbda67f9
11 changed files with 101 additions and 11 deletions

View File

@@ -16,29 +16,48 @@ MESSAGES: dict[str, dict[str, str]] = {
"calendar_link.private_only": "The /calendar_link command is only available in private chat.",
"calendar_link.access_denied": "Access denied.",
"calendar_link.success": "Your personal calendar URL:\n{url}",
"calendar_link.help_hint": "Subscribe to this URL in Google Calendar, Apple Calendar, or Outlook to see only your duties.",
"calendar_link.help_hint": (
"Subscribe to this URL in Google Calendar, Apple Calendar, or Outlook to "
"see only your duties."
),
"calendar_link.error": "Could not generate link. Please try again later.",
"help.import_schedule": "/import_duty_schedule — Import duty schedule (JSON)",
"errors.generic": "An error occurred. Please try again later.",
"pin_duty.group_only": "The /pin_duty command works only in groups.",
"pin_duty.no_message": "There is no duty message in this chat yet. Add the bot to the group — it will create one automatically.",
"pin_duty.pinned": "Duty message pinned.",
"pin_duty.failed": "Could not pin. Make sure the bot is an administrator with «Pin messages» permission.",
"pin_duty.could_not_pin_make_admin": "Duty message was sent but could not be pinned. Make the bot an administrator with «Pin messages» permission, then send /pin_duty in the chat — the current message will be pinned.",
"pin_duty.failed": (
"Could not pin. Make sure the bot is an administrator with "
"«Pin messages» permission."
),
"pin_duty.could_not_pin_make_admin": (
"Duty message was sent but could not be pinned. Make the bot an "
"administrator with «Pin messages» permission, then send /pin_duty in the "
"chat — the current message will be pinned."
),
"duty.no_duty": "No duty at the moment.",
"duty.label": "Duty:",
"import.admin_only": "Access for administrators only.",
"import.handover_format": "Enter handover time as HH:MM and timezone, e.g. 09:00 Europe/Moscow or 06:00 UTC.",
"import.handover_format": (
"Enter handover time as HH:MM and timezone, e.g. 09:00 Europe/Moscow or "
"06:00 UTC."
),
"import.parse_time_error": "Could not parse time. Enter e.g.: 09:00 Europe/Moscow",
"import.send_json": "Send the duty-schedule file (JSON).",
"import.need_json": "File must have .json extension.",
"import.parse_error": "File parse error: {error}",
"import.import_error": "Import error: {error}",
"import.done": "Import done: {users} users, {duties} duties{unavailable}{vacation} ({total} events total).",
"import.done": (
"Import done: {users} users, {duties} duties{unavailable}{vacation} "
"({total} events total)."
),
"import.done_unavailable": ", {count} unavailable",
"import.done_vacation": ", {count} vacation",
"api.open_from_telegram": "Open the calendar from Telegram",
"api.auth_bad_signature": "Invalid signature. Ensure BOT_TOKEN on the server matches the bot from which the calendar was opened (same bot as in the menu).",
"api.auth_bad_signature": (
"Invalid signature. Ensure BOT_TOKEN on the server matches the bot from "
"which the calendar was opened (same bot as in the menu)."
),
"api.auth_invalid": "Invalid auth data",
"api.access_denied": "Access denied",
"dates.bad_format": "Parameters from and to must be in YYYY-MM-DD format",