streamlit-octostar-utils 0.2.8__tar.gz → 0.2.10__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 (42) hide show
  1. {streamlit_octostar_utils-0.2.8 → streamlit_octostar_utils-0.2.10}/PKG-INFO +4 -2
  2. {streamlit_octostar_utils-0.2.8 → streamlit_octostar_utils-0.2.10}/pyproject.toml +1 -1
  3. {streamlit_octostar_utils-0.2.8 → streamlit_octostar_utils-0.2.10}/streamlit_octostar_utils/api_crafter/fastapi.py +1 -1
  4. {streamlit_octostar_utils-0.2.8 → streamlit_octostar_utils-0.2.10}/streamlit_octostar_utils/api_crafter/nifi.py +4 -4
  5. {streamlit_octostar_utils-0.2.8 → streamlit_octostar_utils-0.2.10}/streamlit_octostar_utils/nlp/ner.py +1 -4
  6. {streamlit_octostar_utils-0.2.8 → streamlit_octostar_utils-0.2.10}/LICENSE +0 -0
  7. {streamlit_octostar_utils-0.2.8 → streamlit_octostar_utils-0.2.10}/README.md +0 -0
  8. {streamlit_octostar_utils-0.2.8 → streamlit_octostar_utils-0.2.10}/streamlit_octostar_utils/__init__.py +0 -0
  9. {streamlit_octostar_utils-0.2.8 → streamlit_octostar_utils-0.2.10}/streamlit_octostar_utils/api_crafter/__init__.py +0 -0
  10. {streamlit_octostar_utils-0.2.8 → streamlit_octostar_utils-0.2.10}/streamlit_octostar_utils/api_crafter/celery.py +0 -0
  11. {streamlit_octostar_utils-0.2.8 → streamlit_octostar_utils-0.2.10}/streamlit_octostar_utils/api_crafter/parser/__init__.py +0 -0
  12. {streamlit_octostar_utils-0.2.8 → streamlit_octostar_utils-0.2.10}/streamlit_octostar_utils/api_crafter/parser/combine_fields.py +0 -0
  13. {streamlit_octostar_utils-0.2.8 → streamlit_octostar_utils-0.2.10}/streamlit_octostar_utils/api_crafter/parser/entities_parser.py +0 -0
  14. {streamlit_octostar_utils-0.2.8 → streamlit_octostar_utils-0.2.10}/streamlit_octostar_utils/api_crafter/parser/generics.py +0 -0
  15. {streamlit_octostar_utils-0.2.8 → streamlit_octostar_utils-0.2.10}/streamlit_octostar_utils/api_crafter/parser/info.py +0 -0
  16. {streamlit_octostar_utils-0.2.8 → streamlit_octostar_utils-0.2.10}/streamlit_octostar_utils/api_crafter/parser/linkchart_functions.py +0 -0
  17. {streamlit_octostar_utils-0.2.8 → streamlit_octostar_utils-0.2.10}/streamlit_octostar_utils/api_crafter/parser/matches.py +0 -0
  18. {streamlit_octostar_utils-0.2.8 → streamlit_octostar_utils-0.2.10}/streamlit_octostar_utils/api_crafter/parser/parameters.py +0 -0
  19. {streamlit_octostar_utils-0.2.8 → streamlit_octostar_utils-0.2.10}/streamlit_octostar_utils/api_crafter/parser/rules.py +0 -0
  20. {streamlit_octostar_utils-0.2.8 → streamlit_octostar_utils-0.2.10}/streamlit_octostar_utils/api_crafter/parser/signals.py +0 -0
  21. {streamlit_octostar_utils-0.2.8 → streamlit_octostar_utils-0.2.10}/streamlit_octostar_utils/core/__init__.py +0 -0
  22. {streamlit_octostar_utils-0.2.8 → streamlit_octostar_utils-0.2.10}/streamlit_octostar_utils/core/dict.py +0 -0
  23. {streamlit_octostar_utils-0.2.8 → streamlit_octostar_utils-0.2.10}/streamlit_octostar_utils/core/filetypes.py +0 -0
  24. {streamlit_octostar_utils-0.2.8 → streamlit_octostar_utils-0.2.10}/streamlit_octostar_utils/core/threading/__init__.py +0 -0
  25. {streamlit_octostar_utils-0.2.8 → streamlit_octostar_utils-0.2.10}/streamlit_octostar_utils/core/threading/key_queue.py +0 -0
  26. {streamlit_octostar_utils-0.2.8 → streamlit_octostar_utils-0.2.10}/streamlit_octostar_utils/core/timestamp.py +0 -0
  27. {streamlit_octostar_utils-0.2.8 → streamlit_octostar_utils-0.2.10}/streamlit_octostar_utils/nlp/__init__.py +0 -0
  28. {streamlit_octostar_utils-0.2.8 → streamlit_octostar_utils-0.2.10}/streamlit_octostar_utils/nlp/language.py +0 -0
  29. {streamlit_octostar_utils-0.2.8 → streamlit_octostar_utils-0.2.10}/streamlit_octostar_utils/octostar/__init__.py +0 -0
  30. {streamlit_octostar_utils-0.2.8 → streamlit_octostar_utils-0.2.10}/streamlit_octostar_utils/octostar/client.py +0 -0
  31. {streamlit_octostar_utils-0.2.8 → streamlit_octostar_utils-0.2.10}/streamlit_octostar_utils/octostar/context.py +0 -0
  32. {streamlit_octostar_utils-0.2.8 → streamlit_octostar_utils-0.2.10}/streamlit_octostar_utils/octostar/permissions.py +0 -0
  33. {streamlit_octostar_utils-0.2.8 → streamlit_octostar_utils-0.2.10}/streamlit_octostar_utils/ontology/__init__.py +0 -0
  34. {streamlit_octostar_utils-0.2.8 → streamlit_octostar_utils-0.2.10}/streamlit_octostar_utils/ontology/expand_entities.py +0 -0
  35. {streamlit_octostar_utils-0.2.8 → streamlit_octostar_utils-0.2.10}/streamlit_octostar_utils/ontology/inheritance.py +0 -0
  36. {streamlit_octostar_utils-0.2.8 → streamlit_octostar_utils-0.2.10}/streamlit_octostar_utils/ontology/validation.py +0 -0
  37. {streamlit_octostar_utils-0.2.8 → streamlit_octostar_utils-0.2.10}/streamlit_octostar_utils/style/__init__.py +0 -0
  38. {streamlit_octostar_utils-0.2.8 → streamlit_octostar_utils-0.2.10}/streamlit_octostar_utils/style/common.py +0 -0
  39. {streamlit_octostar_utils-0.2.8 → streamlit_octostar_utils-0.2.10}/streamlit_octostar_utils/threading/__init__.py +0 -0
  40. {streamlit_octostar_utils-0.2.8 → streamlit_octostar_utils-0.2.10}/streamlit_octostar_utils/threading/async_task_manager.py +0 -0
  41. {streamlit_octostar_utils-0.2.8 → streamlit_octostar_utils-0.2.10}/streamlit_octostar_utils/threading/session_callback_manager.py +0 -0
  42. {streamlit_octostar_utils-0.2.8 → streamlit_octostar_utils-0.2.10}/streamlit_octostar_utils/threading/session_state_hot_swapper.py +0 -0
@@ -1,8 +1,9 @@
1
- Metadata-Version: 2.3
1
+ Metadata-Version: 2.4
2
2
  Name: streamlit-octostar-utils
3
- Version: 0.2.8
3
+ Version: 0.2.10
4
4
  Summary:
5
5
  License: MIT
6
+ License-File: LICENSE
6
7
  Author: Octostar
7
8
  Requires-Python: >=3.9, !=2.7.*, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*, !=3.6.*, !=3.7.*, !=3.8.*
8
9
  Classifier: License :: OSI Approved :: MIT License
@@ -12,6 +13,7 @@ Classifier: Programming Language :: Python :: 3.10
12
13
  Classifier: Programming Language :: Python :: 3.11
13
14
  Classifier: Programming Language :: Python :: 3.12
14
15
  Classifier: Programming Language :: Python :: 3.13
16
+ Classifier: Programming Language :: Python :: 3.14
15
17
  Provides-Extra: nlp
16
18
  Requires-Dist: PyJWT (>=2.5.0,<3.0.0)
17
19
  Requires-Dist: celery (>=5.3.0,<6.0.0)
@@ -5,7 +5,7 @@ include = '\.pyi?$'
5
5
 
6
6
  [tool.poetry]
7
7
  name = "streamlit-octostar-utils"
8
- version = "0.2.8"
8
+ version = "0.2.10"
9
9
  description = ""
10
10
  license = "MIT"
11
11
  authors = ["Octostar"]
@@ -330,7 +330,7 @@ class DefaultErrorRoute:
330
330
  if len(message) > MAX_ERROR_MESSAGE_BYTES:
331
331
  message = message[-MAX_ERROR_MESSAGE_BYTES:]
332
332
  try:
333
- tcbk = traceback.format_exception(exc)
333
+ tcbk = "\n".join(traceback.format_exception(exc))
334
334
  if len(tcbk) > MAX_ERROR_TRACEBACK_BYTES:
335
335
  tcbk = tcbk[-MAX_ERROR_TRACEBACK_BYTES:]
336
336
  except:
@@ -293,10 +293,10 @@ class NifiContextManager(object):
293
293
  def get_client(self, json_data):
294
294
  all_jwts = [e["request"].get("jwt") for e in json_data]
295
295
  all_jwts = [j for j in all_jwts if j]
296
- assert len(set(all_jwts)) = 1 # jwt must be unique
296
+ assert len(set(all_jwts)) == 1 # jwt must be unique
297
297
  all_ontology_names = [e["request"].get("ontology_name") for e in json_data]
298
298
  all_ontology_names = [j for j in all_ontology_names if j]
299
- assert len(set(all_ontology_names)) = 1 # ontology name must be unique
299
+ assert len(set(all_ontology_names)) == 1 # ontology name must be unique
300
300
  curr_user_jwt = all_jwts[0]
301
301
  curr_user_ontology = all_ontology_names[0]
302
302
  client = make_client(fixed_jwt=curr_user_jwt, ontology_name=curr_user_ontology)
@@ -639,8 +639,8 @@ class NifiEntity(object):
639
639
  self.request = request
640
640
  self.record = record
641
641
  self.annotations = annotations
642
- assert self.record.get("os_entity_uid") and self.record.get("entity_id")
643
- 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"]
644
644
  if "entity_label" not in self.record:
645
645
  self.record["entity_label"] = self.label
646
646
  children = [c for c in children if isinstance(c, (str, dict))]
@@ -69,10 +69,7 @@ def _sumy__luhn_call(summarizer, document):
69
69
 
70
70
 
71
71
  def get_nltk_tokenizer(language: str) -> Tokenizer:
72
- try:
73
- nltk.data.find("tokenizers/punkt")
74
- except LookupError:
75
- nltk.download("punkt")
72
+ nltk.data.find("tokenizers/punkt")
76
73
  return Tokenizer(language)
77
74
 
78
75