ommlds 0.0.0.dev509__py3-none-any.whl → 0.0.0.dev510__py3-none-any.whl
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.
- ommlds/__about__.py +1 -1
- ommlds/cli/_dataclasses.py +151 -0
- ommlds/cli/sessions/chat/drivers/events/types.py +6 -0
- ommlds/cli/sessions/chat/interfaces/textual/app.py +18 -2
- ommlds/minichain/__init__.py +13 -2
- ommlds/minichain/_dataclasses.py +165 -0
- ommlds/minichain/content/__init__.py +1 -0
- ommlds/minichain/content/resources.py +22 -0
- ommlds/minichain/content/transform/json.py +2 -2
- ommlds/minichain/content/transform/markdown.py +1 -1
- ommlds/minichain/content/transform/materialize.py +16 -8
- ommlds/minichain/content/transform/metadata.py +3 -3
- ommlds/minichain/content/transform/namespaces.py +20 -0
- ommlds/minichain/content/transform/placeholders.py +60 -0
- ommlds/minichain/content/transform/recursive.py +28 -71
- ommlds/minichain/content/transform/resources.py +58 -0
- ommlds/minichain/content/transform/standard.py +2 -2
- ommlds/minichain/content/transform/strings.py +3 -3
- ommlds/minichain/content/transform/templates.py +2 -2
- ommlds/minichain/content/transform/types.py +18 -0
- ommlds/minichain/content/transform/visitors.py +38 -0
- ommlds/minichain/content/visitors.py +8 -21
- ommlds/minichain/tools/execution/errorhandling.py +1 -1
- ommlds/tools/ocr.py +1 -1
- {ommlds-0.0.0.dev509.dist-info → ommlds-0.0.0.dev510.dist-info}/METADATA +6 -6
- {ommlds-0.0.0.dev509.dist-info → ommlds-0.0.0.dev510.dist-info}/RECORD +30 -24
- {ommlds-0.0.0.dev509.dist-info → ommlds-0.0.0.dev510.dist-info}/WHEEL +1 -1
- {ommlds-0.0.0.dev509.dist-info → ommlds-0.0.0.dev510.dist-info}/entry_points.txt +0 -0
- {ommlds-0.0.0.dev509.dist-info → ommlds-0.0.0.dev510.dist-info}/licenses/LICENSE +0 -0
- {ommlds-0.0.0.dev509.dist-info → ommlds-0.0.0.dev510.dist-info}/top_level.txt +0 -0
ommlds/__about__.py
CHANGED
ommlds/cli/_dataclasses.py
CHANGED
|
@@ -2962,6 +2962,157 @@ def _process_dataclass__9f7e26a87dd163b610f38caa1ce9b3c6356e632a():
|
|
|
2962
2962
|
return _process_dataclass
|
|
2963
2963
|
|
|
2964
2964
|
|
|
2965
|
+
@_register(
|
|
2966
|
+
plan_repr=(
|
|
2967
|
+
"Plans(tup=(CopyPlan(fields=('message', 'error')), EqPlan(fields=('message', 'error')), FrozenPlan(fields=('mes"
|
|
2968
|
+
"sage', 'error'), allow_dynamic_dunder_attrs=False), HashPlan(action='add', fields=('message', 'error'), cache="
|
|
2969
|
+
"False), InitPlan(fields=(InitPlan.Field(name='message', annotation=OpRef(name='init.fields.0.annotation'), def"
|
|
2970
|
+
"ault=OpRef(name='init.fields.0.default'), default_factory=None, init=True, override=False, field_type=FieldTyp"
|
|
2971
|
+
"e.INSTANCE, coerce=None, validate=None, check_type=None), InitPlan.Field(name='error', annotation=OpRef(name='"
|
|
2972
|
+
"init.fields.1.annotation'), default=OpRef(name='init.fields.1.default'), default_factory=None, init=True, over"
|
|
2973
|
+
"ride=False, field_type=FieldType.INSTANCE, coerce=None, validate=None, check_type=None)), self_param='self', s"
|
|
2974
|
+
"td_params=('message', 'error'), kw_only_params=(), frozen=True, slots=False, post_init_params=None, init_fns=("
|
|
2975
|
+
"), validate_fns=()), ReprPlan(fields=(ReprPlan.Field(name='message', kw_only=False, fn=None), ReprPlan.Field(n"
|
|
2976
|
+
"ame='error', kw_only=False, fn=None)), id=False, terse=False, default_fn=None)))"
|
|
2977
|
+
),
|
|
2978
|
+
plan_repr_sha1='4e9140c5445b4f62b7f2b08a89442350123d2517',
|
|
2979
|
+
op_ref_idents=(
|
|
2980
|
+
'__dataclass__init__fields__0__annotation',
|
|
2981
|
+
'__dataclass__init__fields__0__default',
|
|
2982
|
+
'__dataclass__init__fields__1__annotation',
|
|
2983
|
+
'__dataclass__init__fields__1__default',
|
|
2984
|
+
),
|
|
2985
|
+
cls_names=(
|
|
2986
|
+
('ommlds.cli.sessions.chat.drivers.impl', 'ErrorChatEvent'),
|
|
2987
|
+
),
|
|
2988
|
+
)
|
|
2989
|
+
def _process_dataclass__4e9140c5445b4f62b7f2b08a89442350123d2517():
|
|
2990
|
+
def _process_dataclass(
|
|
2991
|
+
*,
|
|
2992
|
+
__dataclass__cls,
|
|
2993
|
+
__dataclass__init__fields__0__annotation,
|
|
2994
|
+
__dataclass__init__fields__0__default,
|
|
2995
|
+
__dataclass__init__fields__1__annotation,
|
|
2996
|
+
__dataclass__init__fields__1__default,
|
|
2997
|
+
__dataclass__FieldFnValidationError, # noqa
|
|
2998
|
+
__dataclass__FieldTypeValidationError, # noqa
|
|
2999
|
+
__dataclass__FnValidationError, # noqa
|
|
3000
|
+
__dataclass__FrozenInstanceError=dataclasses.FrozenInstanceError, # noqa
|
|
3001
|
+
__dataclass__FunctionType=types.FunctionType, # noqa
|
|
3002
|
+
__dataclass__HAS_DEFAULT_FACTORY=dataclasses._HAS_DEFAULT_FACTORY, # noqa
|
|
3003
|
+
__dataclass__MISSING=dataclasses.MISSING, # noqa
|
|
3004
|
+
__dataclass__None=None, # noqa
|
|
3005
|
+
__dataclass__TypeError=TypeError, # noqa
|
|
3006
|
+
__dataclass___recursive_repr=reprlib.recursive_repr, # noqa
|
|
3007
|
+
__dataclass__isinstance=isinstance, # noqa
|
|
3008
|
+
__dataclass__object_setattr=object.__setattr__, # noqa
|
|
3009
|
+
__dataclass__property=property, # noqa
|
|
3010
|
+
):
|
|
3011
|
+
def __copy__(self):
|
|
3012
|
+
if self.__class__ is not __dataclass__cls:
|
|
3013
|
+
raise TypeError(self)
|
|
3014
|
+
return __dataclass__cls( # noqa
|
|
3015
|
+
message=self.message,
|
|
3016
|
+
error=self.error,
|
|
3017
|
+
)
|
|
3018
|
+
|
|
3019
|
+
__copy__.__qualname__ = f"{__dataclass__cls.__qualname__}.__copy__"
|
|
3020
|
+
if '__copy__' in __dataclass__cls.__dict__:
|
|
3021
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __copy__ in class {__dataclass__cls.__name__}")
|
|
3022
|
+
setattr(__dataclass__cls, '__copy__', __copy__)
|
|
3023
|
+
|
|
3024
|
+
def __eq__(self, other):
|
|
3025
|
+
if self is other:
|
|
3026
|
+
return True
|
|
3027
|
+
if self.__class__ is not other.__class__:
|
|
3028
|
+
return NotImplemented
|
|
3029
|
+
return (
|
|
3030
|
+
self.message == other.message and
|
|
3031
|
+
self.error == other.error
|
|
3032
|
+
)
|
|
3033
|
+
|
|
3034
|
+
__eq__.__qualname__ = f"{__dataclass__cls.__qualname__}.__eq__"
|
|
3035
|
+
if '__eq__' in __dataclass__cls.__dict__:
|
|
3036
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __eq__ in class {__dataclass__cls.__name__}")
|
|
3037
|
+
setattr(__dataclass__cls, '__eq__', __eq__)
|
|
3038
|
+
|
|
3039
|
+
__dataclass___setattr_frozen_fields = {
|
|
3040
|
+
'message',
|
|
3041
|
+
'error',
|
|
3042
|
+
}
|
|
3043
|
+
|
|
3044
|
+
def __setattr__(self, name, value):
|
|
3045
|
+
if (
|
|
3046
|
+
type(self) is __dataclass__cls
|
|
3047
|
+
or name in __dataclass___setattr_frozen_fields
|
|
3048
|
+
):
|
|
3049
|
+
raise __dataclass__FrozenInstanceError(f"cannot assign to field {name!r}")
|
|
3050
|
+
super(__dataclass__cls, self).__setattr__(name, value)
|
|
3051
|
+
|
|
3052
|
+
__setattr__.__qualname__ = f"{__dataclass__cls.__qualname__}.__setattr__"
|
|
3053
|
+
if '__setattr__' in __dataclass__cls.__dict__:
|
|
3054
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __setattr__ in class {__dataclass__cls.__name__}")
|
|
3055
|
+
setattr(__dataclass__cls, '__setattr__', __setattr__)
|
|
3056
|
+
|
|
3057
|
+
__dataclass___delattr_frozen_fields = {
|
|
3058
|
+
'message',
|
|
3059
|
+
'error',
|
|
3060
|
+
}
|
|
3061
|
+
|
|
3062
|
+
def __delattr__(self, name):
|
|
3063
|
+
if (
|
|
3064
|
+
type(self) is __dataclass__cls
|
|
3065
|
+
or name in __dataclass___delattr_frozen_fields
|
|
3066
|
+
):
|
|
3067
|
+
raise __dataclass__FrozenInstanceError(f"cannot delete field {name!r}")
|
|
3068
|
+
super(__dataclass__cls, self).__delattr__(name)
|
|
3069
|
+
|
|
3070
|
+
__delattr__.__qualname__ = f"{__dataclass__cls.__qualname__}.__delattr__"
|
|
3071
|
+
if '__delattr__' in __dataclass__cls.__dict__:
|
|
3072
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __delattr__ in class {__dataclass__cls.__name__}")
|
|
3073
|
+
setattr(__dataclass__cls, '__delattr__', __delattr__)
|
|
3074
|
+
|
|
3075
|
+
def __hash__(self):
|
|
3076
|
+
return hash((
|
|
3077
|
+
self.message,
|
|
3078
|
+
self.error,
|
|
3079
|
+
))
|
|
3080
|
+
|
|
3081
|
+
__hash__.__qualname__ = f"{__dataclass__cls.__qualname__}.__hash__"
|
|
3082
|
+
setattr(__dataclass__cls, '__hash__', __hash__)
|
|
3083
|
+
|
|
3084
|
+
def __init__(
|
|
3085
|
+
self,
|
|
3086
|
+
message: __dataclass__init__fields__0__annotation = __dataclass__init__fields__0__default,
|
|
3087
|
+
error: __dataclass__init__fields__1__annotation = __dataclass__init__fields__1__default,
|
|
3088
|
+
) -> __dataclass__None:
|
|
3089
|
+
__dataclass__object_setattr(self, 'message', message)
|
|
3090
|
+
__dataclass__object_setattr(self, 'error', error)
|
|
3091
|
+
|
|
3092
|
+
__init__.__qualname__ = f"{__dataclass__cls.__qualname__}.__init__"
|
|
3093
|
+
if '__init__' in __dataclass__cls.__dict__:
|
|
3094
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __init__ in class {__dataclass__cls.__name__}")
|
|
3095
|
+
setattr(__dataclass__cls, '__init__', __init__)
|
|
3096
|
+
|
|
3097
|
+
@__dataclass___recursive_repr()
|
|
3098
|
+
def __repr__(self):
|
|
3099
|
+
parts = []
|
|
3100
|
+
parts.append(f"message={self.message!r}")
|
|
3101
|
+
parts.append(f"error={self.error!r}")
|
|
3102
|
+
return (
|
|
3103
|
+
f"{self.__class__.__qualname__}("
|
|
3104
|
+
f"{', '.join(parts)}"
|
|
3105
|
+
f")"
|
|
3106
|
+
)
|
|
3107
|
+
|
|
3108
|
+
__repr__.__qualname__ = f"{__dataclass__cls.__qualname__}.__repr__"
|
|
3109
|
+
if '__repr__' in __dataclass__cls.__dict__:
|
|
3110
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __repr__ in class {__dataclass__cls.__name__}")
|
|
3111
|
+
setattr(__dataclass__cls, '__repr__', __repr__)
|
|
3112
|
+
|
|
3113
|
+
return _process_dataclass
|
|
3114
|
+
|
|
3115
|
+
|
|
2965
3116
|
@_register(
|
|
2966
3117
|
plan_repr=(
|
|
2967
3118
|
"Plans(tup=(CopyPlan(fields=('version', 'payload', 'created_at', 'updated_at')), EqPlan(fields=('version', 'pay"
|
|
@@ -36,3 +36,9 @@ class AiMessagesChatEvent(ChatEvent, lang.Final):
|
|
|
36
36
|
@dc.dataclass(frozen=True)
|
|
37
37
|
class AiDeltaChatEvent(ChatEvent, lang.Final):
|
|
38
38
|
delta: 'mc.AiDelta'
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
@dc.dataclass(frozen=True)
|
|
42
|
+
class ErrorChatEvent(ChatEvent, lang.Final):
|
|
43
|
+
message: str | None = None
|
|
44
|
+
error: BaseException | None = None
|
|
@@ -50,9 +50,24 @@ class ChatAppGetter(lang.AsyncCachedFunc0['ChatApp']):
|
|
|
50
50
|
pass
|
|
51
51
|
|
|
52
52
|
|
|
53
|
-
class ChatApp(
|
|
53
|
+
class ChatApp(
|
|
54
|
+
tx.ClipboardAppMixin,
|
|
55
|
+
tx.DevtoolsAppMixin,
|
|
56
|
+
tx.App,
|
|
57
|
+
):
|
|
54
58
|
ENABLE_COMMAND_PALETTE: ta.ClassVar[bool] = False
|
|
55
59
|
|
|
60
|
+
BINDINGS: ta.ClassVar[ta.Sequence[tx.BindingType]] = [
|
|
61
|
+
*tx.App.BINDINGS,
|
|
62
|
+
|
|
63
|
+
tx.Binding(
|
|
64
|
+
'alt+c,ctrl+c,super+c',
|
|
65
|
+
'screen.copy_text',
|
|
66
|
+
'Copy selected text',
|
|
67
|
+
show=False,
|
|
68
|
+
),
|
|
69
|
+
]
|
|
70
|
+
|
|
56
71
|
def __init__(
|
|
57
72
|
self,
|
|
58
73
|
*,
|
|
@@ -223,7 +238,8 @@ class ChatApp(tx.App):
|
|
|
223
238
|
try:
|
|
224
239
|
await self._chat_facade.handle_user_input(ac.text)
|
|
225
240
|
except Exception as e: # noqa
|
|
226
|
-
raise
|
|
241
|
+
# raise
|
|
242
|
+
await self.display_ui_message(repr(e))
|
|
227
243
|
|
|
228
244
|
else:
|
|
229
245
|
raise TypeError(ac) # noqa
|
ommlds/minichain/__init__.py
CHANGED
|
@@ -252,6 +252,14 @@ with _lang.auto_proxy_init(
|
|
|
252
252
|
transform_content_strings,
|
|
253
253
|
)
|
|
254
254
|
|
|
255
|
+
from .content.transform.types import ( # noqa
|
|
256
|
+
ContentTransform,
|
|
257
|
+
)
|
|
258
|
+
|
|
259
|
+
from .content.transform.visitors import ( # noqa
|
|
260
|
+
VisitorContentTransform,
|
|
261
|
+
)
|
|
262
|
+
|
|
255
263
|
##
|
|
256
264
|
|
|
257
265
|
from .content.code import ( # noqa
|
|
@@ -334,6 +342,11 @@ with _lang.auto_proxy_init(
|
|
|
334
342
|
RecursiveContent,
|
|
335
343
|
)
|
|
336
344
|
|
|
345
|
+
from .content.resources import ( # noqa
|
|
346
|
+
ResourceContent,
|
|
347
|
+
resource_content,
|
|
348
|
+
)
|
|
349
|
+
|
|
337
350
|
from .content.section import ( # noqa
|
|
338
351
|
SectionContent,
|
|
339
352
|
)
|
|
@@ -369,8 +382,6 @@ with _lang.auto_proxy_init(
|
|
|
369
382
|
|
|
370
383
|
StaticContentVisitorTypeError,
|
|
371
384
|
StaticContentVisitor,
|
|
372
|
-
|
|
373
|
-
ContentTransform,
|
|
374
385
|
)
|
|
375
386
|
|
|
376
387
|
##
|
ommlds/minichain/_dataclasses.py
CHANGED
|
@@ -7053,6 +7053,171 @@ def _process_dataclass__ef0fad925bba9f189d06f3ca8625366af9abb8a5():
|
|
|
7053
7053
|
return _process_dataclass
|
|
7054
7054
|
|
|
7055
7055
|
|
|
7056
|
+
@_register(
|
|
7057
|
+
plan_repr=(
|
|
7058
|
+
"Plans(tup=(CopyPlan(fields=('_metadata', 'package', 'file')), EqPlan(fields=('_metadata', 'package', 'file')),"
|
|
7059
|
+
" FrozenPlan(fields=('_metadata', 'package', 'file'), allow_dynamic_dunder_attrs=False), HashPlan(action='add',"
|
|
7060
|
+
" fields=('_metadata', 'package', 'file'), cache=False), InitPlan(fields=(InitPlan.Field(name='_metadata', anno"
|
|
7061
|
+
"tation=OpRef(name='init.fields.0.annotation'), default=OpRef(name='init.fields.0.default'), default_factory=No"
|
|
7062
|
+
"ne, init=True, override=False, field_type=FieldType.INSTANCE, coerce=OpRef(name='init.fields.0.coerce'), valid"
|
|
7063
|
+
"ate=None, check_type=None), InitPlan.Field(name='package', annotation=OpRef(name='init.fields.1.annotation'), "
|
|
7064
|
+
"default=None, default_factory=None, init=True, override=False, field_type=FieldType.INSTANCE, coerce=None, val"
|
|
7065
|
+
"idate=None, check_type=None), InitPlan.Field(name='file', annotation=OpRef(name='init.fields.2.annotation'), d"
|
|
7066
|
+
"efault=None, default_factory=None, init=True, override=False, field_type=FieldType.INSTANCE, coerce=None, vali"
|
|
7067
|
+
"date=None, check_type=None)), self_param='self', std_params=('package', 'file'), kw_only_params=('_metadata',)"
|
|
7068
|
+
", frozen=True, slots=False, post_init_params=None, init_fns=(), validate_fns=()), ReprPlan(fields=(ReprPlan.Fi"
|
|
7069
|
+
"eld(name='package', kw_only=False, fn=None), ReprPlan.Field(name='file', kw_only=False, fn=None)), id=False, t"
|
|
7070
|
+
"erse=False, default_fn=None)))"
|
|
7071
|
+
),
|
|
7072
|
+
plan_repr_sha1='96d8a115fd863c61344f44124f5175d63ed37469',
|
|
7073
|
+
op_ref_idents=(
|
|
7074
|
+
'__dataclass__init__fields__0__annotation',
|
|
7075
|
+
'__dataclass__init__fields__0__coerce',
|
|
7076
|
+
'__dataclass__init__fields__0__default',
|
|
7077
|
+
'__dataclass__init__fields__1__annotation',
|
|
7078
|
+
'__dataclass__init__fields__2__annotation',
|
|
7079
|
+
),
|
|
7080
|
+
cls_names=(
|
|
7081
|
+
('ommlds.minichain.backends.impls.mistral', 'ResourceContent'),
|
|
7082
|
+
),
|
|
7083
|
+
)
|
|
7084
|
+
def _process_dataclass__96d8a115fd863c61344f44124f5175d63ed37469():
|
|
7085
|
+
def _process_dataclass(
|
|
7086
|
+
*,
|
|
7087
|
+
__dataclass__cls,
|
|
7088
|
+
__dataclass__init__fields__0__annotation,
|
|
7089
|
+
__dataclass__init__fields__0__coerce,
|
|
7090
|
+
__dataclass__init__fields__0__default,
|
|
7091
|
+
__dataclass__init__fields__1__annotation,
|
|
7092
|
+
__dataclass__init__fields__2__annotation,
|
|
7093
|
+
__dataclass__FieldFnValidationError, # noqa
|
|
7094
|
+
__dataclass__FieldTypeValidationError, # noqa
|
|
7095
|
+
__dataclass__FnValidationError, # noqa
|
|
7096
|
+
__dataclass__FrozenInstanceError=dataclasses.FrozenInstanceError, # noqa
|
|
7097
|
+
__dataclass__FunctionType=types.FunctionType, # noqa
|
|
7098
|
+
__dataclass__HAS_DEFAULT_FACTORY=dataclasses._HAS_DEFAULT_FACTORY, # noqa
|
|
7099
|
+
__dataclass__MISSING=dataclasses.MISSING, # noqa
|
|
7100
|
+
__dataclass__None=None, # noqa
|
|
7101
|
+
__dataclass__TypeError=TypeError, # noqa
|
|
7102
|
+
__dataclass___recursive_repr=reprlib.recursive_repr, # noqa
|
|
7103
|
+
__dataclass__isinstance=isinstance, # noqa
|
|
7104
|
+
__dataclass__object_setattr=object.__setattr__, # noqa
|
|
7105
|
+
__dataclass__property=property, # noqa
|
|
7106
|
+
):
|
|
7107
|
+
def __copy__(self):
|
|
7108
|
+
if self.__class__ is not __dataclass__cls:
|
|
7109
|
+
raise TypeError(self)
|
|
7110
|
+
return __dataclass__cls( # noqa
|
|
7111
|
+
_metadata=self._metadata,
|
|
7112
|
+
package=self.package,
|
|
7113
|
+
file=self.file,
|
|
7114
|
+
)
|
|
7115
|
+
|
|
7116
|
+
__copy__.__qualname__ = f"{__dataclass__cls.__qualname__}.__copy__"
|
|
7117
|
+
if '__copy__' in __dataclass__cls.__dict__:
|
|
7118
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __copy__ in class {__dataclass__cls.__name__}")
|
|
7119
|
+
setattr(__dataclass__cls, '__copy__', __copy__)
|
|
7120
|
+
|
|
7121
|
+
def __eq__(self, other):
|
|
7122
|
+
if self is other:
|
|
7123
|
+
return True
|
|
7124
|
+
if self.__class__ is not other.__class__:
|
|
7125
|
+
return NotImplemented
|
|
7126
|
+
return (
|
|
7127
|
+
self._metadata == other._metadata and
|
|
7128
|
+
self.package == other.package and
|
|
7129
|
+
self.file == other.file
|
|
7130
|
+
)
|
|
7131
|
+
|
|
7132
|
+
__eq__.__qualname__ = f"{__dataclass__cls.__qualname__}.__eq__"
|
|
7133
|
+
if '__eq__' in __dataclass__cls.__dict__:
|
|
7134
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __eq__ in class {__dataclass__cls.__name__}")
|
|
7135
|
+
setattr(__dataclass__cls, '__eq__', __eq__)
|
|
7136
|
+
|
|
7137
|
+
__dataclass___setattr_frozen_fields = {
|
|
7138
|
+
'_metadata',
|
|
7139
|
+
'package',
|
|
7140
|
+
'file',
|
|
7141
|
+
}
|
|
7142
|
+
|
|
7143
|
+
def __setattr__(self, name, value):
|
|
7144
|
+
if (
|
|
7145
|
+
type(self) is __dataclass__cls
|
|
7146
|
+
or name in __dataclass___setattr_frozen_fields
|
|
7147
|
+
):
|
|
7148
|
+
raise __dataclass__FrozenInstanceError(f"cannot assign to field {name!r}")
|
|
7149
|
+
super(__dataclass__cls, self).__setattr__(name, value)
|
|
7150
|
+
|
|
7151
|
+
__setattr__.__qualname__ = f"{__dataclass__cls.__qualname__}.__setattr__"
|
|
7152
|
+
if '__setattr__' in __dataclass__cls.__dict__:
|
|
7153
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __setattr__ in class {__dataclass__cls.__name__}")
|
|
7154
|
+
setattr(__dataclass__cls, '__setattr__', __setattr__)
|
|
7155
|
+
|
|
7156
|
+
__dataclass___delattr_frozen_fields = {
|
|
7157
|
+
'_metadata',
|
|
7158
|
+
'package',
|
|
7159
|
+
'file',
|
|
7160
|
+
}
|
|
7161
|
+
|
|
7162
|
+
def __delattr__(self, name):
|
|
7163
|
+
if (
|
|
7164
|
+
type(self) is __dataclass__cls
|
|
7165
|
+
or name in __dataclass___delattr_frozen_fields
|
|
7166
|
+
):
|
|
7167
|
+
raise __dataclass__FrozenInstanceError(f"cannot delete field {name!r}")
|
|
7168
|
+
super(__dataclass__cls, self).__delattr__(name)
|
|
7169
|
+
|
|
7170
|
+
__delattr__.__qualname__ = f"{__dataclass__cls.__qualname__}.__delattr__"
|
|
7171
|
+
if '__delattr__' in __dataclass__cls.__dict__:
|
|
7172
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __delattr__ in class {__dataclass__cls.__name__}")
|
|
7173
|
+
setattr(__dataclass__cls, '__delattr__', __delattr__)
|
|
7174
|
+
|
|
7175
|
+
def __hash__(self):
|
|
7176
|
+
return hash((
|
|
7177
|
+
self._metadata,
|
|
7178
|
+
self.package,
|
|
7179
|
+
self.file,
|
|
7180
|
+
))
|
|
7181
|
+
|
|
7182
|
+
__hash__.__qualname__ = f"{__dataclass__cls.__qualname__}.__hash__"
|
|
7183
|
+
setattr(__dataclass__cls, '__hash__', __hash__)
|
|
7184
|
+
|
|
7185
|
+
def __init__(
|
|
7186
|
+
self,
|
|
7187
|
+
package: __dataclass__init__fields__1__annotation,
|
|
7188
|
+
file: __dataclass__init__fields__2__annotation,
|
|
7189
|
+
*,
|
|
7190
|
+
_metadata: __dataclass__init__fields__0__annotation = __dataclass__init__fields__0__default,
|
|
7191
|
+
) -> __dataclass__None:
|
|
7192
|
+
_metadata = __dataclass__init__fields__0__coerce(_metadata)
|
|
7193
|
+
__dataclass__object_setattr(self, '_metadata', _metadata)
|
|
7194
|
+
__dataclass__object_setattr(self, 'package', package)
|
|
7195
|
+
__dataclass__object_setattr(self, 'file', file)
|
|
7196
|
+
|
|
7197
|
+
__init__.__qualname__ = f"{__dataclass__cls.__qualname__}.__init__"
|
|
7198
|
+
if '__init__' in __dataclass__cls.__dict__:
|
|
7199
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __init__ in class {__dataclass__cls.__name__}")
|
|
7200
|
+
setattr(__dataclass__cls, '__init__', __init__)
|
|
7201
|
+
|
|
7202
|
+
@__dataclass___recursive_repr()
|
|
7203
|
+
def __repr__(self):
|
|
7204
|
+
parts = []
|
|
7205
|
+
parts.append(f"package={self.package!r}")
|
|
7206
|
+
parts.append(f"file={self.file!r}")
|
|
7207
|
+
return (
|
|
7208
|
+
f"{self.__class__.__qualname__}("
|
|
7209
|
+
f"{', '.join(parts)}"
|
|
7210
|
+
f")"
|
|
7211
|
+
)
|
|
7212
|
+
|
|
7213
|
+
__repr__.__qualname__ = f"{__dataclass__cls.__qualname__}.__repr__"
|
|
7214
|
+
if '__repr__' in __dataclass__cls.__dict__:
|
|
7215
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __repr__ in class {__dataclass__cls.__name__}")
|
|
7216
|
+
setattr(__dataclass__cls, '__repr__', __repr__)
|
|
7217
|
+
|
|
7218
|
+
return _process_dataclass
|
|
7219
|
+
|
|
7220
|
+
|
|
7056
7221
|
@_register(
|
|
7057
7222
|
plan_repr=(
|
|
7058
7223
|
"Plans(tup=(CopyPlan(fields=('_metadata', 'body', 'header')), EqPlan(fields=('_metadata', 'body', 'header')), F"
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
from omlish import check
|
|
2
|
+
from omlish import dataclasses as dc
|
|
3
|
+
from omlish import lang
|
|
4
|
+
|
|
5
|
+
from .recursive import RecursiveContent
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
##
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
@dc.dataclass(frozen=True)
|
|
12
|
+
class ResourceContent(RecursiveContent, lang.Final):
|
|
13
|
+
package: str
|
|
14
|
+
file: str
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
def resource_content(*parts: str) -> ResourceContent:
|
|
18
|
+
*package_parts, file = parts
|
|
19
|
+
for p in check.not_empty(package_parts):
|
|
20
|
+
check.non_empty_str(p)
|
|
21
|
+
check.arg(not (p.startswith('.') or p.endswith('.')))
|
|
22
|
+
return ResourceContent('.'.join(package_parts), file)
|
|
@@ -8,13 +8,13 @@ from ..json import JsonContent
|
|
|
8
8
|
from ..metadata import ContentOriginal
|
|
9
9
|
from ..standard import StandardContent
|
|
10
10
|
from ..text import TextContent
|
|
11
|
-
from
|
|
11
|
+
from .visitors import VisitorContentTransform
|
|
12
12
|
|
|
13
13
|
|
|
14
14
|
##
|
|
15
15
|
|
|
16
16
|
|
|
17
|
-
class JsonContentRenderer(
|
|
17
|
+
class JsonContentRenderer(VisitorContentTransform[None]):
|
|
18
18
|
def __init__(
|
|
19
19
|
self,
|
|
20
20
|
*,
|
|
@@ -4,8 +4,11 @@ from omlish import lang
|
|
|
4
4
|
from omlish.text import templating as tpl
|
|
5
5
|
|
|
6
6
|
from ..content import Content
|
|
7
|
-
from .
|
|
7
|
+
from .namespaces import NamespaceContentMaterializer
|
|
8
|
+
from .placeholders import PlaceholderContentMaterializer
|
|
9
|
+
from .placeholders import PlaceholderContents
|
|
8
10
|
from .recursive import RecursiveContentMaterializer
|
|
11
|
+
from .resources import ResourceContentMaterializer
|
|
9
12
|
from .templates import TemplateContentMaterializer
|
|
10
13
|
|
|
11
14
|
|
|
@@ -14,7 +17,7 @@ from .templates import TemplateContentMaterializer
|
|
|
14
17
|
|
|
15
18
|
class ContentMaterializer(lang.Abstract):
|
|
16
19
|
@abc.abstractmethod
|
|
17
|
-
def
|
|
20
|
+
def materialize(self, c: Content) -> Content:
|
|
18
21
|
raise NotImplementedError
|
|
19
22
|
|
|
20
23
|
|
|
@@ -30,12 +33,17 @@ class DefaultContentMaterializer(ContentMaterializer):
|
|
|
30
33
|
) -> None:
|
|
31
34
|
super().__init__()
|
|
32
35
|
|
|
33
|
-
self.
|
|
34
|
-
|
|
36
|
+
self._recursive_materializer = RecursiveContentMaterializer(
|
|
37
|
+
NamespaceContentMaterializer(),
|
|
38
|
+
PlaceholderContentMaterializer(placeholder_contents),
|
|
39
|
+
ResourceContentMaterializer(),
|
|
40
|
+
)
|
|
35
41
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
42
|
+
self._template_materializer = TemplateContentMaterializer(templater_context)
|
|
43
|
+
|
|
44
|
+
def materialize(self, c: Content) -> Content:
|
|
45
|
+
c = self._recursive_materializer.transform(c, None)
|
|
46
|
+
c = self._template_materializer.transform(c, None)
|
|
39
47
|
return c
|
|
40
48
|
|
|
41
49
|
|
|
@@ -48,4 +56,4 @@ def materialize_content(
|
|
|
48
56
|
return DefaultContentMaterializer(
|
|
49
57
|
placeholder_contents=placeholder_contents,
|
|
50
58
|
templater_context=templater_context,
|
|
51
|
-
).
|
|
59
|
+
).materialize(c)
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
from ..content import Content
|
|
2
2
|
from ..metadata import ContentOriginal
|
|
3
3
|
from ..standard import StandardContent
|
|
4
|
-
from
|
|
4
|
+
from .visitors import VisitorContentTransform
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
##
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
class OriginalMetadataStrippingContentTransform(
|
|
10
|
+
class OriginalMetadataStrippingContentTransform(VisitorContentTransform[None]):
|
|
11
11
|
def visit_standard_content(self, c: StandardContent, ctx: None) -> StandardContent:
|
|
12
12
|
return c.with_metadata(discard=[ContentOriginal])
|
|
13
13
|
|
|
14
14
|
|
|
15
15
|
def strip_content_original_metadata(c: Content) -> Content:
|
|
16
|
-
return OriginalMetadataStrippingContentTransform().
|
|
16
|
+
return OriginalMetadataStrippingContentTransform().transform(c, None)
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
from omlish import check
|
|
2
|
+
|
|
3
|
+
from ..content import Content
|
|
4
|
+
from ..namespaces import ContentNamespace
|
|
5
|
+
from ..namespaces import NamespaceContent
|
|
6
|
+
from .visitors import VisitorContentTransform
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
##
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class NamespaceContentMaterializer(VisitorContentTransform[None]):
|
|
13
|
+
def visit_namespace_content(self, c: NamespaceContent, ctx: None) -> Content:
|
|
14
|
+
check.issubclass(c.ns, ContentNamespace)
|
|
15
|
+
out: list[Content] = []
|
|
16
|
+
for n, e in c.ns:
|
|
17
|
+
if n.startswith('_'):
|
|
18
|
+
continue
|
|
19
|
+
out.append(self.transform(e, ctx))
|
|
20
|
+
return out
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import typing as ta
|
|
2
|
+
|
|
3
|
+
from omlish import dataclasses as dc
|
|
4
|
+
|
|
5
|
+
from ..content import Content
|
|
6
|
+
from ..placeholders import PlaceholderContent
|
|
7
|
+
from ..placeholders import PlaceholderContentKey
|
|
8
|
+
from .visitors import VisitorContentTransform
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
##
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
PlaceholderContentMap: ta.TypeAlias = ta.Mapping[PlaceholderContentKey, Content]
|
|
15
|
+
PlaceholderContentFn: ta.TypeAlias = ta.Callable[[PlaceholderContentKey], Content]
|
|
16
|
+
PlaceholderContents: ta.TypeAlias = PlaceholderContentMap | PlaceholderContentFn
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
@dc.dataclass()
|
|
20
|
+
class PlaceholderContentMissingError(Exception):
|
|
21
|
+
key: PlaceholderContentKey
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
def _make_placeholder_content_fn(cps: PlaceholderContents | None = None) -> PlaceholderContentFn:
|
|
25
|
+
if cps is None:
|
|
26
|
+
def none_fn(cpk: PlaceholderContentKey) -> Content:
|
|
27
|
+
raise PlaceholderContentMissingError(cpk)
|
|
28
|
+
|
|
29
|
+
return none_fn
|
|
30
|
+
|
|
31
|
+
elif isinstance(cps, ta.Mapping):
|
|
32
|
+
def mapping_fn(cpk: PlaceholderContentKey) -> Content:
|
|
33
|
+
try:
|
|
34
|
+
return cps[cpk]
|
|
35
|
+
except KeyError:
|
|
36
|
+
raise PlaceholderContentMissingError(cpk) from None
|
|
37
|
+
|
|
38
|
+
return mapping_fn
|
|
39
|
+
|
|
40
|
+
elif callable(cps):
|
|
41
|
+
return cps
|
|
42
|
+
|
|
43
|
+
else:
|
|
44
|
+
raise TypeError(cps)
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
##
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
class PlaceholderContentMaterializer(VisitorContentTransform[None]):
|
|
51
|
+
def __init__(
|
|
52
|
+
self,
|
|
53
|
+
placeholder_contents: PlaceholderContents | None = None,
|
|
54
|
+
) -> None:
|
|
55
|
+
super().__init__()
|
|
56
|
+
|
|
57
|
+
self._placeholder_content_fn = _make_placeholder_content_fn(placeholder_contents)
|
|
58
|
+
|
|
59
|
+
def visit_placeholder_content(self, c: PlaceholderContent, ctx: None) -> Content:
|
|
60
|
+
return self._placeholder_content_fn(c.k)
|
|
@@ -1,51 +1,10 @@
|
|
|
1
1
|
import typing as ta
|
|
2
2
|
|
|
3
|
-
from omlish import check
|
|
4
|
-
from omlish import dataclasses as dc
|
|
5
|
-
|
|
6
3
|
from ..content import Content
|
|
7
|
-
from
|
|
8
|
-
from ..namespaces import NamespaceContent
|
|
9
|
-
from ..placeholders import PlaceholderContent
|
|
10
|
-
from ..placeholders import PlaceholderContentKey
|
|
11
|
-
from ..recursive import RecursiveContent
|
|
12
|
-
from ..visitors import ContentTransform
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
##
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
PlaceholderContentMap: ta.TypeAlias = ta.Mapping[PlaceholderContentKey, Content]
|
|
19
|
-
PlaceholderContentFn: ta.TypeAlias = ta.Callable[[PlaceholderContentKey], Content]
|
|
20
|
-
PlaceholderContents: ta.TypeAlias = PlaceholderContentMap | PlaceholderContentFn
|
|
21
|
-
|
|
4
|
+
from .types import ContentTransform
|
|
22
5
|
|
|
23
|
-
@dc.dataclass()
|
|
24
|
-
class PlaceholderContentMissingError(Exception):
|
|
25
|
-
key: PlaceholderContentKey
|
|
26
6
|
|
|
27
|
-
|
|
28
|
-
def _make_placeholder_content_fn(cps: PlaceholderContents | None = None) -> PlaceholderContentFn:
|
|
29
|
-
if cps is None:
|
|
30
|
-
def none_fn(cpk: PlaceholderContentKey) -> Content:
|
|
31
|
-
raise PlaceholderContentMissingError(cpk)
|
|
32
|
-
|
|
33
|
-
return none_fn
|
|
34
|
-
|
|
35
|
-
elif isinstance(cps, ta.Mapping):
|
|
36
|
-
def mapping_fn(cpk: PlaceholderContentKey) -> Content:
|
|
37
|
-
try:
|
|
38
|
-
return cps[cpk]
|
|
39
|
-
except KeyError:
|
|
40
|
-
raise PlaceholderContentMissingError(cpk) from None
|
|
41
|
-
|
|
42
|
-
return mapping_fn
|
|
43
|
-
|
|
44
|
-
elif callable(cps):
|
|
45
|
-
return cps
|
|
46
|
-
|
|
47
|
-
else:
|
|
48
|
-
raise TypeError(cps)
|
|
7
|
+
C = ta.TypeVar('C')
|
|
49
8
|
|
|
50
9
|
|
|
51
10
|
##
|
|
@@ -55,43 +14,41 @@ class RecursiveContentDepthExceededError(Exception):
|
|
|
55
14
|
pass
|
|
56
15
|
|
|
57
16
|
|
|
58
|
-
class RecursiveContentMaterializer(ContentTransform[
|
|
59
|
-
|
|
17
|
+
class RecursiveContentMaterializer(ContentTransform[C]):
|
|
18
|
+
DEFAULT_MAX_ITERATIONS: int = 8
|
|
60
19
|
|
|
61
20
|
def __init__(
|
|
62
21
|
self,
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
22
|
+
*children: ContentTransform[C],
|
|
23
|
+
max_iterations: int = DEFAULT_MAX_ITERATIONS,
|
|
24
|
+
debug: bool = False,
|
|
66
25
|
) -> None:
|
|
67
26
|
super().__init__()
|
|
68
27
|
|
|
69
|
-
self.
|
|
70
|
-
self.
|
|
28
|
+
self._children = children
|
|
29
|
+
self._max_iterations = max_iterations
|
|
30
|
+
self._debug = debug
|
|
31
|
+
|
|
32
|
+
def transform(self, content: Content, ctx: C) -> Content:
|
|
33
|
+
n = 0
|
|
71
34
|
|
|
72
|
-
|
|
35
|
+
history: list[Content] | None = None
|
|
36
|
+
if self._debug:
|
|
37
|
+
history = []
|
|
73
38
|
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
39
|
+
while True:
|
|
40
|
+
if history is not None:
|
|
41
|
+
history.append(content)
|
|
77
42
|
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
return self.visit(o, ctx)
|
|
81
|
-
finally:
|
|
82
|
-
self._cur_depth -= 1
|
|
43
|
+
if n >= self._max_iterations:
|
|
44
|
+
raise RecursiveContentDepthExceededError
|
|
83
45
|
|
|
84
|
-
|
|
85
|
-
|
|
46
|
+
out = content
|
|
47
|
+
for child in self._children:
|
|
48
|
+
out = child.transform(out, ctx)
|
|
86
49
|
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
out: list[Content] = []
|
|
90
|
-
for n, e in c.ns:
|
|
91
|
-
if n.startswith('_'):
|
|
92
|
-
continue
|
|
93
|
-
out.append(self.recurse(e, ctx))
|
|
94
|
-
return out
|
|
50
|
+
if out is content:
|
|
51
|
+
return content
|
|
95
52
|
|
|
96
|
-
|
|
97
|
-
|
|
53
|
+
content = out
|
|
54
|
+
n += 1
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
from omlish import lang
|
|
2
|
+
|
|
3
|
+
from ..content import Content
|
|
4
|
+
from ..metadata import ContentOriginal
|
|
5
|
+
from ..resources import ResourceContent
|
|
6
|
+
from ..standard import StandardContent
|
|
7
|
+
from ..text import TextContent
|
|
8
|
+
from .visitors import VisitorContentTransform
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
##
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
class ResourceContentCache:
|
|
15
|
+
def __init__(self) -> None:
|
|
16
|
+
super().__init__()
|
|
17
|
+
|
|
18
|
+
self._cache: dict[tuple[str, str], StandardContent] = {}
|
|
19
|
+
|
|
20
|
+
def get(self, rc: ResourceContent) -> StandardContent:
|
|
21
|
+
key = (rc.package, rc.file)
|
|
22
|
+
|
|
23
|
+
try:
|
|
24
|
+
return self._cache[key]
|
|
25
|
+
except KeyError:
|
|
26
|
+
pass
|
|
27
|
+
|
|
28
|
+
nc = self.load(rc)
|
|
29
|
+
self._cache[key] = nc
|
|
30
|
+
return nc
|
|
31
|
+
|
|
32
|
+
def load(self, rc: ResourceContent) -> StandardContent:
|
|
33
|
+
pr = lang.get_package_resources(rc.package)
|
|
34
|
+
rf = pr[rc.file]
|
|
35
|
+
txt = rf.read_text()
|
|
36
|
+
return TextContent(txt)
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
RESOURCE_CONTENT_CACHE = ResourceContentCache()
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
##
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
class ResourceContentMaterializer(VisitorContentTransform[None]):
|
|
46
|
+
def __init__(
|
|
47
|
+
self,
|
|
48
|
+
content_cache: ResourceContentCache | None = None,
|
|
49
|
+
) -> None:
|
|
50
|
+
super().__init__()
|
|
51
|
+
|
|
52
|
+
if content_cache is None:
|
|
53
|
+
content_cache = RESOURCE_CONTENT_CACHE
|
|
54
|
+
self._content_cache = content_cache
|
|
55
|
+
|
|
56
|
+
def visit_resource_content(self, c: ResourceContent, ctx: None) -> Content:
|
|
57
|
+
nc = self._content_cache.get(c)
|
|
58
|
+
return nc.with_metadata(ContentOriginal(c))
|
|
@@ -9,13 +9,13 @@ from ..sequence import BlockContent
|
|
|
9
9
|
from ..sequence import InlineContent
|
|
10
10
|
from ..sequence import SequenceContent
|
|
11
11
|
from ..text import TextContent
|
|
12
|
-
from
|
|
12
|
+
from .visitors import VisitorContentTransform
|
|
13
13
|
|
|
14
14
|
|
|
15
15
|
##
|
|
16
16
|
|
|
17
17
|
|
|
18
|
-
class LiftToStandardContentTransform(
|
|
18
|
+
class LiftToStandardContentTransform(VisitorContentTransform[None]):
|
|
19
19
|
def __init__(
|
|
20
20
|
self,
|
|
21
21
|
*,
|
|
@@ -6,7 +6,7 @@ from ..content import Content
|
|
|
6
6
|
from ..emphasis import EmphasisContent
|
|
7
7
|
from ..metadata import ContentOriginal
|
|
8
8
|
from ..text import TextContent
|
|
9
|
-
from
|
|
9
|
+
from .visitors import VisitorContentTransform
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
T = ta.TypeVar('T')
|
|
@@ -16,7 +16,7 @@ T = ta.TypeVar('T')
|
|
|
16
16
|
|
|
17
17
|
|
|
18
18
|
@dc.dataclass(frozen=True)
|
|
19
|
-
class StringFnContentTransform(
|
|
19
|
+
class StringFnContentTransform(VisitorContentTransform[None]):
|
|
20
20
|
fn: ta.Callable[[str], str]
|
|
21
21
|
|
|
22
22
|
def visit_str(self, c: str, ctx: None) -> TextContent:
|
|
@@ -30,4 +30,4 @@ class StringFnContentTransform(ContentTransform[None]):
|
|
|
30
30
|
|
|
31
31
|
|
|
32
32
|
def transform_content_strings(fn: ta.Callable[[str], str], o: Content) -> Content:
|
|
33
|
-
return StringFnContentTransform(fn).
|
|
33
|
+
return StringFnContentTransform(fn).transform(o, None)
|
|
@@ -5,13 +5,13 @@ from ..content import Content
|
|
|
5
5
|
from ..metadata import ContentOriginal
|
|
6
6
|
from ..templates import TemplateContent
|
|
7
7
|
from ..text import TextContent
|
|
8
|
-
from
|
|
8
|
+
from .visitors import VisitorContentTransform
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
##
|
|
12
12
|
|
|
13
13
|
|
|
14
|
-
class TemplateContentMaterializer(
|
|
14
|
+
class TemplateContentMaterializer(VisitorContentTransform[None]):
|
|
15
15
|
def __init__(
|
|
16
16
|
self,
|
|
17
17
|
templater_context: tpl.Templater.Context | None = None,
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import abc
|
|
2
|
+
import typing as ta
|
|
3
|
+
|
|
4
|
+
from omlish import lang
|
|
5
|
+
|
|
6
|
+
from ..content import Content
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
C = ta.TypeVar('C')
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
##
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
class ContentTransform(lang.Abstract, ta.Generic[C]):
|
|
16
|
+
@abc.abstractmethod
|
|
17
|
+
def transform(self, c: Content, ctx: C) -> Content:
|
|
18
|
+
raise NotImplementedError
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import collections.abc
|
|
2
|
+
import typing as ta
|
|
3
|
+
|
|
4
|
+
from omlish import check
|
|
5
|
+
from omlish import lang
|
|
6
|
+
|
|
7
|
+
from ..composite import CompositeContent
|
|
8
|
+
from ..content import Content
|
|
9
|
+
from ..visitors import ContentVisitor
|
|
10
|
+
from .types import ContentTransform
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
C = ta.TypeVar('C')
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
##
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
class VisitorContentTransform(ContentVisitor[C, Content], ContentTransform[C], lang.Abstract):
|
|
20
|
+
@ta.final
|
|
21
|
+
def transform(self, c: Content, ctx: C) -> Content:
|
|
22
|
+
"""Final - must be identical to `visit`."""
|
|
23
|
+
|
|
24
|
+
return self.visit(c, ctx)
|
|
25
|
+
|
|
26
|
+
#
|
|
27
|
+
|
|
28
|
+
def visit_content(self, c: Content, ctx: C) -> Content:
|
|
29
|
+
return c
|
|
30
|
+
|
|
31
|
+
def visit_sequence(self, c: ta.Sequence[Content], ctx: C) -> Content:
|
|
32
|
+
return lang.map_preserve(lambda cc: self.visit(cc, ctx), c)
|
|
33
|
+
|
|
34
|
+
def visit_composite_content(self, c: CompositeContent, ctx: C) -> Content:
|
|
35
|
+
cc = c.child_content()
|
|
36
|
+
ncc = self.visit_sequence(cc, ctx)
|
|
37
|
+
nc = c.replace_child_content(check.isinstance(ncc, collections.abc.Sequence))
|
|
38
|
+
return super().visit_composite_content(nc, ctx)
|
|
@@ -2,7 +2,7 @@ import collections.abc
|
|
|
2
2
|
import inspect
|
|
3
3
|
import typing as ta
|
|
4
4
|
|
|
5
|
-
from omlish import
|
|
5
|
+
from omlish import collections as col
|
|
6
6
|
from omlish import lang
|
|
7
7
|
|
|
8
8
|
from .code import BlockCodeContent
|
|
@@ -24,6 +24,7 @@ from .namespaces import NamespaceContent
|
|
|
24
24
|
from .placeholders import PlaceholderContent
|
|
25
25
|
from .quote import QuoteContent
|
|
26
26
|
from .recursive import RecursiveContent
|
|
27
|
+
from .resources import ResourceContent
|
|
27
28
|
from .section import SectionContent
|
|
28
29
|
from .sequence import BlockContent
|
|
29
30
|
from .sequence import InlineContent
|
|
@@ -146,6 +147,9 @@ class ContentVisitor(lang.Abstract, ta.Generic[C, R]):
|
|
|
146
147
|
def visit_placeholder_content(self, c: PlaceholderContent, ctx: C) -> R:
|
|
147
148
|
return self.visit_recursive_content(c, ctx)
|
|
148
149
|
|
|
150
|
+
def visit_resource_content(self, c: ResourceContent, ctx: C) -> R:
|
|
151
|
+
return self.visit_recursive_content(c, ctx)
|
|
152
|
+
|
|
149
153
|
def visit_template_content(self, c: TemplateContent, ctx: C) -> R:
|
|
150
154
|
return self.visit_dynamic_content(c, ctx)
|
|
151
155
|
|
|
@@ -180,11 +184,11 @@ class ContentVisitor(lang.Abstract, ta.Generic[C, R]):
|
|
|
180
184
|
return self.visit_sequence_content(c, ctx)
|
|
181
185
|
|
|
182
186
|
|
|
183
|
-
ContentVisitor._visit_method_map =
|
|
184
|
-
list(inspect.signature(o).parameters.values())[1].annotation
|
|
187
|
+
ContentVisitor._visit_method_map = col.make_map([ # noqa
|
|
188
|
+
(list(inspect.signature(o).parameters.values())[1].annotation, a)
|
|
185
189
|
for a, o in ContentVisitor.__dict__.items()
|
|
186
190
|
if a.startswith('visit_')
|
|
187
|
-
|
|
191
|
+
], strict=True)
|
|
188
192
|
|
|
189
193
|
|
|
190
194
|
##
|
|
@@ -212,20 +216,3 @@ class StaticContentVisitorTypeError(TypeError):
|
|
|
212
216
|
class StaticContentVisitor(ContentVisitor[C, R], lang.Abstract):
|
|
213
217
|
def visit_dynamic_content(self, c: DynamicContent, ctx: C) -> R:
|
|
214
218
|
raise StaticContentVisitorTypeError(c)
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
##
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
class ContentTransform(ContentVisitor[C, Content], lang.Abstract):
|
|
221
|
-
def visit_content(self, c: Content, ctx: C) -> Content:
|
|
222
|
-
return c
|
|
223
|
-
|
|
224
|
-
def visit_sequence(self, c: ta.Sequence[Content], ctx: C) -> Content:
|
|
225
|
-
return [self.visit(cc, ctx) for cc in c]
|
|
226
|
-
|
|
227
|
-
def visit_composite_content(self, c: CompositeContent, ctx: C) -> Content:
|
|
228
|
-
cc = c.child_content()
|
|
229
|
-
ncc = self.visit_sequence(cc, ctx)
|
|
230
|
-
nc = c.replace_child_content(check.isinstance(ncc, collections.abc.Sequence))
|
|
231
|
-
return super().visit_composite_content(nc, ctx)
|
ommlds/tools/ocr.py
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: ommlds
|
|
3
|
-
Version: 0.0.0.
|
|
3
|
+
Version: 0.0.0.dev510
|
|
4
4
|
Summary: ommlds
|
|
5
5
|
Author: wrmsr
|
|
6
6
|
License-Expression: BSD-3-Clause
|
|
@@ -14,16 +14,16 @@ Classifier: Programming Language :: Python :: 3.13
|
|
|
14
14
|
Requires-Python: >=3.13
|
|
15
15
|
Description-Content-Type: text/markdown
|
|
16
16
|
License-File: LICENSE
|
|
17
|
-
Requires-Dist: omlish==0.0.0.
|
|
17
|
+
Requires-Dist: omlish==0.0.0.dev510
|
|
18
18
|
Provides-Extra: all
|
|
19
|
-
Requires-Dist: omdev==0.0.0.
|
|
19
|
+
Requires-Dist: omdev==0.0.0.dev510; extra == "all"
|
|
20
20
|
Requires-Dist: llama-cpp-python~=0.3; extra == "all"
|
|
21
21
|
Requires-Dist: mlx~=0.30; sys_platform == "darwin" and extra == "all"
|
|
22
22
|
Requires-Dist: mlx-lm~=0.29; sys_platform == "darwin" and extra == "all"
|
|
23
23
|
Requires-Dist: tiktoken~=0.12; extra == "all"
|
|
24
24
|
Requires-Dist: tinygrad~=0.12; extra == "all"
|
|
25
25
|
Requires-Dist: tokenizers~=0.22; extra == "all"
|
|
26
|
-
Requires-Dist: torch~=2.
|
|
26
|
+
Requires-Dist: torch~=2.10; extra == "all"
|
|
27
27
|
Requires-Dist: transformers~=4.57; extra == "all"
|
|
28
28
|
Requires-Dist: sentence-transformers~=5.2; extra == "all"
|
|
29
29
|
Requires-Dist: huggingface-hub~=0.36; extra == "all"
|
|
@@ -38,7 +38,7 @@ Requires-Dist: mwparserfromhell~=0.7; extra == "all"
|
|
|
38
38
|
Requires-Dist: wikitextparser~=0.56; extra == "all"
|
|
39
39
|
Requires-Dist: lxml>=5.3; python_version < "3.13" and extra == "all"
|
|
40
40
|
Provides-Extra: omdev
|
|
41
|
-
Requires-Dist: omdev==0.0.0.
|
|
41
|
+
Requires-Dist: omdev==0.0.0.dev510; extra == "omdev"
|
|
42
42
|
Provides-Extra: backends
|
|
43
43
|
Requires-Dist: llama-cpp-python~=0.3; extra == "backends"
|
|
44
44
|
Requires-Dist: mlx~=0.30; sys_platform == "darwin" and extra == "backends"
|
|
@@ -46,7 +46,7 @@ Requires-Dist: mlx-lm~=0.29; sys_platform == "darwin" and extra == "backends"
|
|
|
46
46
|
Requires-Dist: tiktoken~=0.12; extra == "backends"
|
|
47
47
|
Requires-Dist: tinygrad~=0.12; extra == "backends"
|
|
48
48
|
Requires-Dist: tokenizers~=0.22; extra == "backends"
|
|
49
|
-
Requires-Dist: torch~=2.
|
|
49
|
+
Requires-Dist: torch~=2.10; extra == "backends"
|
|
50
50
|
Requires-Dist: transformers~=4.57; extra == "backends"
|
|
51
51
|
Requires-Dist: sentence-transformers~=5.2; extra == "backends"
|
|
52
52
|
Provides-Extra: huggingface
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
ommlds/.omlish-manifests.json,sha256=PihtJmB7EFRQ5MHZTzfq6GOST1683niUqHZJDFc0vmw,28921
|
|
2
2
|
ommlds/README.md,sha256=xhbl2n19GznXrIzAGdlX8PAYJYsOo_Zu63I7G1UFRZE,398
|
|
3
|
-
ommlds/__about__.py,sha256=
|
|
3
|
+
ommlds/__about__.py,sha256=xHpcF4Ek0Wia5P3X-SePUtGmGzXpXo-Q36a7-X9P6-A,1902
|
|
4
4
|
ommlds/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
5
5
|
ommlds/_hacks/__init__.py,sha256=ajfw7dMKH8UuloeQ5MSxWwgAmdWf2v8gm-K3uLP9wtY,196
|
|
6
6
|
ommlds/_hacks/funcs.py,sha256=8XseIblP7yolDUD7WQSGn1LP90IQzByVejSzphAPDyM,2861
|
|
@@ -105,7 +105,7 @@ ommlds/backends/transformers/filecache.py,sha256=ycfswt7f4qRrPSTFRhofXZaDBuDPpyp
|
|
|
105
105
|
ommlds/backends/transformers/streamers.py,sha256=Hu_9lp_kUilKjOfs7Ixqr2NoA5FuRn2eRh8JdvaBDYc,1688
|
|
106
106
|
ommlds/cli/__init__.py,sha256=-RtLrdEGN2da1KCf7YNs32jN-kJhT_kNVrcOv4x_J-w,101
|
|
107
107
|
ommlds/cli/__main__.py,sha256=1ffCb0fcUOJMzxROJmJRXQ8PSOVYv7KrcuBtT95cf0c,140
|
|
108
|
-
ommlds/cli/_dataclasses.py,sha256=
|
|
108
|
+
ommlds/cli/_dataclasses.py,sha256=UO9UdIEGJkqfUhpS3IaISxwyPX5aNJgMarfpUjY3f38,180545
|
|
109
109
|
ommlds/cli/asyncs.py,sha256=NAMzzaZq7ORjlbbBB_Y9vcM9qoBpGf4VJNtl_3p_8G4,629
|
|
110
110
|
ommlds/cli/inject.py,sha256=Bt-T-vQIbp8vh6q21Tt3wDztFZ9FPxNhH2ocrAfjArE,815
|
|
111
111
|
ommlds/cli/main.py,sha256=n_13EimSCt2x9wkn4tULk9gNOvuCHuHeDcuEYtrcUgQ,11172
|
|
@@ -155,7 +155,7 @@ ommlds/cli/sessions/chat/drivers/events/__init__.py,sha256=47DEQpj8HBSa-_TImW-5J
|
|
|
155
155
|
ommlds/cli/sessions/chat/drivers/events/inject.py,sha256=quPbkuhPyJ_zFpFzh5hrkqWspwk9El0a8_82r1LphIY,449
|
|
156
156
|
ommlds/cli/sessions/chat/drivers/events/injection.py,sha256=Q32VFAww9EkzkqdqrbamKuuVcfzbGol6JojNYo61jG0,326
|
|
157
157
|
ommlds/cli/sessions/chat/drivers/events/manager.py,sha256=5NTDIFBtGXMT_86CiQgXoUSHqEweFENUDSDQ8d3ouiE,348
|
|
158
|
-
ommlds/cli/sessions/chat/drivers/events/types.py,sha256=
|
|
158
|
+
ommlds/cli/sessions/chat/drivers/events/types.py,sha256=SWc7PMBoZHJjP7yoJtjI6SMi5A2wHb9BO3oPcPGpKZ0,799
|
|
159
159
|
ommlds/cli/sessions/chat/drivers/phases/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
160
160
|
ommlds/cli/sessions/chat/drivers/phases/inject.py,sha256=m9GcCVcp1GnNKN1qwDSgTkfp3e107wXgPeEHDLbfG8s,448
|
|
161
161
|
ommlds/cli/sessions/chat/drivers/phases/injection.py,sha256=ZUFRRLp3HNhKaPBW6aiw5XFEGNkqTj8WVSlXM0kg0y0,326
|
|
@@ -213,7 +213,7 @@ ommlds/cli/sessions/chat/interfaces/bare/interactive.py,sha256=ZnYoePvXtUbhkDQ0j
|
|
|
213
213
|
ommlds/cli/sessions/chat/interfaces/bare/oneshot.py,sha256=b758OIa0gf9I_0UdxYJ6re-g8-8xndgr3R0OotUOsmc,387
|
|
214
214
|
ommlds/cli/sessions/chat/interfaces/bare/tools.py,sha256=_UsuoXLIvfpFP_We5DBBlhm6rwB3_cFA3lmFvpG9b-A,824
|
|
215
215
|
ommlds/cli/sessions/chat/interfaces/textual/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
216
|
-
ommlds/cli/sessions/chat/interfaces/textual/app.py,sha256=
|
|
216
|
+
ommlds/cli/sessions/chat/interfaces/textual/app.py,sha256=mmTqrQanXKiKr7TekiyJ72Zd4ircENcbjqFmzTMRRtU,10837
|
|
217
217
|
ommlds/cli/sessions/chat/interfaces/textual/configs.py,sha256=-pvG2_Uai70ohDfK4Tt8yaHnvdCs10_gaoQkr-CsOqA,213
|
|
218
218
|
ommlds/cli/sessions/chat/interfaces/textual/facades.py,sha256=zXVG7DKVl-Xtdc893O_yktHCMvM0do6hLesMd8hbqeo,411
|
|
219
219
|
ommlds/cli/sessions/chat/interfaces/textual/inject.py,sha256=eBhFVZ2VmQdoTPSZvi2OSkZ-fX8Mw2TKo28bHZeACJY,3056
|
|
@@ -241,8 +241,8 @@ ommlds/cli/state/storage.py,sha256=Wr8DVuEGUxfFJn0tMWNTVdint6NBDdLKstNWSjx8sKw,3
|
|
|
241
241
|
ommlds/datasets/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
242
242
|
ommlds/datasets/lib/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
243
243
|
ommlds/datasets/lib/movies.py,sha256=LmdfoXsZU9XMM_r-sxCLv_s06BFzwWO4xUj6sc9XVcI,1961
|
|
244
|
-
ommlds/minichain/__init__.py,sha256=
|
|
245
|
-
ommlds/minichain/_dataclasses.py,sha256=
|
|
244
|
+
ommlds/minichain/__init__.py,sha256=pmYyU-bDodWx3sKU0NmcLXDY5mp8BxM8S60LMghSxgQ,14048
|
|
245
|
+
ommlds/minichain/_dataclasses.py,sha256=D3K9j3I5-s5LAN9b5ZmWT80rbYMMVURLDpFXf6MkSQc,956494
|
|
246
246
|
ommlds/minichain/_marshal.py,sha256=n9PGWrHhvAmGIc7KDOYt3IF9Z6G0ncXskyICTp3Ji6k,1923
|
|
247
247
|
ommlds/minichain/_typedvalues.py,sha256=0EkpyGo1IVnpcsssz8Xdm_vIoqIbb0dKdhZ5AJzAJCk,2292
|
|
248
248
|
ommlds/minichain/completion.py,sha256=lQ0LfCIYZsvDqteHhhDIv16D2_gn_xMfEL0ouywE5Yo,1033
|
|
@@ -357,7 +357,7 @@ ommlds/minichain/chat/transforms/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRk
|
|
|
357
357
|
ommlds/minichain/chat/transforms/base.py,sha256=V22SasLdnzvmSO7C19gigi8LKeWVtBHmhaSJbkj6b4Y,2923
|
|
358
358
|
ommlds/minichain/chat/transforms/metadata.py,sha256=Gw1cUIk2cVzHMyFPwboY_HWEuV_Ts3R4AVmOuyH120A,1563
|
|
359
359
|
ommlds/minichain/chat/transforms/services.py,sha256=wJw2eu-TU1sVXUYvg7rc7QNn93cCXhtEI_q-KZ5Dz0I,1016
|
|
360
|
-
ommlds/minichain/content/__init__.py,sha256=
|
|
360
|
+
ommlds/minichain/content/__init__.py,sha256=7EWIf3G7fjtoipUmSXf5QKeUm7Zxt-8cmKdgAYY5dFw,777
|
|
361
361
|
ommlds/minichain/content/_marshal.py,sha256=BUhSC3nAXtXJlRK1Btbx1iqoWxBi5fKiIHLuJ0tcfOY,9547
|
|
362
362
|
ommlds/minichain/content/code.py,sha256=-hrz9HomUCo1wicfq-Ix5fDvK-UsAMgQGUfWKnT5kFk,419
|
|
363
363
|
ommlds/minichain/content/composite.py,sha256=nfpZNNydILhfuZv9nLK7jUi4sLgirSlTcvn-sXyV33U,761
|
|
@@ -374,24 +374,30 @@ ommlds/minichain/content/placeholders.py,sha256=esznE8u_bLuxpmRv7tl0-AkUlfY9TpZa
|
|
|
374
374
|
ommlds/minichain/content/quote.py,sha256=44cBNPO8oYvQcWRvdZhR6wxLXPz7Q6VnPf81USfHcJk,546
|
|
375
375
|
ommlds/minichain/content/raw.py,sha256=evB4Vv7Tk42tQrVf5-f78wdjeXEqwcdWEz0pt7z58WQ,676
|
|
376
376
|
ommlds/minichain/content/recursive.py,sha256=httCiaHWyAitsHgneHhkTd1yuDT22x465c6Hk-7g9-E,196
|
|
377
|
+
ommlds/minichain/content/resources.py,sha256=TyArW_hALfZwIwLCvSZ7PcutjF6G-4ikTBGfs9hKj0s,530
|
|
377
378
|
ommlds/minichain/content/section.py,sha256=C1CWGgAtZf4p38fD5OJ0aFLt2ZLGQEp_oz-NHB14cx4,562
|
|
378
379
|
ommlds/minichain/content/sequence.py,sha256=xYcz7WK3wsfa431dgMPhp7z5z643W_-n0-Uv9HnMwr0,1004
|
|
379
380
|
ommlds/minichain/content/standard.py,sha256=x52rI7lfz9MBtW-kmFepbVrv6G96vdX-CbQlb5wV3IM,851
|
|
380
381
|
ommlds/minichain/content/tag.py,sha256=CTRpoFosCo9swfaqlRxhT0Vzak6rZccdmyHHGj_5Krg,647
|
|
381
382
|
ommlds/minichain/content/templates.py,sha256=a94NUJD_s1C1byovWNNLpqlN_is2pmOE0TkSjT1HzH4,246
|
|
382
383
|
ommlds/minichain/content/text.py,sha256=GVdyc3ZWH2xvhtDlVeJK_vl9aqYKxb5BOil5J5KegqI,193
|
|
383
|
-
ommlds/minichain/content/visitors.py,sha256=
|
|
384
|
+
ommlds/minichain/content/visitors.py,sha256=vOY9L_D90s7197CfJkluXwf5ozNXvjB1hIcKyfyZGO4,6478
|
|
384
385
|
ommlds/minichain/content/transform/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
385
|
-
ommlds/minichain/content/transform/json.py,sha256=
|
|
386
|
-
ommlds/minichain/content/transform/markdown.py,sha256=
|
|
387
|
-
ommlds/minichain/content/transform/materialize.py,sha256=
|
|
388
|
-
ommlds/minichain/content/transform/metadata.py,sha256=
|
|
386
|
+
ommlds/minichain/content/transform/json.py,sha256=ZmqJhG3Ri7dWNfKjEf8TI-U4FFJa7DfoTuKiy8qx_vo,1610
|
|
387
|
+
ommlds/minichain/content/transform/markdown.py,sha256=9D-RFwWppniPgJsuNy4A6OU-EH8vr-TeKPHb1Pb_wAk,131
|
|
388
|
+
ommlds/minichain/content/transform/materialize.py,sha256=_lXXg58L0XjaNuavjNkscO1T4WqNYYlUZuFDwx29YXo,1731
|
|
389
|
+
ommlds/minichain/content/transform/metadata.py,sha256=VRsjwd4-CaH84ymHmdwz5Gsa4TLh9mLXynmBrbWURKk,523
|
|
390
|
+
ommlds/minichain/content/transform/namespaces.py,sha256=l9OHYRCm_mrBb2YTi_kt_tNdwb4G4gOWI5DxV5T-ID4,574
|
|
391
|
+
ommlds/minichain/content/transform/placeholders.py,sha256=TrAUdd8yI08e5bFm5nMpXoj7KvOXbn1Hpuw1yKnJ0s0,1647
|
|
389
392
|
ommlds/minichain/content/transform/prepare.py,sha256=DzLdjn7c38ICDX1YP2Qdc6a87nCNDKgtLb2e11tlRfE,1603
|
|
390
|
-
ommlds/minichain/content/transform/recursive.py,sha256=
|
|
391
|
-
ommlds/minichain/content/transform/
|
|
393
|
+
ommlds/minichain/content/transform/recursive.py,sha256=MljHYaWm2xtheA3dyCCCggJLIbZU5fZXkJv9UP6lGAI,1190
|
|
394
|
+
ommlds/minichain/content/transform/resources.py,sha256=uduGa0tt2RnErRKM1Ju7hzX1MSw2fL_ztjV4NfhGgOk,1440
|
|
395
|
+
ommlds/minichain/content/transform/standard.py,sha256=s1ftCkNHThEJ5FkSBfcMgp4WmCmdeO2sN1B321Af7Lg,1217
|
|
392
396
|
ommlds/minichain/content/transform/stringify.py,sha256=8MhrcfAmPwZyTf7Nubhe5luRXilI2xHN8JveVHJgHbM,1065
|
|
393
|
-
ommlds/minichain/content/transform/strings.py,sha256=
|
|
394
|
-
ommlds/minichain/content/transform/templates.py,sha256=
|
|
397
|
+
ommlds/minichain/content/transform/strings.py,sha256=5HyYcYpPuXAy0FiOevF0I9dwfRRhL5uemxj4a1GhOG0,920
|
|
398
|
+
ommlds/minichain/content/transform/templates.py,sha256=jbHnBlW2PgGpubLbfLcKWED9YDx-tgaGlPrzoEd8yNA,735
|
|
399
|
+
ommlds/minichain/content/transform/types.py,sha256=ySNAxg4RKLN0R45iHl4VDrTll3cxcec6l7M2EBT_nNQ,284
|
|
400
|
+
ommlds/minichain/content/transform/visitors.py,sha256=cttype2xrfQeWDzkFtDPuVRujngWVz3ZsCR-T4XiRGY,1044
|
|
395
401
|
ommlds/minichain/docs/__init__.py,sha256=vNpT6sA5YDalFqsCFn0DjUvarxRtRl3w2V9liEU0CQk,364
|
|
396
402
|
ommlds/minichain/docs/docs.py,sha256=Ex7hiqaiYDB9hQhUjuzot8MFktl3LIGG41YBFaNoC80,1340
|
|
397
403
|
ommlds/minichain/docs/dtypes.py,sha256=BRZmLK9NfQwITBYmDOmRPDlFg1RP5BYWT0Xw04AinF8,499
|
|
@@ -470,7 +476,7 @@ ommlds/minichain/tools/types.py,sha256=ZY35TlWsTe5RFMBJ5yIDzFpi3WtL7K9t7QYzgVAMH
|
|
|
470
476
|
ommlds/minichain/tools/execution/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
471
477
|
ommlds/minichain/tools/execution/catalog.py,sha256=M0sW8o03FB3xY1TfENmMjQVgUJDrhvibDp0qVfNyY-M,2006
|
|
472
478
|
ommlds/minichain/tools/execution/context.py,sha256=Gdl1UNjzLQTeIc7m2BlNyLtNsdqCookQv12_WwDDkAI,1872
|
|
473
|
-
ommlds/minichain/tools/execution/errorhandling.py,sha256=
|
|
479
|
+
ommlds/minichain/tools/execution/errorhandling.py,sha256=eEHNfue531Xnr2XLMQOZ_TjKM_R94sO11YtFb1Gnsw4,1021
|
|
474
480
|
ommlds/minichain/tools/execution/errors.py,sha256=DhpwW-rp0_4O9azWXzjNFcKkTAtG-vvLXxtplaPVXkw,241
|
|
475
481
|
ommlds/minichain/tools/execution/executors.py,sha256=zE4l9AQ6EyJ7L6opuAt1p-cv1SeLukGjqSsKqq2KDU8,1367
|
|
476
482
|
ommlds/minichain/tools/execution/reflect.py,sha256=Oklzx5jlMyNj6ivecEQfP6Zt_ICxc-nk-x9xSsxswlg,1817
|
|
@@ -506,7 +512,7 @@ ommlds/specs/mcp/clients.py,sha256=l-QX7KQtsSn40Hb3cATVUqmycGQm4FDTGyljUmpGyCY,4
|
|
|
506
512
|
ommlds/specs/mcp/protocol.py,sha256=ryCjHyrFoJGYoLX_kN5RP_1HbRejzn1pRsjWF08_pkM,8933
|
|
507
513
|
ommlds/tools/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
508
514
|
ommlds/tools/git.py,sha256=He5CQOyC_xx1TP5UfqiKUKYMxP8O6Klez7vIfKINAas,8873
|
|
509
|
-
ommlds/tools/ocr.py,sha256=
|
|
515
|
+
ommlds/tools/ocr.py,sha256=cnPheuV5s46jEUKYa8MIQ9ynVGv9dfpVmIAhH4qoCE0,1844
|
|
510
516
|
ommlds/wiki/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
511
517
|
ommlds/wiki/analyze.py,sha256=lRzqxHjguc5WA0tasnbTSiCYCJiYWDU_q27rJn67HHU,9552
|
|
512
518
|
ommlds/wiki/convert.py,sha256=4UqEKMWW03HwrfxYTn0wmXobYVrTSK2x9Lx-2MeJW8M,2531
|
|
@@ -519,9 +525,9 @@ ommlds/wiki/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU
|
|
|
519
525
|
ommlds/wiki/utils/io.py,sha256=UKgDJGtmpnWvIqVd2mJc2QNPOqlToEY1GEveNp6_pMo,7088
|
|
520
526
|
ommlds/wiki/utils/progress.py,sha256=EhvKcMFYtsarCQhIahlO6f0SboyAKP3UwUyrnVnP-Vk,3222
|
|
521
527
|
ommlds/wiki/utils/xml.py,sha256=sNJNkZ9rT8B-kJMO6bRz8J1USy4fyPx0m2PwTX7vxYY,3846
|
|
522
|
-
ommlds-0.0.0.
|
|
523
|
-
ommlds-0.0.0.
|
|
524
|
-
ommlds-0.0.0.
|
|
525
|
-
ommlds-0.0.0.
|
|
526
|
-
ommlds-0.0.0.
|
|
527
|
-
ommlds-0.0.0.
|
|
528
|
+
ommlds-0.0.0.dev510.dist-info/licenses/LICENSE,sha256=B_hVtavaA8zCYDW99DYdcpDLKz1n3BBRjZrcbv8uG8c,1451
|
|
529
|
+
ommlds-0.0.0.dev510.dist-info/METADATA,sha256=Tn6Q8jUprTPaX6_5wPOaa2mblPYCshymTWkZQxXA0dQ,3497
|
|
530
|
+
ommlds-0.0.0.dev510.dist-info/WHEEL,sha256=qELbo2s1Yzl39ZmrAibXA2jjPLUYfnVhUNTlyF1rq0Y,92
|
|
531
|
+
ommlds-0.0.0.dev510.dist-info/entry_points.txt,sha256=Z5YWtX7ClfiCKdW-dd_CSVvM0h4yQpJPi-2G3q6gNFo,35
|
|
532
|
+
ommlds-0.0.0.dev510.dist-info/top_level.txt,sha256=Rbnk5d5wi58vnAXx13WFZqdQ4VX8hBCS2hEL3WeXOhY,7
|
|
533
|
+
ommlds-0.0.0.dev510.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|