Skip to content

Conversation

@abradley60
Copy link
Collaborator

@abradley60 abradley60 commented May 8, 2025

  • Adding--skip-existing-products flag to search and skip products if they already exist in s3
  • The process will now gracefully exit if all requested products already exist
  • Adding --skip-upload-to-s3 to specify skipping the upload to s3 alone
  • consolidating logic for creating paths to products in s3
  • rename flag dem to dem_type

@abradley60 abradley60 marked this pull request as ready for review May 14, 2025 00:07
Copy link
Collaborator

@geoscience-aman geoscience-aman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Alex :)

required=False,
is_flag=True,
default=False,
help="Skip the creating burst products if it already exist in the desired s3 bucket path. "
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Skip creating the burst products if they already exist in the desired S3 bucket path.

default=False,
help="Skip the creating burst products if it already exist in the desired s3 bucket path. "
"Warning - false may result in duplicate products",
)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WARNING - setting this argument to False may result in duplicate products.

"--skip-existing-products",
required=False,
is_flag=True,
default=False,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we want the default to be False?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah this is a good question. I guess it depends where duplicates should be handles. E.g. if reprocessing is done and new products are released, should we reprocess and handle duplicates later? Can discuss in our meeting today.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

changed to make-existing-products which by default is set to False

Copy link
Collaborator

@caitlinadams caitlinadams left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me -- just two minor suggestions.

burst_id=self.burst_id,
)
else:
raise ValueError()
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it worth putting an error message here?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed and changed to an if and elif, it will already be covered by

self.product = self._check_valid_product(product)

month of burst acquisition
day : str
day of burst acquisition
"""
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add a return statement to the doc string?

@abradley60 abradley60 merged commit 5b9459a into main May 15, 2025
2 checks passed
@abradley60 abradley60 deleted the upgrade/general branch May 15, 2025 01:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants