streamlit-octostar-utils 0.4.2.dev18__tar.gz → 0.4.2.dev20__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.
Files changed (45) hide show
  1. {streamlit_octostar_utils-0.4.2.dev18 → streamlit_octostar_utils-0.4.2.dev20}/PKG-INFO +1 -1
  2. {streamlit_octostar_utils-0.4.2.dev18 → streamlit_octostar_utils-0.4.2.dev20}/pyproject.toml +1 -1
  3. {streamlit_octostar_utils-0.4.2.dev18 → streamlit_octostar_utils-0.4.2.dev20}/streamlit_octostar_utils/api_crafter/contents.py +5 -0
  4. {streamlit_octostar_utils-0.4.2.dev18 → streamlit_octostar_utils-0.4.2.dev20}/streamlit_octostar_utils/api_crafter/nifi.py +3 -3
  5. {streamlit_octostar_utils-0.4.2.dev18 → streamlit_octostar_utils-0.4.2.dev20}/streamlit_octostar_utils/ontology/inheritance.py +4 -4
  6. {streamlit_octostar_utils-0.4.2.dev18 → streamlit_octostar_utils-0.4.2.dev20}/LICENSE +0 -0
  7. {streamlit_octostar_utils-0.4.2.dev18 → streamlit_octostar_utils-0.4.2.dev20}/README.md +0 -0
  8. {streamlit_octostar_utils-0.4.2.dev18 → streamlit_octostar_utils-0.4.2.dev20}/streamlit_octostar_utils/__init__.py +0 -0
  9. {streamlit_octostar_utils-0.4.2.dev18 → streamlit_octostar_utils-0.4.2.dev20}/streamlit_octostar_utils/api_crafter/__init__.py +0 -0
  10. {streamlit_octostar_utils-0.4.2.dev18 → streamlit_octostar_utils-0.4.2.dev20}/streamlit_octostar_utils/api_crafter/celery.py +0 -0
  11. {streamlit_octostar_utils-0.4.2.dev18 → streamlit_octostar_utils-0.4.2.dev20}/streamlit_octostar_utils/api_crafter/fastapi.py +0 -0
  12. {streamlit_octostar_utils-0.4.2.dev18 → streamlit_octostar_utils-0.4.2.dev20}/streamlit_octostar_utils/api_crafter/parallelism.py +0 -0
  13. {streamlit_octostar_utils-0.4.2.dev18 → streamlit_octostar_utils-0.4.2.dev20}/streamlit_octostar_utils/api_crafter/parser/__init__.py +0 -0
  14. {streamlit_octostar_utils-0.4.2.dev18 → streamlit_octostar_utils-0.4.2.dev20}/streamlit_octostar_utils/api_crafter/parser/combine_fields.py +0 -0
  15. {streamlit_octostar_utils-0.4.2.dev18 → streamlit_octostar_utils-0.4.2.dev20}/streamlit_octostar_utils/api_crafter/parser/entities_parser.py +0 -0
  16. {streamlit_octostar_utils-0.4.2.dev18 → streamlit_octostar_utils-0.4.2.dev20}/streamlit_octostar_utils/api_crafter/parser/generics.py +0 -0
  17. {streamlit_octostar_utils-0.4.2.dev18 → streamlit_octostar_utils-0.4.2.dev20}/streamlit_octostar_utils/api_crafter/parser/info.py +0 -0
  18. {streamlit_octostar_utils-0.4.2.dev18 → streamlit_octostar_utils-0.4.2.dev20}/streamlit_octostar_utils/api_crafter/parser/linkchart_functions.py +0 -0
  19. {streamlit_octostar_utils-0.4.2.dev18 → streamlit_octostar_utils-0.4.2.dev20}/streamlit_octostar_utils/api_crafter/parser/matches.py +0 -0
  20. {streamlit_octostar_utils-0.4.2.dev18 → streamlit_octostar_utils-0.4.2.dev20}/streamlit_octostar_utils/api_crafter/parser/parameters.py +0 -0
  21. {streamlit_octostar_utils-0.4.2.dev18 → streamlit_octostar_utils-0.4.2.dev20}/streamlit_octostar_utils/api_crafter/parser/rules.py +0 -0
  22. {streamlit_octostar_utils-0.4.2.dev18 → streamlit_octostar_utils-0.4.2.dev20}/streamlit_octostar_utils/api_crafter/parser/signals.py +0 -0
  23. {streamlit_octostar_utils-0.4.2.dev18 → streamlit_octostar_utils-0.4.2.dev20}/streamlit_octostar_utils/core/__init__.py +0 -0
  24. {streamlit_octostar_utils-0.4.2.dev18 → streamlit_octostar_utils-0.4.2.dev20}/streamlit_octostar_utils/core/dict.py +0 -0
  25. {streamlit_octostar_utils-0.4.2.dev18 → streamlit_octostar_utils-0.4.2.dev20}/streamlit_octostar_utils/core/filetypes.py +0 -0
  26. {streamlit_octostar_utils-0.4.2.dev18 → streamlit_octostar_utils-0.4.2.dev20}/streamlit_octostar_utils/core/threading/__init__.py +0 -0
  27. {streamlit_octostar_utils-0.4.2.dev18 → streamlit_octostar_utils-0.4.2.dev20}/streamlit_octostar_utils/core/threading/key_queue.py +0 -0
  28. {streamlit_octostar_utils-0.4.2.dev18 → streamlit_octostar_utils-0.4.2.dev20}/streamlit_octostar_utils/core/timestamp.py +0 -0
  29. {streamlit_octostar_utils-0.4.2.dev18 → streamlit_octostar_utils-0.4.2.dev20}/streamlit_octostar_utils/nlp/__init__.py +0 -0
  30. {streamlit_octostar_utils-0.4.2.dev18 → streamlit_octostar_utils-0.4.2.dev20}/streamlit_octostar_utils/nlp/custom_recognizers.py +0 -0
  31. {streamlit_octostar_utils-0.4.2.dev18 → streamlit_octostar_utils-0.4.2.dev20}/streamlit_octostar_utils/nlp/language.py +0 -0
  32. {streamlit_octostar_utils-0.4.2.dev18 → streamlit_octostar_utils-0.4.2.dev20}/streamlit_octostar_utils/nlp/ner.py +0 -0
  33. {streamlit_octostar_utils-0.4.2.dev18 → streamlit_octostar_utils-0.4.2.dev20}/streamlit_octostar_utils/octostar/__init__.py +0 -0
  34. {streamlit_octostar_utils-0.4.2.dev18 → streamlit_octostar_utils-0.4.2.dev20}/streamlit_octostar_utils/octostar/client.py +0 -0
  35. {streamlit_octostar_utils-0.4.2.dev18 → streamlit_octostar_utils-0.4.2.dev20}/streamlit_octostar_utils/octostar/context.py +0 -0
  36. {streamlit_octostar_utils-0.4.2.dev18 → streamlit_octostar_utils-0.4.2.dev20}/streamlit_octostar_utils/octostar/permissions.py +0 -0
  37. {streamlit_octostar_utils-0.4.2.dev18 → streamlit_octostar_utils-0.4.2.dev20}/streamlit_octostar_utils/ontology/__init__.py +0 -0
  38. {streamlit_octostar_utils-0.4.2.dev18 → streamlit_octostar_utils-0.4.2.dev20}/streamlit_octostar_utils/ontology/relationships.py +0 -0
  39. {streamlit_octostar_utils-0.4.2.dev18 → streamlit_octostar_utils-0.4.2.dev20}/streamlit_octostar_utils/ontology/validation.py +0 -0
  40. {streamlit_octostar_utils-0.4.2.dev18 → streamlit_octostar_utils-0.4.2.dev20}/streamlit_octostar_utils/style/__init__.py +0 -0
  41. {streamlit_octostar_utils-0.4.2.dev18 → streamlit_octostar_utils-0.4.2.dev20}/streamlit_octostar_utils/style/common.py +0 -0
  42. {streamlit_octostar_utils-0.4.2.dev18 → streamlit_octostar_utils-0.4.2.dev20}/streamlit_octostar_utils/threading/__init__.py +0 -0
  43. {streamlit_octostar_utils-0.4.2.dev18 → streamlit_octostar_utils-0.4.2.dev20}/streamlit_octostar_utils/threading/async_task_manager.py +0 -0
  44. {streamlit_octostar_utils-0.4.2.dev18 → streamlit_octostar_utils-0.4.2.dev20}/streamlit_octostar_utils/threading/session_callback_manager.py +0 -0
  45. {streamlit_octostar_utils-0.4.2.dev18 → streamlit_octostar_utils-0.4.2.dev20}/streamlit_octostar_utils/threading/session_state_hot_swapper.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: streamlit-octostar-utils
3
- Version: 0.4.2.dev18
3
+ Version: 0.4.2.dev20
4
4
  Summary:
5
5
  License: MIT
6
6
  License-File: LICENSE
@@ -5,7 +5,7 @@ include = '\.pyi?$'
5
5
 
6
6
  [tool.poetry]
7
7
  name = "streamlit-octostar-utils"
8
- version = "0.4.2-dev.18"
8
+ version = "0.4.2-dev.20"
9
9
  description = ""
10
10
  license = "MIT"
11
11
  authors = ["Octostar"]
@@ -986,6 +986,11 @@ class ReferenceContents(Contents):
986
986
 
987
987
  # ==================== FileIO Interface ====================
988
988
 
989
+ def __len__(self):
990
+ if self._read_source:
991
+ return len(self._read_source)
992
+ return 0
993
+
989
994
  def read(self, size: int = -1) -> bytes:
990
995
  if self._read_source:
991
996
  return self._read_source.read(size)
@@ -737,14 +737,14 @@ class NifiEntity(object):
737
737
 
738
738
  @property
739
739
  def label(self):
740
- # dummy ontology from our cached data, compatible with get_label()
741
740
  entity_type = self.record["entity_type"]
742
741
  parents = self.request["ontology_info"]["parents"]
743
742
  label_keys = self.request["ontology_info"]["label_keys"]
743
+ # dummy ontology from our cached data, compatible with get_label()
744
744
  ontology = {
745
745
  "concepts": {
746
+ **{p: {"parents": [], "labelKeys": []} for p in parents},
746
747
  entity_type: {"parents": parents, "labelKeys": label_keys},
747
- **{p: {"parents": [], "labelKeys": []} for p in parents}
748
748
  }
749
749
  }
750
750
  return get_label(self.record, ontology)
@@ -1075,7 +1075,7 @@ class NifiEntity(object):
1075
1075
  filename,
1076
1076
  filetype,
1077
1077
  file,
1078
- {**fields, "source_entity_uid": source_entity_uid},
1078
+ fields,
1079
1079
  relationship,
1080
1080
  os_entity_uid,
1081
1081
  os_relationship_uid,
@@ -15,10 +15,10 @@ def get_label_keys(type, ontology):
15
15
  return list(label_keys.keys())
16
16
 
17
17
  def get_label(record, ontology):
18
- if record.get("os_materialized_label"):
19
- return record.get("os_materialized_label")
20
- if record.get("os_label"):
21
- return record.get("os_label")
18
+ if record.get("os_materialized_label") not in (None, ""):
19
+ return str(record.get("os_materialized_label"))
20
+ if record.get("os_custom_label") not in (None, ""):
21
+ return str(record.get("os_custom_label"))
22
22
  label_keys = get_label_keys(record["entity_type"], ontology)
23
23
  fields = [record.get(field) for field in label_keys]
24
24
  fields = [f for f in fields if f is not None]