liminal-orm 1.1.1__tar.gz → 1.1.3__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.
Files changed (62) hide show
  1. {liminal_orm-1.1.1 → liminal_orm-1.1.3}/PKG-INFO +1 -1
  2. {liminal_orm-1.1.1 → liminal_orm-1.1.3}/liminal/connection/benchling_connection.py +3 -0
  3. {liminal_orm-1.1.1 → liminal_orm-1.1.3}/liminal/entity_schemas/generate_files.py +0 -1
  4. {liminal_orm-1.1.1 → liminal_orm-1.1.3}/liminal/entity_schemas/operations.py +11 -7
  5. {liminal_orm-1.1.1 → liminal_orm-1.1.3}/liminal/orm/base_model.py +1 -1
  6. liminal_orm-1.1.3/liminal/orm/base_tables/registry_entity.py +60 -0
  7. liminal_orm-1.1.3/liminal/orm/base_tables/schema.py +31 -0
  8. {liminal_orm-1.1.1 → liminal_orm-1.1.3}/pyproject.toml +1 -1
  9. {liminal_orm-1.1.1 → liminal_orm-1.1.3}/LICENSE.md +0 -0
  10. {liminal_orm-1.1.1 → liminal_orm-1.1.3}/README.md +0 -0
  11. {liminal_orm-1.1.1 → liminal_orm-1.1.3}/liminal/__init__.py +0 -0
  12. {liminal_orm-1.1.1 → liminal_orm-1.1.3}/liminal/base/base_dropdown.py +0 -0
  13. {liminal_orm-1.1.1 → liminal_orm-1.1.3}/liminal/base/base_operation.py +0 -0
  14. {liminal_orm-1.1.1 → liminal_orm-1.1.3}/liminal/base/base_validation_filters.py +0 -0
  15. {liminal_orm-1.1.1 → liminal_orm-1.1.3}/liminal/base/compare_operation.py +0 -0
  16. {liminal_orm-1.1.1 → liminal_orm-1.1.3}/liminal/base/properties/base_field_properties.py +0 -0
  17. {liminal_orm-1.1.1 → liminal_orm-1.1.3}/liminal/base/properties/base_schema_properties.py +0 -0
  18. {liminal_orm-1.1.1 → liminal_orm-1.1.3}/liminal/base/str_enum.py +0 -0
  19. {liminal_orm-1.1.1 → liminal_orm-1.1.3}/liminal/cli/cli.py +0 -0
  20. {liminal_orm-1.1.1 → liminal_orm-1.1.3}/liminal/cli/controller.py +0 -0
  21. {liminal_orm-1.1.1 → liminal_orm-1.1.3}/liminal/cli/live_test_dropdown_migration.py +0 -0
  22. {liminal_orm-1.1.1 → liminal_orm-1.1.3}/liminal/cli/live_test_entity_schema_migration.py +0 -0
  23. {liminal_orm-1.1.1 → liminal_orm-1.1.3}/liminal/connection/__init__.py +0 -0
  24. {liminal_orm-1.1.1 → liminal_orm-1.1.3}/liminal/connection/benchling_service.py +0 -0
  25. {liminal_orm-1.1.1 → liminal_orm-1.1.3}/liminal/dropdowns/api.py +0 -0
  26. {liminal_orm-1.1.1 → liminal_orm-1.1.3}/liminal/dropdowns/compare.py +0 -0
  27. {liminal_orm-1.1.1 → liminal_orm-1.1.3}/liminal/dropdowns/generate_files.py +0 -0
  28. {liminal_orm-1.1.1 → liminal_orm-1.1.3}/liminal/dropdowns/operations.py +0 -0
  29. {liminal_orm-1.1.1 → liminal_orm-1.1.3}/liminal/dropdowns/utils.py +0 -0
  30. {liminal_orm-1.1.1 → liminal_orm-1.1.3}/liminal/entity_schemas/api.py +0 -0
  31. {liminal_orm-1.1.1 → liminal_orm-1.1.3}/liminal/entity_schemas/compare.py +0 -0
  32. {liminal_orm-1.1.1 → liminal_orm-1.1.3}/liminal/entity_schemas/entity_schema_models.py +0 -0
  33. {liminal_orm-1.1.1 → liminal_orm-1.1.3}/liminal/entity_schemas/tag_schema_models.py +0 -0
  34. {liminal_orm-1.1.1 → liminal_orm-1.1.3}/liminal/entity_schemas/utils.py +0 -0
  35. {liminal_orm-1.1.1 → liminal_orm-1.1.3}/liminal/enums/__init__.py +0 -0
  36. {liminal_orm-1.1.1 → liminal_orm-1.1.3}/liminal/enums/benchling_api_field_type.py +0 -0
  37. {liminal_orm-1.1.1 → liminal_orm-1.1.3}/liminal/enums/benchling_entity_type.py +0 -0
  38. {liminal_orm-1.1.1 → liminal_orm-1.1.3}/liminal/enums/benchling_field_type.py +0 -0
  39. {liminal_orm-1.1.1 → liminal_orm-1.1.3}/liminal/enums/benchling_folder_item_type.py +0 -0
  40. {liminal_orm-1.1.1 → liminal_orm-1.1.3}/liminal/enums/benchling_naming_strategy.py +0 -0
  41. {liminal_orm-1.1.1 → liminal_orm-1.1.3}/liminal/enums/benchling_report_level.py +0 -0
  42. {liminal_orm-1.1.1 → liminal_orm-1.1.3}/liminal/enums/benchling_sequence_type.py +0 -0
  43. {liminal_orm-1.1.1 → liminal_orm-1.1.3}/liminal/external/__init__.py +0 -0
  44. {liminal_orm-1.1.1 → liminal_orm-1.1.3}/liminal/mappers.py +0 -0
  45. {liminal_orm-1.1.1 → liminal_orm-1.1.3}/liminal/migrate/components.py +0 -0
  46. {liminal_orm-1.1.1 → liminal_orm-1.1.3}/liminal/migrate/revision.py +0 -0
  47. {liminal_orm-1.1.1 → liminal_orm-1.1.3}/liminal/migrate/revisions_timeline.py +0 -0
  48. {liminal_orm-1.1.1 → liminal_orm-1.1.3}/liminal/migrate/utils.py +0 -0
  49. {liminal_orm-1.1.1 → liminal_orm-1.1.3}/liminal/orm/base.py +0 -0
  50. {liminal_orm-1.1.1/liminal/orm → liminal_orm-1.1.3/liminal/orm/base_tables}/user.py +0 -0
  51. {liminal_orm-1.1.1 → liminal_orm-1.1.3}/liminal/orm/column.py +0 -0
  52. {liminal_orm-1.1.1 → liminal_orm-1.1.3}/liminal/orm/mixins.py +0 -0
  53. {liminal_orm-1.1.1 → liminal_orm-1.1.3}/liminal/orm/relationship.py +0 -0
  54. {liminal_orm-1.1.1 → liminal_orm-1.1.3}/liminal/orm/schema_properties.py +0 -0
  55. {liminal_orm-1.1.1 → liminal_orm-1.1.3}/liminal/py.typed +0 -0
  56. {liminal_orm-1.1.1 → liminal_orm-1.1.3}/liminal/tests/__init__.py +0 -0
  57. {liminal_orm-1.1.1 → liminal_orm-1.1.3}/liminal/tests/conftest.py +0 -0
  58. {liminal_orm-1.1.1 → liminal_orm-1.1.3}/liminal/tests/from benchling_sdk.py +0 -0
  59. {liminal_orm-1.1.1 → liminal_orm-1.1.3}/liminal/tests/test_dropdown_compare.py +0 -0
  60. {liminal_orm-1.1.1 → liminal_orm-1.1.3}/liminal/tests/test_entity_schema_compare.py +0 -0
  61. {liminal_orm-1.1.1 → liminal_orm-1.1.3}/liminal/utils.py +0 -0
  62. {liminal_orm-1.1.1 → liminal_orm-1.1.3}/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.1
3
+ Version: 1.1.3
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
@@ -30,6 +30,8 @@ class BenchlingConnection(BaseModel):
30
30
  warehouse_access: bool = False
31
31
  Whether your Benchling tenant has access to the warehouse. If warehouse_connection_string is provided, this will default to True.
32
32
  warehouse_access is required to set a custom warehouse names on entity schemas and their fields.
33
+ fieldsets: bool = False
34
+ Whether your Benchling tenant has access to fieldsets.
33
35
  """
34
36
 
35
37
  tenant_name: str
@@ -41,6 +43,7 @@ class BenchlingConnection(BaseModel):
41
43
  internal_api_admin_email: str | None = None
42
44
  internal_api_admin_password: str | None = None
43
45
  warehouse_access: bool = False
46
+ fieldsets: bool = False
44
47
 
45
48
  @model_validator(mode="before")
46
49
  @classmethod
@@ -74,7 +74,6 @@ def generate_all_entity_schema_files(
74
74
  columns = {key: columns[key] for key in columns}
75
75
  import_strings = [
76
76
  "from sqlalchemy import Column as SqlColumn",
77
- "from sqlalchemy.orm import Query, Session",
78
77
  "from liminal.orm.column import Column",
79
78
  "from liminal.orm.base_model import BaseModel",
80
79
  "from liminal.orm.schema_properties import SchemaProperties",
@@ -96,9 +96,11 @@ class CreateEntitySchema(BaseOperation):
96
96
  raise ValueError(
97
97
  f"Entity schema warehouse name {self._validated_schema_properties.warehouse_name} already exists in Benchling."
98
98
  )
99
- if self._validated_schema_properties.prefix in [
100
- schema["prefix"] for schema in all_schemas
101
- ]:
99
+ if (
100
+ not benchling_service.connection.fieldsets
101
+ and self._validated_schema_properties.prefix
102
+ in [schema["prefix"] for schema in all_schemas]
103
+ ):
102
104
  raise ValueError(
103
105
  f"Entity schema prefix {self._validated_schema_properties.prefix} already exists in Benchling."
104
106
  )
@@ -235,9 +237,11 @@ class UpdateEntitySchema(BaseOperation):
235
237
  raise ValueError(
236
238
  f"Entity schema warehouse name {self.update_props.warehouse_name} already exists in Benchling."
237
239
  )
238
- if self.update_props.prefix and self.update_props.prefix in [
239
- schema["prefix"] for schema in all_schemas
240
- ]:
240
+ if (
241
+ not benchling_service.connection.fieldsets
242
+ and self.update_props.prefix
243
+ and self.update_props.prefix in [schema["prefix"] for schema in all_schemas]
244
+ ):
241
245
  raise ValueError(
242
246
  f"Entity schema prefix {self.update_props.prefix} already exists in Benchling."
243
247
  )
@@ -439,7 +443,7 @@ class UnarchiveEntitySchemaField(BaseOperation):
439
443
 
440
444
 
441
445
  class UpdateEntitySchemaField(BaseOperation):
442
- order: ClassVar[int] = 14
446
+ order: ClassVar[int] = 140
443
447
 
444
448
  def __init__(
445
449
  self,
@@ -12,8 +12,8 @@ from sqlalchemy.orm.decl_api import declared_attr
12
12
 
13
13
  from liminal.base.base_validation_filters import BaseValidatorFilters
14
14
  from liminal.orm.base import Base
15
+ from liminal.orm.base_tables.user import User
15
16
  from liminal.orm.schema_properties import SchemaProperties
16
- from liminal.orm.user import User
17
17
  from liminal.validation import (
18
18
  BenchlingValidator,
19
19
  BenchlingValidatorReport,
@@ -0,0 +1,60 @@
1
+ from datetime import datetime
2
+
3
+ from sqlalchemy import Column, ForeignKey
4
+ from sqlalchemy.types import DATETIME, Boolean, String
5
+
6
+ from liminal.orm.base import Base
7
+ from liminal.orm.relationship import single_relationship
8
+
9
+
10
+ class RegistryEntity(Base):
11
+ __tablename__ = "registry_entity$raw"
12
+
13
+ id = Column("id", String, nullable=True, primary_key=True)
14
+ archived = Column("archived$", Boolean, nullable=True)
15
+ archive_purpose = Column("archive_purpose$", String, nullable=True)
16
+ created_at = Column("created_at", DATETIME, nullable=True)
17
+ creator_id = Column("creator_id", String, ForeignKey("user$raw.id"), nullable=True)
18
+ file_registry_id = Column("file_registry_id", String, nullable=True)
19
+ folder_id = Column("folder_id", String, nullable=True)
20
+ modified_at = Column("modified_at", DATETIME, nullable=True)
21
+ name = Column("name", String, nullable=True)
22
+ project_id = Column("project_id", String, nullable=True)
23
+ schema_id = Column("schema_id", String, nullable=True)
24
+ source_id = Column("source_id", String, nullable=True)
25
+ url = Column("url", String, nullable=True)
26
+ validation_status = Column("validation_status", String, nullable=True)
27
+
28
+ creator = single_relationship("User", creator_id)
29
+
30
+ def __init__(
31
+ self,
32
+ id: str,
33
+ archived: bool,
34
+ archive_purpose: str,
35
+ created_at: datetime,
36
+ file_registry_id: str,
37
+ folder_id: str,
38
+ modified_at: datetime,
39
+ name: str,
40
+ project_id: str,
41
+ schema: str,
42
+ schema_id: str,
43
+ source_id: str,
44
+ url: str,
45
+ validation_status: str,
46
+ ):
47
+ self.id = id
48
+ self.archived = archived
49
+ self.archive_purpose = archive_purpose
50
+ self.created_at = created_at
51
+ self.file_registry_id = file_registry_id
52
+ self.folder_id = folder_id
53
+ self.modified_at = modified_at
54
+ self.name = name
55
+ self.project_id = project_id
56
+ self.schema = schema
57
+ self.schema_id = schema_id
58
+ self.source_id = source_id
59
+ self.url = url
60
+ self.validation_status = validation_status
@@ -0,0 +1,31 @@
1
+ from sqlalchemy import Column
2
+ from sqlalchemy.types import Boolean, String
3
+
4
+ from liminal.orm.base import Base
5
+
6
+
7
+ class Schema(Base):
8
+ __tablename__ = "schema$raw"
9
+
10
+ id = Column("id", String, nullable=True, primary_key=True)
11
+ schema_type = Column("schema_type", String, nullable=True)
12
+ name = Column("name", String, nullable=True)
13
+ system_name = Column("system_name", String, nullable=True)
14
+ archived = Column("archived$", Boolean, nullable=True)
15
+ archive_purpose = Column("archive_purpose$", String, nullable=True)
16
+
17
+ def __init__(
18
+ self,
19
+ id: str,
20
+ schema_type: str,
21
+ name: str,
22
+ system_name: str,
23
+ archived: bool,
24
+ archive_purpose: str,
25
+ ):
26
+ self.id = id
27
+ self.schema_type = schema_type
28
+ self.name = name
29
+ self.system_name = system_name
30
+ self.archived = archived
31
+ self.archive_purpose = archive_purpose
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "liminal-orm"
3
- version = "1.1.1"
3
+ version = "1.1.3"
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