streamlit-octostar-utils 0.5.0.dev19__tar.gz → 0.5.2.dev1__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.5.0.dev19 → streamlit_octostar_utils-0.5.2.dev1}/PKG-INFO +1 -1
- {streamlit_octostar_utils-0.5.0.dev19 → streamlit_octostar_utils-0.5.2.dev1}/pyproject.toml +1 -1
- {streamlit_octostar_utils-0.5.0.dev19 → streamlit_octostar_utils-0.5.2.dev1}/streamlit_octostar_utils/api_crafter/nifi.py +3 -38
- {streamlit_octostar_utils-0.5.0.dev19 → streamlit_octostar_utils-0.5.2.dev1}/LICENSE +0 -0
- {streamlit_octostar_utils-0.5.0.dev19 → streamlit_octostar_utils-0.5.2.dev1}/README.md +0 -0
- {streamlit_octostar_utils-0.5.0.dev19 → streamlit_octostar_utils-0.5.2.dev1}/streamlit_octostar_utils/__init__.py +0 -0
- {streamlit_octostar_utils-0.5.0.dev19 → streamlit_octostar_utils-0.5.2.dev1}/streamlit_octostar_utils/api_crafter/__init__.py +0 -0
- {streamlit_octostar_utils-0.5.0.dev19 → streamlit_octostar_utils-0.5.2.dev1}/streamlit_octostar_utils/api_crafter/celery.py +0 -0
- {streamlit_octostar_utils-0.5.0.dev19 → streamlit_octostar_utils-0.5.2.dev1}/streamlit_octostar_utils/api_crafter/contents.py +0 -0
- {streamlit_octostar_utils-0.5.0.dev19 → streamlit_octostar_utils-0.5.2.dev1}/streamlit_octostar_utils/api_crafter/fastapi.py +0 -0
- {streamlit_octostar_utils-0.5.0.dev19 → streamlit_octostar_utils-0.5.2.dev1}/streamlit_octostar_utils/api_crafter/parallelism.py +0 -0
- {streamlit_octostar_utils-0.5.0.dev19 → streamlit_octostar_utils-0.5.2.dev1}/streamlit_octostar_utils/api_crafter/parser/__init__.py +0 -0
- {streamlit_octostar_utils-0.5.0.dev19 → streamlit_octostar_utils-0.5.2.dev1}/streamlit_octostar_utils/api_crafter/parser/combine_fields.py +0 -0
- {streamlit_octostar_utils-0.5.0.dev19 → streamlit_octostar_utils-0.5.2.dev1}/streamlit_octostar_utils/api_crafter/parser/entities_parser.py +0 -0
- {streamlit_octostar_utils-0.5.0.dev19 → streamlit_octostar_utils-0.5.2.dev1}/streamlit_octostar_utils/api_crafter/parser/generics.py +0 -0
- {streamlit_octostar_utils-0.5.0.dev19 → streamlit_octostar_utils-0.5.2.dev1}/streamlit_octostar_utils/api_crafter/parser/info.py +0 -0
- {streamlit_octostar_utils-0.5.0.dev19 → streamlit_octostar_utils-0.5.2.dev1}/streamlit_octostar_utils/api_crafter/parser/linkchart_functions.py +0 -0
- {streamlit_octostar_utils-0.5.0.dev19 → streamlit_octostar_utils-0.5.2.dev1}/streamlit_octostar_utils/api_crafter/parser/matches.py +0 -0
- {streamlit_octostar_utils-0.5.0.dev19 → streamlit_octostar_utils-0.5.2.dev1}/streamlit_octostar_utils/api_crafter/parser/parameters.py +0 -0
- {streamlit_octostar_utils-0.5.0.dev19 → streamlit_octostar_utils-0.5.2.dev1}/streamlit_octostar_utils/api_crafter/parser/rules.py +0 -0
- {streamlit_octostar_utils-0.5.0.dev19 → streamlit_octostar_utils-0.5.2.dev1}/streamlit_octostar_utils/api_crafter/parser/signals.py +0 -0
- {streamlit_octostar_utils-0.5.0.dev19 → streamlit_octostar_utils-0.5.2.dev1}/streamlit_octostar_utils/core/__init__.py +0 -0
- {streamlit_octostar_utils-0.5.0.dev19 → streamlit_octostar_utils-0.5.2.dev1}/streamlit_octostar_utils/core/dict.py +0 -0
- {streamlit_octostar_utils-0.5.0.dev19 → streamlit_octostar_utils-0.5.2.dev1}/streamlit_octostar_utils/core/filetypes.py +0 -0
- {streamlit_octostar_utils-0.5.0.dev19 → streamlit_octostar_utils-0.5.2.dev1}/streamlit_octostar_utils/core/threading/__init__.py +0 -0
- {streamlit_octostar_utils-0.5.0.dev19 → streamlit_octostar_utils-0.5.2.dev1}/streamlit_octostar_utils/core/threading/key_queue.py +0 -0
- {streamlit_octostar_utils-0.5.0.dev19 → streamlit_octostar_utils-0.5.2.dev1}/streamlit_octostar_utils/core/timestamp.py +0 -0
- {streamlit_octostar_utils-0.5.0.dev19 → streamlit_octostar_utils-0.5.2.dev1}/streamlit_octostar_utils/nlp/__init__.py +0 -0
- {streamlit_octostar_utils-0.5.0.dev19 → streamlit_octostar_utils-0.5.2.dev1}/streamlit_octostar_utils/nlp/custom_recognizers.py +0 -0
- {streamlit_octostar_utils-0.5.0.dev19 → streamlit_octostar_utils-0.5.2.dev1}/streamlit_octostar_utils/nlp/language.py +0 -0
- {streamlit_octostar_utils-0.5.0.dev19 → streamlit_octostar_utils-0.5.2.dev1}/streamlit_octostar_utils/nlp/ner.py +0 -0
- {streamlit_octostar_utils-0.5.0.dev19 → streamlit_octostar_utils-0.5.2.dev1}/streamlit_octostar_utils/octostar/__init__.py +0 -0
- {streamlit_octostar_utils-0.5.0.dev19 → streamlit_octostar_utils-0.5.2.dev1}/streamlit_octostar_utils/octostar/client.py +0 -0
- {streamlit_octostar_utils-0.5.0.dev19 → streamlit_octostar_utils-0.5.2.dev1}/streamlit_octostar_utils/octostar/context.py +0 -0
- {streamlit_octostar_utils-0.5.0.dev19 → streamlit_octostar_utils-0.5.2.dev1}/streamlit_octostar_utils/octostar/permissions.py +0 -0
- {streamlit_octostar_utils-0.5.0.dev19 → streamlit_octostar_utils-0.5.2.dev1}/streamlit_octostar_utils/ontology/__init__.py +0 -0
- {streamlit_octostar_utils-0.5.0.dev19 → streamlit_octostar_utils-0.5.2.dev1}/streamlit_octostar_utils/ontology/inheritance.py +0 -0
- {streamlit_octostar_utils-0.5.0.dev19 → streamlit_octostar_utils-0.5.2.dev1}/streamlit_octostar_utils/ontology/relationships.py +0 -0
- {streamlit_octostar_utils-0.5.0.dev19 → streamlit_octostar_utils-0.5.2.dev1}/streamlit_octostar_utils/ontology/validation.py +0 -0
- {streamlit_octostar_utils-0.5.0.dev19 → streamlit_octostar_utils-0.5.2.dev1}/streamlit_octostar_utils/style/__init__.py +0 -0
- {streamlit_octostar_utils-0.5.0.dev19 → streamlit_octostar_utils-0.5.2.dev1}/streamlit_octostar_utils/style/common.py +0 -0
- {streamlit_octostar_utils-0.5.0.dev19 → streamlit_octostar_utils-0.5.2.dev1}/streamlit_octostar_utils/threading/__init__.py +0 -0
- {streamlit_octostar_utils-0.5.0.dev19 → streamlit_octostar_utils-0.5.2.dev1}/streamlit_octostar_utils/threading/async_task_manager.py +0 -0
- {streamlit_octostar_utils-0.5.0.dev19 → streamlit_octostar_utils-0.5.2.dev1}/streamlit_octostar_utils/threading/session_callback_manager.py +0 -0
- {streamlit_octostar_utils-0.5.0.dev19 → streamlit_octostar_utils-0.5.2.dev1}/streamlit_octostar_utils/threading/session_state_hot_swapper.py +0 -0
|
@@ -17,7 +17,6 @@ from starlette.exceptions import HTTPException as StarletteHTTPException
|
|
|
17
17
|
|
|
18
18
|
from octostar.utils.workspace import upsert_entities
|
|
19
19
|
from octostar.utils.ontology import fetch_ontology_data
|
|
20
|
-
from octostar.utils.workspace.permissions import get_permissions, PermissionLevel
|
|
21
20
|
from octostar.utils.pipeline import update_processing_status
|
|
22
21
|
|
|
23
22
|
from octostar.client import make_client
|
|
@@ -85,7 +84,6 @@ class NifiEntityModel(BaseModel):
|
|
|
85
84
|
is_temporary: bool = False
|
|
86
85
|
exception: dict = Field(default_factory=dict)
|
|
87
86
|
last_processor_name: Optional[str] = None
|
|
88
|
-
fallback_os_workspace: Optional[str] = None
|
|
89
87
|
|
|
90
88
|
class RecordModel(BaseModel):
|
|
91
89
|
model_config = ConfigDict(extra="allow")
|
|
@@ -475,7 +473,6 @@ class NifiContextManager(object):
|
|
|
475
473
|
def __init__(self, json_data, lazy_sync=True):
|
|
476
474
|
if not json_data:
|
|
477
475
|
raise ValueError("Nifi context manager received list of 0 entities")
|
|
478
|
-
self.permissions = {}
|
|
479
476
|
self.in_batches = None
|
|
480
477
|
self.out_entities = None
|
|
481
478
|
self.nonlazy_sync_ids = set()
|
|
@@ -552,16 +549,6 @@ class NifiContextManager(object):
|
|
|
552
549
|
def __enter__(self):
|
|
553
550
|
return self
|
|
554
551
|
|
|
555
|
-
def get_workspaces_permissions(self, workspace_ids):
|
|
556
|
-
permissions_to_fetch = list(set(workspace_ids).difference(set(list(self.permissions.keys()))))
|
|
557
|
-
if permissions_to_fetch:
|
|
558
|
-
permissions = get_permissions.sync(permissions_to_fetch, client=self.client)
|
|
559
|
-
self.permissions.update(permissions)
|
|
560
|
-
permissions = {}
|
|
561
|
-
for k in workspace_ids:
|
|
562
|
-
permissions[k] = self.permissions.get(k, PermissionLevel.NONE)
|
|
563
|
-
return permissions
|
|
564
|
-
|
|
565
552
|
def request_entity_sync(
|
|
566
553
|
self,
|
|
567
554
|
entity,
|
|
@@ -970,29 +957,7 @@ class NifiEntity(object):
|
|
|
970
957
|
|
|
971
958
|
@property
|
|
972
959
|
def write_os_workspace(self):
|
|
973
|
-
|
|
974
|
-
[
|
|
975
|
-
e
|
|
976
|
-
for e in [
|
|
977
|
-
self.record.get("os_workspace"),
|
|
978
|
-
self.request.get("fallback_os_workspace"),
|
|
979
|
-
]
|
|
980
|
-
if e
|
|
981
|
-
]
|
|
982
|
-
)
|
|
983
|
-
if (
|
|
984
|
-
self.record.get("os_workspace")
|
|
985
|
-
and (permissions.get(self.record.get("os_workspace")) or PermissionLevel.NONE) >= PermissionLevel.WRITE
|
|
986
|
-
):
|
|
987
|
-
return self.record["os_workspace"]
|
|
988
|
-
elif (
|
|
989
|
-
self.request.get("fallback_os_workspace")
|
|
990
|
-
and (permissions.get(self.request.get("fallback_os_workspace")) or PermissionLevel.NONE)
|
|
991
|
-
>= PermissionLevel.WRITE
|
|
992
|
-
):
|
|
993
|
-
return self.request["fallback_os_workspace"]
|
|
994
|
-
else:
|
|
995
|
-
return None
|
|
960
|
+
return self.record.get("os_workspace")
|
|
996
961
|
|
|
997
962
|
@property
|
|
998
963
|
def label(self):
|
|
@@ -1210,7 +1175,6 @@ class NifiEntity(object):
|
|
|
1210
1175
|
"is_temporary": True,
|
|
1211
1176
|
"exception": {},
|
|
1212
1177
|
"last_processor_name": None,
|
|
1213
|
-
"fallback_os_workspace": self.request["fallback_os_workspace"],
|
|
1214
1178
|
}
|
|
1215
1179
|
child_entity = NifiEntity(
|
|
1216
1180
|
self.context,
|
|
@@ -1436,6 +1400,7 @@ class NifiEntity(object):
|
|
|
1436
1400
|
os_entity_uid=None,
|
|
1437
1401
|
os_relationship_uid=None,
|
|
1438
1402
|
os_entity_type=FRAGMENT_ENTITY_NAME,
|
|
1403
|
+
os_parent_uid=None,
|
|
1439
1404
|
previous_fragment_uid=None,
|
|
1440
1405
|
previous_fragment_relationship_uid=None,
|
|
1441
1406
|
previous_fragment_relationship=PREVIOUS_FRAGMENT_RELATIONSHIP,
|
|
@@ -1448,7 +1413,7 @@ class NifiEntity(object):
|
|
|
1448
1413
|
fields = {
|
|
1449
1414
|
**{k: v for k, v in self.record.items() if k.startswith("fragment") and v is not None},
|
|
1450
1415
|
**fields,
|
|
1451
|
-
"os_parent_uid": self.record["os_entity_uid"],
|
|
1416
|
+
"os_parent_uid": os_parent_uid or self.record["os_entity_uid"],
|
|
1452
1417
|
"source_entity_uid": source_entity_uid,
|
|
1453
1418
|
"previous_entity_uid": previous_fragment_uid,
|
|
1454
1419
|
"next_entity_uid": next_fragment_uid,
|
|
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
|