Open bsweger opened 2 months ago
Discussed this with @matthewcornell, and we decided that the delete method does indeed belong in the ModelOutputTransform
class (instead of a new class) because there's some shared code, and the delete operation is simple.
We did decide to split the new delete code into separate unit test files, however, since the existing test_model_output.py
is getting long-ish.
Background
This package's
ModelOutputTransform
class has a method to transform a hub's incoming model-output files to Hubverse format.ModelOutputTransform
is bundled into an AWS Lambda package that is triggered whenever files are added/updated in theraw/model-output
folder of a hub's S3 bucket.The next step is ensuring that
ModelOutputTransform
also contains a function to delete files in a hub's S3model-output
directory if the file is removed from the hub.Definition of done
ModelOutputTransform
contains a new method that accepts an S3 bucket name and the name of an S3 object in a hub'sraw/
folder. The method uses this information to determine the corresponding "public-facing" model-output file and delete it.lambda_function.py
is updated to invoke the new deletion method when it's triggered by ans3:ObjectRemoved:*
S3 event.This issue to to create the