streamlit-octostar-utils 0.2.7a1__tar.gz → 0.2.9__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.2.7a1 → streamlit_octostar_utils-0.2.9}/PKG-INFO +1 -1
- {streamlit_octostar_utils-0.2.7a1 → streamlit_octostar_utils-0.2.9}/pyproject.toml +1 -1
- {streamlit_octostar_utils-0.2.7a1 → streamlit_octostar_utils-0.2.9}/streamlit_octostar_utils/api_crafter/nifi.py +6 -4
- {streamlit_octostar_utils-0.2.7a1 → streamlit_octostar_utils-0.2.9}/LICENSE +0 -0
- {streamlit_octostar_utils-0.2.7a1 → streamlit_octostar_utils-0.2.9}/README.md +0 -0
- {streamlit_octostar_utils-0.2.7a1 → streamlit_octostar_utils-0.2.9}/streamlit_octostar_utils/__init__.py +0 -0
- {streamlit_octostar_utils-0.2.7a1 → streamlit_octostar_utils-0.2.9}/streamlit_octostar_utils/api_crafter/__init__.py +0 -0
- {streamlit_octostar_utils-0.2.7a1 → streamlit_octostar_utils-0.2.9}/streamlit_octostar_utils/api_crafter/celery.py +0 -0
- {streamlit_octostar_utils-0.2.7a1 → streamlit_octostar_utils-0.2.9}/streamlit_octostar_utils/api_crafter/fastapi.py +0 -0
- {streamlit_octostar_utils-0.2.7a1 → streamlit_octostar_utils-0.2.9}/streamlit_octostar_utils/api_crafter/parser/__init__.py +0 -0
- {streamlit_octostar_utils-0.2.7a1 → streamlit_octostar_utils-0.2.9}/streamlit_octostar_utils/api_crafter/parser/combine_fields.py +0 -0
- {streamlit_octostar_utils-0.2.7a1 → streamlit_octostar_utils-0.2.9}/streamlit_octostar_utils/api_crafter/parser/entities_parser.py +0 -0
- {streamlit_octostar_utils-0.2.7a1 → streamlit_octostar_utils-0.2.9}/streamlit_octostar_utils/api_crafter/parser/generics.py +0 -0
- {streamlit_octostar_utils-0.2.7a1 → streamlit_octostar_utils-0.2.9}/streamlit_octostar_utils/api_crafter/parser/info.py +0 -0
- {streamlit_octostar_utils-0.2.7a1 → streamlit_octostar_utils-0.2.9}/streamlit_octostar_utils/api_crafter/parser/linkchart_functions.py +0 -0
- {streamlit_octostar_utils-0.2.7a1 → streamlit_octostar_utils-0.2.9}/streamlit_octostar_utils/api_crafter/parser/matches.py +0 -0
- {streamlit_octostar_utils-0.2.7a1 → streamlit_octostar_utils-0.2.9}/streamlit_octostar_utils/api_crafter/parser/parameters.py +0 -0
- {streamlit_octostar_utils-0.2.7a1 → streamlit_octostar_utils-0.2.9}/streamlit_octostar_utils/api_crafter/parser/rules.py +0 -0
- {streamlit_octostar_utils-0.2.7a1 → streamlit_octostar_utils-0.2.9}/streamlit_octostar_utils/api_crafter/parser/signals.py +0 -0
- {streamlit_octostar_utils-0.2.7a1 → streamlit_octostar_utils-0.2.9}/streamlit_octostar_utils/core/__init__.py +0 -0
- {streamlit_octostar_utils-0.2.7a1 → streamlit_octostar_utils-0.2.9}/streamlit_octostar_utils/core/dict.py +0 -0
- {streamlit_octostar_utils-0.2.7a1 → streamlit_octostar_utils-0.2.9}/streamlit_octostar_utils/core/filetypes.py +0 -0
- {streamlit_octostar_utils-0.2.7a1 → streamlit_octostar_utils-0.2.9}/streamlit_octostar_utils/core/threading/__init__.py +0 -0
- {streamlit_octostar_utils-0.2.7a1 → streamlit_octostar_utils-0.2.9}/streamlit_octostar_utils/core/threading/key_queue.py +0 -0
- {streamlit_octostar_utils-0.2.7a1 → streamlit_octostar_utils-0.2.9}/streamlit_octostar_utils/core/timestamp.py +0 -0
- {streamlit_octostar_utils-0.2.7a1 → streamlit_octostar_utils-0.2.9}/streamlit_octostar_utils/nlp/__init__.py +0 -0
- {streamlit_octostar_utils-0.2.7a1 → streamlit_octostar_utils-0.2.9}/streamlit_octostar_utils/nlp/language.py +0 -0
- {streamlit_octostar_utils-0.2.7a1 → streamlit_octostar_utils-0.2.9}/streamlit_octostar_utils/nlp/ner.py +0 -0
- {streamlit_octostar_utils-0.2.7a1 → streamlit_octostar_utils-0.2.9}/streamlit_octostar_utils/octostar/__init__.py +0 -0
- {streamlit_octostar_utils-0.2.7a1 → streamlit_octostar_utils-0.2.9}/streamlit_octostar_utils/octostar/client.py +0 -0
- {streamlit_octostar_utils-0.2.7a1 → streamlit_octostar_utils-0.2.9}/streamlit_octostar_utils/octostar/context.py +0 -0
- {streamlit_octostar_utils-0.2.7a1 → streamlit_octostar_utils-0.2.9}/streamlit_octostar_utils/octostar/permissions.py +0 -0
- {streamlit_octostar_utils-0.2.7a1 → streamlit_octostar_utils-0.2.9}/streamlit_octostar_utils/ontology/__init__.py +0 -0
- {streamlit_octostar_utils-0.2.7a1 → streamlit_octostar_utils-0.2.9}/streamlit_octostar_utils/ontology/expand_entities.py +0 -0
- {streamlit_octostar_utils-0.2.7a1 → streamlit_octostar_utils-0.2.9}/streamlit_octostar_utils/ontology/inheritance.py +0 -0
- {streamlit_octostar_utils-0.2.7a1 → streamlit_octostar_utils-0.2.9}/streamlit_octostar_utils/ontology/validation.py +0 -0
- {streamlit_octostar_utils-0.2.7a1 → streamlit_octostar_utils-0.2.9}/streamlit_octostar_utils/style/__init__.py +0 -0
- {streamlit_octostar_utils-0.2.7a1 → streamlit_octostar_utils-0.2.9}/streamlit_octostar_utils/style/common.py +0 -0
- {streamlit_octostar_utils-0.2.7a1 → streamlit_octostar_utils-0.2.9}/streamlit_octostar_utils/threading/__init__.py +0 -0
- {streamlit_octostar_utils-0.2.7a1 → streamlit_octostar_utils-0.2.9}/streamlit_octostar_utils/threading/async_task_manager.py +0 -0
- {streamlit_octostar_utils-0.2.7a1 → streamlit_octostar_utils-0.2.9}/streamlit_octostar_utils/threading/session_callback_manager.py +0 -0
- {streamlit_octostar_utils-0.2.7a1 → streamlit_octostar_utils-0.2.9}/streamlit_octostar_utils/threading/session_state_hot_swapper.py +0 -0
@@ -266,6 +266,8 @@ class NifiContextManager(object):
|
|
266
266
|
FETCH_RELATIONSHIPS = 20 # 'relationships': list of relationship names
|
267
267
|
|
268
268
|
def __init__(self, json_data, lazy_sync=True):
|
269
|
+
if not json_data:
|
270
|
+
raise ValueError("Nifi context manager received list of 0 entities")
|
269
271
|
self.permissions = {}
|
270
272
|
self.in_batches = None
|
271
273
|
self.out_entities = None
|
@@ -291,10 +293,10 @@ class NifiContextManager(object):
|
|
291
293
|
def get_client(self, json_data):
|
292
294
|
all_jwts = [e["request"].get("jwt") for e in json_data]
|
293
295
|
all_jwts = [j for j in all_jwts if j]
|
294
|
-
assert len(set(all_jwts))
|
296
|
+
assert len(set(all_jwts)) == 1 # jwt must be unique
|
295
297
|
all_ontology_names = [e["request"].get("ontology_name") for e in json_data]
|
296
298
|
all_ontology_names = [j for j in all_ontology_names if j]
|
297
|
-
assert len(set(all_ontology_names))
|
299
|
+
assert len(set(all_ontology_names)) == 1 # ontology name must be unique
|
298
300
|
curr_user_jwt = all_jwts[0]
|
299
301
|
curr_user_ontology = all_ontology_names[0]
|
300
302
|
client = make_client(fixed_jwt=curr_user_jwt, ontology_name=curr_user_ontology)
|
@@ -637,8 +639,8 @@ class NifiEntity(object):
|
|
637
639
|
self.request = request
|
638
640
|
self.record = record
|
639
641
|
self.annotations = annotations
|
640
|
-
assert self.record.get("os_entity_uid") and self.record.get("entity_id")
|
641
|
-
assert self.record.get("os_concept") and self.record.get("entity_type")
|
642
|
+
assert self.record.get("os_entity_uid") and self.record.get("entity_id") and self.record["os_entity_uid"] == self.record["entity_id"]
|
643
|
+
assert self.record.get("os_concept") and self.record.get("entity_type") and self.record["os_concept"] == self.record["entity_type"]
|
642
644
|
if "entity_label" not in self.record:
|
643
645
|
self.record["entity_label"] = self.label
|
644
646
|
children = [c for c in children if isinstance(c, (str, dict))]
|
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
|