slidge 0.2.1__tar.gz → 0.2.3.post1__tar.gz
Sign up to get free protection for your applications and to get access to all the features.
- slidge-0.2.3.post1/.gitignore +44 -0
- slidge-0.2.3.post1/.pre-commit-config.yaml +47 -0
- slidge-0.2.3.post1/.woodpecker/container-cache.yml +71 -0
- slidge-0.2.3.post1/.woodpecker/container-ci.yaml +29 -0
- slidge-0.2.3.post1/.woodpecker/container.yml +49 -0
- slidge-0.2.3.post1/.woodpecker/docs.yaml +24 -0
- slidge-0.2.3.post1/.woodpecker/package.yaml +51 -0
- slidge-0.2.3.post1/.woodpecker/test.yaml +64 -0
- slidge-0.2.3.post1/Dockerfile +94 -0
- slidge-0.2.3.post1/PKG-INFO +793 -0
- slidge-0.2.3.post1/README.md +104 -0
- slidge-0.2.3.post1/commitlint.config.js +2 -0
- slidge-0.2.3.post1/dev/assets/5x5.png +0 -0
- slidge-0.2.3.post1/dev/assets/slidge-color-small.png +0 -0
- slidge-0.2.3.post1/dev/assets/slidge-color.png +0 -0
- slidge-0.2.3.post1/dev/assets/slidge-mono-black.png +0 -0
- slidge-0.2.3.post1/dev/assets/slidge-mono-white.png +0 -0
- slidge-0.2.3.post1/dev/assets/slidge.svg +136 -0
- slidge-0.2.3.post1/dev/confs/movim.env +14 -0
- slidge-0.2.3.post1/dev/confs/nginx.conf +67 -0
- slidge-0.2.3.post1/dev/confs/slidge-example.ini +45 -0
- slidge-0.2.3.post1/dev/prettify_tests.py +87 -0
- slidge-0.2.3.post1/doap.xml +506 -0
- slidge-0.2.3.post1/docker-compose.yml +69 -0
- slidge-0.2.3.post1/docs/Makefile +20 -0
- slidge-0.2.3.post1/docs/source/admin/attachments.rst +152 -0
- slidge-0.2.3.post1/docs/source/admin/component.rst +46 -0
- slidge-0.2.3.post1/docs/source/admin/config/index.rst +35 -0
- slidge-0.2.3.post1/docs/source/admin/daemon.rst +134 -0
- slidge-0.2.3.post1/docs/source/admin/examples/ejabberd.yaml +51 -0
- slidge-0.2.3.post1/docs/source/admin/examples/index.rst +35 -0
- slidge-0.2.3.post1/docs/source/admin/examples/prosody.cfg.lua +41 -0
- slidge-0.2.3.post1/docs/source/admin/index.rst +23 -0
- slidge-0.2.3.post1/docs/source/admin/install.rst +47 -0
- slidge-0.2.3.post1/docs/source/admin/note.rst +12 -0
- slidge-0.2.3.post1/docs/source/admin/privilege.rst +89 -0
- slidge-0.2.3.post1/docs/source/codeberg.svg +17 -0
- slidge-0.2.3.post1/docs/source/conf.py +122 -0
- slidge-0.2.3.post1/docs/source/dev/contributing.rst +62 -0
- slidge-0.2.3.post1/docs/source/dev/design.rst +58 -0
- slidge-0.2.3.post1/docs/source/dev/howto.rst +4 -0
- slidge-0.2.3.post1/docs/source/dev/index.rst +13 -0
- slidge-0.2.3.post1/docs/source/dev/tutorial.rst +138 -0
- slidge-0.2.3.post1/docs/source/glossary.rst +68 -0
- slidge-0.2.3.post1/docs/source/index.rst +35 -0
- slidge-0.2.3.post1/docs/source/user/commands.rst +41 -0
- slidge-0.2.3.post1/docs/source/user/contacts.rst +18 -0
- slidge-0.2.3.post1/docs/source/user/foxyproxy.png +0 -0
- slidge-0.2.3.post1/docs/source/user/gajim.png +0 -0
- slidge-0.2.3.post1/docs/source/user/index.rst +34 -0
- slidge-0.2.3.post1/docs/source/user/low_profile.rst +20 -0
- slidge-0.2.3.post1/docs/source/user/movim1.png +0 -0
- slidge-0.2.3.post1/docs/source/user/movim2.png +0 -0
- slidge-0.2.3.post1/docs/source/user/note.rst +13 -0
- slidge-0.2.3.post1/docs/source/user/register.rst +47 -0
- slidge-0.2.3.post1/pyproject.toml +117 -0
- slidge-0.2.3.post1/setup.cfg +4 -0
- {slidge-0.2.1 → slidge-0.2.3.post1}/slidge/__version__.py +1 -1
- {slidge-0.2.1 → slidge-0.2.3.post1}/slidge/command/base.py +1 -1
- {slidge-0.2.1 → slidge-0.2.3.post1}/slidge/command/chat_command.py +5 -2
- {slidge-0.2.1 → slidge-0.2.3.post1}/slidge/command/register.py +2 -4
- {slidge-0.2.1 → slidge-0.2.3.post1}/slidge/command/user.py +1 -1
- {slidge-0.2.1 → slidge-0.2.3.post1}/slidge/contact/contact.py +1 -1
- {slidge-0.2.1 → slidge-0.2.3.post1}/slidge/core/dispatcher/muc/admin.py +3 -4
- {slidge-0.2.1 → slidge-0.2.3.post1}/slidge/core/dispatcher/presence.py +3 -3
- {slidge-0.2.1 → slidge-0.2.3.post1}/slidge/core/gateway.py +3 -0
- {slidge-0.2.1 → slidge-0.2.3.post1}/slidge/core/mixins/attachment.py +13 -2
- {slidge-0.2.1 → slidge-0.2.3.post1}/slidge/core/mixins/avatar.py +6 -0
- {slidge-0.2.1 → slidge-0.2.3.post1}/slidge/core/mixins/message.py +13 -2
- {slidge-0.2.1 → slidge-0.2.3.post1}/slidge/db/models.py +4 -0
- {slidge-0.2.1 → slidge-0.2.3.post1}/slidge/db/store.py +9 -3
- {slidge-0.2.1 → slidge-0.2.3.post1}/slidge/group/archive.py +3 -3
- {slidge-0.2.1 → slidge-0.2.3.post1}/slidge/group/participant.py +11 -5
- {slidge-0.2.1 → slidge-0.2.3.post1}/slidge/main.py +1 -1
- {slidge-0.2.1 → slidge-0.2.3.post1}/slidge/slixfix/__init__.py +5 -16
- {slidge-0.2.1 → slidge-0.2.3.post1}/slidge/slixfix/xep_0153/__init__.py +0 -1
- {slidge-0.2.1 → slidge-0.2.3.post1}/slidge/slixfix/xep_0153/vcard_avatar.py +1 -10
- {slidge-0.2.1 → slidge-0.2.3.post1}/slidge/util/test.py +9 -2
- slidge-0.2.3.post1/slidge.egg-info/PKG-INFO +793 -0
- slidge-0.2.3.post1/slidge.egg-info/SOURCES.txt +204 -0
- slidge-0.2.3.post1/slidge.egg-info/dependency_links.txt +1 -0
- slidge-0.2.3.post1/slidge.egg-info/entry_points.txt +2 -0
- slidge-0.2.3.post1/slidge.egg-info/requires.txt +11 -0
- slidge-0.2.3.post1/slidge.egg-info/top_level.txt +1 -0
- slidge-0.2.3.post1/superduper/__init__.py +7 -0
- slidge-0.2.3.post1/superduper/contact.py +32 -0
- slidge-0.2.3.post1/superduper/gateway.py +73 -0
- slidge-0.2.3.post1/superduper/group.py +64 -0
- slidge-0.2.3.post1/superduper/legacy_client.py +193 -0
- slidge-0.2.3.post1/superduper/session.py +47 -0
- slidge-0.2.3.post1/superduper/util.py +17 -0
- slidge-0.2.3.post1/tests/conftest.py +79 -0
- slidge-0.2.3.post1/tests/test_adhoc/test_access.py +273 -0
- slidge-0.2.3.post1/tests/test_adhoc/test_confirmation.py +301 -0
- slidge-0.2.3.post1/tests/test_adhoc/test_form.py +548 -0
- slidge-0.2.3.post1/tests/test_adhoc/test_reported.py +117 -0
- slidge-0.2.3.post1/tests/test_attachment.py +453 -0
- slidge-0.2.3.post1/tests/test_avatar.py +459 -0
- slidge-0.2.3.post1/tests/test_backfill.py +117 -0
- slidge-0.2.3.post1/tests/test_chat_commands.py +259 -0
- slidge-0.2.3.post1/tests/test_config.py +274 -0
- slidge-0.2.3.post1/tests/test_db/test_store.py +103 -0
- slidge-0.2.3.post1/tests/test_db/test_user.py +32 -0
- slidge-0.2.3.post1/tests/test_feature_restriction.py +62 -0
- slidge-0.2.3.post1/tests/test_mds.py +205 -0
- slidge-0.2.3.post1/tests/test_muc.py +4116 -0
- slidge-0.2.3.post1/tests/test_name_in_constructor.py +66 -0
- slidge-0.2.3.post1/tests/test_resourceprep.py +34 -0
- slidge-0.2.3.post1/tests/test_session.py +645 -0
- slidge-0.2.3.post1/tests/test_session_2.py +241 -0
- slidge-0.2.3.post1/tests/test_set_name_before_fill.py +60 -0
- slidge-0.2.3.post1/tests/test_shakespeare.py +2138 -0
- slidge-0.2.3.post1/tests/test_stanza_link_preview.py +101 -0
- slidge-0.2.3.post1/tests/test_util.py +258 -0
- slidge-0.2.3.post1/tests/test_vcard.py +243 -0
- slidge-0.2.3.post1/uv.lock +1646 -0
- slidge-0.2.1/PKG-INFO +0 -116
- slidge-0.2.1/README.md +0 -84
- slidge-0.2.1/pyproject.toml +0 -100
- slidge-0.2.1/slidge/slixfix/xep_0153/stanza.py +0 -25
- slidge-0.2.1/slidge/slixfix/xep_0264/__init__.py +0 -5
- slidge-0.2.1/slidge/slixfix/xep_0264/stanza.py +0 -36
- slidge-0.2.1/slidge/slixfix/xep_0264/thumbnail.py +0 -23
- slidge-0.2.1/slidge/slixfix/xep_0313/__init__.py +0 -12
- slidge-0.2.1/slidge/slixfix/xep_0313/mam.py +0 -262
- slidge-0.2.1/slidge/slixfix/xep_0313/stanza.py +0 -359
- slidge-0.2.1/slidge/slixfix/xep_0317/__init__.py +0 -5
- slidge-0.2.1/slidge/slixfix/xep_0317/hats.py +0 -17
- slidge-0.2.1/slidge/slixfix/xep_0317/stanza.py +0 -28
- slidge-0.2.1/slidge/slixfix/xep_0424/__init__.py +0 -9
- slidge-0.2.1/slidge/slixfix/xep_0424/retraction.py +0 -77
- slidge-0.2.1/slidge/slixfix/xep_0424/stanza.py +0 -28
- slidge-0.2.1/slidge/slixfix/xep_0490/__init__.py +0 -8
- slidge-0.2.1/slidge/slixfix/xep_0490/mds.py +0 -47
- slidge-0.2.1/slidge/slixfix/xep_0490/stanza.py +0 -17
- {slidge-0.2.1 → slidge-0.2.3.post1}/LICENSE +0 -0
- {slidge-0.2.1 → slidge-0.2.3.post1}/slidge/__init__.py +0 -0
- {slidge-0.2.1 → slidge-0.2.3.post1}/slidge/__main__.py +0 -0
- {slidge-0.2.1 → slidge-0.2.3.post1}/slidge/command/__init__.py +0 -0
- {slidge-0.2.1 → slidge-0.2.3.post1}/slidge/command/adhoc.py +0 -0
- {slidge-0.2.1 → slidge-0.2.3.post1}/slidge/command/admin.py +0 -0
- {slidge-0.2.1 → slidge-0.2.3.post1}/slidge/command/categories.py +0 -0
- {slidge-0.2.1 → slidge-0.2.3.post1}/slidge/contact/__init__.py +0 -0
- {slidge-0.2.1 → slidge-0.2.3.post1}/slidge/contact/roster.py +0 -0
- {slidge-0.2.1 → slidge-0.2.3.post1}/slidge/core/__init__.py +0 -0
- {slidge-0.2.1 → slidge-0.2.3.post1}/slidge/core/config.py +0 -0
- {slidge-0.2.1 → slidge-0.2.3.post1}/slidge/core/dispatcher/__init__.py +0 -0
- {slidge-0.2.1 → slidge-0.2.3.post1}/slidge/core/dispatcher/caps.py +0 -0
- {slidge-0.2.1 → slidge-0.2.3.post1}/slidge/core/dispatcher/disco.py +0 -0
- {slidge-0.2.1 → slidge-0.2.3.post1}/slidge/core/dispatcher/message/__init__.py +0 -0
- {slidge-0.2.1 → slidge-0.2.3.post1}/slidge/core/dispatcher/message/chat_state.py +0 -0
- {slidge-0.2.1 → slidge-0.2.3.post1}/slidge/core/dispatcher/message/marker.py +0 -0
- {slidge-0.2.1 → slidge-0.2.3.post1}/slidge/core/dispatcher/message/message.py +0 -0
- {slidge-0.2.1 → slidge-0.2.3.post1}/slidge/core/dispatcher/muc/__init__.py +0 -0
- {slidge-0.2.1 → slidge-0.2.3.post1}/slidge/core/dispatcher/muc/mam.py +0 -0
- {slidge-0.2.1 → slidge-0.2.3.post1}/slidge/core/dispatcher/muc/misc.py +0 -0
- {slidge-0.2.1 → slidge-0.2.3.post1}/slidge/core/dispatcher/muc/owner.py +0 -0
- {slidge-0.2.1 → slidge-0.2.3.post1}/slidge/core/dispatcher/muc/ping.py +0 -0
- {slidge-0.2.1 → slidge-0.2.3.post1}/slidge/core/dispatcher/registration.py +0 -0
- {slidge-0.2.1 → slidge-0.2.3.post1}/slidge/core/dispatcher/search.py +0 -0
- {slidge-0.2.1 → slidge-0.2.3.post1}/slidge/core/dispatcher/session_dispatcher.py +0 -0
- {slidge-0.2.1 → slidge-0.2.3.post1}/slidge/core/dispatcher/util.py +0 -0
- {slidge-0.2.1 → slidge-0.2.3.post1}/slidge/core/dispatcher/vcard.py +0 -0
- {slidge-0.2.1 → slidge-0.2.3.post1}/slidge/core/mixins/__init__.py +0 -0
- {slidge-0.2.1 → slidge-0.2.3.post1}/slidge/core/mixins/base.py +0 -0
- {slidge-0.2.1 → slidge-0.2.3.post1}/slidge/core/mixins/db.py +0 -0
- {slidge-0.2.1 → slidge-0.2.3.post1}/slidge/core/mixins/disco.py +0 -0
- {slidge-0.2.1 → slidge-0.2.3.post1}/slidge/core/mixins/lock.py +0 -0
- {slidge-0.2.1 → slidge-0.2.3.post1}/slidge/core/mixins/message_maker.py +0 -0
- {slidge-0.2.1 → slidge-0.2.3.post1}/slidge/core/mixins/message_text.py +0 -0
- {slidge-0.2.1 → slidge-0.2.3.post1}/slidge/core/mixins/presence.py +0 -0
- {slidge-0.2.1 → slidge-0.2.3.post1}/slidge/core/mixins/recipient.py +0 -0
- {slidge-0.2.1 → slidge-0.2.3.post1}/slidge/core/pubsub.py +0 -0
- {slidge-0.2.1 → slidge-0.2.3.post1}/slidge/core/session.py +0 -0
- {slidge-0.2.1 → slidge-0.2.3.post1}/slidge/db/__init__.py +0 -0
- {slidge-0.2.1 → slidge-0.2.3.post1}/slidge/db/alembic/__init__.py +0 -0
- {slidge-0.2.1 → slidge-0.2.3.post1}/slidge/db/alembic/env.py +0 -0
- {slidge-0.2.1 → slidge-0.2.3.post1}/slidge/db/alembic/old_user_store.py +0 -0
- {slidge-0.2.1 → slidge-0.2.3.post1}/slidge/db/alembic/script.py.mako +0 -0
- {slidge-0.2.1 → slidge-0.2.3.post1}/slidge/db/alembic/versions/09f27f098baa_add_missing_attributes_in_room.py +0 -0
- {slidge-0.2.1 → slidge-0.2.3.post1}/slidge/db/alembic/versions/15b0bd83407a_remove_bogus_unique_constraints_on_room_.py +0 -0
- {slidge-0.2.1 → slidge-0.2.3.post1}/slidge/db/alembic/versions/2461390c0af2_store_contacts_caps_verstring_in_db.py +0 -0
- {slidge-0.2.1 → slidge-0.2.3.post1}/slidge/db/alembic/versions/29f5280c61aa_store_subject_setter_in_room.py +0 -0
- {slidge-0.2.1 → slidge-0.2.3.post1}/slidge/db/alembic/versions/2b1f45ab7379_store_room_subject_setter_by_nickname.py +0 -0
- {slidge-0.2.1 → slidge-0.2.3.post1}/slidge/db/alembic/versions/3071e0fa69d4_add_contact_client_type.py +0 -0
- {slidge-0.2.1 → slidge-0.2.3.post1}/slidge/db/alembic/versions/45c24cc73c91_add_bob.py +0 -0
- {slidge-0.2.1 → slidge-0.2.3.post1}/slidge/db/alembic/versions/5bd48bfdffa2_lift_room_legacy_id_constraint.py +0 -0
- {slidge-0.2.1 → slidge-0.2.3.post1}/slidge/db/alembic/versions/82a4af84b679_add_muc_history_filled.py +0 -0
- {slidge-0.2.1 → slidge-0.2.3.post1}/slidge/db/alembic/versions/8b993243a536_add_vcard_content_to_contact_table.py +0 -0
- {slidge-0.2.1 → slidge-0.2.3.post1}/slidge/db/alembic/versions/8d2ced764698_rely_on_db_to_store_contacts_rooms_and_.py +0 -0
- {slidge-0.2.1 → slidge-0.2.3.post1}/slidge/db/alembic/versions/aa9d82a7f6ef_db_creation.py +0 -0
- {slidge-0.2.1 → slidge-0.2.3.post1}/slidge/db/alembic/versions/abba1ae0edb3_store_avatar_legacy_id_in_the_contact_.py +0 -0
- {slidge-0.2.1 → slidge-0.2.3.post1}/slidge/db/alembic/versions/b33993e87db3_move_everything_to_persistent_db.py +0 -0
- {slidge-0.2.1 → slidge-0.2.3.post1}/slidge/db/alembic/versions/b64b1a793483_add_source_and_legacy_id_for_archived_.py +0 -0
- {slidge-0.2.1 → slidge-0.2.3.post1}/slidge/db/alembic/versions/c4a8ec35a0e8_per_room_user_nick.py +0 -0
- {slidge-0.2.1 → slidge-0.2.3.post1}/slidge/db/alembic/versions/e91195719c2c_store_users_avatars_persistently.py +0 -0
- {slidge-0.2.1 → slidge-0.2.3.post1}/slidge/db/avatar.py +0 -0
- {slidge-0.2.1 → slidge-0.2.3.post1}/slidge/db/meta.py +0 -0
- {slidge-0.2.1 → slidge-0.2.3.post1}/slidge/group/__init__.py +0 -0
- {slidge-0.2.1 → slidge-0.2.3.post1}/slidge/group/bookmarks.py +0 -0
- {slidge-0.2.1 → slidge-0.2.3.post1}/slidge/group/room.py +0 -0
- {slidge-0.2.1 → slidge-0.2.3.post1}/slidge/migration.py +0 -0
- {slidge-0.2.1 → slidge-0.2.3.post1}/slidge/py.typed +0 -0
- {slidge-0.2.1 → slidge-0.2.3.post1}/slidge/slixfix/delivery_receipt.py +0 -0
- {slidge-0.2.1 → slidge-0.2.3.post1}/slidge/slixfix/link_preview/__init__.py +0 -0
- {slidge-0.2.1 → slidge-0.2.3.post1}/slidge/slixfix/link_preview/link_preview.py +0 -0
- {slidge-0.2.1 → slidge-0.2.3.post1}/slidge/slixfix/link_preview/stanza.py +0 -0
- {slidge-0.2.1 → slidge-0.2.3.post1}/slidge/slixfix/roster.py +0 -0
- {slidge-0.2.1 → slidge-0.2.3.post1}/slidge/slixfix/xep_0077/__init__.py +0 -0
- {slidge-0.2.1 → slidge-0.2.3.post1}/slidge/slixfix/xep_0077/register.py +0 -0
- {slidge-0.2.1 → slidge-0.2.3.post1}/slidge/slixfix/xep_0077/stanza.py +0 -0
- {slidge-0.2.1 → slidge-0.2.3.post1}/slidge/slixfix/xep_0100/__init__.py +0 -0
- {slidge-0.2.1 → slidge-0.2.3.post1}/slidge/slixfix/xep_0100/gateway.py +0 -0
- {slidge-0.2.1 → slidge-0.2.3.post1}/slidge/slixfix/xep_0100/stanza.py +0 -0
- {slidge-0.2.1 → slidge-0.2.3.post1}/slidge/slixfix/xep_0292/__init__.py +0 -0
- {slidge-0.2.1 → slidge-0.2.3.post1}/slidge/slixfix/xep_0292/vcard4.py +0 -0
- {slidge-0.2.1 → slidge-0.2.3.post1}/slidge/slixfix/xep_0356_old/__init__.py +0 -0
- {slidge-0.2.1 → slidge-0.2.3.post1}/slidge/slixfix/xep_0356_old/privilege.py +0 -0
- {slidge-0.2.1 → slidge-0.2.3.post1}/slidge/slixfix/xep_0356_old/stanza.py +0 -0
- {slidge-0.2.1 → slidge-0.2.3.post1}/slidge/util/__init__.py +0 -0
- {slidge-0.2.1 → slidge-0.2.3.post1}/slidge/util/archive_msg.py +0 -0
- {slidge-0.2.1 → slidge-0.2.3.post1}/slidge/util/conf.py +0 -0
- {slidge-0.2.1 → slidge-0.2.3.post1}/slidge/util/db.py +0 -0
- {slidge-0.2.1 → slidge-0.2.3.post1}/slidge/util/types.py +0 -0
- {slidge-0.2.1 → slidge-0.2.3.post1}/slidge/util/util.py +0 -0
@@ -0,0 +1,44 @@
|
|
1
|
+
__pycache__
|
2
|
+
*.__pycache__
|
3
|
+
*.pyc
|
4
|
+
dist/
|
5
|
+
.pytest_cache
|
6
|
+
*.bak
|
7
|
+
.vscode
|
8
|
+
docs/build
|
9
|
+
persistent/
|
10
|
+
.idea
|
11
|
+
.mypy_cache
|
12
|
+
.old
|
13
|
+
requirements*
|
14
|
+
slidge/plugins/whatsapp/generated
|
15
|
+
dev/confs/slidge-tg.ini
|
16
|
+
.ruff_cache
|
17
|
+
|
18
|
+
/debian/.debhelper/generated
|
19
|
+
/debian/.debhelper/slidge
|
20
|
+
/debian/.debhelper/slidge/dbgsym-build-ids
|
21
|
+
/debian/etc/discord.conf.example
|
22
|
+
/debian/etc/facebook.conf.example
|
23
|
+
/debian/etc/hackernews.conf.example
|
24
|
+
/debian/etc/mattermost.conf.example
|
25
|
+
/debian/etc/signal.conf.example
|
26
|
+
/debian/etc/skype.conf.example
|
27
|
+
/debian/etc/steam.conf.example
|
28
|
+
/debian/etc/telegram.conf.example
|
29
|
+
/debian/etc/whatsapp.conf.example
|
30
|
+
/debian/slidge
|
31
|
+
/debian/changelog
|
32
|
+
/debian/debhelper-build-stamp
|
33
|
+
/debian/files
|
34
|
+
/debian/slidge.postinst.debhelper
|
35
|
+
/debian/slidge.prerm.debhelper
|
36
|
+
/debian/slidge.substvars
|
37
|
+
/build/
|
38
|
+
/docs/source/dev/api/slidge/
|
39
|
+
*.egg-info
|
40
|
+
.coverage
|
41
|
+
htmlcov
|
42
|
+
/dev/slidge.sqlite
|
43
|
+
|
44
|
+
.python-version
|
@@ -0,0 +1,47 @@
|
|
1
|
+
default_stages: [pre-commit]
|
2
|
+
repos:
|
3
|
+
- repo: https://github.com/pre-commit/pre-commit-hooks
|
4
|
+
rev: v5.0.0
|
5
|
+
hooks:
|
6
|
+
- id: trailing-whitespace
|
7
|
+
- id: end-of-file-fixer
|
8
|
+
- id: check-yaml
|
9
|
+
- id: check-added-large-files
|
10
|
+
- id: check-merge-conflict
|
11
|
+
args: [--assume-in-merge]
|
12
|
+
|
13
|
+
- repo: https://github.com/astral-sh/uv-pre-commit
|
14
|
+
# uv version.
|
15
|
+
rev: 0.5.21
|
16
|
+
hooks:
|
17
|
+
- id: uv-lock
|
18
|
+
|
19
|
+
- repo: https://github.com/charliermarsh/ruff-pre-commit
|
20
|
+
rev: v0.9.2
|
21
|
+
hooks:
|
22
|
+
- id: ruff
|
23
|
+
args: [ --fix ]
|
24
|
+
- id: ruff-format
|
25
|
+
|
26
|
+
- repo: https://github.com/alessandrojcm/commitlint-pre-commit-hook
|
27
|
+
rev: v9.20.0
|
28
|
+
hooks:
|
29
|
+
- id: commitlint
|
30
|
+
stages: [commit-msg]
|
31
|
+
additional_dependencies: ['@commitlint/config-conventional']
|
32
|
+
|
33
|
+
- repo: local
|
34
|
+
hooks:
|
35
|
+
- id: mypy
|
36
|
+
name: Static type check with mypy
|
37
|
+
entry: .venv/bin/mypy
|
38
|
+
language: system
|
39
|
+
pass_filenames: false
|
40
|
+
files: .*\.py
|
41
|
+
- id: prettify-xml
|
42
|
+
name: Prettify XML in test strings
|
43
|
+
entry: .venv/bin/python dev/prettify_tests.py
|
44
|
+
language: system
|
45
|
+
pass_filenames: true
|
46
|
+
always_run: true
|
47
|
+
files: tests.*\.py
|
@@ -0,0 +1,71 @@
|
|
1
|
+
# Generate build caches for containers used by the legacy modules and the CI images
|
2
|
+
|
3
|
+
# We cannot do it directly in the container workflow, because buildx does not "magically"
|
4
|
+
# merge multi-arch build caches, cf https://github.com/docker/buildx/discussions/1382#discussioncomment-4159926
|
5
|
+
|
6
|
+
when:
|
7
|
+
event: [ manual, cron ]
|
8
|
+
|
9
|
+
variables:
|
10
|
+
- &settings
|
11
|
+
username: slidge
|
12
|
+
registry: codeberg.org
|
13
|
+
password:
|
14
|
+
from_secret: CODEBERG_TOKEN
|
15
|
+
dry_run: true
|
16
|
+
- &when
|
17
|
+
when:
|
18
|
+
branch: main
|
19
|
+
path:
|
20
|
+
- Dockerfile
|
21
|
+
- pyproject.toml
|
22
|
+
- uv.lock
|
23
|
+
|
24
|
+
matrix:
|
25
|
+
PLATFORM:
|
26
|
+
- arm64
|
27
|
+
- amd64
|
28
|
+
|
29
|
+
steps:
|
30
|
+
builder-base:
|
31
|
+
image: woodpeckerci/plugin-docker-buildx
|
32
|
+
<<: *when
|
33
|
+
settings:
|
34
|
+
platforms: linux/${PLATFORM}
|
35
|
+
target: builder-base
|
36
|
+
cache_images:
|
37
|
+
- codeberg.org/slidge/slidge-builder:buildcache-base-${PLATFORM}
|
38
|
+
<<: *settings
|
39
|
+
|
40
|
+
builder:
|
41
|
+
image: woodpeckerci/plugin-docker-buildx
|
42
|
+
<<: *when
|
43
|
+
settings:
|
44
|
+
platforms: linux/${PLATFORM}
|
45
|
+
target: builder
|
46
|
+
cache_from: codeberg.org/slidge/slidge-builder:buildcache-base-${PLATFORM}
|
47
|
+
cache_images:
|
48
|
+
- codeberg.org/slidge/slidge-builder:buildcache-${PLATFORM}
|
49
|
+
<<: *settings
|
50
|
+
|
51
|
+
base:
|
52
|
+
image: woodpeckerci/plugin-docker-buildx
|
53
|
+
<<: *when
|
54
|
+
settings:
|
55
|
+
platforms: linux/${PLATFORM}
|
56
|
+
target: base
|
57
|
+
cache_from: codeberg.org/slidge/slidge-builder:buildcache-${PLATFORM}
|
58
|
+
cache_images:
|
59
|
+
- codeberg.org/slidge/slidge-base:buildcache-${PLATFORM}
|
60
|
+
<<: *settings
|
61
|
+
|
62
|
+
dev:
|
63
|
+
image: woodpeckerci/plugin-docker-buildx
|
64
|
+
<<: *when
|
65
|
+
settings:
|
66
|
+
platforms: linux/${PLATFORM}
|
67
|
+
target: dev
|
68
|
+
cache_from: codeberg.org/slidge/slidge-base:buildcache-${PLATFORM}
|
69
|
+
cache_images:
|
70
|
+
- codeberg.org/slidge/slidge-dev:buildcache-${PLATFORM}
|
71
|
+
<<: *settings
|
@@ -0,0 +1,29 @@
|
|
1
|
+
# Build a container with a virtualenv that can be used for tests and to build docs.
|
2
|
+
|
3
|
+
when:
|
4
|
+
event: [ manual, cron ]
|
5
|
+
|
6
|
+
depends_on: [ container-cache ]
|
7
|
+
|
8
|
+
matrix:
|
9
|
+
PYTHON_VERSION:
|
10
|
+
- "3.11"
|
11
|
+
- "3.12"
|
12
|
+
- "3.13"
|
13
|
+
|
14
|
+
steps:
|
15
|
+
build-and-push:
|
16
|
+
image: woodpeckerci/plugin-docker-buildx
|
17
|
+
settings:
|
18
|
+
repo: codeberg.org/${CI_REPO_OWNER}/woodpecker-${CI_REPO_NAME}
|
19
|
+
registry: codeberg.org
|
20
|
+
build_args:
|
21
|
+
PYTHONVER: "${PYTHON_VERSION}"
|
22
|
+
tag: ${PYTHON_VERSION}
|
23
|
+
target: woodpecker-${CI_REPO_NAME}
|
24
|
+
username: slidge
|
25
|
+
password:
|
26
|
+
from_secret: CODEBERG_TOKEN
|
27
|
+
cache_from: codeberg.org/slidge/slidge-builder:buildcache-base-amd64
|
28
|
+
cache_images:
|
29
|
+
- codeberg.org/slidge/woodpecker-slidge:buildcache-${PYTHON_VERSION}
|
@@ -0,0 +1,49 @@
|
|
1
|
+
# Build the containers used as bases by the legacy modules
|
2
|
+
|
3
|
+
variables:
|
4
|
+
- &platforms linux/arm64/v8,linux/amd64
|
5
|
+
- settings: &settings
|
6
|
+
platforms: *platforms
|
7
|
+
cache_from: codeberg.org/slidge/slidge-${TARGET}:buildcache-arm64
|
8
|
+
# TODO: also pull cache from :buildcache-amd64
|
9
|
+
# cf https://codeberg.org/woodpecker-plugins/docker-buildx/pulls/212
|
10
|
+
|
11
|
+
depends_on: [ container-cache ]
|
12
|
+
|
13
|
+
when:
|
14
|
+
event: [ cron, manual ]
|
15
|
+
branch: main
|
16
|
+
path: [ Dockerfile, uv.lock, "slidge/**/*" ]
|
17
|
+
|
18
|
+
matrix:
|
19
|
+
TARGET:
|
20
|
+
- builder
|
21
|
+
- base
|
22
|
+
- dev
|
23
|
+
|
24
|
+
steps:
|
25
|
+
version:
|
26
|
+
image: codeberg.org/slidge/woodpecker-version
|
27
|
+
|
28
|
+
build-and-push:
|
29
|
+
image: woodpeckerci/plugin-docker-buildx
|
30
|
+
pull: true
|
31
|
+
settings:
|
32
|
+
repo: codeberg.org/slidge/slidge-${TARGET}
|
33
|
+
registry: codeberg.org
|
34
|
+
auto_tag: true
|
35
|
+
target: ${TARGET}
|
36
|
+
username: slidge
|
37
|
+
password:
|
38
|
+
from_secret: CODEBERG_TOKEN
|
39
|
+
<<: *settings
|
40
|
+
when:
|
41
|
+
event: [ push, tag ]
|
42
|
+
|
43
|
+
build:
|
44
|
+
image: woodpeckerci/plugin-docker-buildx
|
45
|
+
settings:
|
46
|
+
dry-run: true
|
47
|
+
<<: *settings
|
48
|
+
when:
|
49
|
+
event: pull_request
|
@@ -0,0 +1,24 @@
|
|
1
|
+
when:
|
2
|
+
event: [ push, tag, pull_request ]
|
3
|
+
path: [ "slidge/**/*.py", "superduper/**/*.py", "docs/**/*" ]
|
4
|
+
|
5
|
+
steps:
|
6
|
+
build:
|
7
|
+
image: codeberg.org/slidge/woodpecker-${CI_REPO_NAME}:3.13
|
8
|
+
pull: true
|
9
|
+
commands:
|
10
|
+
# the first 2 commands update the virtualenv, which is a no-op unless uv.lock has been modified
|
11
|
+
- uv export > req.txt
|
12
|
+
- uv pip install --requirements req.txt
|
13
|
+
- uv pip install .
|
14
|
+
- cd docs
|
15
|
+
- make html
|
16
|
+
|
17
|
+
publish:
|
18
|
+
image: codeberg.org/slidge/woodpecker-publish-pages
|
19
|
+
pull: true
|
20
|
+
when:
|
21
|
+
event: [ push, tag ]
|
22
|
+
settings:
|
23
|
+
token:
|
24
|
+
from_secret: CODEBERG_TOKEN
|
@@ -0,0 +1,51 @@
|
|
1
|
+
# Build a source dist and a wheel.
|
2
|
+
|
3
|
+
when:
|
4
|
+
event: [ push, tag, pull_request ]
|
5
|
+
path: [ "slidge/**/*", "pyproject.toml", "uv.lock", "README.md" ]
|
6
|
+
|
7
|
+
# We do not need to build several packages for several python versions
|
8
|
+
# since slidge is pure python.
|
9
|
+
variables:
|
10
|
+
- &image codeberg.org/slidge/woodpecker-${CI_REPO_NAME}:3.13
|
11
|
+
|
12
|
+
steps:
|
13
|
+
version:
|
14
|
+
image: codeberg.org/slidge/woodpecker-version
|
15
|
+
|
16
|
+
build:
|
17
|
+
image: *image
|
18
|
+
commands:
|
19
|
+
- uv build
|
20
|
+
|
21
|
+
codeberg-pypi:
|
22
|
+
when:
|
23
|
+
event: [ push, tag ]
|
24
|
+
image: *image
|
25
|
+
environment:
|
26
|
+
CODEBERG_TOKEN:
|
27
|
+
from_secret: CODEBERG_TOKEN
|
28
|
+
commands:
|
29
|
+
- uv publish --index codeberg --token $CODEBERG_TOKEN
|
30
|
+
|
31
|
+
pypi:
|
32
|
+
when:
|
33
|
+
branch: main
|
34
|
+
event: tag
|
35
|
+
image: *image
|
36
|
+
environment:
|
37
|
+
PYPI_TOKEN:
|
38
|
+
from_secret: PYPI_TOKEN
|
39
|
+
commands:
|
40
|
+
- uv publish --token $PYPI_TOKEN
|
41
|
+
|
42
|
+
codeberg-release:
|
43
|
+
when:
|
44
|
+
branch: main
|
45
|
+
event: tag
|
46
|
+
image: woodpeckerci/plugin-release
|
47
|
+
settings:
|
48
|
+
files:
|
49
|
+
- dist/slidge*
|
50
|
+
api_key:
|
51
|
+
from_secret: CODEBERG_TOKEN
|
@@ -0,0 +1,64 @@
|
|
1
|
+
when:
|
2
|
+
event: [ push, pull_request ]
|
3
|
+
path: [ pyproject.toml, uv.lock, "slidge/**/*.py", "tests/**/*.py" ]
|
4
|
+
|
5
|
+
matrix:
|
6
|
+
PYTHON_VERSION:
|
7
|
+
- "3.11"
|
8
|
+
- "3.12"
|
9
|
+
- "3.13"
|
10
|
+
|
11
|
+
variables:
|
12
|
+
- &only-once
|
13
|
+
when:
|
14
|
+
matrix:
|
15
|
+
PYTHON_VERSION: "3.11"
|
16
|
+
event: push
|
17
|
+
|
18
|
+
steps:
|
19
|
+
# This is often a no-op, but since we manually build the woodpecker-slidge:3.x images,
|
20
|
+
# their venv may be out of date, even if uv.lock is not modified.
|
21
|
+
update-venv:
|
22
|
+
image: codeberg.org/slidge/woodpecker-${CI_REPO_NAME}:${PYTHON_VERSION}
|
23
|
+
pull: true
|
24
|
+
commands:
|
25
|
+
- cp -r /venv .venv
|
26
|
+
- uv venv --allow-existing .venv
|
27
|
+
- uv export > req.txt
|
28
|
+
- uv pip install --requirements req.txt
|
29
|
+
|
30
|
+
ruff:
|
31
|
+
image: codeberg.org/slidge/woodpecker-${CI_REPO_NAME}:${PYTHON_VERSION}
|
32
|
+
commands:
|
33
|
+
- ruff check
|
34
|
+
- ruff format
|
35
|
+
|
36
|
+
mypy:
|
37
|
+
image: codeberg.org/slidge/woodpecker-${CI_REPO_NAME}:${PYTHON_VERSION}
|
38
|
+
commands:
|
39
|
+
- mypy
|
40
|
+
|
41
|
+
test:
|
42
|
+
image: codeberg.org/slidge/woodpecker-${CI_REPO_NAME}:${PYTHON_VERSION}
|
43
|
+
commands:
|
44
|
+
- coverage run -m pytest tests
|
45
|
+
- coverage report | tee coverage.txt
|
46
|
+
- coverage html
|
47
|
+
|
48
|
+
badge:
|
49
|
+
image: codeberg.org/slidge/woodpecker-${CI_REPO_NAME}:${PYTHON_VERSION}
|
50
|
+
commands:
|
51
|
+
- uv pip install pybadges
|
52
|
+
- COVERAGE=$(tail -n1 coverage.txt | awk 'NF>1{print $NF}')
|
53
|
+
- python -m pybadges --left-text=coverage --right-text=$COVERAGE --right-color=green > htmlcov/coverage.svg || true
|
54
|
+
<<: *only-once
|
55
|
+
|
56
|
+
publish:
|
57
|
+
image: codeberg.org/slidge/woodpecker-publish-pages
|
58
|
+
pull: true
|
59
|
+
settings:
|
60
|
+
token:
|
61
|
+
from_secret: CODEBERG_TOKEN
|
62
|
+
html-root: htmlcov
|
63
|
+
root: coverage
|
64
|
+
<<: *only-once
|
@@ -0,0 +1,94 @@
|
|
1
|
+
ARG PYTHONVER=3.11
|
2
|
+
ARG DISTRO=bookworm
|
3
|
+
## Base build stage for Slidge, prepares and installs common dependencies.
|
4
|
+
FROM ghcr.io/astral-sh/uv:python$PYTHONVER-$DISTRO AS builder-base
|
5
|
+
ARG PYTHONVER
|
6
|
+
ENV PATH="/venv/bin:$PATH"
|
7
|
+
|
8
|
+
# rust/cargo is for building "cryptography" since they don't provide wheels for arm32
|
9
|
+
RUN apt-get update -y && apt-get install -y --no-install-recommends \
|
10
|
+
build-essential \
|
11
|
+
ca-certificates \
|
12
|
+
cargo \
|
13
|
+
curl \
|
14
|
+
git \
|
15
|
+
gcc \
|
16
|
+
g++ \
|
17
|
+
libffi-dev \
|
18
|
+
libssl-dev \
|
19
|
+
pkg-config \
|
20
|
+
python3-dev \
|
21
|
+
rustc
|
22
|
+
|
23
|
+
RUN uv venv /venv
|
24
|
+
WORKDIR /build
|
25
|
+
# Only copy files used to define dependencies, so this step can be in cache
|
26
|
+
# as long as we don't touch the deps.
|
27
|
+
COPY uv.lock pyproject.toml /build/
|
28
|
+
|
29
|
+
FROM builder-base AS builder
|
30
|
+
RUN uv export --no-dev > requirements.txt
|
31
|
+
RUN uv pip install --requirement requirements.txt
|
32
|
+
RUN ln -s /venv/lib/python$PYTHONVER /venv/lib/python
|
33
|
+
|
34
|
+
# CI environment for slidge
|
35
|
+
FROM builder-base AS woodpecker-slidge
|
36
|
+
# In CI we sometimes move /venv to .venv, then update it for the whole workflow.
|
37
|
+
ENV PATH=".venv/bin:$PATH"
|
38
|
+
RUN uv export > requirements.txt
|
39
|
+
RUN uv pip install --requirement requirements.txt
|
40
|
+
|
41
|
+
## Minimal runtime environment for slidge
|
42
|
+
# We re-use this for plugins that need extra dependencies, but copy the ./slidge
|
43
|
+
# dir as the last step to be docker cache-friendly
|
44
|
+
FROM docker.io/library/python:$PYTHONVER-slim AS base
|
45
|
+
ARG PYTHONVER
|
46
|
+
ENV PATH="/venv/bin:$PATH"
|
47
|
+
ENV PYTHONUNBUFFERED=1
|
48
|
+
|
49
|
+
# libmagic1: to guess mime type from files
|
50
|
+
# media-types: to determine file name suffix based on file type
|
51
|
+
RUN apt-get update -y && apt-get install -y --no-install-recommends \
|
52
|
+
libmagic1 media-types shared-mime-info python3-slixmpp-lib
|
53
|
+
|
54
|
+
RUN addgroup --system --gid 10000 slidge
|
55
|
+
RUN adduser --system --uid 10000 --ingroup slidge --home /var/lib/slidge slidge
|
56
|
+
|
57
|
+
ENV SLIDGE_LEGACY_MODULE=legacy_module
|
58
|
+
|
59
|
+
WORKDIR /var/lib/slidge
|
60
|
+
COPY --from=builder /venv /venv
|
61
|
+
# hacky, link compiled (fast) stringprep.so to the proper dir
|
62
|
+
RUN ln -s /usr/lib/python3/dist-packages/slixmpp/stringprep*.so /venv/lib/python$PYTHONVER/site-packages/slixmpp/
|
63
|
+
|
64
|
+
STOPSIGNAL SIGINT
|
65
|
+
USER slidge
|
66
|
+
|
67
|
+
ENTRYPOINT ["python", "-m", "slidge"]
|
68
|
+
|
69
|
+
# dev container with hot reload on code change
|
70
|
+
FROM base AS dev
|
71
|
+
|
72
|
+
USER root
|
73
|
+
|
74
|
+
COPY --from=docker.io/nicocool84/slidge-prosody-dev:latest \
|
75
|
+
/etc/prosody/certs/localhost.crt \
|
76
|
+
/usr/local/share/ca-certificates/
|
77
|
+
RUN update-ca-certificates
|
78
|
+
|
79
|
+
RUN pip install watchdog[watchmedo]
|
80
|
+
|
81
|
+
COPY --from=builder /venv /venv
|
82
|
+
COPY ./slidge /venv/lib/python/site-packages/slidge
|
83
|
+
|
84
|
+
ENTRYPOINT ["watchmedo", "auto-restart", \
|
85
|
+
"--pattern", "*.py", \
|
86
|
+
"--directory", "/venv/lib/python/site-packages/legacy_module/", \
|
87
|
+
"--recursive", \
|
88
|
+
"python", "--", "-m", "slidge", \
|
89
|
+
"--jid", "slidge.localhost", \
|
90
|
+
"--secret", "secret", \
|
91
|
+
"--debug", \
|
92
|
+
"--upload-service", "upload.localhost", \
|
93
|
+
"--admins", "test@localhost", \
|
94
|
+
"--dev-mode"]
|