django-spire 0.21.1__py3-none-any.whl → 0.22.1__py3-none-any.whl
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.
- django_spire/consts.py +1 -1
- django_spire/contrib/generic_views/portal_views.py +43 -0
- django_spire/core/models.py +9 -0
- django_spire/core/static/django_spire/css/bootstrap-extension.css +41 -0
- django_spire/core/static/django_spire/css/bootstrap-override.css +28 -4
- django_spire/core/{tags → tag}/intelligence/tag_set_bot.py +5 -4
- django_spire/core/tag/mixins.py +23 -0
- django_spire/core/{tags → tag}/models.py +1 -2
- django_spire/core/tag/service/tag_service.py +72 -0
- django_spire/core/{tags → tag}/tests/test_intelligence.py +1 -1
- django_spire/core/tag/tests/test_tags.py +102 -0
- django_spire/core/tag/tools.py +66 -0
- django_spire/core/templates/django_spire/dropdown/ellipsis_table_dropdown.html +26 -0
- django_spire/core/templates/django_spire/filtering/form/base_session_filter_form.html +4 -4
- django_spire/core/templates/django_spire/modal/content/dispatch_modal_delete_confirmation_content.html +6 -4
- django_spire/core/templates/django_spire/table/base.html +409 -0
- django_spire/core/templates/django_spire/table/element/child_row.html +59 -0
- django_spire/core/templates/django_spire/table/element/expandable_row.html +45 -0
- django_spire/core/templates/django_spire/table/element/footer.html +17 -0
- django_spire/core/templates/django_spire/table/element/header.html +9 -0
- django_spire/core/templates/django_spire/table/element/loading_skeleton.html +13 -0
- django_spire/core/templates/django_spire/table/element/refreshing_skeleton.html +13 -0
- django_spire/core/templates/django_spire/table/element/row.html +94 -0
- django_spire/core/templates/django_spire/table/element/trigger.html +1 -0
- django_spire/core/templates/django_spire/table/item/no_data_item.html +11 -0
- django_spire/core/templates/django_spire/tag/element/tag.html +1 -0
- django_spire/core/templatetags/spire_core_tags.py +12 -0
- django_spire/knowledge/collection/models.py +2 -2
- django_spire/knowledge/collection/services/tag_service.py +16 -14
- django_spire/knowledge/entry/models.py +2 -2
- django_spire/knowledge/entry/querysets.py +5 -0
- django_spire/knowledge/entry/services/tag_service.py +5 -5
- django_spire/knowledge/intelligence/bots/entries_search_llm_bot.py +44 -0
- django_spire/knowledge/intelligence/intel/entry_intel.py +24 -4
- django_spire/knowledge/intelligence/workflows/knowledge_workflow.py +46 -25
- django_spire/knowledge/models.py +12 -4
- django_spire/knowledge/templates/django_spire/knowledge/collection/page/display_page.html +6 -4
- django_spire/knowledge/templates/django_spire/knowledge/entry/version/page/editor_page.html +3 -2
- django_spire/knowledge/templates/django_spire/knowledge/message/knowledge_message_intel.html +14 -6
- django_spire/settings.py +1 -1
- {django_spire-0.21.1.dist-info → django_spire-0.22.1.dist-info}/METADATA +2 -2
- {django_spire-0.21.1.dist-info → django_spire-0.22.1.dist-info}/RECORD +50 -40
- django_spire/core/tags/mixins.py +0 -61
- django_spire/core/tags/tests/test_tags.py +0 -102
- django_spire/core/tags/tools.py +0 -20
- django_spire/knowledge/intelligence/bots/entry_search_llm_bot.py +0 -45
- django_spire/knowledge/intelligence/decoders/collection_decoder.py +0 -19
- django_spire/knowledge/intelligence/decoders/entry_decoder.py +0 -22
- django_spire/knowledge/intelligence/intel/collection_intel.py +0 -8
- django_spire/knowledge/templates/django_spire/knowledge/entry/version/page/form_page.html +0 -26
- /django_spire/core/{tags → tag}/__init__.py +0 -0
- /django_spire/core/{tags → tag}/intelligence/__init__.py +0 -0
- /django_spire/core/{tags → tag}/querysets.py +0 -0
- /django_spire/core/{tags/tests → tag/service}/__init__.py +0 -0
- /django_spire/{knowledge/intelligence/decoders → core/tag/tests}/__init__.py +0 -0
- {django_spire-0.21.1.dist-info → django_spire-0.22.1.dist-info}/WHEEL +0 -0
- {django_spire-0.21.1.dist-info → django_spire-0.22.1.dist-info}/licenses/LICENSE.md +0 -0
- {django_spire-0.21.1.dist-info → django_spire-0.22.1.dist-info}/top_level.txt +0 -0
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
django_spire/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
2
|
django_spire/conf.py,sha256=c5Hs-7lk9T15254tOasiQ2ZTFLQIVJof9_QJDfm1PAI,933
|
|
3
|
-
django_spire/consts.py,sha256=
|
|
3
|
+
django_spire/consts.py,sha256=GkvgHyxBBoMVG-DwMxZMs702frH-HZ0L5xU4_r338PQ,171
|
|
4
4
|
django_spire/exceptions.py,sha256=L5ndRO5ftMmh0pHkO2z_NG3LSGZviJ-dDHNT73SzTNw,48
|
|
5
|
-
django_spire/settings.py,sha256=
|
|
5
|
+
django_spire/settings.py,sha256=B4GPqBGt_dmkt0Ay0j-IP-SZ6mY44m2Ap5kVSON5YLA,1005
|
|
6
6
|
django_spire/urls.py,sha256=mKeZszb5U4iIGqddMb5Tt5fRC72U2wABEOi6mvOfEBU,656
|
|
7
7
|
django_spire/utils.py,sha256=kW0HP1xWj8Oz0h1GWs4NflnD8Jq8_F4hABwKTiT-Iyk,1006
|
|
8
8
|
django_spire/ai/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -319,7 +319,7 @@ django_spire/contrib/gamification/static/django_spire/css/contrib/gamification/g
|
|
|
319
319
|
django_spire/contrib/gamification/templates/django_spire/contrib/gamification/effect/kapow.html,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
320
320
|
django_spire/contrib/generic_views/__init__.py,sha256=fJU5nY61oqFCK-osl1Hnr7W2FKc_ZWeFuEkADWqCKzA,245
|
|
321
321
|
django_spire/contrib/generic_views/modal_views.py,sha256=wXPAvinnQWV0p5yrlJk-vl1-u1uSTS3GquEIlEsQXDc,2052
|
|
322
|
-
django_spire/contrib/generic_views/portal_views.py,sha256=
|
|
322
|
+
django_spire/contrib/generic_views/portal_views.py,sha256=gDIr1qPrAerKqiqw9hns6BTEzdzhVxgNG1pKlNNHvPQ,8698
|
|
323
323
|
django_spire/contrib/help/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
324
324
|
django_spire/contrib/help/apps.py,sha256=UM1IoIMFNaVaQdUfACTMfUkm541TqNhOMqlp9X47zBc,193
|
|
325
325
|
django_spire/contrib/help/templates/django_spire/contrib/help/help_button.html,sha256=ikym1hVCy1OuBJnU0CWhi-aCPCrLsfP3stCs0OV3PFk,162
|
|
@@ -420,6 +420,7 @@ django_spire/core/context_processors.py,sha256=l1eH7-rsUX74cy_MWYx6gnNZi3hPsYZNU
|
|
|
420
420
|
django_spire/core/decorators.py,sha256=-zRi8lSRqbGMTxBEJ3Ek7sLmowgpLDMhC0at80Fu8vo,674
|
|
421
421
|
django_spire/core/maps.py,sha256=5q48KuTT7NB-oLFTKpL7A3QuCQHAjdEZvp_JPQdlRy0,1508
|
|
422
422
|
django_spire/core/middleware.py,sha256=fN5rfTj_a-lfhoibD1MY-czCYjLYcUfgeERtiOqQkCs,948
|
|
423
|
+
django_spire/core/models.py,sha256=-4p4u2zWd6huWzfWMoTdHxOEtNzWd8VQWQGzO5M1eYQ,223
|
|
423
424
|
django_spire/core/shortcuts.py,sha256=bmurxweUlqkmDXp4vYNlcF52UKw4JBZyM7pP_jzDxF4,2787
|
|
424
425
|
django_spire/core/urls.py,sha256=A0ylc3k9QuPJrWzNEyvqj7aTxaCNKB0StsZ4jTB76dc,509
|
|
425
426
|
django_spire/core/utils.py,sha256=IrLFwuvhQzsa11wMDNumnHfnkdLBxkkRri6mtjGDXuQ,1003
|
|
@@ -520,8 +521,8 @@ django_spire/core/static/django_spire/css/app-side-panel.css,sha256=tZUwmC_yK9ZN
|
|
|
520
521
|
django_spire/core/static/django_spire/css/app-template.css,sha256=D5ORspwfokNqRW0HwyCbzjBp2Kf_2XtWKa6FSQuSXOg,485
|
|
521
522
|
django_spire/core/static/django_spire/css/app-text.css,sha256=YQYhTsXux7vVuZhzsyHV5TuPCpKam8F14GiOnMcGOyk,10141
|
|
522
523
|
django_spire/core/static/django_spire/css/app-theme.css,sha256=6vxu-tNDS4i1wWwLxdkCuiucN_ZKzGqwZmqZ8Vcwzk0,421
|
|
523
|
-
django_spire/core/static/django_spire/css/bootstrap-extension.css,sha256=
|
|
524
|
-
django_spire/core/static/django_spire/css/bootstrap-override.css,sha256=
|
|
524
|
+
django_spire/core/static/django_spire/css/bootstrap-extension.css,sha256=KJAAz64fGLQn_3TP-PxTrD7-M8JDebC96HMmi2bivAs,13654
|
|
525
|
+
django_spire/core/static/django_spire/css/bootstrap-override.css,sha256=BJYXU2Cz9NCGAlNunAOLi8TCIwDb4NqMdp_wonh_6E8,10471
|
|
525
526
|
django_spire/core/static/django_spire/css/bootstrap.css,sha256=GEgESnyGv91X48AEz35ovTv1fF8JPaB_VZB-JXJjdb0,155840
|
|
526
527
|
django_spire/core/static/django_spire/css/flatpickr.min.css,sha256=RXPAyxHVyMLxb0TYCM2OW5R4GWkcDe02jdYgyZp41OU,16081
|
|
527
528
|
django_spire/core/static/django_spire/css/themes/input.css,sha256=dHY08qEODw-L1xbelx2q-5zu7g9hznVw3Ii3INKlQKU,738
|
|
@@ -581,16 +582,18 @@ django_spire/core/static/django_spire/js/modal.js,sha256=ay0Sovi0HhedEz3dRhB_INh
|
|
|
581
582
|
django_spire/core/static/django_spire/js/session_controller.js,sha256=aMom087y00MUhdxrZlrg89f88mBC7cWEhGWopeb5hlQ,232
|
|
582
583
|
django_spire/core/static/django_spire/js/theme.js,sha256=Aq3KOJarjCr_Qjn0HyJlEFG0FWW1C948ppVvWxW554o,9606
|
|
583
584
|
django_spire/core/static/django_spire/js/ui.js,sha256=Xrnw6cMmddCiUKC7iAJn1U7lk3nMJYxFJJO-J5zCqSw,673
|
|
584
|
-
django_spire/core/
|
|
585
|
-
django_spire/core/
|
|
586
|
-
django_spire/core/
|
|
587
|
-
django_spire/core/
|
|
588
|
-
django_spire/core/
|
|
589
|
-
django_spire/core/
|
|
590
|
-
django_spire/core/
|
|
591
|
-
django_spire/core/
|
|
592
|
-
django_spire/core/
|
|
593
|
-
django_spire/core/
|
|
585
|
+
django_spire/core/tag/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
586
|
+
django_spire/core/tag/mixins.py,sha256=jbBlg-ycTUE7SX1j08iRE2cu8_9j6dp5eI2uzeoYC7Y,707
|
|
587
|
+
django_spire/core/tag/models.py,sha256=XBxDvfwl_k0dWxm9eClD1jxzVu--gRLQu5FMwmzY8Xs,817
|
|
588
|
+
django_spire/core/tag/querysets.py,sha256=vLdAV9KRTn-B9G9vhB4tQ3j-iNyz6OVZR5E9nVvAZY8,263
|
|
589
|
+
django_spire/core/tag/tools.py,sha256=SyYRrYhjwu-TFnUeHRq82J21n5aVe8Wwy-iO5GGvvd8,2142
|
|
590
|
+
django_spire/core/tag/intelligence/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
591
|
+
django_spire/core/tag/intelligence/tag_set_bot.py,sha256=1kIZjt3NB52z1HMOocuGZn0LCng0zuqwmw1tzycxua8,1345
|
|
592
|
+
django_spire/core/tag/service/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
593
|
+
django_spire/core/tag/service/tag_service.py,sha256=R_YUQsSYn4kDhKjfeOvoGUQalPwsJoBe2H5186-cA-k,2534
|
|
594
|
+
django_spire/core/tag/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
595
|
+
django_spire/core/tag/tests/test_intelligence.py,sha256=qYRecu9qfRgiSdZbcuHPgCZrX_V_oC8CMoi6aiuwRTg,1073
|
|
596
|
+
django_spire/core/tag/tests/test_tags.py,sha256=kLpu41VQhM2fYDNR1ce-uiTMNYGcovwNho7H-Wo-Tks,3827
|
|
594
597
|
django_spire/core/templates/django_spire/403.html,sha256=35OX-3z-Yi6Igx9DTAcxNwWiZ17wXdm4wYGML4U2pns,37
|
|
595
598
|
django_spire/core/templates/django_spire/404.html,sha256=91sTr518M2YxQ8X3GlzDsNP6IVo3MW07tbHdcLBL8Iw,235
|
|
596
599
|
django_spire/core/templates/django_spire/500.html,sha256=8N-aqCoafjq2mFcjLZv-BkAEqRh2bzJ2SqojlboS8g4,247
|
|
@@ -638,6 +641,7 @@ django_spire/core/templates/django_spire/container/form_container.html,sha256=FZ
|
|
|
638
641
|
django_spire/core/templates/django_spire/dropdown/dropdown.html,sha256=O3gUp2YZm_2g0Qd-odFOnxfBkRc4c4af4zTbyGibSU0,528
|
|
639
642
|
django_spire/core/templates/django_spire/dropdown/ellipsis_dropdown.html,sha256=6DrFtcvfCnegs_gLfDZDkEGYb6ZpJ85clKQWckiTH00,1431
|
|
640
643
|
django_spire/core/templates/django_spire/dropdown/ellipsis_modal_dropdown.html,sha256=kUNcg-dSqr1wHjU_NijBAyCsa_7Z6_spVE5jytqYaME,898
|
|
644
|
+
django_spire/core/templates/django_spire/dropdown/ellipsis_table_dropdown.html,sha256=_Rf9hKmOchDdE00NU5Aq8pvVb4Q4vPxlIWf1NWOUGg8,935
|
|
641
645
|
django_spire/core/templates/django_spire/dropdown/element/dropdown_link_element.html,sha256=KB4KRolkw5zOImRkXcVXxIH_bxsN648gQRnRDijgvB4,1005
|
|
642
646
|
django_spire/core/templates/django_spire/dropdown/element/ellipsis_dropdown_modal_link_element.html,sha256=WC2ruVWh5c_5hYZmrKFYrfJXGW6r5z7KGu8_X-vPvhs,438
|
|
643
647
|
django_spire/core/templates/django_spire/element/attribute_element.html,sha256=2SOodzlW7aX3oIHic7g9oyFpRgUKu7dtZX6IEybSbrU,1487
|
|
@@ -648,7 +652,7 @@ django_spire/core/templates/django_spire/element/no_data_element.html,sha256=-WS
|
|
|
648
652
|
django_spire/core/templates/django_spire/element/page_loading_element.html,sha256=wdwYIVGoaUaapYQM_ekv2-3loXQ8Abchhhs8ipm5r-U,242
|
|
649
653
|
django_spire/core/templates/django_spire/element/pagination_element.html,sha256=jEyTNxaBxwJmuvDtgSP9NEb574Hn2F5taYh44KBSQWw,1702
|
|
650
654
|
django_spire/core/templates/django_spire/error/error.html,sha256=ZsNCwdEax8IhaMPE1jQ7mwWkQ63KHoZOuRzb_IjYoNc,390
|
|
651
|
-
django_spire/core/templates/django_spire/filtering/form/base_session_filter_form.html,sha256=
|
|
655
|
+
django_spire/core/templates/django_spire/filtering/form/base_session_filter_form.html,sha256=xlXI_D9u7OtkGsmgG5NGVFbx1L7H_pCw-wIkkyLfmq8,860
|
|
652
656
|
django_spire/core/templates/django_spire/filtering/form/filter_form.html,sha256=MJz2R7lA2BxuLi2n-MPPZ0rrE88q93gTEzOwQJMjwdY,264
|
|
653
657
|
django_spire/core/templates/django_spire/filtering/form/search_form.html,sha256=XAmbFYJU6pZOcwHe0KWoVPjMP58ozUlzDUZudnksJS4,264
|
|
654
658
|
django_spire/core/templates/django_spire/footer/footer.html,sha256=QqBoB9g5BWb9BWmGkdfmBBqihycW6bgx7ys1Fz-3Mww,321
|
|
@@ -666,7 +670,7 @@ django_spire/core/templates/django_spire/modal/center_modal.html,sha256=1ceBcqTh
|
|
|
666
670
|
django_spire/core/templates/django_spire/modal/dispatch_modal.html,sha256=_EOQQC6dmzN1Se1PyX5Brk1X9Hw2mYYuOqVqyK3OHEM,259
|
|
667
671
|
django_spire/core/templates/django_spire/modal/modal.html,sha256=jEnUweB81u-EYtQdalNMzZrCs38Ml8gU6-zQRwtRi2s,2290
|
|
668
672
|
django_spire/core/templates/django_spire/modal/title_modal.html,sha256=avPAPBnv4f7XF3O13mJ_osF3-s47iJJXDT2OqN58OjM,664
|
|
669
|
-
django_spire/core/templates/django_spire/modal/content/dispatch_modal_delete_confirmation_content.html,sha256=
|
|
673
|
+
django_spire/core/templates/django_spire/modal/content/dispatch_modal_delete_confirmation_content.html,sha256=nwVUqOfY1glF93amomA5VEL2evot2ilMOubGyQ-xQVY,1002
|
|
670
674
|
django_spire/core/templates/django_spire/modal/content/modal_title_content.html,sha256=zsYlbdo6hPbYWKIxfcvl6IU2IBmZ4SH-ii6oY34InLg,725
|
|
671
675
|
django_spire/core/templates/django_spire/modal/element/model_close_element.html,sha256=yxeesbfVS5PK08UH7IUacBhdtLA7KyIQjK7FrkAOvb8,71
|
|
672
676
|
django_spire/core/templates/django_spire/navigation/mobile_navigation.html,sha256=btXoeLihu3jd_7XzKrZiwaBgffDiLoDorMSxhYrnhc4,997
|
|
@@ -691,12 +695,23 @@ django_spire/core/templates/django_spire/speech/speech_synthesis.html,sha256=25H
|
|
|
691
695
|
django_spire/core/templates/django_spire/tab/tab.html,sha256=1zSIX0Xk337VV9Qa4tvoSJlhoT2LDTfEfCwJvESNG-Q,1964
|
|
692
696
|
django_spire/core/templates/django_spire/tab/element/tab_section_element.html,sha256=tEo0ENKhss74ll8HcFE9_kml35vusAfiMQHpudh3aEc,181
|
|
693
697
|
django_spire/core/templates/django_spire/tab/element/tab_trigger_element.html,sha256=9VmMhfEGa3ARHerwyXojtQWyIkUj9sOPGhckcQR3h6k,442
|
|
698
|
+
django_spire/core/templates/django_spire/table/base.html,sha256=kghLGWDS3Ka0VFGGcvGq2hyKUra_DXWq4h_uBl8bzIg,14012
|
|
699
|
+
django_spire/core/templates/django_spire/table/element/child_row.html,sha256=B0fIXw3-p7YREdNtpIBwijCom6RS64Lrzj-teRuvvKI,1916
|
|
700
|
+
django_spire/core/templates/django_spire/table/element/expandable_row.html,sha256=sAzzUeGishdYRUqs9t4lduxuxZaOzUYNhMfMytRLq90,1516
|
|
701
|
+
django_spire/core/templates/django_spire/table/element/footer.html,sha256=hOcdcyfZpw3Vc21seilTOBjYxR8ZXiTKQYp2vodFJi4,608
|
|
702
|
+
django_spire/core/templates/django_spire/table/element/header.html,sha256=RVCAV0ji_wP4otjhFZHaLiHdc3yqzJiqqvFdW00GRtM,615
|
|
703
|
+
django_spire/core/templates/django_spire/table/element/loading_skeleton.html,sha256=b3EGdrXoFT1tku4dA_sWv8FAxck5ZZhef_9FumYZYNA,577
|
|
704
|
+
django_spire/core/templates/django_spire/table/element/refreshing_skeleton.html,sha256=nCoDCITzPewTYJ-vPDZiSCv1qhdhT2BqMwygIdF1tYg,562
|
|
705
|
+
django_spire/core/templates/django_spire/table/element/row.html,sha256=qaj4dZZ_Z442813-Nq6YmCS9UueIM2G_sJ_tZ-NT3lo,3258
|
|
706
|
+
django_spire/core/templates/django_spire/table/element/trigger.html,sha256=KixtqIshbs8V1QSupIMxTe0UYJbK2oJIsqD8fZYxAOs,66
|
|
707
|
+
django_spire/core/templates/django_spire/table/item/no_data_item.html,sha256=PxTyI98edGtMxRdRzuEh1P_uOKRY_X5awrWXQsVb1jI,441
|
|
708
|
+
django_spire/core/templates/django_spire/tag/element/tag.html,sha256=Zx2HyGd-A01SrfohjHhPGjYrJj3h0xH0BUNFDD5BH_4,131
|
|
694
709
|
django_spire/core/templates/django_spire/wizard/wizard.html,sha256=iPkdo5O9mh3IQnhFijP9ZQXOaJDzhHGLmZo2Y49QnJ4,2266
|
|
695
710
|
django_spire/core/templates/django_spire/wizard/wizard_page.html,sha256=emW5W2z_mkGERsbw3A9tFJoUOwhxa4Efr8thtZ_gHkI,75
|
|
696
711
|
django_spire/core/templatetags/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
697
712
|
django_spire/core/templatetags/json.py,sha256=2XY8hQZrJOSmGMblL8bLRYD9hvUSQvhYaSJvwGaKzwU,280
|
|
698
713
|
django_spire/core/templatetags/message.py,sha256=y70pMv1ddttJ41c11O1S7h7v8h_gTtJVdXe67J4Ld3g,491
|
|
699
|
-
django_spire/core/templatetags/spire_core_tags.py,sha256=
|
|
714
|
+
django_spire/core/templatetags/spire_core_tags.py,sha256=V1pRiEo9fOh938dpxTRcjuIh3ukxIYNGnrmE59r-Cg4,4575
|
|
700
715
|
django_spire/core/templatetags/string_formating.py,sha256=pE5ID0-cvOKfmbAIixVXEW3LN8_XLEF_OlpztHkiILk,444
|
|
701
716
|
django_spire/core/templatetags/variable_types.py,sha256=LFk9NO-LKBTBnXu04jLJ_miOKyuO-KAvqaBM8jwzg7s,686
|
|
702
717
|
django_spire/core/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -811,13 +826,13 @@ django_spire/knowledge/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3
|
|
|
811
826
|
django_spire/knowledge/admin.py,sha256=fOF1RT1SQjiqAxQ8_BgrSWATykVkd4r8N6rihEYLWk0,348
|
|
812
827
|
django_spire/knowledge/apps.py,sha256=jxay3Kf1otlVCaPWcs3sYbatzaJOGK4K4e8jgbmQsuE,750
|
|
813
828
|
django_spire/knowledge/exceptions.py,sha256=CVe-sXRR8Sw30n-qJuDT12HYekmxD65DIm13-ip4gmk,96
|
|
814
|
-
django_spire/knowledge/models.py,sha256=
|
|
829
|
+
django_spire/knowledge/models.py,sha256=HknEl6GeoDwjyF7Hn9fEsAKR-73p6qDJVRbudvqATXo,596
|
|
815
830
|
django_spire/knowledge/auth/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
816
831
|
django_spire/knowledge/auth/controller.py,sha256=ktTJ7gjtbYmCYESZnK97q7_fPojTAScZXRysg2F_86Y,929
|
|
817
832
|
django_spire/knowledge/collection/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
818
833
|
django_spire/knowledge/collection/admin.py,sha256=9OKEgiSDiSHX6ZwB11l6mCx-jdF4VKfOe-SwFBdjKK4,1370
|
|
819
834
|
django_spire/knowledge/collection/forms.py,sha256=7JovVxNzE67hSydDa-1JGK4U4zPyzOj605QyEl0JkP8,238
|
|
820
|
-
django_spire/knowledge/collection/models.py,sha256=
|
|
835
|
+
django_spire/knowledge/collection/models.py,sha256=69ol2B-ytH6mJ48afFywPhENQNnM37gAsX-Grjim-g4,2387
|
|
821
836
|
django_spire/knowledge/collection/querysets.py,sha256=8DWTGvo4WovXQ9n7XRLoxtyDdBUka2N-kcPUnJVOhOo,2479
|
|
822
837
|
django_spire/knowledge/collection/seeding/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
823
838
|
django_spire/knowledge/collection/seeding/seed.py,sha256=i4VEvScJvZ1SUV9ukKZp0qdh_owyLyVSHGgl8vIzhwQ,303
|
|
@@ -827,7 +842,7 @@ django_spire/knowledge/collection/services/factory_service.py,sha256=92DLZODSRPF
|
|
|
827
842
|
django_spire/knowledge/collection/services/ordering_service.py,sha256=vTkSdt1lVT4VxSK3GhZibj8FPDDy5butwPkVzqmm07g,1243
|
|
828
843
|
django_spire/knowledge/collection/services/processor_service.py,sha256=3ArKBndoL3HEvH_1EBqfiw7AnbFYZ0WmBgcPV8BHdLQ,911
|
|
829
844
|
django_spire/knowledge/collection/services/service.py,sha256=sEamdqRcKdNcL6yz18hok0jww3Z4VRCPWrMF2QLvKGE,1830
|
|
830
|
-
django_spire/knowledge/collection/services/tag_service.py,sha256=
|
|
845
|
+
django_spire/knowledge/collection/services/tag_service.py,sha256=o1HnL0-du0XCGIl_8nMGMgW9AzEQE-AWbGOoBN_cQb0,1774
|
|
831
846
|
django_spire/knowledge/collection/services/transformation_service.py,sha256=ME_jYURSG7at4oujTbcRzIVXyKnb75Xi6M4Nclbw6Yo,3464
|
|
832
847
|
django_spire/knowledge/collection/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
833
848
|
django_spire/knowledge/collection/tests/factories.py,sha256=NUu4OliEZIQL9c05RPIPdzYP3Dtn1szLZxP4Wl-kX2w,429
|
|
@@ -848,8 +863,8 @@ django_spire/knowledge/collection/views/page_views.py,sha256=jiKsIqi9pvSY5KbLLGD
|
|
|
848
863
|
django_spire/knowledge/entry/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
849
864
|
django_spire/knowledge/entry/admin.py,sha256=pY-0sYx24Su0y7sb1I2-GMCZxFEZj9oXhRckEdHNKno,1568
|
|
850
865
|
django_spire/knowledge/entry/forms.py,sha256=Mhol37dMJP-pnex5IPxQVdchYcFBXnGzcWoY0SkU7lo,339
|
|
851
|
-
django_spire/knowledge/entry/models.py,sha256=
|
|
852
|
-
django_spire/knowledge/entry/querysets.py,sha256=
|
|
866
|
+
django_spire/knowledge/entry/models.py,sha256=S7UV7UbWJZMyw_Tj2Y5IAJ3ShBbFp-H7i-E2Ll74IdE,2138
|
|
867
|
+
django_spire/knowledge/entry/querysets.py,sha256=uD7eoxGvyzTdom55xrwBzGoS7bs3dGVixioQhvM_hs8,1284
|
|
853
868
|
django_spire/knowledge/entry/seeding/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
854
869
|
django_spire/knowledge/entry/seeding/seed.py,sha256=n7ereq118GuqV1luNih7nuVpkrZpkBgPWt0FuE4Bl88,105
|
|
855
870
|
django_spire/knowledge/entry/seeding/seeder.py,sha256=AqClwSzrFYWU59VsbUMJiN1Dh4P6Dvax-M3gqhoZoQM,2069
|
|
@@ -858,7 +873,7 @@ django_spire/knowledge/entry/services/automation_service.py,sha256=0_Ypk5cXhGvkQ
|
|
|
858
873
|
django_spire/knowledge/entry/services/factory_service.py,sha256=bgUEHjdc9u2mxUJFy26qYOxUiJRHmhtcoH6AG3xzU0I,1379
|
|
859
874
|
django_spire/knowledge/entry/services/processor_service.py,sha256=sfAM5ku7Td4k0jCe2szyoR72Bt1_OS75UKh7YPL4l2s,494
|
|
860
875
|
django_spire/knowledge/entry/services/service.py,sha256=-A8_UcmQ8aLvkRNzGzTMA4faN9UWOd5pdlFlujB1YHI,1912
|
|
861
|
-
django_spire/knowledge/entry/services/tag_service.py,sha256=
|
|
876
|
+
django_spire/knowledge/entry/services/tag_service.py,sha256=y5iYeWD4yi3aL4V8bbDIMvzVzqmcaqFSl5tQx5KlJtQ,792
|
|
862
877
|
django_spire/knowledge/entry/services/tool_service.py,sha256=QL6w8t284LfSOJrQaF46uWInd4t413WYxcXCWsat_jE,1083
|
|
863
878
|
django_spire/knowledge/entry/services/transformation_services.py,sha256=6WPQxW-_XATi8HCwshtJjoYbQFJcIdCqFaADHnTyk1U,2687
|
|
864
879
|
django_spire/knowledge/entry/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -939,16 +954,12 @@ django_spire/knowledge/entry/views/template_views.py,sha256=Y-3JnslI_hj4WesN8dJb
|
|
|
939
954
|
django_spire/knowledge/intelligence/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
940
955
|
django_spire/knowledge/intelligence/router.py,sha256=4nPcIJJPHtwGgBXrLZiZaSNrfHDADrE5wCznvQOOm2s,802
|
|
941
956
|
django_spire/knowledge/intelligence/bots/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
942
|
-
django_spire/knowledge/intelligence/bots/
|
|
943
|
-
django_spire/knowledge/intelligence/decoders/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
944
|
-
django_spire/knowledge/intelligence/decoders/collection_decoder.py,sha256=Vqh-JQukPatbxvV3NMWKvl8Np3bgRtDxQZjd2T3E0Rc,599
|
|
945
|
-
django_spire/knowledge/intelligence/decoders/entry_decoder.py,sha256=cyywWGDlXmEeq050AEcAc4II0ItwBp8HFM1aQXfGAl4,572
|
|
957
|
+
django_spire/knowledge/intelligence/bots/entries_search_llm_bot.py,sha256=Pnpbu9mzEm2_vKvUNz4DIqZL_XzZx4L44LQ2vIqDPnk,1664
|
|
946
958
|
django_spire/knowledge/intelligence/intel/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
947
|
-
django_spire/knowledge/intelligence/intel/
|
|
948
|
-
django_spire/knowledge/intelligence/intel/entry_intel.py,sha256=lGlGqeruV5oOu0aArGA_Bxa1pqAI7lr1MD7UATAy2Sg,445
|
|
959
|
+
django_spire/knowledge/intelligence/intel/entry_intel.py,sha256=7B7qLqNl39VFQKq_e5m1ShhSNgN2AV2gqesKRCnXid0,844
|
|
949
960
|
django_spire/knowledge/intelligence/intel/message_intel.py,sha256=iYXdOkS1KfP3QH3-KsTSJ_BspRh1vPw-zG7uJMNOWf8,419
|
|
950
961
|
django_spire/knowledge/intelligence/workflows/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
951
|
-
django_spire/knowledge/intelligence/workflows/knowledge_workflow.py,sha256=
|
|
962
|
+
django_spire/knowledge/intelligence/workflows/knowledge_workflow.py,sha256=55e_zFeeKBglQ73hi3d71Zc7WLUuWO5SwvFLCP5rUDg,2449
|
|
952
963
|
django_spire/knowledge/migrations/0001_initial.py,sha256=0oAx4e0Tu1wbcMwQZ4I_B2X_EGdEA9Qz_UBdVNGc3yE,5487
|
|
953
964
|
django_spire/knowledge/migrations/0002_alter_entryversionblock_type.py,sha256=Eg8tLjDO0nJ3go_jgVvoqwYKFOpYUUyNtZtLI2V3IQQ,527
|
|
954
965
|
django_spire/knowledge/migrations/0003_alter_collection_order_alter_entry_order_and_more.py,sha256=nIIUg1lHQ1iLbPlOulwZgzHrP1erGMYVXDaEdDXv4ik,749
|
|
@@ -973,7 +984,7 @@ django_spire/knowledge/templates/django_spire/knowledge/collection/container/det
|
|
|
973
984
|
django_spire/knowledge/templates/django_spire/knowledge/collection/element/ellipsis_dropdown.html,sha256=o9cceexfwUSDtac4uhlUm4LimnBQrgTP6QPkpJF6DD0,1376
|
|
974
985
|
django_spire/knowledge/templates/django_spire/knowledge/collection/form/form.html,sha256=gDjvFBpNQHGn4PNJBi4pBw89-IakpyrC23D9dr0xQ-c,1902
|
|
975
986
|
django_spire/knowledge/templates/django_spire/knowledge/collection/item/collection_item.html,sha256=gaOqh1wxf5IcWdxWWiYyz6HWjoPyn6FohaTMIssJ67k,517
|
|
976
|
-
django_spire/knowledge/templates/django_spire/knowledge/collection/page/display_page.html,sha256=
|
|
987
|
+
django_spire/knowledge/templates/django_spire/knowledge/collection/page/display_page.html,sha256=AzYod7og_yU_lfxWIRFC2R_ga_jwH_Cr4VE07sRlGT8,2400
|
|
977
988
|
django_spire/knowledge/templates/django_spire/knowledge/collection/page/form_page.html,sha256=eD190iYnmx-6u8Y0EAExDdilPtxTlS_ic6-WBfTtj2s,274
|
|
978
989
|
django_spire/knowledge/templates/django_spire/knowledge/container/container.html,sha256=Fi-PL8neKrmGeLQtvhNiGoimpen86m4r9YlAS-amWXI,1220
|
|
979
990
|
django_spire/knowledge/templates/django_spire/knowledge/entry/badge/entry_status_badge.html,sha256=qz7Y2ac1T4qu0Nr_Yj4BdUbQamgA6Llq7TmoXAf5Arw,381
|
|
@@ -990,9 +1001,8 @@ django_spire/knowledge/templates/django_spire/knowledge/entry/modal/publish_conf
|
|
|
990
1001
|
django_spire/knowledge/templates/django_spire/knowledge/entry/page/form_page.html,sha256=EBfDjDBvo7IR6f5joTtZjzK5LtZb4rt0U1FO1HQNt88,291
|
|
991
1002
|
django_spire/knowledge/templates/django_spire/knowledge/entry/page/import_form_page.html,sha256=TK8Bc7mUZwsmV1Xm9FPyWz7Hws68Ijy4c55orvNoOC4,308
|
|
992
1003
|
django_spire/knowledge/templates/django_spire/knowledge/entry/version/container/editor_container.html,sha256=NAtXEq8UJOV9_vp3l5HIIdQp-lZhNVW4luF0Nvv8Sl8,3389
|
|
993
|
-
django_spire/knowledge/templates/django_spire/knowledge/entry/version/page/editor_page.html,sha256=
|
|
994
|
-
django_spire/knowledge/templates/django_spire/knowledge/
|
|
995
|
-
django_spire/knowledge/templates/django_spire/knowledge/message/knowledge_message_intel.html,sha256=fpCJAwgxYqzJPLV63mLmUFjfEFk98t4FBX0RkSvDnzQ,698
|
|
1004
|
+
django_spire/knowledge/templates/django_spire/knowledge/entry/version/page/editor_page.html,sha256=Gc5uYGjYJR8nwaLa0hm-5GHO3ezI9CLO0H_OLp8EvdE,3092
|
|
1005
|
+
django_spire/knowledge/templates/django_spire/knowledge/message/knowledge_message_intel.html,sha256=kOSsRJHkh8hFYp1k1Y0wc-wh75VVjdXldEKErkfANGY,855
|
|
996
1006
|
django_spire/knowledge/templates/django_spire/knowledge/page/full_page.html,sha256=vz3WQ6SAL43QALRf0haaLfNkUfIQQemR0FAZQ2tznV4,1331
|
|
997
1007
|
django_spire/knowledge/templates/django_spire/knowledge/page/home_page.html,sha256=LMGSoPuP4N0NMX9QB1r5qJaExDvt6IKlJNp69Dt2EeQ,293
|
|
998
1008
|
django_spire/knowledge/templates/django_spire/knowledge/sub_navigation/element/collection_sub_navigation_ellipsis_dropdown.html,sha256=DeM7yRcjRN25eRvdOK-3Ae0kbYaMWvk7Ufbc8AZphgk,1023
|
|
@@ -1151,8 +1161,8 @@ django_spire/theme/urls/page_urls.py,sha256=S8nkKkgbhG3XHI3uMUL-piOjXIrRkuY2UlM_
|
|
|
1151
1161
|
django_spire/theme/views/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
1152
1162
|
django_spire/theme/views/json_views.py,sha256=W1khC2K_EMbEzAFmMxC_P76_MFnkRH4-eVdodrRfAhw,1904
|
|
1153
1163
|
django_spire/theme/views/page_views.py,sha256=pHr8iekjtR99xs7w1taj35HEo133Svq1dvDD0y0VL1c,3933
|
|
1154
|
-
django_spire-0.
|
|
1155
|
-
django_spire-0.
|
|
1156
|
-
django_spire-0.
|
|
1157
|
-
django_spire-0.
|
|
1158
|
-
django_spire-0.
|
|
1164
|
+
django_spire-0.22.1.dist-info/licenses/LICENSE.md,sha256=tlTbOtgKoy-xAQpUk9gPeh9O4oRXCOzoWdW3jJz0wnA,1091
|
|
1165
|
+
django_spire-0.22.1.dist-info/METADATA,sha256=NoSKljzmaON1i2bUleBV34oumpw460s_7RyY1lYeHeQ,4967
|
|
1166
|
+
django_spire-0.22.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
1167
|
+
django_spire-0.22.1.dist-info/top_level.txt,sha256=xf3QV1e--ONkVpgMDQE9iqjQ1Vg4--_6C8wmO-KxPHQ,13
|
|
1168
|
+
django_spire-0.22.1.dist-info/RECORD,,
|
django_spire/core/tags/mixins.py
DELETED
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
from django.db import models
|
|
2
|
-
from django.db.models import QuerySet
|
|
3
|
-
|
|
4
|
-
from django_spire.core.tags.models import Tag
|
|
5
|
-
from django_spire.core.tags import tools
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
class TagsModelMixin(models.Model):
|
|
9
|
-
tags = models.ManyToManyField(Tag, related_name='+', null=True, blank=True, editable=False)
|
|
10
|
-
|
|
11
|
-
class Meta:
|
|
12
|
-
abstract = True
|
|
13
|
-
|
|
14
|
-
@property
|
|
15
|
-
def tag_set(self) -> set[str]:
|
|
16
|
-
return set(self.tags.values_list('name', flat=True))
|
|
17
|
-
|
|
18
|
-
@property
|
|
19
|
-
def tag_set_simplified(self) -> set[str]:
|
|
20
|
-
simplified_tag_words = []
|
|
21
|
-
|
|
22
|
-
for tag in self.tag_set:
|
|
23
|
-
tag_words = tag.split('-')
|
|
24
|
-
simplified_tag_words.extend(tag_words)
|
|
25
|
-
|
|
26
|
-
return set(simplified_tag_words)
|
|
27
|
-
|
|
28
|
-
def add_tags_from_tag_set(self, tag_set: set[str]):
|
|
29
|
-
self._update_global_tags_from_set(tag_set)
|
|
30
|
-
|
|
31
|
-
self.tags.add(*Tag.objects.in_tag_set(tag_set))
|
|
32
|
-
|
|
33
|
-
def clear_tags(self):
|
|
34
|
-
self.tags.clear()
|
|
35
|
-
|
|
36
|
-
def get_matching_tags_from_tag_set(self, tag_set: set[str]) -> QuerySet:
|
|
37
|
-
return self.tags.in_tag_set(tag_set)
|
|
38
|
-
|
|
39
|
-
def get_matching_percentage_of_tag_set(self, tag_set: set[str]) -> float:
|
|
40
|
-
return tools.get_matching_a_percentage_from_tag_sets(tag_set, self.tag_set)
|
|
41
|
-
|
|
42
|
-
def get_matching_percentage_of_model_tags_from_tag_set(self, tag_set: set[str]) -> float:
|
|
43
|
-
return tools.get_matching_b_percentage_from_tag_sets(tag_set, self.tag_set)
|
|
44
|
-
|
|
45
|
-
def has_tags_in_tag_set(self, tag_set: set[str]) -> bool:
|
|
46
|
-
return self.tag_set.issuperset(tag_set)
|
|
47
|
-
|
|
48
|
-
def remove_tags_by_tag_set(self, tag_set: set[str]):
|
|
49
|
-
tag_objects = Tag.objects.in_tag_set(tag_set)
|
|
50
|
-
|
|
51
|
-
self.tags.remove(*tag_objects)
|
|
52
|
-
|
|
53
|
-
def set_tags_from_tag_set(self, tag_set: set[str]):
|
|
54
|
-
self._update_global_tags_from_set(tag_set)
|
|
55
|
-
|
|
56
|
-
tag_objects = Tag.objects.in_tag_set(tag_set)
|
|
57
|
-
self.tags.set(tag_objects)
|
|
58
|
-
|
|
59
|
-
@staticmethod
|
|
60
|
-
def _update_global_tags_from_set(tag_set: set[str]):
|
|
61
|
-
Tag.add_tags([Tag(name=tag) for tag in tag_set])
|
|
@@ -1,102 +0,0 @@
|
|
|
1
|
-
from django.test import TestCase
|
|
2
|
-
|
|
3
|
-
from django_spire.core.tags.models import Tag
|
|
4
|
-
from django_spire.knowledge.collection.models import Collection
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
class TestTags(TestCase):
|
|
8
|
-
def setUp(self):
|
|
9
|
-
self.collection = Collection.objects.create(
|
|
10
|
-
name='Test Collection', description='Test Collection Description'
|
|
11
|
-
)
|
|
12
|
-
|
|
13
|
-
self.tag_set_a = {'apple', 'banana', 'orange'}
|
|
14
|
-
self.tag_set_b = {'grape', 'kiwi', 'pear'}
|
|
15
|
-
self.tag_set_c = {'lemon', 'lime', 'mango'}
|
|
16
|
-
|
|
17
|
-
self.mixed_tag_set = {'apple', 'grape', 'lemon'}
|
|
18
|
-
|
|
19
|
-
self.dirty_tag_set = {'HaT~', 'four* tacos', '123 hoop!!'}
|
|
20
|
-
|
|
21
|
-
self.collection.add_tags_from_tag_set(self.tag_set_a)
|
|
22
|
-
self.collection.add_tags_from_tag_set(self.tag_set_b)
|
|
23
|
-
self.collection.add_tags_from_tag_set(self.tag_set_c)
|
|
24
|
-
|
|
25
|
-
self.collection.add_tags_from_tag_set(self.mixed_tag_set)
|
|
26
|
-
|
|
27
|
-
self.collection.add_tags_from_tag_set(self.dirty_tag_set)
|
|
28
|
-
|
|
29
|
-
def test_tag_removal(self):
|
|
30
|
-
self.assertIn('apple', self.collection.tag_set)
|
|
31
|
-
|
|
32
|
-
self.collection.remove_tags_by_tag_set(self.mixed_tag_set)
|
|
33
|
-
|
|
34
|
-
self.assertNotIn('lemon', self.collection.tag_set)
|
|
35
|
-
|
|
36
|
-
self.assertIn('kiwi', self.collection.tag_set)
|
|
37
|
-
|
|
38
|
-
def test_tag_add_and_set(self):
|
|
39
|
-
self.collection.set_tags_from_tag_set(self.mixed_tag_set)
|
|
40
|
-
|
|
41
|
-
self.assertIn('lemon', self.collection.tag_set)
|
|
42
|
-
|
|
43
|
-
self.assertNotIn('banana', self.collection.tag_set)
|
|
44
|
-
|
|
45
|
-
def test_tag_count(self):
|
|
46
|
-
self.assertEqual(Tag.objects.count(), 12)
|
|
47
|
-
self.assertEqual(self.collection.tags.count(), 12)
|
|
48
|
-
|
|
49
|
-
def test_tag_removal(self):
|
|
50
|
-
self.collection.remove_tags_by_tag_set(self.tag_set_a)
|
|
51
|
-
|
|
52
|
-
self.assertEqual(self.collection.tags.count(), 9)
|
|
53
|
-
|
|
54
|
-
def test_tag_bool_methods(self):
|
|
55
|
-
self.collection.remove_tags_by_tag_set(self.tag_set_b)
|
|
56
|
-
|
|
57
|
-
self.assertTrue(self.collection.has_tags_in_tag_set(self.tag_set_c))
|
|
58
|
-
self.assertFalse(self.collection.has_tags_in_tag_set(self.mixed_tag_set))
|
|
59
|
-
|
|
60
|
-
def test_tag_matching_methods(self):
|
|
61
|
-
self.assertEqual(len(self.collection.get_matching_tags_from_tag_set(self.tag_set_a)), 3)
|
|
62
|
-
|
|
63
|
-
self.collection.remove_tags_by_tag_set(self.tag_set_a)
|
|
64
|
-
|
|
65
|
-
self.assertEqual(len(self.collection.get_matching_tags_from_tag_set(self.tag_set_a)), 0)
|
|
66
|
-
self.assertEqual(len(self.collection.get_matching_tags_from_tag_set(self.tag_set_b)), 3)
|
|
67
|
-
self.assertEqual(len(self.collection.get_matching_tags_from_tag_set(self.mixed_tag_set)), 2)
|
|
68
|
-
|
|
69
|
-
self.collection.remove_tags_by_tag_set(self.tag_set_b)
|
|
70
|
-
|
|
71
|
-
self.assertEqual(len(self.collection.get_matching_tags_from_tag_set(self.tag_set_b)), 0)
|
|
72
|
-
|
|
73
|
-
self.assertEqual(len(self.collection.get_matching_tags_from_tag_set(self.mixed_tag_set)), 1)
|
|
74
|
-
|
|
75
|
-
def test_tag_metric_methods(self):
|
|
76
|
-
self.assertAlmostEqual(
|
|
77
|
-
self.collection.get_matching_percentage_of_tag_set(self.tag_set_a),
|
|
78
|
-
1.00,
|
|
79
|
-
2
|
|
80
|
-
)
|
|
81
|
-
|
|
82
|
-
self.assertAlmostEqual(
|
|
83
|
-
self.collection.get_matching_percentage_of_model_tags_from_tag_set(self.tag_set_b),
|
|
84
|
-
0.25,
|
|
85
|
-
2
|
|
86
|
-
)
|
|
87
|
-
|
|
88
|
-
self.collection.remove_tags_by_tag_set(self.mixed_tag_set)
|
|
89
|
-
|
|
90
|
-
self.assertAlmostEqual(
|
|
91
|
-
self.collection.get_matching_percentage_of_tag_set(self.tag_set_a),
|
|
92
|
-
0.666,
|
|
93
|
-
2
|
|
94
|
-
)
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
self.assertAlmostEqual(
|
|
98
|
-
self.collection.get_matching_percentage_of_model_tags_from_tag_set(self.tag_set_b),
|
|
99
|
-
0.222,
|
|
100
|
-
2
|
|
101
|
-
)
|
|
102
|
-
|
django_spire/core/tags/tools.py
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
def get_matching_tag_set_from_tag_sets(tag_set_a: set[str], tag_set_b: set[str]) -> set[str]:
|
|
2
|
-
return tag_set_a.intersection(tag_set_b)
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
def get_matching_count_from_tag_sets(tag_set_a: set[str], tag_set_b: set[str]) -> int:
|
|
6
|
-
return len(get_matching_tag_set_from_tag_sets(tag_set_a, tag_set_b))
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
def get_matching_a_percentage_from_tag_sets(tag_set_a: set[str], tag_set_b: set[str]) -> float:
|
|
10
|
-
try:
|
|
11
|
-
return get_matching_count_from_tag_sets(tag_set_a, tag_set_b) / len(tag_set_a)
|
|
12
|
-
except ZeroDivisionError:
|
|
13
|
-
return 0.0
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
def get_matching_b_percentage_from_tag_sets(tag_set_a: set[str], tag_set_b: set[str]) -> float:
|
|
17
|
-
try:
|
|
18
|
-
return get_matching_count_from_tag_sets(tag_set_a, tag_set_b) / len(tag_set_b)
|
|
19
|
-
except ZeroDivisionError:
|
|
20
|
-
return 0.0
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
from __future__ import annotations
|
|
2
|
-
|
|
3
|
-
from dandy import Bot, Prompt
|
|
4
|
-
|
|
5
|
-
from django_spire.knowledge.entry.models import Entry
|
|
6
|
-
from django_spire.knowledge.intelligence.intel.collection_intel import CollectionIntel
|
|
7
|
-
from django_spire.knowledge.intelligence.intel.entry_intel import EntryIntel
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
class EntrySearchBot(Bot):
|
|
11
|
-
llm_role = 'Knowledge Entry Search Assistant'
|
|
12
|
-
llm_task = 'Read through the knowledge entry the information request and return information and the block id that relevant'
|
|
13
|
-
llm_guidelines = (
|
|
14
|
-
Prompt()
|
|
15
|
-
.list([
|
|
16
|
-
'Make sure the relevant heading text is from a heading with mark down formatting.'
|
|
17
|
-
'When returning the relevant heading remove any of the markdown formating characters.'
|
|
18
|
-
])
|
|
19
|
-
)
|
|
20
|
-
llm_intel_class = EntryIntel
|
|
21
|
-
|
|
22
|
-
def process(self, user_input: str, entry: Entry) -> EntryIntel:
|
|
23
|
-
entry_prompt = Prompt()
|
|
24
|
-
entry_prompt.sub_heading('Information Request')
|
|
25
|
-
entry_prompt.line_break()
|
|
26
|
-
entry_prompt.text(f'{user_input}')
|
|
27
|
-
entry_prompt.line_break()
|
|
28
|
-
entry_prompt.sub_heading(f'Knowledge Entry: {entry.name}')
|
|
29
|
-
entry_prompt.line_break()
|
|
30
|
-
|
|
31
|
-
for version_block in entry.current_version.blocks.all():
|
|
32
|
-
entry_prompt.text(f'{version_block.id}: {version_block.render_to_text()}')
|
|
33
|
-
|
|
34
|
-
entry_intel = self.llm.prompt_to_intel(
|
|
35
|
-
prompt=entry_prompt,
|
|
36
|
-
exclude_fields={'entry_id', 'collection_intel'},
|
|
37
|
-
)
|
|
38
|
-
|
|
39
|
-
entry_intel.entry_id = entry.id
|
|
40
|
-
entry_intel.collection_intel = CollectionIntel(
|
|
41
|
-
name=entry.collection.name,
|
|
42
|
-
collection_id=entry.collection.id,
|
|
43
|
-
)
|
|
44
|
-
|
|
45
|
-
return entry_intel
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
from __future__ import annotations
|
|
2
|
-
|
|
3
|
-
from dandy import Decoder
|
|
4
|
-
|
|
5
|
-
from django_spire.knowledge.collection.models import Collection
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
def get_collection_decoder() -> Decoder:
|
|
9
|
-
class CollectionDecoder(Decoder):
|
|
10
|
-
mapping_keys_description = 'Knowledge Collections Tags'
|
|
11
|
-
mapping = {
|
|
12
|
-
**{
|
|
13
|
-
f'{collection.services.tag.get_aggregated_tag_set_simplified()}': collection
|
|
14
|
-
for collection in Collection.objects.all().annotate_entry_count()
|
|
15
|
-
},
|
|
16
|
-
'No Matching Knowledge Collection Tags': None,
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
return CollectionDecoder()
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
from __future__ import annotations
|
|
2
|
-
|
|
3
|
-
from typing import TYPE_CHECKING
|
|
4
|
-
|
|
5
|
-
from dandy import Decoder
|
|
6
|
-
|
|
7
|
-
if TYPE_CHECKING:
|
|
8
|
-
from django_spire.knowledge.collection.models import Collection
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
def get_entry_decoder(collection: Collection) -> Decoder:
|
|
12
|
-
class EntryDecoder(Decoder):
|
|
13
|
-
mapping_keys_description = 'Knowledge Entries Tags'
|
|
14
|
-
mapping = {
|
|
15
|
-
**{
|
|
16
|
-
f'{entry.tag_set}': entry
|
|
17
|
-
for entry in collection.entries.all()
|
|
18
|
-
},
|
|
19
|
-
'No Matching Knowledge Entries': None
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
return EntryDecoder()
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
{% extends 'django_spire/knowledge/page/full_page.html' %}
|
|
2
|
-
|
|
3
|
-
{% load static %}
|
|
4
|
-
|
|
5
|
-
{% block base_body_additional_top_js %}
|
|
6
|
-
<script type="application/javascript" src="{% static 'django_spire/knowledge/entry/version/js/managers.js' %}?v={{ DJANGO_SPIRE_VERSION }}"></script>
|
|
7
|
-
{% endblock %}
|
|
8
|
-
|
|
9
|
-
{% block knowledge_full_page_content %}
|
|
10
|
-
<style>
|
|
11
|
-
.block {}
|
|
12
|
-
|
|
13
|
-
.action-items {
|
|
14
|
-
opacity: 0;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
.block:hover .action-items {
|
|
18
|
-
opacity: 1;
|
|
19
|
-
}
|
|
20
|
-
</style>
|
|
21
|
-
<div class="row justify-content-center">
|
|
22
|
-
<div class="col-12 col-xl-8">
|
|
23
|
-
{% include 'django_spire/knowledge/entry/version/container/form_container.html' %}
|
|
24
|
-
</div>
|
|
25
|
-
</div>
|
|
26
|
-
{% endblock %}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|