liminal-orm 4.4.5__tar.gz → 4.4.7__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-4.4.5 → liminal_orm-4.4.7}/PKG-INFO +1 -1
- {liminal_orm-4.4.5 → liminal_orm-4.4.7}/liminal/entity_schemas/generate_files.py +17 -24
- {liminal_orm-4.4.5 → liminal_orm-4.4.7}/liminal/entity_schemas/tag_schema_models.py +2 -2
- {liminal_orm-4.4.5 → liminal_orm-4.4.7}/liminal/results_schemas/generate_files.py +18 -14
- {liminal_orm-4.4.5 → liminal_orm-4.4.7}/liminal/results_schemas/models/results_schema_model.py +0 -1
- {liminal_orm-4.4.5 → liminal_orm-4.4.7}/liminal/results_schemas/utils.py +3 -1
- {liminal_orm-4.4.5 → liminal_orm-4.4.7}/pyproject.toml +1 -1
- {liminal_orm-4.4.5 → liminal_orm-4.4.7}/.gitignore +0 -0
- {liminal_orm-4.4.5 → liminal_orm-4.4.7}/LICENSE.md +0 -0
- {liminal_orm-4.4.5 → liminal_orm-4.4.7}/README.md +0 -0
- {liminal_orm-4.4.5 → liminal_orm-4.4.7}/liminal/.gitignore +0 -0
- {liminal_orm-4.4.5 → liminal_orm-4.4.7}/liminal/.lock +0 -0
- {liminal_orm-4.4.5 → liminal_orm-4.4.7}/liminal/CACHEDIR.TAG +0 -0
- {liminal_orm-4.4.5 → liminal_orm-4.4.7}/liminal/__init__.py +0 -0
- {liminal_orm-4.4.5 → liminal_orm-4.4.7}/liminal/base/base_dropdown.py +0 -0
- {liminal_orm-4.4.5 → liminal_orm-4.4.7}/liminal/base/base_operation.py +0 -0
- {liminal_orm-4.4.5 → liminal_orm-4.4.7}/liminal/base/base_validation_filters.py +0 -0
- {liminal_orm-4.4.5 → liminal_orm-4.4.7}/liminal/base/compare_operation.py +0 -0
- {liminal_orm-4.4.5 → liminal_orm-4.4.7}/liminal/base/name_template_parts.py +0 -0
- {liminal_orm-4.4.5 → liminal_orm-4.4.7}/liminal/base/properties/base_field_properties.py +0 -0
- {liminal_orm-4.4.5 → liminal_orm-4.4.7}/liminal/base/properties/base_name_template.py +0 -0
- {liminal_orm-4.4.5 → liminal_orm-4.4.7}/liminal/base/properties/base_schema_properties.py +0 -0
- {liminal_orm-4.4.5 → liminal_orm-4.4.7}/liminal/base/str_enum.py +0 -0
- {liminal_orm-4.4.5 → liminal_orm-4.4.7}/liminal/cli/cli.py +0 -0
- {liminal_orm-4.4.5 → liminal_orm-4.4.7}/liminal/cli/controller.py +0 -0
- {liminal_orm-4.4.5 → liminal_orm-4.4.7}/liminal/cli/live_test_dropdown_migration.py +0 -0
- {liminal_orm-4.4.5 → liminal_orm-4.4.7}/liminal/cli/live_test_entity_schema_migration.py +0 -0
- {liminal_orm-4.4.5 → liminal_orm-4.4.7}/liminal/cli/utils.py +0 -0
- {liminal_orm-4.4.5 → liminal_orm-4.4.7}/liminal/connection/__init__.py +0 -0
- {liminal_orm-4.4.5 → liminal_orm-4.4.7}/liminal/connection/benchling_connection.py +0 -0
- {liminal_orm-4.4.5 → liminal_orm-4.4.7}/liminal/connection/benchling_service.py +0 -0
- {liminal_orm-4.4.5 → liminal_orm-4.4.7}/liminal/dropdowns/api.py +0 -0
- {liminal_orm-4.4.5 → liminal_orm-4.4.7}/liminal/dropdowns/compare.py +0 -0
- {liminal_orm-4.4.5 → liminal_orm-4.4.7}/liminal/dropdowns/generate_files.py +0 -0
- {liminal_orm-4.4.5 → liminal_orm-4.4.7}/liminal/dropdowns/operations.py +0 -0
- {liminal_orm-4.4.5 → liminal_orm-4.4.7}/liminal/dropdowns/utils.py +0 -0
- {liminal_orm-4.4.5 → liminal_orm-4.4.7}/liminal/entity_schemas/api.py +0 -0
- {liminal_orm-4.4.5 → liminal_orm-4.4.7}/liminal/entity_schemas/compare.py +0 -0
- {liminal_orm-4.4.5 → liminal_orm-4.4.7}/liminal/entity_schemas/entity_schema_models.py +0 -0
- {liminal_orm-4.4.5 → liminal_orm-4.4.7}/liminal/entity_schemas/operations.py +0 -0
- {liminal_orm-4.4.5 → liminal_orm-4.4.7}/liminal/entity_schemas/utils.py +0 -0
- {liminal_orm-4.4.5 → liminal_orm-4.4.7}/liminal/enums/__init__.py +0 -0
- {liminal_orm-4.4.5 → liminal_orm-4.4.7}/liminal/enums/benchling_api_field_type.py +0 -0
- {liminal_orm-4.4.5 → liminal_orm-4.4.7}/liminal/enums/benchling_entity_type.py +0 -0
- {liminal_orm-4.4.5 → liminal_orm-4.4.7}/liminal/enums/benchling_field_type.py +0 -0
- {liminal_orm-4.4.5 → liminal_orm-4.4.7}/liminal/enums/benchling_folder_item_type.py +0 -0
- {liminal_orm-4.4.5 → liminal_orm-4.4.7}/liminal/enums/benchling_naming_strategy.py +0 -0
- {liminal_orm-4.4.5 → liminal_orm-4.4.7}/liminal/enums/benchling_sequence_type.py +0 -0
- {liminal_orm-4.4.5 → liminal_orm-4.4.7}/liminal/enums/name_template_part_type.py +0 -0
- {liminal_orm-4.4.5 → liminal_orm-4.4.7}/liminal/enums/sequence_constraint.py +0 -0
- {liminal_orm-4.4.5 → liminal_orm-4.4.7}/liminal/external/__init__.py +0 -0
- {liminal_orm-4.4.5 → liminal_orm-4.4.7}/liminal/mappers.py +0 -0
- {liminal_orm-4.4.5 → liminal_orm-4.4.7}/liminal/migrate/components.py +0 -0
- {liminal_orm-4.4.5 → liminal_orm-4.4.7}/liminal/migrate/revision.py +0 -0
- {liminal_orm-4.4.5 → liminal_orm-4.4.7}/liminal/migrate/revisions_timeline.py +0 -0
- {liminal_orm-4.4.5 → liminal_orm-4.4.7}/liminal/orm/base.py +0 -0
- {liminal_orm-4.4.5 → liminal_orm-4.4.7}/liminal/orm/base_model.py +0 -0
- {liminal_orm-4.4.5 → liminal_orm-4.4.7}/liminal/orm/base_results_model.py +0 -0
- {liminal_orm-4.4.5 → liminal_orm-4.4.7}/liminal/orm/base_tables/registry_entity.py +0 -0
- {liminal_orm-4.4.5 → liminal_orm-4.4.7}/liminal/orm/base_tables/schema.py +0 -0
- {liminal_orm-4.4.5 → liminal_orm-4.4.7}/liminal/orm/base_tables/user.py +0 -0
- {liminal_orm-4.4.5 → liminal_orm-4.4.7}/liminal/orm/column.py +0 -0
- {liminal_orm-4.4.5 → liminal_orm-4.4.7}/liminal/orm/mixins.py +0 -0
- {liminal_orm-4.4.5 → liminal_orm-4.4.7}/liminal/orm/name_template.py +0 -0
- {liminal_orm-4.4.5 → liminal_orm-4.4.7}/liminal/orm/name_template_parts.py +0 -0
- {liminal_orm-4.4.5 → liminal_orm-4.4.7}/liminal/orm/relationship.py +0 -0
- {liminal_orm-4.4.5 → liminal_orm-4.4.7}/liminal/orm/results_schema_properties.py +0 -0
- {liminal_orm-4.4.5 → liminal_orm-4.4.7}/liminal/orm/schema_properties.py +0 -0
- {liminal_orm-4.4.5 → liminal_orm-4.4.7}/liminal/py.typed +0 -0
- {liminal_orm-4.4.5 → liminal_orm-4.4.7}/liminal/pyvenv.cfg +0 -0
- {liminal_orm-4.4.5 → liminal_orm-4.4.7}/liminal/share/jupyter/kernels/python3/kernel.json +0 -0
- {liminal_orm-4.4.5 → liminal_orm-4.4.7}/liminal/share/jupyter/kernels/python3/logo-32x32.png +0 -0
- {liminal_orm-4.4.5 → liminal_orm-4.4.7}/liminal/share/jupyter/kernels/python3/logo-64x64.png +0 -0
- {liminal_orm-4.4.5 → liminal_orm-4.4.7}/liminal/share/jupyter/kernels/python3/logo-svg.svg +0 -0
- {liminal_orm-4.4.5 → liminal_orm-4.4.7}/liminal/share/man/man1/ipython.1 +0 -0
- {liminal_orm-4.4.5 → liminal_orm-4.4.7}/liminal/tests/__init__.py +0 -0
- {liminal_orm-4.4.5 → liminal_orm-4.4.7}/liminal/tests/conftest.py +0 -0
- {liminal_orm-4.4.5 → liminal_orm-4.4.7}/liminal/tests/from benchling_sdk.py +0 -0
- {liminal_orm-4.4.5 → liminal_orm-4.4.7}/liminal/tests/test_dropdown_compare.py +0 -0
- {liminal_orm-4.4.5 → liminal_orm-4.4.7}/liminal/tests/test_entity_schema_compare.py +0 -0
- {liminal_orm-4.4.5 → liminal_orm-4.4.7}/liminal/unit_dictionary/utils.py +0 -0
- {liminal_orm-4.4.5 → liminal_orm-4.4.7}/liminal/utils.py +0 -0
- {liminal_orm-4.4.5 → liminal_orm-4.4.7}/liminal/validation/__init__.py +0 -0
- {liminal_orm-4.4.5 → liminal_orm-4.4.7}/liminal/validation/validation_severity.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: liminal-orm
|
|
3
|
-
Version: 4.4.
|
|
3
|
+
Version: 4.4.7
|
|
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
|
Project-URL: Homepage, https://github.com/dynotx/liminal-orm
|
|
6
6
|
Project-URL: Repository, https://github.com/dynotx/liminal-orm
|
|
@@ -3,7 +3,6 @@ from pathlib import Path
|
|
|
3
3
|
|
|
4
4
|
from rich import print
|
|
5
5
|
|
|
6
|
-
from liminal.base.base_dropdown import BaseDropdown
|
|
7
6
|
from liminal.connection.benchling_service import BenchlingService
|
|
8
7
|
from liminal.dropdowns.utils import get_benchling_dropdowns_dict
|
|
9
8
|
from liminal.entity_schemas.utils import get_converted_tag_schemas
|
|
@@ -140,20 +139,22 @@ def generate_all_entity_schema_files(
|
|
|
140
139
|
col.type in BenchlingFieldType.get_entity_link_types()
|
|
141
140
|
and col.entity_link is not None
|
|
142
141
|
):
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
142
|
+
entity_classname = wh_name_to_classname.get(col.entity_link)
|
|
143
|
+
if entity_classname is not None:
|
|
144
|
+
if not col.is_multi:
|
|
145
|
+
relationship_strings.append(
|
|
146
|
+
f"""{TAB}{col_name}_entity = single_relationship("{wh_name_to_classname[col.entity_link]}", {col_name})"""
|
|
147
|
+
)
|
|
148
|
+
import_strings.append(
|
|
149
|
+
"from liminal.orm.relationship import single_relationship"
|
|
150
|
+
)
|
|
151
|
+
else:
|
|
152
|
+
relationship_strings.append(
|
|
153
|
+
f"""{TAB}{col_name}_entities = multi_relationship("{wh_name_to_classname[col.entity_link]}", {col_name})"""
|
|
154
|
+
)
|
|
155
|
+
import_strings.append(
|
|
156
|
+
"from liminal.orm.relationship import multi_relationship"
|
|
157
|
+
)
|
|
157
158
|
for col_name, col in columns.items():
|
|
158
159
|
if not col.required and col.type:
|
|
159
160
|
init_strings.append(
|
|
@@ -241,15 +242,7 @@ class {classname}(BaseModel, {get_entity_mixin(schema_properties.entity_type)}):
|
|
|
241
242
|
def _get_dropdown_name_to_classname_map(
|
|
242
243
|
benchling_service: BenchlingService,
|
|
243
244
|
) -> dict[str, str]:
|
|
244
|
-
"""Gets the dropdown name to classname map.
|
|
245
|
-
If there are dropdowns imported, use BenchlingDropdown.get_all_subclasses()
|
|
246
|
-
Otherwise, it will query for Benchling dropdowns and use those.
|
|
247
|
-
"""
|
|
248
|
-
if len(BaseDropdown.get_all_subclasses()) > 0:
|
|
249
|
-
return {
|
|
250
|
-
dropdown.__benchling_name__: dropdown.__name__
|
|
251
|
-
for dropdown in BaseDropdown.get_all_subclasses()
|
|
252
|
-
}
|
|
245
|
+
"""Gets the dropdown name to classname map by querying Benchling dropdowns and using the dropdown name to create the classname."""
|
|
253
246
|
benchling_dropdowns = get_benchling_dropdowns_dict(benchling_service)
|
|
254
247
|
return {
|
|
255
248
|
dropdown_name: to_pascal_case(dropdown_name)
|
|
@@ -93,7 +93,7 @@ class TagSchemaConstraint(BaseModel):
|
|
|
93
93
|
|
|
94
94
|
areUniqueResiduesCaseSensitive: bool | None = None
|
|
95
95
|
fields: list[TagSchemaFieldModel] | None = None
|
|
96
|
-
|
|
96
|
+
uniqueCanonicalSmiles: bool | None = None
|
|
97
97
|
uniqueResidues: bool | None = None
|
|
98
98
|
|
|
99
99
|
@classmethod
|
|
@@ -118,7 +118,7 @@ class TagSchemaConstraint(BaseModel):
|
|
|
118
118
|
return cls(
|
|
119
119
|
fields=constraint_fields,
|
|
120
120
|
uniqueResidues=uniqueResidues,
|
|
121
|
-
|
|
121
|
+
uniqueCanonicalSmiles=False,
|
|
122
122
|
areUniqueResiduesCaseSensitive=areUniqueResiduesCaseSensitive,
|
|
123
123
|
)
|
|
124
124
|
|
|
@@ -97,20 +97,24 @@ def generate_all_results_schema_files(
|
|
|
97
97
|
col.type in BenchlingFieldType.get_entity_link_types()
|
|
98
98
|
and col.entity_link is not None
|
|
99
99
|
):
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
100
|
+
entity_classname = entity_schemas_wh_name_to_classname.get(
|
|
101
|
+
col.entity_link
|
|
102
|
+
)
|
|
103
|
+
if entity_classname is not None:
|
|
104
|
+
if not col.is_multi:
|
|
105
|
+
relationship_strings.append(
|
|
106
|
+
f"""{TAB}{col_name}_entity = single_relationship("{entity_classname}", {col_name})"""
|
|
107
|
+
)
|
|
108
|
+
import_strings.append(
|
|
109
|
+
"from liminal.orm.relationship import single_relationship"
|
|
110
|
+
)
|
|
111
|
+
else:
|
|
112
|
+
relationship_strings.append(
|
|
113
|
+
f"""{TAB}{col_name}_entities = multi_relationship("{entity_classname}", {col_name})"""
|
|
114
|
+
)
|
|
115
|
+
import_strings.append(
|
|
116
|
+
"from liminal.orm.relationship import multi_relationship"
|
|
117
|
+
)
|
|
114
118
|
for col_name, col in field_properties_dict.items():
|
|
115
119
|
if not col.required and col.type:
|
|
116
120
|
init_strings.append(
|
|
@@ -12,7 +12,7 @@ from liminal.unit_dictionary.utils import get_unit_id_to_name_map
|
|
|
12
12
|
|
|
13
13
|
|
|
14
14
|
def get_converted_results_schemas(
|
|
15
|
-
benchling_service: BenchlingService,
|
|
15
|
+
benchling_service: BenchlingService, include_archived: bool = False
|
|
16
16
|
) -> list[tuple[ResultsSchemaProperties, dict[str, BaseFieldProperties]]]:
|
|
17
17
|
"""This functions gets all Results Schema schemas from Benchling and converts them to our internal representation of a schema and its fields.
|
|
18
18
|
It parses the Results Schema and creates ResultsSchemaProperties and a list of FieldProperties for each field in the schema.
|
|
@@ -21,6 +21,8 @@ def get_converted_results_schemas(
|
|
|
21
21
|
dropdowns_map = get_benchling_dropdown_id_name_map(benchling_service)
|
|
22
22
|
unit_id_to_name_map = get_unit_id_to_name_map(benchling_service)
|
|
23
23
|
results_schemas_list = []
|
|
24
|
+
if not include_archived:
|
|
25
|
+
results_schemas = [s for s in results_schemas if not s.archiveRecord]
|
|
24
26
|
for schema in results_schemas:
|
|
25
27
|
schema_properties = ResultsSchemaProperties(
|
|
26
28
|
name=schema.name,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "liminal-orm"
|
|
3
|
-
version = "4.4.
|
|
3
|
+
version = "4.4.7"
|
|
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 = [{ name = "DynoTx Open Source", email = "opensource@dynotx.com" }]
|
|
6
6
|
requires-python = ">=3.9,<4"
|
|
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
|
|
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
|
{liminal_orm-4.4.5 → liminal_orm-4.4.7}/liminal/share/jupyter/kernels/python3/logo-32x32.png
RENAMED
|
File without changes
|
{liminal_orm-4.4.5 → liminal_orm-4.4.7}/liminal/share/jupyter/kernels/python3/logo-64x64.png
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
|