matrix-jitsi-bot 0.0.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (101) hide show
  1. matrix_jitsi_bot-0.0.1/.gitignore +4 -0
  2. matrix_jitsi_bot-0.0.1/Dockerfile +62 -0
  3. matrix_jitsi_bot-0.0.1/LICENSE +661 -0
  4. matrix_jitsi_bot-0.0.1/Makefile +82 -0
  5. matrix_jitsi_bot-0.0.1/PKG-INFO +39 -0
  6. matrix_jitsi_bot-0.0.1/README.md +9 -0
  7. matrix_jitsi_bot-0.0.1/docs/.gitignore +2 -0
  8. matrix_jitsi_bot-0.0.1/docs/_static/custom.css +32 -0
  9. matrix_jitsi_bot-0.0.1/docs/conf.py +198 -0
  10. matrix_jitsi_bot-0.0.1/docs/development/index.rst +137 -0
  11. matrix_jitsi_bot-0.0.1/docs/hosting-a-bot/docker-compose.rst +56 -0
  12. matrix_jitsi_bot-0.0.1/docs/hosting-a-bot/docker.rst +64 -0
  13. matrix_jitsi_bot-0.0.1/docs/hosting-a-bot/from-source.rst +21 -0
  14. matrix_jitsi_bot-0.0.1/docs/hosting-a-bot/index.rst +87 -0
  15. matrix_jitsi_bot-0.0.1/docs/hosting-a-bot/python-package.rst +47 -0
  16. matrix_jitsi_bot-0.0.1/docs/index.rst +108 -0
  17. matrix_jitsi_bot-0.0.1/docs/maintenance/index.rst +51 -0
  18. matrix_jitsi_bot-0.0.1/docs/reference/api/matrix_jitsi_bot.bot.rst +9 -0
  19. matrix_jitsi_bot-0.0.1/docs/reference/api/matrix_jitsi_bot.cli.rst +9 -0
  20. matrix_jitsi_bot-0.0.1/docs/reference/api/matrix_jitsi_bot.db.apps.rst +9 -0
  21. matrix_jitsi_bot-0.0.1/docs/reference/api/matrix_jitsi_bot.db.models.account.rst +9 -0
  22. matrix_jitsi_bot-0.0.1/docs/reference/api/matrix_jitsi_bot.db.models.conversation.rst +9 -0
  23. matrix_jitsi_bot-0.0.1/docs/reference/api/matrix_jitsi_bot.db.models.jitsi.rst +9 -0
  24. matrix_jitsi_bot-0.0.1/docs/reference/api/matrix_jitsi_bot.db.models.room.rst +9 -0
  25. matrix_jitsi_bot-0.0.1/docs/reference/api/matrix_jitsi_bot.db.models.rst +21 -0
  26. matrix_jitsi_bot-0.0.1/docs/reference/api/matrix_jitsi_bot.db.rst +26 -0
  27. matrix_jitsi_bot-0.0.1/docs/reference/api/matrix_jitsi_bot.django.rst +9 -0
  28. matrix_jitsi_bot-0.0.1/docs/reference/api/matrix_jitsi_bot.interactions.all.rst +9 -0
  29. matrix_jitsi_bot-0.0.1/docs/reference/api/matrix_jitsi_bot.interactions.base.rst +9 -0
  30. matrix_jitsi_bot-0.0.1/docs/reference/api/matrix_jitsi_bot.interactions.greeting.rst +9 -0
  31. matrix_jitsi_bot-0.0.1/docs/reference/api/matrix_jitsi_bot.interactions.help.rst +9 -0
  32. matrix_jitsi_bot-0.0.1/docs/reference/api/matrix_jitsi_bot.interactions.room.rst +9 -0
  33. matrix_jitsi_bot-0.0.1/docs/reference/api/matrix_jitsi_bot.interactions.rst +22 -0
  34. matrix_jitsi_bot-0.0.1/docs/reference/api/matrix_jitsi_bot.jitsi.rst +9 -0
  35. matrix_jitsi_bot-0.0.1/docs/reference/api/matrix_jitsi_bot.matrix_login.rst +9 -0
  36. matrix_jitsi_bot-0.0.1/docs/reference/api/matrix_jitsi_bot.rst +33 -0
  37. matrix_jitsi_bot-0.0.1/docs/reference/api/matrix_jitsi_bot.settings.rst +9 -0
  38. matrix_jitsi_bot-0.0.1/docs/reference/api/matrix_jitsi_bot.version.rst +9 -0
  39. matrix_jitsi_bot-0.0.1/docs/reference/api/modules.rst +7 -0
  40. matrix_jitsi_bot-0.0.1/docs/reference/changelog.rst +23 -0
  41. matrix_jitsi_bot-0.0.1/docs/reference/cli.rst +35 -0
  42. matrix_jitsi_bot-0.0.1/docs/reference/index.rst +10 -0
  43. matrix_jitsi_bot-0.0.1/docs/using-a-bot/index.rst +147 -0
  44. matrix_jitsi_bot-0.0.1/docs/using-a-bot/track-a-conference.rst +151 -0
  45. matrix_jitsi_bot-0.0.1/docs/using-a-bot/try-it-out.rst +54 -0
  46. matrix_jitsi_bot-0.0.1/matrix_jitsi_bot/__init__.py +10 -0
  47. matrix_jitsi_bot-0.0.1/matrix_jitsi_bot/_version.py +24 -0
  48. matrix_jitsi_bot-0.0.1/matrix_jitsi_bot/bot.py +888 -0
  49. matrix_jitsi_bot-0.0.1/matrix_jitsi_bot/cli.py +524 -0
  50. matrix_jitsi_bot-0.0.1/matrix_jitsi_bot/db/__init__.py +1 -0
  51. matrix_jitsi_bot-0.0.1/matrix_jitsi_bot/db/apps.py +7 -0
  52. matrix_jitsi_bot-0.0.1/matrix_jitsi_bot/db/migrations/0001_initial.py +47 -0
  53. matrix_jitsi_bot-0.0.1/matrix_jitsi_bot/db/migrations/0002_room.py +43 -0
  54. matrix_jitsi_bot-0.0.1/matrix_jitsi_bot/db/migrations/0003_conversation_message_commandreply_roommember.py +175 -0
  55. matrix_jitsi_bot-0.0.1/matrix_jitsi_bot/db/migrations/0004_alter_message_event_id_and_more.py +37 -0
  56. matrix_jitsi_bot-0.0.1/matrix_jitsi_bot/db/migrations/0005_commandreply_sent.py +18 -0
  57. matrix_jitsi_bot-0.0.1/matrix_jitsi_bot/db/migrations/0006_room_paused_remove_room_language.py +36 -0
  58. matrix_jitsi_bot-0.0.1/matrix_jitsi_bot/db/migrations/0007_jitsiroom_trackedjitsiroom.py +113 -0
  59. matrix_jitsi_bot-0.0.1/matrix_jitsi_bot/db/migrations/0008_trackedjitsiroom_track_flags.py +56 -0
  60. matrix_jitsi_bot-0.0.1/matrix_jitsi_bot/db/migrations/0009_commandreply_reaction.py +23 -0
  61. matrix_jitsi_bot-0.0.1/matrix_jitsi_bot/db/migrations/0010_room_account.py +29 -0
  62. matrix_jitsi_bot-0.0.1/matrix_jitsi_bot/db/migrations/0011_room_last_help_at.py +21 -0
  63. matrix_jitsi_bot-0.0.1/matrix_jitsi_bot/db/migrations/0012_remove_room_last_help_at.py +16 -0
  64. matrix_jitsi_bot-0.0.1/matrix_jitsi_bot/db/migrations/0013_room_name.py +22 -0
  65. matrix_jitsi_bot-0.0.1/matrix_jitsi_bot/db/migrations/__init__.py +0 -0
  66. matrix_jitsi_bot-0.0.1/matrix_jitsi_bot/db/models/__init__.py +24 -0
  67. matrix_jitsi_bot-0.0.1/matrix_jitsi_bot/db/models/account.py +28 -0
  68. matrix_jitsi_bot-0.0.1/matrix_jitsi_bot/db/models/conversation.py +175 -0
  69. matrix_jitsi_bot-0.0.1/matrix_jitsi_bot/db/models/jitsi.py +741 -0
  70. matrix_jitsi_bot-0.0.1/matrix_jitsi_bot/db/models/room.py +346 -0
  71. matrix_jitsi_bot-0.0.1/matrix_jitsi_bot/django.py +107 -0
  72. matrix_jitsi_bot-0.0.1/matrix_jitsi_bot/interactions/__init__.py +33 -0
  73. matrix_jitsi_bot-0.0.1/matrix_jitsi_bot/interactions/all.py +53 -0
  74. matrix_jitsi_bot-0.0.1/matrix_jitsi_bot/interactions/base.py +579 -0
  75. matrix_jitsi_bot-0.0.1/matrix_jitsi_bot/interactions/greeting.py +24 -0
  76. matrix_jitsi_bot-0.0.1/matrix_jitsi_bot/interactions/help.py +114 -0
  77. matrix_jitsi_bot-0.0.1/matrix_jitsi_bot/interactions/room.py +100 -0
  78. matrix_jitsi_bot-0.0.1/matrix_jitsi_bot/jitsi.py +155 -0
  79. matrix_jitsi_bot-0.0.1/matrix_jitsi_bot/matrix_login.py +276 -0
  80. matrix_jitsi_bot-0.0.1/matrix_jitsi_bot/settings.py +46 -0
  81. matrix_jitsi_bot-0.0.1/matrix_jitsi_bot/tests/__init__.py +0 -0
  82. matrix_jitsi_bot-0.0.1/matrix_jitsi_bot/tests/base/__init__.py +0 -0
  83. matrix_jitsi_bot-0.0.1/matrix_jitsi_bot/tests/base/test_config.py +124 -0
  84. matrix_jitsi_bot-0.0.1/matrix_jitsi_bot/tests/base/test_mention.py +163 -0
  85. matrix_jitsi_bot-0.0.1/matrix_jitsi_bot/tests/base/test_message_reaction.py +115 -0
  86. matrix_jitsi_bot-0.0.1/matrix_jitsi_bot/tests/conftest.py +106 -0
  87. matrix_jitsi_bot-0.0.1/matrix_jitsi_bot/tests/test_bot.py +1119 -0
  88. matrix_jitsi_bot-0.0.1/matrix_jitsi_bot/tests/test_cli.py +539 -0
  89. matrix_jitsi_bot-0.0.1/matrix_jitsi_bot/tests/test_docstrings.py +137 -0
  90. matrix_jitsi_bot-0.0.1/matrix_jitsi_bot/tests/test_greeting.py +26 -0
  91. matrix_jitsi_bot-0.0.1/matrix_jitsi_bot/tests/test_help.py +98 -0
  92. matrix_jitsi_bot-0.0.1/matrix_jitsi_bot/tests/test_integration.py +268 -0
  93. matrix_jitsi_bot-0.0.1/matrix_jitsi_bot/tests/test_jitsi.py +381 -0
  94. matrix_jitsi_bot-0.0.1/matrix_jitsi_bot/tests/test_jitsi_duplicate_ended_bug.py +67 -0
  95. matrix_jitsi_bot-0.0.1/matrix_jitsi_bot/tests/test_jitsi_interaction.py +448 -0
  96. matrix_jitsi_bot-0.0.1/matrix_jitsi_bot/tests/test_matrix_login.py +18 -0
  97. matrix_jitsi_bot-0.0.1/matrix_jitsi_bot/tests/test_models.py +169 -0
  98. matrix_jitsi_bot-0.0.1/matrix_jitsi_bot/tests/test_room_interaction.py +105 -0
  99. matrix_jitsi_bot-0.0.1/matrix_jitsi_bot/tests/test_room_name.py +250 -0
  100. matrix_jitsi_bot-0.0.1/matrix_jitsi_bot/version.py +18 -0
  101. matrix_jitsi_bot-0.0.1/pyproject.toml +254 -0
@@ -0,0 +1,4 @@
1
+ __pycache__
2
+ /*.sqlite3*
3
+ /.prompts
4
+ /*.crypto-store
@@ -0,0 +1,62 @@
1
+ # syntax=docker/dockerfile:1
2
+ FROM ghcr.io/astral-sh/uv:python3.12-alpine AS builder
3
+
4
+ ENV UV_COMPILE_BYTECODE=1 \
5
+ UV_LINK_MODE=copy \
6
+ PYTHONUNBUFFERED=1 \
7
+ PYTHONDONTWRITEBYTECODE=1
8
+
9
+ WORKDIR /app
10
+
11
+ # git: hatch-vcs derives the package version from git history at build time.
12
+ # The rest is build tooling for dependencies without musllinux wheels (e.g.
13
+ # Rust-based packages pulled in by nio-bot/niquests) that would otherwise
14
+ # need to be compiled from source on Alpine.
15
+ RUN apk add --no-cache \
16
+ git \
17
+ build-base \
18
+ cargo \
19
+ rust \
20
+ libffi-dev \
21
+ jpeg-dev \
22
+ zlib-dev \
23
+ openssl-dev \
24
+ file-dev
25
+
26
+ # Install dependencies first, cached separately from the application code.
27
+ RUN --mount=type=cache,target=/root/.cache/uv \
28
+ --mount=type=bind,source=uv.lock,target=uv.lock \
29
+ --mount=type=bind,source=pyproject.toml,target=pyproject.toml \
30
+ uv sync --locked --no-install-project --no-dev
31
+
32
+ COPY . /app
33
+ RUN --mount=type=cache,target=/root/.cache/uv \
34
+ uv sync --locked --no-dev
35
+
36
+
37
+ FROM python:3.12-alpine
38
+
39
+ ENV PYTHONUNBUFFERED=1 \
40
+ PYTHONDONTWRITEBYTECODE=1 \
41
+ PATH="/app/.venv/bin:$PATH" \
42
+ MJB_DB=/data/matrix-jitsi-bot.sqlite3
43
+
44
+ # file provides libmagic, which python-magic (a nio-bot dependency) loads at
45
+ # runtime to detect attachment mime types. bash/bash-completion are for the
46
+ # CLI's tab completion, for anyone who `docker exec`s in with bash.
47
+ RUN apk add --no-cache file bash bash-completion \
48
+ && mkdir -p /data
49
+
50
+ WORKDIR /app
51
+ COPY --from=builder /app /app
52
+ COPY --chmod=755 docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh
53
+ # _TYPER_COMPLETE_TEST_DISABLE_SHELL_DETECTION forces --show-completion to
54
+ # take an explicit shell name instead of auto-detecting one from the
55
+ # calling process, which is unreliable in a minimal build container.
56
+ RUN _TYPER_COMPLETE_TEST_DISABLE_SHELL_DETECTION=1 \
57
+ matrix-jitsi-bot --show-completion bash > /etc/bash_completion.d/matrix-jitsi-bot
58
+
59
+ VOLUME ["/data"]
60
+
61
+ ENTRYPOINT ["docker-entrypoint.sh"]
62
+ CMD ["run"]