liminal-orm 1.1.0__tar.gz → 1.1.1__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.
- {liminal_orm-1.1.0 → liminal_orm-1.1.1}/PKG-INFO +3 -1
- {liminal_orm-1.1.0 → liminal_orm-1.1.1}/liminal/orm/column.py +9 -2
- {liminal_orm-1.1.0 → liminal_orm-1.1.1}/liminal/tests/conftest.py +32 -0
- {liminal_orm-1.1.0 → liminal_orm-1.1.1}/liminal/tests/test_entity_schema_compare.py +11 -0
- {liminal_orm-1.1.0 → liminal_orm-1.1.1}/pyproject.toml +1 -1
- {liminal_orm-1.1.0 → liminal_orm-1.1.1}/LICENSE.md +0 -0
- {liminal_orm-1.1.0 → liminal_orm-1.1.1}/README.md +0 -0
- {liminal_orm-1.1.0 → liminal_orm-1.1.1}/liminal/__init__.py +0 -0
- {liminal_orm-1.1.0 → liminal_orm-1.1.1}/liminal/base/base_dropdown.py +0 -0
- {liminal_orm-1.1.0 → liminal_orm-1.1.1}/liminal/base/base_operation.py +0 -0
- {liminal_orm-1.1.0 → liminal_orm-1.1.1}/liminal/base/base_validation_filters.py +0 -0
- {liminal_orm-1.1.0 → liminal_orm-1.1.1}/liminal/base/compare_operation.py +0 -0
- {liminal_orm-1.1.0 → liminal_orm-1.1.1}/liminal/base/properties/base_field_properties.py +0 -0
- {liminal_orm-1.1.0 → liminal_orm-1.1.1}/liminal/base/properties/base_schema_properties.py +0 -0
- {liminal_orm-1.1.0 → liminal_orm-1.1.1}/liminal/base/str_enum.py +0 -0
- {liminal_orm-1.1.0 → liminal_orm-1.1.1}/liminal/cli/cli.py +0 -0
- {liminal_orm-1.1.0 → liminal_orm-1.1.1}/liminal/cli/controller.py +0 -0
- {liminal_orm-1.1.0 → liminal_orm-1.1.1}/liminal/cli/live_test_dropdown_migration.py +0 -0
- {liminal_orm-1.1.0 → liminal_orm-1.1.1}/liminal/cli/live_test_entity_schema_migration.py +0 -0
- {liminal_orm-1.1.0 → liminal_orm-1.1.1}/liminal/connection/__init__.py +0 -0
- {liminal_orm-1.1.0 → liminal_orm-1.1.1}/liminal/connection/benchling_connection.py +0 -0
- {liminal_orm-1.1.0 → liminal_orm-1.1.1}/liminal/connection/benchling_service.py +0 -0
- {liminal_orm-1.1.0 → liminal_orm-1.1.1}/liminal/dropdowns/api.py +0 -0
- {liminal_orm-1.1.0 → liminal_orm-1.1.1}/liminal/dropdowns/compare.py +0 -0
- {liminal_orm-1.1.0 → liminal_orm-1.1.1}/liminal/dropdowns/generate_files.py +0 -0
- {liminal_orm-1.1.0 → liminal_orm-1.1.1}/liminal/dropdowns/operations.py +0 -0
- {liminal_orm-1.1.0 → liminal_orm-1.1.1}/liminal/dropdowns/utils.py +0 -0
- {liminal_orm-1.1.0 → liminal_orm-1.1.1}/liminal/entity_schemas/api.py +0 -0
- {liminal_orm-1.1.0 → liminal_orm-1.1.1}/liminal/entity_schemas/compare.py +0 -0
- {liminal_orm-1.1.0 → liminal_orm-1.1.1}/liminal/entity_schemas/entity_schema_models.py +0 -0
- {liminal_orm-1.1.0 → liminal_orm-1.1.1}/liminal/entity_schemas/generate_files.py +0 -0
- {liminal_orm-1.1.0 → liminal_orm-1.1.1}/liminal/entity_schemas/operations.py +0 -0
- {liminal_orm-1.1.0 → liminal_orm-1.1.1}/liminal/entity_schemas/tag_schema_models.py +0 -0
- {liminal_orm-1.1.0 → liminal_orm-1.1.1}/liminal/entity_schemas/utils.py +0 -0
- {liminal_orm-1.1.0 → liminal_orm-1.1.1}/liminal/enums/__init__.py +0 -0
- {liminal_orm-1.1.0 → liminal_orm-1.1.1}/liminal/enums/benchling_api_field_type.py +0 -0
- {liminal_orm-1.1.0 → liminal_orm-1.1.1}/liminal/enums/benchling_entity_type.py +0 -0
- {liminal_orm-1.1.0 → liminal_orm-1.1.1}/liminal/enums/benchling_field_type.py +0 -0
- {liminal_orm-1.1.0 → liminal_orm-1.1.1}/liminal/enums/benchling_folder_item_type.py +0 -0
- {liminal_orm-1.1.0 → liminal_orm-1.1.1}/liminal/enums/benchling_naming_strategy.py +0 -0
- {liminal_orm-1.1.0 → liminal_orm-1.1.1}/liminal/enums/benchling_report_level.py +0 -0
- {liminal_orm-1.1.0 → liminal_orm-1.1.1}/liminal/enums/benchling_sequence_type.py +0 -0
- {liminal_orm-1.1.0 → liminal_orm-1.1.1}/liminal/external/__init__.py +0 -0
- {liminal_orm-1.1.0 → liminal_orm-1.1.1}/liminal/mappers.py +0 -0
- {liminal_orm-1.1.0 → liminal_orm-1.1.1}/liminal/migrate/components.py +0 -0
- {liminal_orm-1.1.0 → liminal_orm-1.1.1}/liminal/migrate/revision.py +0 -0
- {liminal_orm-1.1.0 → liminal_orm-1.1.1}/liminal/migrate/revisions_timeline.py +0 -0
- {liminal_orm-1.1.0 → liminal_orm-1.1.1}/liminal/migrate/utils.py +0 -0
- {liminal_orm-1.1.0 → liminal_orm-1.1.1}/liminal/orm/base.py +0 -0
- {liminal_orm-1.1.0 → liminal_orm-1.1.1}/liminal/orm/base_model.py +0 -0
- {liminal_orm-1.1.0 → liminal_orm-1.1.1}/liminal/orm/mixins.py +0 -0
- {liminal_orm-1.1.0 → liminal_orm-1.1.1}/liminal/orm/relationship.py +0 -0
- {liminal_orm-1.1.0 → liminal_orm-1.1.1}/liminal/orm/schema_properties.py +0 -0
- {liminal_orm-1.1.0 → liminal_orm-1.1.1}/liminal/orm/user.py +0 -0
- {liminal_orm-1.1.0 → liminal_orm-1.1.1}/liminal/py.typed +0 -0
- {liminal_orm-1.1.0 → liminal_orm-1.1.1}/liminal/tests/__init__.py +0 -0
- {liminal_orm-1.1.0 → liminal_orm-1.1.1}/liminal/tests/from benchling_sdk.py +0 -0
- {liminal_orm-1.1.0 → liminal_orm-1.1.1}/liminal/tests/test_dropdown_compare.py +0 -0
- {liminal_orm-1.1.0 → liminal_orm-1.1.1}/liminal/utils.py +0 -0
- {liminal_orm-1.1.0 → liminal_orm-1.1.1}/liminal/validation/__init__.py +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: liminal-orm
|
3
|
-
Version: 1.1.
|
3
|
+
Version: 1.1.1
|
4
4
|
Summary: An ORM and toolkit that builds on top of Benchling's platform to keep your schemas and downstream code dependencies in sync.
|
5
5
|
Home-page: https://github.com/dynotx/liminal-orm
|
6
6
|
Author: DynoTx Open Source
|
@@ -10,6 +10,8 @@ Classifier: Programming Language :: Python :: 3
|
|
10
10
|
Classifier: Programming Language :: Python :: 3.9
|
11
11
|
Classifier: Programming Language :: Python :: 3.10
|
12
12
|
Classifier: Programming Language :: Python :: 3.11
|
13
|
+
Classifier: Programming Language :: Python :: 3.12
|
14
|
+
Classifier: Programming Language :: Python :: 3.13
|
13
15
|
Requires-Dist: benchling-sdk (>=1.8.0)
|
14
16
|
Requires-Dist: bs4 (>=0.0.2,<0.0.3)
|
15
17
|
Requires-Dist: lxml (>=5.3.0,<6.0.0)
|
@@ -26,12 +26,16 @@ class Column(SqlColumn):
|
|
26
26
|
Whether the field is a multi-value field.
|
27
27
|
parent_link : bool = False
|
28
28
|
Whether the entity link field is a parent of the entity schema.
|
29
|
+
tooltip : str | None = None
|
30
|
+
The tooltip text for the field.
|
29
31
|
dropdown : Type[BaseDropdown] | None = None
|
30
32
|
The dropdown for the field.
|
31
33
|
entity_link : str | None = None
|
32
34
|
The warehouse name of the entity the field links to.
|
33
|
-
|
34
|
-
The
|
35
|
+
_warehouse_name : str | None = None
|
36
|
+
The warehouse name of the column. Necessary when the variable name is not the same as the warehouse name.
|
37
|
+
_archived : bool = False
|
38
|
+
Whether the field is archived.
|
35
39
|
"""
|
36
40
|
|
37
41
|
def __init__(
|
@@ -44,6 +48,7 @@ class Column(SqlColumn):
|
|
44
48
|
tooltip: str | None = None,
|
45
49
|
dropdown: Type[BaseDropdown] | None = None, # noqa: UP006
|
46
50
|
entity_link: str | None = None,
|
51
|
+
_warehouse_name: str | None = None,
|
47
52
|
_archived: bool = False,
|
48
53
|
**kwargs: Any,
|
49
54
|
):
|
@@ -82,6 +87,8 @@ class Column(SqlColumn):
|
|
82
87
|
foreign_key = None
|
83
88
|
if type == BenchlingFieldType.ENTITY_LINK and entity_link:
|
84
89
|
foreign_key = ForeignKey(f"{entity_link}$raw.id")
|
90
|
+
if _warehouse_name:
|
91
|
+
kwargs["name"] = _warehouse_name
|
85
92
|
super().__init__(
|
86
93
|
self.sqlalchemy_type,
|
87
94
|
foreign_key,
|
@@ -215,6 +215,24 @@ def mock_benchling_schema(
|
|
215
215
|
tooltip=None,
|
216
216
|
_archived=False,
|
217
217
|
),
|
218
|
+
"archived_field": Props(
|
219
|
+
name="Archived Field",
|
220
|
+
type=Type.TEXT,
|
221
|
+
required=False,
|
222
|
+
is_multi=False,
|
223
|
+
_archived=True,
|
224
|
+
),
|
225
|
+
"wh_name_field_different": Props(
|
226
|
+
name="Different Wh Name Field",
|
227
|
+
type=Type.TEXT,
|
228
|
+
required=False,
|
229
|
+
is_multi=False,
|
230
|
+
parent_link=False,
|
231
|
+
dropdown_link=None,
|
232
|
+
entity_link=None,
|
233
|
+
tooltip=None,
|
234
|
+
_archived=False,
|
235
|
+
),
|
218
236
|
}
|
219
237
|
return [(schema_props, fields)]
|
220
238
|
|
@@ -369,6 +387,20 @@ def mock_benchling_subclass(mock_benchling_dropdown) -> list[type[BaseModel]]:
|
|
369
387
|
is_multi=True,
|
370
388
|
dropdown=mock_benchling_dropdown,
|
371
389
|
)
|
390
|
+
archived_field: SqlColumn = Column(
|
391
|
+
name="Archived Field",
|
392
|
+
type=Type.TEXT,
|
393
|
+
required=False,
|
394
|
+
is_multi=False,
|
395
|
+
_archived=True,
|
396
|
+
)
|
397
|
+
different_wh_name_field: SqlColumn = Column(
|
398
|
+
name="Different Wh Name Field",
|
399
|
+
type=Type.TEXT,
|
400
|
+
required=False,
|
401
|
+
is_multi=False,
|
402
|
+
_warehouse_name="wh_name_field_different",
|
403
|
+
)
|
372
404
|
|
373
405
|
def __init__(
|
374
406
|
self,
|
@@ -330,3 +330,14 @@ class TestCompareEntitySchemas:
|
|
330
330
|
assert isinstance(
|
331
331
|
invalid_models["mock_entity"][0].op, ReorderEntitySchemaFields
|
332
332
|
)
|
333
|
+
|
334
|
+
# Test when the Benchling schema archived field becomes unarchived
|
335
|
+
benchling_rearchived_field = copy.deepcopy(mock_benchling_schema)
|
336
|
+
benchling_rearchived_field[0][1]["archived_field"].set_archived(False)
|
337
|
+
mock_get_benchling_entity_schemas.return_value = benchling_rearchived_field
|
338
|
+
invalid_models = compare_entity_schemas(mock_benchling_sdk)
|
339
|
+
assert len(invalid_models["mock_entity"]) == 1
|
340
|
+
assert isinstance(
|
341
|
+
invalid_models["mock_entity"][0].op, ArchiveEntitySchemaField
|
342
|
+
)
|
343
|
+
assert invalid_models["mock_entity"][0].op.wh_field_name == "archived_field"
|
@@ -1,6 +1,6 @@
|
|
1
1
|
[tool.poetry]
|
2
2
|
name = "liminal-orm"
|
3
|
-
version = "1.1.
|
3
|
+
version = "1.1.1"
|
4
4
|
description = "An ORM and toolkit that builds on top of Benchling's platform to keep your schemas and downstream code dependencies in sync."
|
5
5
|
authors = ["DynoTx Open Source <opensource@dynotx.com>"]
|
6
6
|
readme = "README.md"
|
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
|
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
|
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
|
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
|