industrial-model 0.1.0__tar.gz → 0.1.2__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.
- {industrial_model-0.1.0 → industrial_model-0.1.2}/PKG-INFO +1 -1
- {industrial_model-0.1.0 → industrial_model-0.1.2}/industrial_model/cognite_adapters/schemas.py +11 -7
- {industrial_model-0.1.0 → industrial_model-0.1.2}/pyproject.toml +1 -1
- {industrial_model-0.1.0 → industrial_model-0.1.2}/.gitignore +0 -0
- {industrial_model-0.1.0 → industrial_model-0.1.2}/.python-version +0 -0
- {industrial_model-0.1.0 → industrial_model-0.1.2}/README.md +0 -0
- {industrial_model-0.1.0 → industrial_model-0.1.2}/assets/logo.jpeg +0 -0
- {industrial_model-0.1.0 → industrial_model-0.1.2}/industrial_model/__init__.py +0 -0
- {industrial_model-0.1.0 → industrial_model-0.1.2}/industrial_model/cognite_adapters/__init__.py +0 -0
- {industrial_model-0.1.0 → industrial_model-0.1.2}/industrial_model/cognite_adapters/filter_mapper.py +0 -0
- {industrial_model-0.1.0 → industrial_model-0.1.2}/industrial_model/cognite_adapters/optimizer.py +0 -0
- {industrial_model-0.1.0 → industrial_model-0.1.2}/industrial_model/cognite_adapters/query_mapper.py +0 -0
- {industrial_model-0.1.0 → industrial_model-0.1.2}/industrial_model/cognite_adapters/query_result_mapper.py +0 -0
- {industrial_model-0.1.0 → industrial_model-0.1.2}/industrial_model/cognite_adapters/sort_mapper.py +0 -0
- {industrial_model-0.1.0 → industrial_model-0.1.2}/industrial_model/cognite_adapters/utils.py +0 -0
- {industrial_model-0.1.0 → industrial_model-0.1.2}/industrial_model/cognite_adapters/view_mapper.py +0 -0
- {industrial_model-0.1.0 → industrial_model-0.1.2}/industrial_model/config.py +0 -0
- {industrial_model-0.1.0 → industrial_model-0.1.2}/industrial_model/constants.py +0 -0
- {industrial_model-0.1.0 → industrial_model-0.1.2}/industrial_model/engines/__init__.py +0 -0
- {industrial_model-0.1.0 → industrial_model-0.1.2}/industrial_model/engines/async_engine.py +0 -0
- {industrial_model-0.1.0 → industrial_model-0.1.2}/industrial_model/engines/engine.py +0 -0
- {industrial_model-0.1.0 → industrial_model-0.1.2}/industrial_model/models/__init__.py +0 -0
- {industrial_model-0.1.0 → industrial_model-0.1.2}/industrial_model/models/base.py +0 -0
- {industrial_model-0.1.0 → industrial_model-0.1.2}/industrial_model/models/entities.py +0 -0
- {industrial_model-0.1.0 → industrial_model-0.1.2}/industrial_model/py.typed +0 -0
- {industrial_model-0.1.0 → industrial_model-0.1.2}/industrial_model/queries/__init__.py +0 -0
- {industrial_model-0.1.0 → industrial_model-0.1.2}/industrial_model/queries/models.py +0 -0
- {industrial_model-0.1.0 → industrial_model-0.1.2}/industrial_model/queries/params.py +0 -0
- {industrial_model-0.1.0 → industrial_model-0.1.2}/industrial_model/statements/__init__.py +0 -0
- {industrial_model-0.1.0 → industrial_model-0.1.2}/industrial_model/statements/expressions.py +0 -0
- {industrial_model-0.1.0 → industrial_model-0.1.2}/industrial_model/utils.py +0 -0
- {industrial_model-0.1.0 → industrial_model-0.1.2}/scripts/build.sh +0 -0
- {industrial_model-0.1.0 → industrial_model-0.1.2}/scripts/format.sh +0 -0
- {industrial_model-0.1.0 → industrial_model-0.1.2}/scripts/lint.sh +0 -0
- {industrial_model-0.1.0 → industrial_model-0.1.2}/tests/__init__.py +0 -0
- {industrial_model-0.1.0 → industrial_model-0.1.2}/tests/cognite-sdk-config.yaml +0 -0
- {industrial_model-0.1.0 → industrial_model-0.1.2}/tests/hubs.py +0 -0
- {industrial_model-0.1.0 → industrial_model-0.1.2}/tests/tests_adapter.py +0 -0
- {industrial_model-0.1.0 → industrial_model-0.1.2}/uv.lock +0 -0
{industrial_model-0.1.0 → industrial_model-0.1.2}/industrial_model/cognite_adapters/schemas.py
RENAMED
|
@@ -22,7 +22,7 @@ def get_schema_properties(
|
|
|
22
22
|
nested_separator: str = NESTED_SEP,
|
|
23
23
|
prefix: str | None = None,
|
|
24
24
|
) -> list[str]:
|
|
25
|
-
data = _get_type_properties(cls
|
|
25
|
+
data = _get_type_properties(cls) or {}
|
|
26
26
|
keys = _flatten_dict_keys(data, None, nested_separator)
|
|
27
27
|
if not prefix:
|
|
28
28
|
return keys
|
|
@@ -31,15 +31,19 @@ def get_schema_properties(
|
|
|
31
31
|
|
|
32
32
|
|
|
33
33
|
def _get_type_properties(
|
|
34
|
-
cls: type[BaseModel], visited_count: defaultdict[type, int]
|
|
34
|
+
cls: type[BaseModel], visited_count: defaultdict[type, int] | None = None
|
|
35
35
|
) -> dict[str, Any] | None:
|
|
36
|
-
if visited_count
|
|
37
|
-
|
|
38
|
-
|
|
36
|
+
if visited_count is not None:
|
|
37
|
+
if visited_count[cls] > 2:
|
|
38
|
+
return None
|
|
39
|
+
visited_count[cls] += 1
|
|
39
40
|
|
|
40
41
|
hints = get_type_hints(cls)
|
|
41
42
|
origins = {
|
|
42
|
-
key: _get_field_type(
|
|
43
|
+
key: _get_field_type(
|
|
44
|
+
type_hint,
|
|
45
|
+
visited_count or defaultdict(lambda: 0),
|
|
46
|
+
)
|
|
43
47
|
for key, type_hint in hints.items()
|
|
44
48
|
}
|
|
45
49
|
|
|
@@ -118,4 +122,4 @@ def _flatten_dict_keys(
|
|
|
118
122
|
[f"{full_key}{nested_separator}{item}" for item in value]
|
|
119
123
|
)
|
|
120
124
|
|
|
121
|
-
return
|
|
125
|
+
return sorted(paths)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{industrial_model-0.1.0 → industrial_model-0.1.2}/industrial_model/cognite_adapters/__init__.py
RENAMED
|
File without changes
|
{industrial_model-0.1.0 → industrial_model-0.1.2}/industrial_model/cognite_adapters/filter_mapper.py
RENAMED
|
File without changes
|
{industrial_model-0.1.0 → industrial_model-0.1.2}/industrial_model/cognite_adapters/optimizer.py
RENAMED
|
File without changes
|
{industrial_model-0.1.0 → industrial_model-0.1.2}/industrial_model/cognite_adapters/query_mapper.py
RENAMED
|
File without changes
|
|
File without changes
|
{industrial_model-0.1.0 → industrial_model-0.1.2}/industrial_model/cognite_adapters/sort_mapper.py
RENAMED
|
File without changes
|
{industrial_model-0.1.0 → industrial_model-0.1.2}/industrial_model/cognite_adapters/utils.py
RENAMED
|
File without changes
|
{industrial_model-0.1.0 → industrial_model-0.1.2}/industrial_model/cognite_adapters/view_mapper.py
RENAMED
|
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
|
{industrial_model-0.1.0 → industrial_model-0.1.2}/industrial_model/statements/expressions.py
RENAMED
|
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
|