Skip to content

Commit

Permalink
improve(processing): move single progress outside quick fail or norma…
Browse files Browse the repository at this point in the history
…l mode blocks
  • Loading branch information
Guts committed Jun 17, 2024
1 parent 5a9001a commit 12555dc
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 12 deletions.
20 changes: 8 additions & 12 deletions dicogis/georeaders/process_files.py
Original file line number Diff line number Diff line change
Expand Up @@ -259,32 +259,28 @@ def export_metadataset(
Returns:
dataset to process, metadataset or None if something went wrong
"""
self.update_progress(
message_to_display="Exporting metadata of "
f"{dataset_to_process.file_path.name}..."
)
if self.opt_quick_fail:
self.update_progress(
message_to_display="Exporting metadata of "
f"{dataset_to_process.file_path}..."
)
# writing to the Excel file
self.serializer.serialize_metadaset(metadataset=metadataset_to_serialize)
self.update_progress(
message_to_display="Exporting metadata of "
f"{dataset_to_process.file_path}: OK",
message_to_display="Metadata of "
f"{dataset_to_process.file_path.name}: EXPORTED",
increment_counter=True,
)
logger.debug(f"Exporting metadata of {dataset_to_process.file_path}: OK")
dataset_to_process.exported = True
return dataset_to_process, metadataset_to_serialize

try:
self.update_progress(
message_to_display="Exporting metadata of "
f"{dataset_to_process.file_path}..."
)
# writing to the Excel file
self.serializer.serialize_metadaset(metadataset=metadataset_to_serialize)
self.update_progress(
message_to_display="Exporting metadata of "
f"{dataset_to_process.file_path}: OK",
message_to_display="Metadata of "
f"{dataset_to_process.file_path.name}: EXPORTED",
increment_counter=True,
)
logger.debug(f"Exporting metadata of {dataset_to_process.file_path}: OK")
Expand Down
16 changes: 16 additions & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,22 @@ A quickview video:

----

## Quickstart

If you are on a recent Linux distribution like Ubuntu 22.04 and higher with Python 3.10+ and GDAL installed, you can try something like this:

```sh
cd /tmp/
mkdir test-dicogis
cd test-dicogis/
python3 -m venv .venv
. .venv/bin/activate
python -m pip install -U pip setuptools wheel

```

----

```{toctree}
---
maxdepth: 1
Expand Down

0 comments on commit 12555dc

Please sign in to comment.