Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix online activity masking #583

Merged
merged 3 commits into from
Dec 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion src/cplus_plugin/api/scenario_task_api_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,13 @@ def upload_layers(self) -> typing.Union[bool, None]:
{"progress_text": "Checking layers to be uploaded", "progress": 0}
)
masking_layers = self.get_masking_layers()
masking_layers.extend(
[
mask_path
for activity in self.analysis_activities
for mask_path in activity.mask_paths
]
)

# 2 comes from sieve_mask_layer and snap layer
check_counts = len(self.analysis_activities) + 2 + len(masking_layers)
Expand Down Expand Up @@ -404,7 +411,6 @@ def upload_layers(self) -> typing.Union[bool, None]:
)

files_to_upload.update(self.check_layer_uploaded(items_to_check))

if self.processing_cancelled:
return False

Expand Down
7 changes: 0 additions & 7 deletions src/cplus_plugin/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,13 +160,6 @@ def get_masking_layers(self) -> typing.List:
)
masking_layers = masking_layers_paths.split(",") if masking_layers_paths else []
masking_layers.remove("") if "" in masking_layers else None
masking_layers.extend(
[
mask_path
for activity in self.analysis_activities
for mask_path in activity.mask_paths
]
)
return masking_layers

def cancel_task(self, exception=None):
Expand Down
Loading