pybiolib 1.2.856__py3-none-any.whl → 1.2.869__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.
- biolib/cli/init.py +12 -4
- {pybiolib-1.2.856.dist-info → pybiolib-1.2.869.dist-info}/METADATA +1 -1
- {pybiolib-1.2.856.dist-info → pybiolib-1.2.869.dist-info}/RECORD +6 -6
- {pybiolib-1.2.856.dist-info → pybiolib-1.2.869.dist-info}/LICENSE +0 -0
- {pybiolib-1.2.856.dist-info → pybiolib-1.2.869.dist-info}/WHEEL +0 -0
- {pybiolib-1.2.856.dist-info → pybiolib-1.2.869.dist-info}/entry_points.txt +0 -0
biolib/cli/init.py
CHANGED
@@ -26,6 +26,7 @@ def init() -> None:
|
|
26
26
|
|
27
27
|
template_dir = templates.init_template()
|
28
28
|
conflicting_files = []
|
29
|
+
files_to_overwrite = set()
|
29
30
|
|
30
31
|
try:
|
31
32
|
# First pass: check for conflicts
|
@@ -40,11 +41,17 @@ def init() -> None:
|
|
40
41
|
with open(source_file, 'rb') as fsrc, open(destination_file, 'rb') as fdest:
|
41
42
|
if fsrc.read() != fdest.read():
|
42
43
|
conflicting_files.append(os.path.relpath(destination_file, cwd))
|
44
|
+
|
43
45
|
if conflicting_files:
|
44
|
-
print('The following files
|
46
|
+
print('The following files already exist and would be overwritten:')
|
47
|
+
for conflicting_file in conflicting_files:
|
48
|
+
print(f' {conflicting_file}')
|
49
|
+
print()
|
50
|
+
|
45
51
|
for conflicting_file in conflicting_files:
|
46
|
-
|
47
|
-
|
52
|
+
choice = input(f'Overwrite {conflicting_file}? [y/N]: ').lower().strip()
|
53
|
+
if choice in ['y', 'yes']:
|
54
|
+
files_to_overwrite.add(conflicting_file)
|
48
55
|
|
49
56
|
replace_app_uri = app_uri if app_uri else 'PUT_APP_URI_HERE'
|
50
57
|
|
@@ -61,8 +68,9 @@ def init() -> None:
|
|
61
68
|
|
62
69
|
source_file = os.path.join(root, filename)
|
63
70
|
destination_file = os.path.join(destination_dir, filename)
|
71
|
+
relative_file_path = os.path.relpath(destination_file, cwd)
|
64
72
|
|
65
|
-
if not os.path.exists(destination_file):
|
73
|
+
if not os.path.exists(destination_file) or relative_file_path in files_to_overwrite:
|
66
74
|
try:
|
67
75
|
with open(source_file) as f:
|
68
76
|
content = f.read()
|
@@ -83,7 +83,7 @@ biolib/cli/__init__.py,sha256=IHC2bEyA27pvgp-18SGfFVJOP456elanz7suDP8D084,1316
|
|
83
83
|
biolib/cli/auth.py,sha256=rpWGmXs6Fz6CGrO9K8ibPRszOdXG78Vig_boKaVCD9A,2082
|
84
84
|
biolib/cli/data_record.py,sha256=t8DfJK2EZ_SNZ9drDA_N5Jqy8DNwf9f5SlFrIaOvtv0,3501
|
85
85
|
biolib/cli/download_container.py,sha256=HIZVHOPmslGE5M2Dsp9r2cCkAEJx__vcsDz5Wt5LRos,483
|
86
|
-
biolib/cli/init.py,sha256=
|
86
|
+
biolib/cli/init.py,sha256=_dhnKdlRMy2oSNRRsXdjFKVzayy2aiRQkeF948VCCkg,4438
|
87
87
|
biolib/cli/lfs.py,sha256=z2qHUwink85mv9yDgifbVKkVwuyknGhMDTfly_gLKJM,4151
|
88
88
|
biolib/cli/push.py,sha256=pSFEUQkQ69M__eR1nIT9ejW4V4_MtX3lb8ydEc1uKiM,1484
|
89
89
|
biolib/cli/run.py,sha256=MCo0ZqW2pHBxOoCI3i5gAx5D0auW9fmxHqkAF4TRhms,2134
|
@@ -140,8 +140,8 @@ biolib/utils/cache_state.py,sha256=u256F37QSRIVwqKlbnCyzAX4EMI-kl6Dwu6qwj-Qmag,3
|
|
140
140
|
biolib/utils/multipart_uploader.py,sha256=XvGP1I8tQuKhAH-QugPRoEsCi9qvbRk-DVBs5PNwwJo,8452
|
141
141
|
biolib/utils/seq_util.py,sha256=Ozk0blGtPur_D9MwShD02r_mphyQmgZkx-lOHOwnlIM,6730
|
142
142
|
biolib/utils/zip/remote_zip.py,sha256=0wErYlxir5921agfFeV1xVjf29l9VNgGQvNlWOlj2Yc,23232
|
143
|
-
pybiolib-1.2.
|
144
|
-
pybiolib-1.2.
|
145
|
-
pybiolib-1.2.
|
146
|
-
pybiolib-1.2.
|
147
|
-
pybiolib-1.2.
|
143
|
+
pybiolib-1.2.869.dist-info/LICENSE,sha256=F2h7gf8i0agDIeWoBPXDMYScvQOz02pAWkKhTGOHaaw,1067
|
144
|
+
pybiolib-1.2.869.dist-info/METADATA,sha256=cKOLYxkyG6H3jabOiGGTUNZsKDU-UL3SdxoddPJxt1E,1570
|
145
|
+
pybiolib-1.2.869.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
|
146
|
+
pybiolib-1.2.869.dist-info/entry_points.txt,sha256=p6DyaP_2kctxegTX23WBznnrDi4mz6gx04O5uKtRDXg,42
|
147
|
+
pybiolib-1.2.869.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|