streamlit-octostar-utils 0.4.2.dev20__tar.gz → 0.4.2.dev22__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.
- {streamlit_octostar_utils-0.4.2.dev20 → streamlit_octostar_utils-0.4.2.dev22}/PKG-INFO +1 -1
- {streamlit_octostar_utils-0.4.2.dev20 → streamlit_octostar_utils-0.4.2.dev22}/pyproject.toml +1 -1
- {streamlit_octostar_utils-0.4.2.dev20 → streamlit_octostar_utils-0.4.2.dev22}/streamlit_octostar_utils/api_crafter/nifi.py +29 -1
- streamlit_octostar_utils-0.4.2.dev22/streamlit_octostar_utils/octostar/constants.py +1 -0
- {streamlit_octostar_utils-0.4.2.dev20 → streamlit_octostar_utils-0.4.2.dev22}/LICENSE +0 -0
- {streamlit_octostar_utils-0.4.2.dev20 → streamlit_octostar_utils-0.4.2.dev22}/README.md +0 -0
- {streamlit_octostar_utils-0.4.2.dev20 → streamlit_octostar_utils-0.4.2.dev22}/streamlit_octostar_utils/__init__.py +0 -0
- {streamlit_octostar_utils-0.4.2.dev20 → streamlit_octostar_utils-0.4.2.dev22}/streamlit_octostar_utils/api_crafter/__init__.py +0 -0
- {streamlit_octostar_utils-0.4.2.dev20 → streamlit_octostar_utils-0.4.2.dev22}/streamlit_octostar_utils/api_crafter/celery.py +0 -0
- {streamlit_octostar_utils-0.4.2.dev20 → streamlit_octostar_utils-0.4.2.dev22}/streamlit_octostar_utils/api_crafter/contents.py +0 -0
- {streamlit_octostar_utils-0.4.2.dev20 → streamlit_octostar_utils-0.4.2.dev22}/streamlit_octostar_utils/api_crafter/fastapi.py +0 -0
- {streamlit_octostar_utils-0.4.2.dev20 → streamlit_octostar_utils-0.4.2.dev22}/streamlit_octostar_utils/api_crafter/parallelism.py +0 -0
- {streamlit_octostar_utils-0.4.2.dev20 → streamlit_octostar_utils-0.4.2.dev22}/streamlit_octostar_utils/api_crafter/parser/__init__.py +0 -0
- {streamlit_octostar_utils-0.4.2.dev20 → streamlit_octostar_utils-0.4.2.dev22}/streamlit_octostar_utils/api_crafter/parser/combine_fields.py +0 -0
- {streamlit_octostar_utils-0.4.2.dev20 → streamlit_octostar_utils-0.4.2.dev22}/streamlit_octostar_utils/api_crafter/parser/entities_parser.py +0 -0
- {streamlit_octostar_utils-0.4.2.dev20 → streamlit_octostar_utils-0.4.2.dev22}/streamlit_octostar_utils/api_crafter/parser/generics.py +0 -0
- {streamlit_octostar_utils-0.4.2.dev20 → streamlit_octostar_utils-0.4.2.dev22}/streamlit_octostar_utils/api_crafter/parser/info.py +0 -0
- {streamlit_octostar_utils-0.4.2.dev20 → streamlit_octostar_utils-0.4.2.dev22}/streamlit_octostar_utils/api_crafter/parser/linkchart_functions.py +0 -0
- {streamlit_octostar_utils-0.4.2.dev20 → streamlit_octostar_utils-0.4.2.dev22}/streamlit_octostar_utils/api_crafter/parser/matches.py +0 -0
- {streamlit_octostar_utils-0.4.2.dev20 → streamlit_octostar_utils-0.4.2.dev22}/streamlit_octostar_utils/api_crafter/parser/parameters.py +0 -0
- {streamlit_octostar_utils-0.4.2.dev20 → streamlit_octostar_utils-0.4.2.dev22}/streamlit_octostar_utils/api_crafter/parser/rules.py +0 -0
- {streamlit_octostar_utils-0.4.2.dev20 → streamlit_octostar_utils-0.4.2.dev22}/streamlit_octostar_utils/api_crafter/parser/signals.py +0 -0
- {streamlit_octostar_utils-0.4.2.dev20 → streamlit_octostar_utils-0.4.2.dev22}/streamlit_octostar_utils/core/__init__.py +0 -0
- {streamlit_octostar_utils-0.4.2.dev20 → streamlit_octostar_utils-0.4.2.dev22}/streamlit_octostar_utils/core/dict.py +0 -0
- {streamlit_octostar_utils-0.4.2.dev20 → streamlit_octostar_utils-0.4.2.dev22}/streamlit_octostar_utils/core/filetypes.py +0 -0
- {streamlit_octostar_utils-0.4.2.dev20 → streamlit_octostar_utils-0.4.2.dev22}/streamlit_octostar_utils/core/threading/__init__.py +0 -0
- {streamlit_octostar_utils-0.4.2.dev20 → streamlit_octostar_utils-0.4.2.dev22}/streamlit_octostar_utils/core/threading/key_queue.py +0 -0
- {streamlit_octostar_utils-0.4.2.dev20 → streamlit_octostar_utils-0.4.2.dev22}/streamlit_octostar_utils/core/timestamp.py +0 -0
- {streamlit_octostar_utils-0.4.2.dev20 → streamlit_octostar_utils-0.4.2.dev22}/streamlit_octostar_utils/nlp/__init__.py +0 -0
- {streamlit_octostar_utils-0.4.2.dev20 → streamlit_octostar_utils-0.4.2.dev22}/streamlit_octostar_utils/nlp/custom_recognizers.py +0 -0
- {streamlit_octostar_utils-0.4.2.dev20 → streamlit_octostar_utils-0.4.2.dev22}/streamlit_octostar_utils/nlp/language.py +0 -0
- {streamlit_octostar_utils-0.4.2.dev20 → streamlit_octostar_utils-0.4.2.dev22}/streamlit_octostar_utils/nlp/ner.py +0 -0
- {streamlit_octostar_utils-0.4.2.dev20 → streamlit_octostar_utils-0.4.2.dev22}/streamlit_octostar_utils/octostar/__init__.py +0 -0
- {streamlit_octostar_utils-0.4.2.dev20 → streamlit_octostar_utils-0.4.2.dev22}/streamlit_octostar_utils/octostar/client.py +0 -0
- {streamlit_octostar_utils-0.4.2.dev20 → streamlit_octostar_utils-0.4.2.dev22}/streamlit_octostar_utils/octostar/context.py +0 -0
- {streamlit_octostar_utils-0.4.2.dev20 → streamlit_octostar_utils-0.4.2.dev22}/streamlit_octostar_utils/octostar/permissions.py +0 -0
- {streamlit_octostar_utils-0.4.2.dev20 → streamlit_octostar_utils-0.4.2.dev22}/streamlit_octostar_utils/ontology/__init__.py +0 -0
- {streamlit_octostar_utils-0.4.2.dev20 → streamlit_octostar_utils-0.4.2.dev22}/streamlit_octostar_utils/ontology/inheritance.py +0 -0
- {streamlit_octostar_utils-0.4.2.dev20 → streamlit_octostar_utils-0.4.2.dev22}/streamlit_octostar_utils/ontology/relationships.py +0 -0
- {streamlit_octostar_utils-0.4.2.dev20 → streamlit_octostar_utils-0.4.2.dev22}/streamlit_octostar_utils/ontology/validation.py +0 -0
- {streamlit_octostar_utils-0.4.2.dev20 → streamlit_octostar_utils-0.4.2.dev22}/streamlit_octostar_utils/style/__init__.py +0 -0
- {streamlit_octostar_utils-0.4.2.dev20 → streamlit_octostar_utils-0.4.2.dev22}/streamlit_octostar_utils/style/common.py +0 -0
- {streamlit_octostar_utils-0.4.2.dev20 → streamlit_octostar_utils-0.4.2.dev22}/streamlit_octostar_utils/threading/__init__.py +0 -0
- {streamlit_octostar_utils-0.4.2.dev20 → streamlit_octostar_utils-0.4.2.dev22}/streamlit_octostar_utils/threading/async_task_manager.py +0 -0
- {streamlit_octostar_utils-0.4.2.dev20 → streamlit_octostar_utils-0.4.2.dev22}/streamlit_octostar_utils/threading/session_callback_manager.py +0 -0
- {streamlit_octostar_utils-0.4.2.dev20 → streamlit_octostar_utils-0.4.2.dev22}/streamlit_octostar_utils/threading/session_state_hot_swapper.py +0 -0
|
@@ -208,6 +208,7 @@ class NifiFragmenter(object):
|
|
|
208
208
|
if count > 100_000:
|
|
209
209
|
raise ValueError("Cannot have more than 100k entities for fragmentation")
|
|
210
210
|
identifier = str(uuid.uuid4())
|
|
211
|
+
root_uid = fragments[0].record["os_entity_uid"]
|
|
211
212
|
for i, entity in enumerate(fragments):
|
|
212
213
|
travel_dict(entity.request["nifi_attributes"], fragmenter_keylist.split("."), "w")(
|
|
213
214
|
{"identifier": identifier, "count": count, "index": i}
|
|
@@ -221,7 +222,7 @@ class NifiFragmenter(object):
|
|
|
221
222
|
"fragments_stack"
|
|
222
223
|
]
|
|
223
224
|
travel_dict(entity.request["config"]["fragment"], fragmenter_keylist.split("."), "w")(
|
|
224
|
-
{"identifier": identifier, "count": count, "index": i}
|
|
225
|
+
{"identifier": identifier, "count": count, "index": i, "root_uid": root_uid}
|
|
225
226
|
)
|
|
226
227
|
|
|
227
228
|
def push_defragment_strategy(fragment, defragmenter_config):
|
|
@@ -793,6 +794,33 @@ class NifiEntity(object):
|
|
|
793
794
|
fragment = entity.request.get("config", {}).get("fragment", {})
|
|
794
795
|
return not _is_sub_fragment_recursive(fragment)
|
|
795
796
|
|
|
797
|
+
def get_fragment_root_uid(self, fragment_name_or_idx) -> str:
|
|
798
|
+
fragment_config = self.request.get("config", {}).get("fragment", {})
|
|
799
|
+
fragments_stack = fragment_config.get("fragments_stack", [])
|
|
800
|
+
if isinstance(fragment_name_or_idx, int):
|
|
801
|
+
try:
|
|
802
|
+
fragment_key = fragments_stack[fragment_name_or_idx]
|
|
803
|
+
except IndexError:
|
|
804
|
+
raise IndexError(
|
|
805
|
+
f"Fragment stack index {fragment_name_or_idx} out of range "
|
|
806
|
+
f"(stack size: {len(fragments_stack)})"
|
|
807
|
+
)
|
|
808
|
+
else:
|
|
809
|
+
fragment_key = fragment_name_or_idx
|
|
810
|
+
if fragment_key not in fragments_stack:
|
|
811
|
+
raise KeyError(
|
|
812
|
+
f"Fragment '{fragment_key}' not found in "
|
|
813
|
+
f"fragments_stack: {fragments_stack}"
|
|
814
|
+
)
|
|
815
|
+
fragment_data = travel_dict(
|
|
816
|
+
fragment_config, fragment_key.split("."), mode="r"
|
|
817
|
+
)
|
|
818
|
+
if not isinstance(fragment_data, dict) or "root_uid" not in fragment_data:
|
|
819
|
+
raise KeyError(
|
|
820
|
+
f"No root_uid found in fragment config for '{fragment_key}'"
|
|
821
|
+
)
|
|
822
|
+
return fragment_data["root_uid"]
|
|
823
|
+
|
|
796
824
|
def to_json(self):
|
|
797
825
|
if self.drop_on_output:
|
|
798
826
|
return
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
OS_XMP_NAMESPACE = "http://octostar.io/ns/1.0/"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|