mmar-mapi 1.0.9__tar.gz → 1.0.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.

Potentially problematic release.


This version of mmar-mapi might be problematic. Click here for more details.

@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: mmar-mapi
3
- Version: 1.0.9
3
+ Version: 1.0.10
4
4
  Summary: Common pure/IO utilities for multi-modal architectures team
5
5
  Keywords:
6
6
  Author: Eugene Tagin
@@ -1,7 +1,7 @@
1
1
  [project]
2
2
  name = "mmar-mapi"
3
3
  # dynamic version is not supported yet on uv_build
4
- version = "1.0.9"
4
+ version = "1.0.10"
5
5
  description = "Common pure/IO utilities for multi-modal architectures team"
6
6
  authors = [{name = "Eugene Tagin", email = "tagin@airi.net"}]
7
7
  license = "MIT"
@@ -51,7 +51,6 @@ ci = [
51
51
  "mypy>=1.10",
52
52
  "types-markdown>=3.6",
53
53
  "types-pyyaml>=6.0",
54
- "more-itertools>=10.8.0",
55
54
  ]
56
55
 
57
56
  [tool.uv]
@@ -15,9 +15,10 @@ from .models.chat_item import ChatItem, OuterContextItem, InnerContextItem, Repl
15
15
  from .models.enums import MTRSLabelEnum, DiagnosticsXMLTagEnum, MTRSXMLTagEnum, DoctorChoiceXMLTagEnum
16
16
  from .models.tracks import TrackInfo, DomainInfo
17
17
  from .models.widget import Widget
18
- from .utils import make_session_id
18
+ from .utils import make_session_id, chunked
19
19
  from .xml_parser import XMLParser
20
20
 
21
+
21
22
  __all__ = [
22
23
  "AIMessage",
23
24
  "Base",
@@ -42,6 +43,7 @@ __all__ = [
42
43
  "TrackInfo",
43
44
  "Widget",
44
45
  "XMLParser",
46
+ "chunked",
45
47
  "make_content",
46
48
  "make_session_id",
47
49
  ]
@@ -1,6 +1,6 @@
1
1
  from typing import Self, Literal
2
2
 
3
- from more_itertools import chunked
3
+ from mmar_mapi.utils import chunked
4
4
  from pydantic import BaseModel, model_validator
5
5
 
6
6
 
@@ -0,0 +1,16 @@
1
+ from itertools import islice
2
+ from collections.abc import Iterable
3
+ from datetime import datetime
4
+
5
+
6
+ def make_session_id() -> str:
7
+ return f"{datetime.now():%Y-%m-%d--%H-%M-%S}"
8
+
9
+
10
+ def chunked(items: Iterable, n) -> list:
11
+ "behavior like in more_itertools.chunked"
12
+ iterator = iter(items)
13
+ res = []
14
+ while chunk := list(islice(iterator, n)):
15
+ res.append(chunk)
16
+ return res
@@ -1,5 +0,0 @@
1
- from datetime import datetime
2
-
3
-
4
- def make_session_id() -> str:
5
- return f"{datetime.now():%Y-%m-%d--%H-%M-%S}"
File without changes
File without changes