sl-shared-assets 4.0.1__py3-none-any.whl → 5.0.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.
Potentially problematic release.
This version of sl-shared-assets might be problematic. Click here for more details.
- sl_shared_assets/__init__.py +45 -42
- sl_shared_assets/command_line_interfaces/__init__.py +3 -0
- sl_shared_assets/command_line_interfaces/configure.py +173 -0
- sl_shared_assets/command_line_interfaces/manage.py +226 -0
- sl_shared_assets/data_classes/__init__.py +33 -32
- sl_shared_assets/data_classes/configuration_data.py +267 -79
- sl_shared_assets/data_classes/session_data.py +226 -289
- sl_shared_assets/server/__init__.py +24 -4
- sl_shared_assets/server/job.py +6 -7
- sl_shared_assets/server/pipeline.py +570 -0
- sl_shared_assets/server/server.py +57 -25
- sl_shared_assets/tools/__init__.py +9 -8
- sl_shared_assets/tools/packaging_tools.py +14 -25
- sl_shared_assets/tools/project_management_tools.py +602 -523
- sl_shared_assets/tools/transfer_tools.py +88 -23
- {sl_shared_assets-4.0.1.dist-info → sl_shared_assets-5.0.0.dist-info}/METADATA +46 -203
- sl_shared_assets-5.0.0.dist-info/RECORD +23 -0
- sl_shared_assets-5.0.0.dist-info/entry_points.txt +3 -0
- sl_shared_assets/__init__.pyi +0 -91
- sl_shared_assets/cli.py +0 -501
- sl_shared_assets/cli.pyi +0 -106
- sl_shared_assets/data_classes/__init__.pyi +0 -75
- sl_shared_assets/data_classes/configuration_data.pyi +0 -235
- sl_shared_assets/data_classes/runtime_data.pyi +0 -157
- sl_shared_assets/data_classes/session_data.pyi +0 -379
- sl_shared_assets/data_classes/surgery_data.pyi +0 -89
- sl_shared_assets/server/__init__.pyi +0 -11
- sl_shared_assets/server/job.pyi +0 -205
- sl_shared_assets/server/server.pyi +0 -298
- sl_shared_assets/tools/__init__.pyi +0 -19
- sl_shared_assets/tools/ascension_tools.py +0 -265
- sl_shared_assets/tools/ascension_tools.pyi +0 -68
- sl_shared_assets/tools/packaging_tools.pyi +0 -58
- sl_shared_assets/tools/project_management_tools.pyi +0 -239
- sl_shared_assets/tools/transfer_tools.pyi +0 -53
- sl_shared_assets-4.0.1.dist-info/RECORD +0 -36
- sl_shared_assets-4.0.1.dist-info/entry_points.txt +0 -7
- {sl_shared_assets-4.0.1.dist-info → sl_shared_assets-5.0.0.dist-info}/WHEEL +0 -0
- {sl_shared_assets-4.0.1.dist-info → sl_shared_assets-5.0.0.dist-info}/licenses/LICENSE +0 -0
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
from pathlib import Path
|
|
2
|
-
|
|
3
|
-
from .packaging_tools import calculate_directory_checksum as calculate_directory_checksum
|
|
4
|
-
|
|
5
|
-
def _transfer_file(source_file: Path, source_directory: Path, destination_directory: Path) -> None:
|
|
6
|
-
"""Copies the input file from the source directory to the destination directory while preserving the file metadata.
|
|
7
|
-
|
|
8
|
-
This is a worker method used by the transfer_directory() method to move multiple files in parallel.
|
|
9
|
-
|
|
10
|
-
Notes:
|
|
11
|
-
If the file is found under a hierarchy of subdirectories inside the input source_directory, that hierarchy will
|
|
12
|
-
be preserved in the destination directory.
|
|
13
|
-
|
|
14
|
-
Args:
|
|
15
|
-
source_file: The file to be copied.
|
|
16
|
-
source_directory: The root directory where the file is located.
|
|
17
|
-
destination_directory: The destination directory where to move the file.
|
|
18
|
-
"""
|
|
19
|
-
|
|
20
|
-
def transfer_directory(source: Path, destination: Path, num_threads: int = 1, verify_integrity: bool = True) -> None:
|
|
21
|
-
"""Copies the contents of the input directory tree from source to destination while preserving the folder
|
|
22
|
-
structure.
|
|
23
|
-
|
|
24
|
-
This function is used to assemble the experimental data from all remote machines used in the acquisition process on
|
|
25
|
-
the VRPC before the data is preprocessed. It is also used to transfer the preprocessed data from the VRPC to the
|
|
26
|
-
SynologyNAS and the Sun lab BioHPC server.
|
|
27
|
-
|
|
28
|
-
Notes:
|
|
29
|
-
This method recreates the moved directory hierarchy on the destination if the hierarchy does not exist. This is
|
|
30
|
-
done before copying the files.
|
|
31
|
-
|
|
32
|
-
The method executes a multithreading copy operation. It does not clean up the source files. That job is handed
|
|
33
|
-
to the specific preprocessing function from the sl_experiment or sl-forgery libraries that call this function.
|
|
34
|
-
|
|
35
|
-
If the method is configured to verify transferred file integrity, it reruns the xxHash3-128 checksum calculation
|
|
36
|
-
and compares the returned checksum to the one stored in the source directory. The method assumes that all input
|
|
37
|
-
directories contain the 'ax_checksum.txt' file that stores the 'source' directory checksum at the highest level
|
|
38
|
-
of the input directory tree.
|
|
39
|
-
|
|
40
|
-
Args:
|
|
41
|
-
source: The path to the directory that needs to be moved.
|
|
42
|
-
destination: The path to the destination directory where to move the contents of the source directory.
|
|
43
|
-
num_threads: The number of threads to use for parallel file transfer. This number should be set depending on the
|
|
44
|
-
type of transfer (local or remote) and is not guaranteed to provide improved transfer performance. For local
|
|
45
|
-
transfers, setting this number above 1 will likely provide a performance boost. For remote transfers using
|
|
46
|
-
a single TCP / IP socket (such as non-multichannel SMB protocol), the number should be set to 1.
|
|
47
|
-
verify_integrity: Determines whether to perform integrity verification for the transferred files. Note,
|
|
48
|
-
integrity verification is a time-consuming process and generally would not be a concern for most runtimes.
|
|
49
|
-
Therefore, it is often fine to disable this option to optimize method runtime speed.
|
|
50
|
-
|
|
51
|
-
Raises:
|
|
52
|
-
RuntimeError: If the transferred files do not pass the xxHas3-128 checksum integrity verification.
|
|
53
|
-
"""
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
sl_shared_assets/__init__.py,sha256=h4QBqUSvHTDYo9xJgfSzVwIRmH5RJEKgNPA0Hoy274Q,2611
|
|
2
|
-
sl_shared_assets/__init__.pyi,sha256=rFWG-cUSrwlNyaxMX0LGR42WS4YE_Q5-PzPiYuum6V0,2996
|
|
3
|
-
sl_shared_assets/cli.py,sha256=pUebcXDlG47CAQnCGFSNBEKdpzeD8_zDRwg74LDkc04,19842
|
|
4
|
-
sl_shared_assets/cli.pyi,sha256=_jErcrfdWROiZJm4QnZGQC85bw5FWKvs0LIwm3bR6nI,5408
|
|
5
|
-
sl_shared_assets/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
6
|
-
sl_shared_assets/data_classes/__init__.py,sha256=BSWFbTavTAHZx1ss1EgNr16an9iUz5HDOq617HpVXNE,2143
|
|
7
|
-
sl_shared_assets/data_classes/__init__.pyi,sha256=IgdbnAxhPGNmwjStwEZspvdBxm2aP67gX6eLlT_f8Ew,2463
|
|
8
|
-
sl_shared_assets/data_classes/configuration_data.py,sha256=bmD9bICgRtsM2P1wSInUfjlmaT2ZjiOwPlo87EkYt8U,36361
|
|
9
|
-
sl_shared_assets/data_classes/configuration_data.pyi,sha256=1_kmBDPGkHmVwXEGYR_3uERBSsenQOTuquMBtjKVTA8,11068
|
|
10
|
-
sl_shared_assets/data_classes/runtime_data.py,sha256=ruo5KZ1VSfGwSg_gtSyWTbLBFcfG7Az455cKxiUpDoc,17565
|
|
11
|
-
sl_shared_assets/data_classes/runtime_data.pyi,sha256=kCVSpS69goF-MRCZtp7EnoruTye64rjKsdPoDiC0PjU,6942
|
|
12
|
-
sl_shared_assets/data_classes/session_data.py,sha256=MuzKQYILXJVCCNHzkLq9yrGAin4yj3bbiW4q8P0jmMk,51106
|
|
13
|
-
sl_shared_assets/data_classes/session_data.pyi,sha256=KTQr0OXfeOk8eaUOsXW2-2UYjIjWcZSoW7Hv69l6JW0,20653
|
|
14
|
-
sl_shared_assets/data_classes/surgery_data.py,sha256=riwyULMdZ8pDXFLdyNByNSeMk1-mVTo1FcCl5FrThas,7495
|
|
15
|
-
sl_shared_assets/data_classes/surgery_data.pyi,sha256=3ILU5H_BUXEE9YXgPdVMC10jxivixPlJILBMg7OdEwc,2615
|
|
16
|
-
sl_shared_assets/server/__init__.py,sha256=GOQ7wWjiS5Xg_WgTqeEqCTRF9ms9GXx0nffCr-BmKsA,453
|
|
17
|
-
sl_shared_assets/server/__init__.pyi,sha256=Zc12G90fZdgEMwaVZbFzrRVV1wH_LEj3sxaV3lhk1Cw,316
|
|
18
|
-
sl_shared_assets/server/job.py,sha256=wZbppMrv6fqch79bKLjOGQ9AYfjiDKDnTyUe7xgAT44,19461
|
|
19
|
-
sl_shared_assets/server/job.pyi,sha256=wop4ulVY2u6eb3twajeA9MS0EAtNb89aA56pPoGF1Xc,11673
|
|
20
|
-
sl_shared_assets/server/server.py,sha256=EpJEBY8660QoG8kGb4TmIZLXZEjBrGEVSLJ7G14y6kk,34770
|
|
21
|
-
sl_shared_assets/server/server.pyi,sha256=K42zwzaZk13LH964fex3sK2kCL_Ulis_GualZkZG-NA,15828
|
|
22
|
-
sl_shared_assets/tools/__init__.py,sha256=i-oUVw_un3lzyyII4Sc75s4BnUfZh_aUbQe6dP2Vrbc,743
|
|
23
|
-
sl_shared_assets/tools/__init__.pyi,sha256=pi-5AJyQYeuqIFGWpJ_HhUpXLq6P_nItIqDhsdaIJFU,686
|
|
24
|
-
sl_shared_assets/tools/ascension_tools.py,sha256=xI-hrkR9NIgb7lyhj-ntc8tCYQvDEv6YgYJXl1yvxCs,14639
|
|
25
|
-
sl_shared_assets/tools/ascension_tools.pyi,sha256=fs5j7nbnZ4WpgK8D75A7WJcvFMwK_MUO9ULIYo1YkGo,3739
|
|
26
|
-
sl_shared_assets/tools/packaging_tools.py,sha256=TeYcP8-ykA1gSwnu4jCrvzQR8FY1Ki6sn1kY1pCvtYg,7462
|
|
27
|
-
sl_shared_assets/tools/packaging_tools.pyi,sha256=u_oDZF44lZrzhU56Pomny_UWq2qN93UC8jcMFnRO9wQ,3183
|
|
28
|
-
sl_shared_assets/tools/project_management_tools.py,sha256=9A133D38BkvRX_tXGS5-o6y9YAH_TI3H_oPCZqw91Zc,39599
|
|
29
|
-
sl_shared_assets/tools/project_management_tools.pyi,sha256=NwmqHwSC0uu8vxtHDA7BTv1dneibj7MErE4XHeGRQTI,13251
|
|
30
|
-
sl_shared_assets/tools/transfer_tools.py,sha256=vqYO4sERZV0W1DFNFnTpJA6QBZ4QJA94a2TyUhZW2Qk,6605
|
|
31
|
-
sl_shared_assets/tools/transfer_tools.pyi,sha256=WtUGfaKV9FP_CnhBg_UvclpuDvOlEESOSMlEDtWpOLg,3293
|
|
32
|
-
sl_shared_assets-4.0.1.dist-info/METADATA,sha256=KzF2ukjsxK_Sef1sUbSBLeR_7mzvLaPkN9zr4kgheRw,56941
|
|
33
|
-
sl_shared_assets-4.0.1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
34
|
-
sl_shared_assets-4.0.1.dist-info/entry_points.txt,sha256=UmO1rl7ly9N7HWPwWyP9E0b5KBUStpBo4TRoqNtizDY,430
|
|
35
|
-
sl_shared_assets-4.0.1.dist-info/licenses/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
|
|
36
|
-
sl_shared_assets-4.0.1.dist-info/RECORD,,
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
[console_scripts]
|
|
2
|
-
sl-ascend-tyche = sl_shared_assets.cli:ascend_tyche_directory
|
|
3
|
-
sl-create-server-credentials = sl_shared_assets.cli:generate_server_credentials_file
|
|
4
|
-
sl-dataset-marker = sl_shared_assets.cli:resolve_dataset_marker
|
|
5
|
-
sl-project-manifest = sl_shared_assets.cli:generate_project_manifest_file
|
|
6
|
-
sl-start-jupyter = sl_shared_assets.cli:start_jupyter_server
|
|
7
|
-
sl-verify-session = sl_shared_assets.cli:verify_session_integrity
|
|
File without changes
|
|
File without changes
|