Skip to content

Commit 22f34b6

Browse files
committed
dev(lib): fetch recent ZP lib for building last fix. Some messages during upload.
1 parent 27cc7bd commit 22f34b6

2 files changed

Lines changed: 7 additions & 2 deletions

File tree

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ pymongo==4.15.1
1515
# pillow==11.3.0 # PIL, in ZooProcess-lib
1616
pyjwt==2.10.1 # For JWT token validation
1717
sqlalchemy==2.0.43 # ORM for database operations
18-
ZooProcess-lib @ https://github.com/ecotaxa/ZooProcess-lib/archive/refs/tags/v0.12.0.tar.gz
18+
ZooProcess-lib @ https://github.com/ecotaxa/ZooProcess-lib/archive/refs/tags/v0.13.0.tar.gz
1919
python-dotenv==1.1.1
2020

2121
# CLI dependencies

src/modern/jobs/VerifiedSepToUpload.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,14 +168,16 @@ def run(self):
168168
)
169169
tsv_gen.generate_into(tsv_file_path)
170170
# Build images zip
171-
images_zip = ImageList(modern_fs.cut_dir_after)
172171
zip_path = self.modern_fs.zip_for_upload
172+
self.logger.info(f"Building zip for EcoTaxa import into {zip_path}")
173+
images_zip = ImageList(modern_fs.cut_dir_after)
173174
zip_file = images_zip.zipped(self.logger, force_RGB=False, zip_path=zip_path)
174175
# Add the TSV file to the zip
175176
with zipfile.ZipFile(zip_file, "a") as zip_ref:
176177
zip_ref.write(tsv_file_path, arcname=tsv_file_name)
177178

178179
# Upload the zip file into a directory, it automatically uncompresses there
180+
self.logger.info(f"Uploading zip to EcoTaxa")
179181
dest_user_dir = f"/{self.subsample_name}/"
180182
remote_ref = client.put_file(zip_file, dest_user_dir)
181183
self.logger.info(f"Zip file uploaded into {dest_user_dir} as {remote_ref}")
@@ -200,6 +202,7 @@ def adaptative_upload(
200202
"""
201203
Upload onto EcoTaxa depending on what's already there, i.e. target subsample in target project.
202204
"""
205+
self.logger.info(f"Reading EcoTaxa project")
203206
# Reconstitute the previously sent acq_id
204207
all_scans_meta = read_scans_metadata_table(self.zoo_project)
205208
meta_for_scan = find_scan_metadata(
@@ -214,6 +217,7 @@ def adaptative_upload(
214217
target_acq = next((acq for acq in all_acqs if acq.orig_id == acq_orig_id), None)
215218
import_update = ""
216219
if target_acq is not None:
220+
self.logger.info(f"Reading EcoTaxa objects")
217221
# We might have some objects in there
218222
objects_for_acq = client.query_acquisition_object_set(
219223
prj=dst_project_id,
@@ -250,6 +254,7 @@ def adaptative_upload(
250254
# No previous acq
251255
pass
252256
# Start an import task with the file
257+
self.logger.info(f"Starting EcoTaxa import")
253258
job_id = client.import_my_file_into_project(
254259
dst_project_id,
255260
dest_user_dir,

0 commit comments

Comments
 (0)