labkey 3.1.0__py3-none-any.whl → 3.2.0__py3-none-any.whl
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.
- labkey/__init__.py +1 -1
- labkey/experiment.py +94 -0
- {labkey-3.1.0.dist-info → labkey-3.2.0.dist-info}/METADATA +12 -1
- {labkey-3.1.0.dist-info → labkey-3.2.0.dist-info}/RECORD +7 -7
- {labkey-3.1.0.dist-info → labkey-3.2.0.dist-info}/WHEEL +1 -1
- {labkey-3.1.0.dist-info → labkey-3.2.0.dist-info}/LICENSE.txt +0 -0
- {labkey-3.1.0.dist-info → labkey-3.2.0.dist-info}/top_level.txt +0 -0
labkey/__init__.py
CHANGED
labkey/experiment.py
CHANGED
@@ -218,6 +218,70 @@ def save_batches(
|
|
218
218
|
return None
|
219
219
|
|
220
220
|
|
221
|
+
def lineage(
|
222
|
+
server_context: ServerContext,
|
223
|
+
lsids: List[str],
|
224
|
+
children: bool = None,
|
225
|
+
container_path: str = None,
|
226
|
+
cpas_type: str = None,
|
227
|
+
depth: int = None,
|
228
|
+
exp_type: str = None,
|
229
|
+
include_inputs_and_outputs: bool = None,
|
230
|
+
include_properties: bool = None,
|
231
|
+
include_run_steps: bool = None,
|
232
|
+
parents: bool = None,
|
233
|
+
run_protocol_lsid: str = None,
|
234
|
+
):
|
235
|
+
"""
|
236
|
+
:param server_context: A LabKey server context. See utils.create_server_context.
|
237
|
+
:param lsids: Array of LSIDs for the seed ExpData, ExpMaterials, or ExpRun
|
238
|
+
:param children: Include children in the lineage response. Defaults to true.
|
239
|
+
:param container_path: labkey container path if not already set in context
|
240
|
+
:param cpas_type: Optional LSID of a SampleSet or DataClass to filter the response. Defaults to include all.
|
241
|
+
:param depth: An optional depth argument. Defaults to include all.
|
242
|
+
:param exp_type: Optional experiment type to filter response -- either "Data", "Material", or "ExperimentRun".
|
243
|
+
Defaults to include all.
|
244
|
+
:param include_inputs_and_outputs: Include inputs and outputs in the lineage response.
|
245
|
+
:param include_properties: Include properties in the lineage response.
|
246
|
+
:param include_run_steps: Include run steps in the lineage response.
|
247
|
+
:param parents: Include parents in the lineage response. Defaults to true.
|
248
|
+
:param run_protocol_lsid: Optional Exp Run Protocol Lsid to filter response. Defaults to include all.
|
249
|
+
"""
|
250
|
+
lineage_url = server_context.build_url(
|
251
|
+
"experiment", "lineage.api", container_path=container_path
|
252
|
+
)
|
253
|
+
payload = {"lsids": lsids}
|
254
|
+
|
255
|
+
if children is not None:
|
256
|
+
payload["children"] = children
|
257
|
+
|
258
|
+
if cpas_type is not None:
|
259
|
+
payload["cpasType"] = cpas_type
|
260
|
+
|
261
|
+
if depth is not None:
|
262
|
+
payload["depth"] = depth
|
263
|
+
|
264
|
+
if exp_type is not None:
|
265
|
+
payload["expType"] = exp_type
|
266
|
+
|
267
|
+
if include_inputs_and_outputs is not None:
|
268
|
+
payload["includeInputsAndOutputs"] = include_inputs_and_outputs
|
269
|
+
|
270
|
+
if include_properties is not None:
|
271
|
+
payload["includeProperties"] = include_properties
|
272
|
+
|
273
|
+
if include_run_steps is not None:
|
274
|
+
payload["includeRunSteps"] = include_run_steps
|
275
|
+
|
276
|
+
if parents is not None:
|
277
|
+
payload["parents"] = parents
|
278
|
+
|
279
|
+
if run_protocol_lsid is not None:
|
280
|
+
payload["runProtocolLsid"] = run_protocol_lsid
|
281
|
+
|
282
|
+
return server_context.make_request(lineage_url, payload=payload, method="POST")
|
283
|
+
|
284
|
+
|
221
285
|
class ExperimentWrapper:
|
222
286
|
"""
|
223
287
|
Wrapper for all of the API methods exposed in the experiment module. Used by the APIWrapper class.
|
@@ -237,3 +301,33 @@ class ExperimentWrapper:
|
|
237
301
|
@functools.wraps(save_batches)
|
238
302
|
def save_batches(self, assay_id: int, batches: List[Batch]) -> Optional[List[Batch]]:
|
239
303
|
return save_batches(self.server_context, assay_id, batches)
|
304
|
+
|
305
|
+
@functools.wraps(lineage)
|
306
|
+
def lineage(
|
307
|
+
self,
|
308
|
+
lsids: List[str],
|
309
|
+
children: bool = None,
|
310
|
+
container_path: str = None,
|
311
|
+
cpas_type: str = None,
|
312
|
+
exp_type: str = None,
|
313
|
+
depth: int = None,
|
314
|
+
include_properties: bool = None,
|
315
|
+
include_inputs_and_outputs: bool = None,
|
316
|
+
include_run_steps: bool = None,
|
317
|
+
parents: bool = None,
|
318
|
+
run_protocol_lsid: str = None,
|
319
|
+
):
|
320
|
+
return lineage(
|
321
|
+
self.server_context,
|
322
|
+
lsids,
|
323
|
+
children,
|
324
|
+
container_path,
|
325
|
+
cpas_type,
|
326
|
+
depth,
|
327
|
+
exp_type,
|
328
|
+
parents,
|
329
|
+
include_inputs_and_outputs,
|
330
|
+
include_properties,
|
331
|
+
include_run_steps,
|
332
|
+
run_protocol_lsid,
|
333
|
+
)
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: labkey
|
3
|
-
Version: 3.
|
3
|
+
Version: 3.2.0
|
4
4
|
Summary: Python client API for LabKey Server
|
5
5
|
Home-page: https://github.com/LabKey/labkey-api-python
|
6
6
|
Author: LabKey
|
@@ -21,6 +21,17 @@ Classifier: Programming Language :: Python :: 3
|
|
21
21
|
Classifier: Topic :: Scientific/Engineering
|
22
22
|
License-File: LICENSE.txt
|
23
23
|
Requires-Dist: requests
|
24
|
+
Provides-Extra: build
|
25
|
+
Requires-Dist: setuptools ; extra == 'build'
|
26
|
+
Requires-Dist: build ; extra == 'build'
|
27
|
+
Requires-Dist: twine ; extra == 'build'
|
28
|
+
Requires-Dist: wheel ; extra == 'build'
|
29
|
+
Provides-Extra: dev
|
30
|
+
Requires-Dist: pytest ; extra == 'dev'
|
31
|
+
Requires-Dist: requests ; extra == 'dev'
|
32
|
+
Requires-Dist: mock ; extra == 'dev'
|
33
|
+
Requires-Dist: pytest-cov ; extra == 'dev'
|
34
|
+
Requires-Dist: black ; extra == 'dev'
|
24
35
|
Provides-Extra: test
|
25
36
|
Requires-Dist: pytest ; extra == 'test'
|
26
37
|
Requires-Dist: requests ; extra == 'test'
|
@@ -1,16 +1,16 @@
|
|
1
|
-
labkey/__init__.py,sha256=
|
1
|
+
labkey/__init__.py,sha256=BxplFb91voofYbNkCpovsh5LfOdvBLWqCmHPjhy2Lj0,695
|
2
2
|
labkey/api_wrapper.py,sha256=OxnV6_5jONWiwsi24TOXTKP5inXtAfABGqXAPua3eCM,1427
|
3
3
|
labkey/container.py,sha256=DXmLhGsNnN_QLXa_tMCM0Xf_Kkz7B8KjRFhJT5I4FtY,5497
|
4
4
|
labkey/domain.py,sha256=SABG7BfSqQGJr8DPjUsvhi8C7xP2MTpkq24sdtAu4J8,22486
|
5
5
|
labkey/exceptions.py,sha256=00x-4oP_2d0SfZKxsGIs8QGvXiNq2y7C5hAzuzT3Gkk,3619
|
6
|
-
labkey/experiment.py,sha256=
|
6
|
+
labkey/experiment.py,sha256=6U4BXnYHNXCUF_mee0maK_CZDVm_lbMjC82ywx9YCTE,12062
|
7
7
|
labkey/query.py,sha256=w6vYDwiwnLalrDQ8pGY-c9DvoPQuMXaFXnZLRUiezuk,24041
|
8
8
|
labkey/security.py,sha256=eMa2b_22FWB2rVvVpxTeWrK0VgGTszhRchsApbDR6sA,15306
|
9
9
|
labkey/server_context.py,sha256=0YcA7BRijLMs172qTrTB12MlnIcqz4X9dkkCwSxxzaA,7741
|
10
10
|
labkey/storage.py,sha256=WpgpTWQzgig_qJXMGszFcFjtf8oMd2-6TBehSkpJPUg,6144
|
11
11
|
labkey/utils.py,sha256=oL6qmHkpzLTm_9c7gSEzumv_MVh5s8fj6bOrbuslrV0,3233
|
12
|
-
labkey-3.
|
13
|
-
labkey-3.
|
14
|
-
labkey-3.
|
15
|
-
labkey-3.
|
16
|
-
labkey-3.
|
12
|
+
labkey-3.2.0.dist-info/LICENSE.txt,sha256=xllut76FgcGL5zbIRvuRc7aezPbvlMUTWJPsVr2Sugg,11358
|
13
|
+
labkey-3.2.0.dist-info/METADATA,sha256=0xOPpsSbHkT9ow_bUQeILdYVPAcFIwmr_KG1tlHHbxQ,1481
|
14
|
+
labkey-3.2.0.dist-info/WHEEL,sha256=cVxcB9AmuTcXqmwrtPhNK88dr7IR_b6qagTj0UvIEbY,91
|
15
|
+
labkey-3.2.0.dist-info/top_level.txt,sha256=DQIk1fQNg7NxxBsEt_K7k-aopiH87jmnU98zwDp0n04,7
|
16
|
+
labkey-3.2.0.dist-info/RECORD,,
|
File without changes
|
File without changes
|