liminal-orm 1.0.0__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.0.0/LICENSE.md +201 -0
- liminal_orm-1.0.0/PKG-INFO +200 -0
- liminal_orm-1.0.0/README.md +177 -0
- liminal_orm-1.0.0/liminal/__init__.py +0 -0
- liminal_orm-1.0.0/liminal/base/base_dropdown.py +56 -0
- liminal_orm-1.0.0/liminal/base/base_operation.py +98 -0
- liminal_orm-1.0.0/liminal/base/base_validation_filters.py +17 -0
- liminal_orm-1.0.0/liminal/base/compare_operation.py +13 -0
- liminal_orm-1.0.0/liminal/base/properties/base_field_properties.py +114 -0
- liminal_orm-1.0.0/liminal/base/properties/base_schema_properties.py +99 -0
- liminal_orm-1.0.0/liminal/base/str_enum.py +9 -0
- liminal_orm-1.0.0/liminal/cli/cli.py +232 -0
- liminal_orm-1.0.0/liminal/cli/controller.py +224 -0
- liminal_orm-1.0.0/liminal/cli/live_test_dropdown_migration.py +76 -0
- liminal_orm-1.0.0/liminal/cli/live_test_entity_schema_migration.py +148 -0
- liminal_orm-1.0.0/liminal/connection/__init__.py +2 -0
- liminal_orm-1.0.0/liminal/connection/benchling_connection.py +58 -0
- liminal_orm-1.0.0/liminal/connection/benchling_service.py +181 -0
- liminal_orm-1.0.0/liminal/dropdowns/api.py +175 -0
- liminal_orm-1.0.0/liminal/dropdowns/compare.py +162 -0
- liminal_orm-1.0.0/liminal/dropdowns/generate_files.py +52 -0
- liminal_orm-1.0.0/liminal/dropdowns/operations.py +344 -0
- liminal_orm-1.0.0/liminal/dropdowns/utils.py +107 -0
- liminal_orm-1.0.0/liminal/entity_schemas/api.py +77 -0
- liminal_orm-1.0.0/liminal/entity_schemas/compare.py +287 -0
- liminal_orm-1.0.0/liminal/entity_schemas/entity_schema_models.py +142 -0
- liminal_orm-1.0.0/liminal/entity_schemas/generate_files.py +191 -0
- liminal_orm-1.0.0/liminal/entity_schemas/operations.py +561 -0
- liminal_orm-1.0.0/liminal/entity_schemas/tag_schema_models.py +404 -0
- liminal_orm-1.0.0/liminal/entity_schemas/utils.py +104 -0
- liminal_orm-1.0.0/liminal/enums/__init__.py +8 -0
- liminal_orm-1.0.0/liminal/enums/benchling_api_field_type.py +17 -0
- liminal_orm-1.0.0/liminal/enums/benchling_entity_type.py +14 -0
- liminal_orm-1.0.0/liminal/enums/benchling_field_type.py +30 -0
- liminal_orm-1.0.0/liminal/enums/benchling_folder_item_type.py +9 -0
- liminal_orm-1.0.0/liminal/enums/benchling_naming_strategy.py +31 -0
- liminal_orm-1.0.0/liminal/enums/benchling_report_level.py +10 -0
- liminal_orm-1.0.0/liminal/enums/benchling_sequence_type.py +8 -0
- liminal_orm-1.0.0/liminal/external/__init__.py +36 -0
- liminal_orm-1.0.0/liminal/mappers.py +206 -0
- liminal_orm-1.0.0/liminal/migrate/components.py +89 -0
- liminal_orm-1.0.0/liminal/migrate/revision.py +204 -0
- liminal_orm-1.0.0/liminal/migrate/revisions_timeline.py +327 -0
- liminal_orm-1.0.0/liminal/migrate/utils.py +50 -0
- liminal_orm-1.0.0/liminal/orm/base.py +16 -0
- liminal_orm-1.0.0/liminal/orm/base_model.py +281 -0
- liminal_orm-1.0.0/liminal/orm/column.py +109 -0
- liminal_orm-1.0.0/liminal/orm/mixins.py +89 -0
- liminal_orm-1.0.0/liminal/orm/relationship.py +62 -0
- liminal_orm-1.0.0/liminal/orm/schema_properties.py +55 -0
- liminal_orm-1.0.0/liminal/orm/user.py +32 -0
- liminal_orm-1.0.0/liminal/tests/__init__.py +0 -0
- liminal_orm-1.0.0/liminal/tests/conftest.py +471 -0
- liminal_orm-1.0.0/liminal/tests/from benchling_sdk.py +3 -0
- liminal_orm-1.0.0/liminal/tests/test_dropdown_compare.py +192 -0
- liminal_orm-1.0.0/liminal/tests/test_entity_schema_compare.py +326 -0
- liminal_orm-1.0.0/liminal/utils.py +81 -0
- liminal_orm-1.0.0/liminal/validation/__init__.py +178 -0
- liminal_orm-1.0.0/pyproject.toml +57 -0
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
+
|
|
180
|
+
To apply the Apache License to your work, attach the following
|
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
+
replaced with your own identifying information. (Don't include
|
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
+
comment syntax for the file format. We also recommend that a
|
|
185
|
+
file or class name and description of purpose be included on the
|
|
186
|
+
same "printed page" as the copyright notice for easier
|
|
187
|
+
identification within third-party archives.
|
|
188
|
+
|
|
189
|
+
Copyright 2024 The liminal-orm Authors
|
|
190
|
+
|
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
+
you may not use this file except in compliance with the License.
|
|
193
|
+
You may obtain a copy of the License at
|
|
194
|
+
|
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
+
|
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
+
See the License for the specific language governing permissions and
|
|
201
|
+
limitations under the License.
|
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: liminal-orm
|
|
3
|
+
Version: 1.0.0
|
|
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
|
+
Author: ndamania00
|
|
6
|
+
Author-email: ndamania00@gmail.com
|
|
7
|
+
Requires-Python: >=3.9,<4
|
|
8
|
+
Classifier: Programming Language :: Python :: 3
|
|
9
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
10
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
11
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
12
|
+
Requires-Dist: benchling-sdk (>=1.8.0)
|
|
13
|
+
Requires-Dist: bs4 (>=0.0.2,<0.0.3)
|
|
14
|
+
Requires-Dist: pandas (>=2.2.3,<3.0.0)
|
|
15
|
+
Requires-Dist: pydantic (>=2.9.2,<3.0.0)
|
|
16
|
+
Requires-Dist: requests (>=2.32.3,<3.0.0)
|
|
17
|
+
Requires-Dist: rich (>=13.9.2,<14.0.0)
|
|
18
|
+
Requires-Dist: sqlalchemy (==1.4.49)
|
|
19
|
+
Requires-Dist: tenacity (>=9.0.0,<10.0.0)
|
|
20
|
+
Requires-Dist: typer (>=0.12.5,<0.13.0)
|
|
21
|
+
Description-Content-Type: text/markdown
|
|
22
|
+
|
|
23
|
+
# [Liminal ORM](#liminal-orm)
|
|
24
|
+
|
|
25
|
+
Liminal ORM<sup>1</sup> is a Python package that builds on top of [Benchling](https://www.benchling.com/)'s LIMS<sup>2</sup> platform to keep your Benchling schemas and downstream code dependencies in sync. Liminal provides an ORM framework using [SQLAlchemy](https://github.com/sqlalchemy/sqlalchemy) that allows you to define all your Benchling schemas in code. This creates a single source of truth that Benchling managers can use to keep multiple tenants in sync. This enables a code-first approach for managing Benchling tenants and accessing Benchling data. With the schemas defined in code, you can now take advantage of the additional capabilities that the Liminal toolkit provides. This includes:
|
|
26
|
+
|
|
27
|
+
- The ability to run migrations to your Benchling tenant(s) through an easy to use CLI<sup>3</sup>.
|
|
28
|
+
- One source of truth defined in code for your Benchling schema model that your many Benchling tenants can stay in sync with.
|
|
29
|
+
- Easy to implement validation rules to reflect business logic for all of your Benchling entities.
|
|
30
|
+
- Strongly typed queries for all your Benchling entities.
|
|
31
|
+
- CI/CD integration with GitHub Actions to ensure that your Benchling schemas and code are always in sync.
|
|
32
|
+
- And more!
|
|
33
|
+
|
|
34
|
+
Benchling is an industry standard cloud platform for life sciences R&D. Liminal builds on top of Benchling's platform and assumes that you already have a Benchling tenant set up and have (or have access to) an admin user account. If not, learn more about getting started with Benchling [here](https://www.benchling.com/explore-benchling)!
|
|
35
|
+
|
|
36
|
+
For a full and in-depth overview of Liminal, please refer to our [full documentation](coming soon). Below is a [quickstart guide](#getting-started) to get you Liminal set up in your project.
|
|
37
|
+
|
|
38
|
+
Reach out in the [Discussions](https://github.com/dynotx/liminal-orm/discussions) forum with any questions or to simply introduce yourself! If you run into any issues, during setup or usage, don't hesitate to post in [Issues](https://github.com/dynotx/liminal-orm/issues) or reach out directly at <opensource@dynotx.com>. You can expect responses within 48 hours :)
|
|
39
|
+
|
|
40
|
+
<img width="793" alt="liminal_simple_graph" src="https://github.com/user-attachments/assets/52e32cd0-3407-49f5-b100-5763bee3830c">
|
|
41
|
+
|
|
42
|
+
## Table of Contents
|
|
43
|
+
|
|
44
|
+
- [Overview](#liminal-orm)
|
|
45
|
+
- [Getting Started](#getting-started)
|
|
46
|
+
- [Installation](#installation)
|
|
47
|
+
- [Setup](#setup)
|
|
48
|
+
- [Migration](#migration)
|
|
49
|
+
- [Toolkit](#toolkit)
|
|
50
|
+
- [Community](#community)
|
|
51
|
+
- [Contributing](#contributing)
|
|
52
|
+
- [License](#license)
|
|
53
|
+
- [Acknowledgements](#acknowledgements)
|
|
54
|
+
- [Footnotes](#footnotes)
|
|
55
|
+
|
|
56
|
+
## [Getting Started](#getting-started)
|
|
57
|
+
|
|
58
|
+
Note: Liminal requires you to have (or have access to) an admin user account for your Benchling tenant. If you run into any issues, please reach out to us on the [Discussions](https://github.com/dynotx/liminal-orm/discussions/categories/q-a) forum and we'll be happy to help!
|
|
59
|
+
|
|
60
|
+
### [Installation](#installation)
|
|
61
|
+
|
|
62
|
+
via pip: `pip install liminal-orm`
|
|
63
|
+
|
|
64
|
+
via github: `python -m pip install git+https://github.com/dynotx/liminal-orm.git --ignore-installed`
|
|
65
|
+
|
|
66
|
+
### [Setup](#setup)
|
|
67
|
+
|
|
68
|
+
1. `cd` into the directory where you want to instantiate your *Liminal environment*. This will be the root directory where your schemas will live. Note: the Liminal CLI must always be run from within this root directory.
|
|
69
|
+
|
|
70
|
+
2. Run `liminal init` to initialize your Liminal project. This will create a liminal/ directory with an env.py file and a versions/ directory with an empty first revision file.
|
|
71
|
+
|
|
72
|
+
3. Populate the env.py file with your Benchling connection information, following the instructions in the file. For example:
|
|
73
|
+
|
|
74
|
+
```python
|
|
75
|
+
from liminal.connection import BenchlingConnection
|
|
76
|
+
|
|
77
|
+
PROD_CURRENT_REVISION_ID = "12b31776a755b"
|
|
78
|
+
|
|
79
|
+
# It is highly recommended to use a secrets manager to store your credentials.
|
|
80
|
+
connection = BenchlingConnection(
|
|
81
|
+
tenant_name="pizzahouse-prod",
|
|
82
|
+
tenant_alias="prod",
|
|
83
|
+
current_revision_id_var_name="PROD_CURRENT_REVISION_ID",
|
|
84
|
+
api_client_id="my-secret-api-client-id",
|
|
85
|
+
api_client_secret="my-secret-api-client-secret",
|
|
86
|
+
warehouse_connection_string="my-warehouse-connection-string",
|
|
87
|
+
internal_api_admin_email="my-secret-internal-api-admin-email",
|
|
88
|
+
internal_api_admin_password="my-secret-internal-api-admin-password",
|
|
89
|
+
)
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
4. If your Benchling tenant has pre-existing schemas, run `liminal generate-files` to populate the root directory with the schema files. Your file structure should now look like this:
|
|
93
|
+
|
|
94
|
+
```text
|
|
95
|
+
benchling/
|
|
96
|
+
liminal/
|
|
97
|
+
env.py
|
|
98
|
+
versions/
|
|
99
|
+
<revision_id>_initial_init_revision.py
|
|
100
|
+
dropdowns/
|
|
101
|
+
...
|
|
102
|
+
entity_schemas/
|
|
103
|
+
...
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
5. Add your schema imports to the env.py file. For example:
|
|
107
|
+
|
|
108
|
+
```python
|
|
109
|
+
from pizzahouse.dropdowns import *
|
|
110
|
+
from pizzahouse.entity_schemas import *
|
|
111
|
+
...
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
6. Set up is complete! You're now ready to start using your schemas defined in code as the single source of truth for your Benchling tenant(s). Refer to the [Migration](#migration) section to learn about how you make a change to your Benchling schema model. Refer to the [Toolkit](#toolkit) section to learn about the additional features the Liminal toolkit provides.
|
|
115
|
+
|
|
116
|
+
## [Migration](#migration)
|
|
117
|
+
|
|
118
|
+
This section will walk you through the process of making a change to your Benchling schema model and syncing it to your Benchling tenant(s).
|
|
119
|
+
|
|
120
|
+
1. Make a change to your Benchling schema model!
|
|
121
|
+
|
|
122
|
+
2. Run `liminal autogenerate <benchling_tenant_name> <description_of_changes>` to generate a new revision file. For example: `liminal autogenerate prod "new oven schema"`. This will create a new revision file in the `versions/` directory. This revision file defines the set of steps (or "operations") that will be needed to make the targeted Benchling tenant up to date with the changes made in the schema model.
|
|
123
|
+
|
|
124
|
+
If I have multiple Benchling tenants, do I have to run `autogenerate` for each tenant?
|
|
125
|
+
|
|
126
|
+
No, Liminal only keeps a single thread of revision history that are linked together for easy upgrade/downgrade. In the case of multiple tenants that need to stay in sync together, we recommend pointing `autogenerate` at your production tenant, or the tenant that acts as the production environment. When ready, you can then apply the revision to all your tenants.
|
|
127
|
+
|
|
128
|
+
3. Review the generated revision file and set of operations to ensure that it is accurate.
|
|
129
|
+
|
|
130
|
+
4. Run `liminal upgrade <benchling_tenant_name> <upgrade_descriptor>` to migrate your Benchling tenant(s) to the new schema. For example: `liminal upgrade prod head`. This will apply the revision to the targeted Benchling tenant. For example: `liminal upgrade prod head` will apply the revision to the production tenant.
|
|
131
|
+
|
|
132
|
+
5. Check out your changes on your Benchling tenant(s)!
|
|
133
|
+
|
|
134
|
+
## [Toolkit](#toolkit)
|
|
135
|
+
|
|
136
|
+
With your schemas defined in code, you can now take advantage of the additional capabilities that the Liminal toolkit provides.
|
|
137
|
+
|
|
138
|
+
1. Entity validation: Easily create custom validation rules for your Benchling entities.
|
|
139
|
+
|
|
140
|
+
```python
|
|
141
|
+
from dyno.liminal.orm.base_model import BaseModel
|
|
142
|
+
from dyno.liminal.orm.mixins import CustomEntityMixin
|
|
143
|
+
|
|
144
|
+
class Pizza(BaseModel, CustomEntityMixin):
|
|
145
|
+
...
|
|
146
|
+
|
|
147
|
+
@validator(BenchlingReportLevel.HIGH)
|
|
148
|
+
def cook_temp_time(self):
|
|
149
|
+
if self.cook_time is not None and self.cook_temp is None:
|
|
150
|
+
raise ValueError("Cook temp is required if cook time is set")
|
|
151
|
+
if self.cook_time is None and self.cook_temp is not None:
|
|
152
|
+
raise ValueError("Cook time is required if cook temp is set")
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
2. Strongly typed queries: Write type-safe queries using SQLAlchemy to access your Benchling entities.
|
|
156
|
+
|
|
157
|
+
```python
|
|
158
|
+
with BenchlingSession(benchling_connection, with_db=True) as session:
|
|
159
|
+
pizza = session.query(Pizza).filter(Pizza.name == "Margherita").first()
|
|
160
|
+
print(pizza)
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
3. CI/CD integration: Use Liminal to automatically generate and apply your revision files to your Benchling tenant(s) as part of your CI/CD pipeline.
|
|
164
|
+
|
|
165
|
+
4. And more to come!
|
|
166
|
+
|
|
167
|
+
## [Community](#community)
|
|
168
|
+
|
|
169
|
+
We're excited to hear from you! Feel free to introduce yourself on the [Liminal GitHub Discussions page](https://github.com/dynotx/liminal-orm/discussions/categories/intros)
|
|
170
|
+
|
|
171
|
+
Please refer to [CODE_OF_CONDUCT.md](./CODE_OF_CONDUCT.md) to learn more about how to interact with the community.
|
|
172
|
+
|
|
173
|
+
Please refer to [GOVERNANCE.md](./GOVERNANCE.md) to learn more about the project's governance structure.
|
|
174
|
+
|
|
175
|
+
## [Contributing](#contributing)
|
|
176
|
+
|
|
177
|
+
Contributions of any kind are welcome and encouraged! This ranges from feedback and feature requests all the way to code contributions.
|
|
178
|
+
Please refer to [CONTRIBUTING.md](./CONTRIBUTING.md) to learn how to contribute to Liminal!
|
|
179
|
+
|
|
180
|
+
## [License](#license)
|
|
181
|
+
|
|
182
|
+
Liminal ORM is distributed under the [Apache License, Version 2.0](./LICENSE.md).
|
|
183
|
+
|
|
184
|
+
## [Acknowledgements](#acknowledgements)
|
|
185
|
+
|
|
186
|
+
This project could not have been started without the support of Dyno Therapeutics and the help of the following people.
|
|
187
|
+
|
|
188
|
+
- [Steve Northup](https://github.com/steve-dyno): For being an incredibly supportive manager and mentor, making key technical contributions, and providing guidance on the project's direction.
|
|
189
|
+
- [Joyce Samson](https://github.com/samsonjoyce): For being Liminal's first power user at Dyno Therapeutics, providing valuable feedback that informed the project's direction, and coming up with Liminal's name.
|
|
190
|
+
- [David Levy-Booth](https://github.com/davidlevybooth): For providing leadership and guidance on releasing this as an open source software.
|
|
191
|
+
- The rest of the Dyno team...
|
|
192
|
+
|
|
193
|
+
## [Footnotes](#footnotes)
|
|
194
|
+
|
|
195
|
+
ORM<sup>1</sup>: Object-Relational Mapper. An ORM is a piece of software designed to translate between the data representations used by databases and those used in object-oriented programming. In this case, Liminal provides an ORM layer built specifically for Benchling that allows for users to quickly and easily define Benchling entities in code. [SQLAlchemy](https://github.com/sqlalchemy/sqlalchemy) is the underlying ORM that Liminal uses to interact with your Benchling tenant(s) and is an open-source software that is an industry standard software.
|
|
196
|
+
|
|
197
|
+
LIMS<sup>2</sup>: Laboratory Information Management System. A LIMS is a piece of software that allows you to effectively manage samples and associated data. [Benchling](https://www.benchling.com/) is an industry-leading LIMS software.
|
|
198
|
+
|
|
199
|
+
CLI<sup>3</sup>: Command Line Interface. A CLI is a piece of software that allows you to interact with a software program via the command line. Liminal provides a CLI that allows you to interact with your Liminal environment. This project uses [Typer](https://github.com/fastapi/typer) to construct the CLI
|
|
200
|
+
|
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
# [Liminal ORM](#liminal-orm)
|
|
2
|
+
|
|
3
|
+
Liminal ORM<sup>1</sup> is a Python package that builds on top of [Benchling](https://www.benchling.com/)'s LIMS<sup>2</sup> platform to keep your Benchling schemas and downstream code dependencies in sync. Liminal provides an ORM framework using [SQLAlchemy](https://github.com/sqlalchemy/sqlalchemy) that allows you to define all your Benchling schemas in code. This creates a single source of truth that Benchling managers can use to keep multiple tenants in sync. This enables a code-first approach for managing Benchling tenants and accessing Benchling data. With the schemas defined in code, you can now take advantage of the additional capabilities that the Liminal toolkit provides. This includes:
|
|
4
|
+
|
|
5
|
+
- The ability to run migrations to your Benchling tenant(s) through an easy to use CLI<sup>3</sup>.
|
|
6
|
+
- One source of truth defined in code for your Benchling schema model that your many Benchling tenants can stay in sync with.
|
|
7
|
+
- Easy to implement validation rules to reflect business logic for all of your Benchling entities.
|
|
8
|
+
- Strongly typed queries for all your Benchling entities.
|
|
9
|
+
- CI/CD integration with GitHub Actions to ensure that your Benchling schemas and code are always in sync.
|
|
10
|
+
- And more!
|
|
11
|
+
|
|
12
|
+
Benchling is an industry standard cloud platform for life sciences R&D. Liminal builds on top of Benchling's platform and assumes that you already have a Benchling tenant set up and have (or have access to) an admin user account. If not, learn more about getting started with Benchling [here](https://www.benchling.com/explore-benchling)!
|
|
13
|
+
|
|
14
|
+
For a full and in-depth overview of Liminal, please refer to our [full documentation](coming soon). Below is a [quickstart guide](#getting-started) to get you Liminal set up in your project.
|
|
15
|
+
|
|
16
|
+
Reach out in the [Discussions](https://github.com/dynotx/liminal-orm/discussions) forum with any questions or to simply introduce yourself! If you run into any issues, during setup or usage, don't hesitate to post in [Issues](https://github.com/dynotx/liminal-orm/issues) or reach out directly at <opensource@dynotx.com>. You can expect responses within 48 hours :)
|
|
17
|
+
|
|
18
|
+
<img width="793" alt="liminal_simple_graph" src="https://github.com/user-attachments/assets/52e32cd0-3407-49f5-b100-5763bee3830c">
|
|
19
|
+
|
|
20
|
+
## Table of Contents
|
|
21
|
+
|
|
22
|
+
- [Overview](#liminal-orm)
|
|
23
|
+
- [Getting Started](#getting-started)
|
|
24
|
+
- [Installation](#installation)
|
|
25
|
+
- [Setup](#setup)
|
|
26
|
+
- [Migration](#migration)
|
|
27
|
+
- [Toolkit](#toolkit)
|
|
28
|
+
- [Community](#community)
|
|
29
|
+
- [Contributing](#contributing)
|
|
30
|
+
- [License](#license)
|
|
31
|
+
- [Acknowledgements](#acknowledgements)
|
|
32
|
+
- [Footnotes](#footnotes)
|
|
33
|
+
|
|
34
|
+
## [Getting Started](#getting-started)
|
|
35
|
+
|
|
36
|
+
Note: Liminal requires you to have (or have access to) an admin user account for your Benchling tenant. If you run into any issues, please reach out to us on the [Discussions](https://github.com/dynotx/liminal-orm/discussions/categories/q-a) forum and we'll be happy to help!
|
|
37
|
+
|
|
38
|
+
### [Installation](#installation)
|
|
39
|
+
|
|
40
|
+
via pip: `pip install liminal-orm`
|
|
41
|
+
|
|
42
|
+
via github: `python -m pip install git+https://github.com/dynotx/liminal-orm.git --ignore-installed`
|
|
43
|
+
|
|
44
|
+
### [Setup](#setup)
|
|
45
|
+
|
|
46
|
+
1. `cd` into the directory where you want to instantiate your *Liminal environment*. This will be the root directory where your schemas will live. Note: the Liminal CLI must always be run from within this root directory.
|
|
47
|
+
|
|
48
|
+
2. Run `liminal init` to initialize your Liminal project. This will create a liminal/ directory with an env.py file and a versions/ directory with an empty first revision file.
|
|
49
|
+
|
|
50
|
+
3. Populate the env.py file with your Benchling connection information, following the instructions in the file. For example:
|
|
51
|
+
|
|
52
|
+
```python
|
|
53
|
+
from liminal.connection import BenchlingConnection
|
|
54
|
+
|
|
55
|
+
PROD_CURRENT_REVISION_ID = "12b31776a755b"
|
|
56
|
+
|
|
57
|
+
# It is highly recommended to use a secrets manager to store your credentials.
|
|
58
|
+
connection = BenchlingConnection(
|
|
59
|
+
tenant_name="pizzahouse-prod",
|
|
60
|
+
tenant_alias="prod",
|
|
61
|
+
current_revision_id_var_name="PROD_CURRENT_REVISION_ID",
|
|
62
|
+
api_client_id="my-secret-api-client-id",
|
|
63
|
+
api_client_secret="my-secret-api-client-secret",
|
|
64
|
+
warehouse_connection_string="my-warehouse-connection-string",
|
|
65
|
+
internal_api_admin_email="my-secret-internal-api-admin-email",
|
|
66
|
+
internal_api_admin_password="my-secret-internal-api-admin-password",
|
|
67
|
+
)
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
4. If your Benchling tenant has pre-existing schemas, run `liminal generate-files` to populate the root directory with the schema files. Your file structure should now look like this:
|
|
71
|
+
|
|
72
|
+
```text
|
|
73
|
+
benchling/
|
|
74
|
+
liminal/
|
|
75
|
+
env.py
|
|
76
|
+
versions/
|
|
77
|
+
<revision_id>_initial_init_revision.py
|
|
78
|
+
dropdowns/
|
|
79
|
+
...
|
|
80
|
+
entity_schemas/
|
|
81
|
+
...
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
5. Add your schema imports to the env.py file. For example:
|
|
85
|
+
|
|
86
|
+
```python
|
|
87
|
+
from pizzahouse.dropdowns import *
|
|
88
|
+
from pizzahouse.entity_schemas import *
|
|
89
|
+
...
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
6. Set up is complete! You're now ready to start using your schemas defined in code as the single source of truth for your Benchling tenant(s). Refer to the [Migration](#migration) section to learn about how you make a change to your Benchling schema model. Refer to the [Toolkit](#toolkit) section to learn about the additional features the Liminal toolkit provides.
|
|
93
|
+
|
|
94
|
+
## [Migration](#migration)
|
|
95
|
+
|
|
96
|
+
This section will walk you through the process of making a change to your Benchling schema model and syncing it to your Benchling tenant(s).
|
|
97
|
+
|
|
98
|
+
1. Make a change to your Benchling schema model!
|
|
99
|
+
|
|
100
|
+
2. Run `liminal autogenerate <benchling_tenant_name> <description_of_changes>` to generate a new revision file. For example: `liminal autogenerate prod "new oven schema"`. This will create a new revision file in the `versions/` directory. This revision file defines the set of steps (or "operations") that will be needed to make the targeted Benchling tenant up to date with the changes made in the schema model.
|
|
101
|
+
|
|
102
|
+
If I have multiple Benchling tenants, do I have to run `autogenerate` for each tenant?
|
|
103
|
+
|
|
104
|
+
No, Liminal only keeps a single thread of revision history that are linked together for easy upgrade/downgrade. In the case of multiple tenants that need to stay in sync together, we recommend pointing `autogenerate` at your production tenant, or the tenant that acts as the production environment. When ready, you can then apply the revision to all your tenants.
|
|
105
|
+
|
|
106
|
+
3. Review the generated revision file and set of operations to ensure that it is accurate.
|
|
107
|
+
|
|
108
|
+
4. Run `liminal upgrade <benchling_tenant_name> <upgrade_descriptor>` to migrate your Benchling tenant(s) to the new schema. For example: `liminal upgrade prod head`. This will apply the revision to the targeted Benchling tenant. For example: `liminal upgrade prod head` will apply the revision to the production tenant.
|
|
109
|
+
|
|
110
|
+
5. Check out your changes on your Benchling tenant(s)!
|
|
111
|
+
|
|
112
|
+
## [Toolkit](#toolkit)
|
|
113
|
+
|
|
114
|
+
With your schemas defined in code, you can now take advantage of the additional capabilities that the Liminal toolkit provides.
|
|
115
|
+
|
|
116
|
+
1. Entity validation: Easily create custom validation rules for your Benchling entities.
|
|
117
|
+
|
|
118
|
+
```python
|
|
119
|
+
from dyno.liminal.orm.base_model import BaseModel
|
|
120
|
+
from dyno.liminal.orm.mixins import CustomEntityMixin
|
|
121
|
+
|
|
122
|
+
class Pizza(BaseModel, CustomEntityMixin):
|
|
123
|
+
...
|
|
124
|
+
|
|
125
|
+
@validator(BenchlingReportLevel.HIGH)
|
|
126
|
+
def cook_temp_time(self):
|
|
127
|
+
if self.cook_time is not None and self.cook_temp is None:
|
|
128
|
+
raise ValueError("Cook temp is required if cook time is set")
|
|
129
|
+
if self.cook_time is None and self.cook_temp is not None:
|
|
130
|
+
raise ValueError("Cook time is required if cook temp is set")
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
2. Strongly typed queries: Write type-safe queries using SQLAlchemy to access your Benchling entities.
|
|
134
|
+
|
|
135
|
+
```python
|
|
136
|
+
with BenchlingSession(benchling_connection, with_db=True) as session:
|
|
137
|
+
pizza = session.query(Pizza).filter(Pizza.name == "Margherita").first()
|
|
138
|
+
print(pizza)
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
3. CI/CD integration: Use Liminal to automatically generate and apply your revision files to your Benchling tenant(s) as part of your CI/CD pipeline.
|
|
142
|
+
|
|
143
|
+
4. And more to come!
|
|
144
|
+
|
|
145
|
+
## [Community](#community)
|
|
146
|
+
|
|
147
|
+
We're excited to hear from you! Feel free to introduce yourself on the [Liminal GitHub Discussions page](https://github.com/dynotx/liminal-orm/discussions/categories/intros)
|
|
148
|
+
|
|
149
|
+
Please refer to [CODE_OF_CONDUCT.md](./CODE_OF_CONDUCT.md) to learn more about how to interact with the community.
|
|
150
|
+
|
|
151
|
+
Please refer to [GOVERNANCE.md](./GOVERNANCE.md) to learn more about the project's governance structure.
|
|
152
|
+
|
|
153
|
+
## [Contributing](#contributing)
|
|
154
|
+
|
|
155
|
+
Contributions of any kind are welcome and encouraged! This ranges from feedback and feature requests all the way to code contributions.
|
|
156
|
+
Please refer to [CONTRIBUTING.md](./CONTRIBUTING.md) to learn how to contribute to Liminal!
|
|
157
|
+
|
|
158
|
+
## [License](#license)
|
|
159
|
+
|
|
160
|
+
Liminal ORM is distributed under the [Apache License, Version 2.0](./LICENSE.md).
|
|
161
|
+
|
|
162
|
+
## [Acknowledgements](#acknowledgements)
|
|
163
|
+
|
|
164
|
+
This project could not have been started without the support of Dyno Therapeutics and the help of the following people.
|
|
165
|
+
|
|
166
|
+
- [Steve Northup](https://github.com/steve-dyno): For being an incredibly supportive manager and mentor, making key technical contributions, and providing guidance on the project's direction.
|
|
167
|
+
- [Joyce Samson](https://github.com/samsonjoyce): For being Liminal's first power user at Dyno Therapeutics, providing valuable feedback that informed the project's direction, and coming up with Liminal's name.
|
|
168
|
+
- [David Levy-Booth](https://github.com/davidlevybooth): For providing leadership and guidance on releasing this as an open source software.
|
|
169
|
+
- The rest of the Dyno team...
|
|
170
|
+
|
|
171
|
+
## [Footnotes](#footnotes)
|
|
172
|
+
|
|
173
|
+
ORM<sup>1</sup>: Object-Relational Mapper. An ORM is a piece of software designed to translate between the data representations used by databases and those used in object-oriented programming. In this case, Liminal provides an ORM layer built specifically for Benchling that allows for users to quickly and easily define Benchling entities in code. [SQLAlchemy](https://github.com/sqlalchemy/sqlalchemy) is the underlying ORM that Liminal uses to interact with your Benchling tenant(s) and is an open-source software that is an industry standard software.
|
|
174
|
+
|
|
175
|
+
LIMS<sup>2</sup>: Laboratory Information Management System. A LIMS is a piece of software that allows you to effectively manage samples and associated data. [Benchling](https://www.benchling.com/) is an industry-leading LIMS software.
|
|
176
|
+
|
|
177
|
+
CLI<sup>3</sup>: Command Line Interface. A CLI is a piece of software that allows you to interact with a software program via the command line. Liminal provides a CLI that allows you to interact with your Liminal environment. This project uses [Typer](https://github.com/fastapi/typer) to construct the CLI
|
|
File without changes
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
from abc import ABC
|
|
2
|
+
from typing import Any
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
class BaseDropdown(ABC):
|
|
6
|
+
__benchling_name__: str
|
|
7
|
+
__allowed_values__: list[str]
|
|
8
|
+
|
|
9
|
+
_existing_benchling_names: set[str] = set()
|
|
10
|
+
|
|
11
|
+
def __new__(cls, **kwargs: Any) -> "BaseDropdown":
|
|
12
|
+
if not hasattr(cls, "__allowed_values__"):
|
|
13
|
+
raise ValueError(f"{cls.__name__} must define __allowed_values__")
|
|
14
|
+
if not hasattr(cls, "__benchling_name__") or not cls.__benchling_name__:
|
|
15
|
+
raise ValueError(f"{cls.__name__} must define __benchling_name__")
|
|
16
|
+
if len(cls.__allowed_values__) != len(set(cls.__allowed_values__)):
|
|
17
|
+
raise ValueError(
|
|
18
|
+
f"{cls.__name__} must have unique values in __allowed_values__"
|
|
19
|
+
)
|
|
20
|
+
|
|
21
|
+
if cls.__benchling_name__ in cls._existing_benchling_names:
|
|
22
|
+
raise ValueError(
|
|
23
|
+
f"{cls.__benchling_name__} is already used as a benchling name."
|
|
24
|
+
)
|
|
25
|
+
cls._existing_benchling_names.add(cls.__benchling_name__)
|
|
26
|
+
return super().__new__(cls, **kwargs)
|
|
27
|
+
|
|
28
|
+
@classmethod
|
|
29
|
+
def validate(cls, *values: str | None) -> None:
|
|
30
|
+
err_values = []
|
|
31
|
+
for value in values:
|
|
32
|
+
if value and value not in cls.__allowed_values__:
|
|
33
|
+
err_values.append(value)
|
|
34
|
+
if len(err_values) > 0:
|
|
35
|
+
raise ValueError(
|
|
36
|
+
f"{', '.join(err_values)} are not valid {cls.__benchling_name__} dropdown values."
|
|
37
|
+
)
|
|
38
|
+
|
|
39
|
+
@classmethod
|
|
40
|
+
def get_all_subclasses(
|
|
41
|
+
cls, names: set[str] | None = None
|
|
42
|
+
) -> list[type["BaseDropdown"]]:
|
|
43
|
+
if names is None:
|
|
44
|
+
return cls.__subclasses__()
|
|
45
|
+
dropdowns = {
|
|
46
|
+
name: subclass
|
|
47
|
+
for subclass in cls.__subclasses__()
|
|
48
|
+
for name in names
|
|
49
|
+
if name in (subclass.__name__, subclass.__benchling_name__)
|
|
50
|
+
}
|
|
51
|
+
if len(dropdowns.keys()) != len(set(names)):
|
|
52
|
+
missing_dropdowns = set(names) - set(dropdowns.keys())
|
|
53
|
+
raise ValueError(
|
|
54
|
+
f"No dropdown subclass found for the following class names or warehouse names: {', '.join(missing_dropdowns)}"
|
|
55
|
+
)
|
|
56
|
+
return list(dropdowns.values())
|