Skip to content
Snippets Groups Projects

CAPO handling for NAASC submission

Merged Charlotte Hausman requested to merge relocatable_workflows into main
3 unresolved threads
1 file
+ 1
1
Compare changes
  • Side-by-side
  • Inline
import logging
from immutable_views import DictView, ListView
from workspaces.system.enums import RemoteWorkflows
from workspaces.system.enums import RemoteWorkflows, RemoteProcessingSites
from workspaces.workflow.schema_interfaces import WorkflowRequestIF
logger = logging.getLogger(__name__)
@@ -15,11 +15,33 @@ wf_properties_list = DictView(
"general": [
"edu.nrao.workspaces.WorkflowSettings.serviceUrl",
"edu.nrao.workspaces.NotificationSettings.serviceUrl",
"edu.nrao.workspaces.UISettings.serviceUrl",
],
"delivery_requirements": [
"edu.nrao.workspaces.DeliverySettings.downloadDirectory",
"edu.nrao.workspaces.DeliverySettings.downloadUrl",
],
"fetcher_requirements": [
"edu.nrao.workspaces.ProductFetcherSettings.locatorServiceUrlPrefix",
"edu.nrao.workspaces.ProductFetcherSettings.defaultThreadsPerHost",
"edu.nrao.workspaces.ProductFetcherSettings.executionSite",
"almaMetadataDatabase.jdbcUsername",
"almaMetadataDatabase.jdbcPassword",
"almaMetadataDatabase.jdbcUrl",
],
"casa_requirements": [
"edu.nrao.workspaces.ProcessingSettings.useCasa",
"edu.nrao.archive.workflow.config.CasaVersions.homeForReprocessing",
],
"carta_requirements": [
"edu.nrao.workspaces.carta.useCarta",
"edu.nrao.carta.timeoutInMinutes",
"edu.nrao.carta.pathToExecutable",
"edu.nrao.carta.redisHost",
"edu.nrao.carta.redisPort",
"edu.nrao.carta.redisPassword",
"edu.nrao.carta.reverseProxyHost",
],
}
)
@@ -33,13 +55,32 @@ class ViewWorkflowCapoParameters:
logger.info("Gathering general properties...")
return wf_properties_list["general"]
@staticmethod
def delivery_parameters():
logger.info("Gathering ALMA Download parameters...")
return wf_properties_list["delivery_requirements"]
@staticmethod
def casa_parameters() -> list:
logger.info("Gathering CASA properties...")
return wf_properties_list["casa_requirements"]
@staticmethod
def carta_parameters():
logger.info("Gathering CARTA parameters...")
return wf_properties_list["carta_requirements"]
@staticmethod
def fetcher_parameters():
logger.info("Gathering Product Fetcher parameters...")
return wf_properties_list["fetcher_requirements"]
def construct_view(self) -> ListView:
wf = RemoteWorkflows(self.request.workflow_name)
logger.info(wf)
if wf == RemoteWorkflows.SECI:
return ListView(self.general_parameters() + self.casa_parameters())
if wf == RemoteWorkflows.DOWNLOAD and RemoteProcessingSites.NAASC.value in self.request.argument:
return ListView(self.delivery_parameters() + self.fetcher_parameters())
if wf == RemoteWorkflows.CARTA and RemoteProcessingSites.NAASC.value in self.request.argument:
return ListView(self.general_parameters() + self.carta_parameters())
Loading