Skip to content
Snippets Groups Projects

Catchup with main

Merged Charlotte Hausman requested to merge catchup-with-main into 2.8.4-DEVELOPMENT
Files
16
@@ -55,6 +55,7 @@ class GeneralFoundation(FoundationIF):
def __init__(self, parameters: dict, metadata: AbstractTextFile):
self.logger = logging.getLogger("casa_envoy")
self.parent_path = parameters["parent_path"]
self.rawdata_dir = self.parent_path / "rawdata"
self.working_dir = self.parent_path / "working"
self.content = json.loads(metadata.content)
@@ -75,8 +76,21 @@ class GeneralFoundation(FoundationIF):
if stripped_file:
shutil.copy(stripped_file, self.working_dir)
self.copy_into_rawdata()
self.logger.info("General data foundation complete!")
def copy_into_rawdata(self):
"""
CASA expects some files from the 'working' directory to also exist next to the data in the 'rawdata' directory.
:return:
"""
# Copy files that need to exist next to the data into the rawdata directory
for file in Path(self.working_dir).glob('*flagtargetstemplate.txt'):
if Path(file).exists():
shutil.copy(file, self.rawdata_dir)
class RestoreFoundation(FoundationIF):
"""
Loading