Skip to content

Commit

Permalink
Let hermes container path be configurable
Browse files Browse the repository at this point in the history
  • Loading branch information
Vince-janv committed Jan 21, 2025
1 parent a88f171 commit ba937d1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
3 changes: 2 additions & 1 deletion cg/apps/hermes/hermes_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ def __init__(self, config: dict):
self.process = Process(
binary=config["hermes"]["binary_path"],
)
self.container_path: str = config["hermes"]["container_path"]
self.container_mount_volume = config["hermes"]["container_mount_volume"]

def convert_deliverables(
Expand All @@ -33,7 +34,7 @@ def convert_deliverables(
"run",
"--bind",
self.container_mount_volume,
"/home/proj/stage/singularity_containers/hermes_latest.sif",
self.container_path,
"convert",
"deliverables",
"--workflow",
Expand Down
10 changes: 6 additions & 4 deletions cg/models/cg_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,7 @@
from cg.meta.delivery.delivery import DeliveryAPI
from cg.services.analysis_service.analysis_service import AnalysisService
from cg.services.decompression_service.decompressor import Decompressor
from cg.services.deliver_files.factory import (
DeliveryServiceFactory,
)
from cg.services.deliver_files.factory import DeliveryServiceFactory
from cg.services.deliver_files.rsync.models import RsyncDeliveryConfig
from cg.services.deliver_files.rsync.service import DeliveryRsyncService
from cg.services.fastq_concatenation_service.fastq_concatenation_service import (
Expand Down Expand Up @@ -147,6 +145,10 @@ class CommonAppConfig(BaseModel):
container_mount_volume: str | None = None


class HermesConfig(CommonAppConfig):
container_path: str


class FluffyUploadConfig(BaseModel):
user: str
password: str
Expand Down Expand Up @@ -425,7 +427,7 @@ class CGConfig(BaseModel):
genotype_api_: GenotypeAPI = None
gens: CommonAppConfig = None
gens_api_: GensAPI = None
hermes: CommonAppConfig = None
hermes: HermesConfig = None
hermes_api_: HermesApi = None
janus: ClientConfig | None = None
janus_api_: JanusAPIClient | None = None
Expand Down

0 comments on commit ba937d1

Please sign in to comment.