Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 12 additions & 3 deletions cadetrdm/batch_running/case.py
Original file line number Diff line number Diff line change
@@ -1,20 +1,27 @@
import os
import traceback
import warnings
from pathlib import Path
import subprocess
from typing import Dict

# from cadetrdm.container.containerAdapter import ContainerAdapter
from cadetrdm.batch_running import Study
from cadetrdm.repositories import ProjectRepo
from cadetrdm import Options
from cadetrdm.environment import Environment
from cadetrdm.logging import LogEntry


class Case:
def __init__(self, project_repo: ProjectRepo = None, options: Options = None, environment: Environment = None,
name: str = None,
study=None):
def __init__(
self,
project_repo: ProjectRepo | os.PathLike = "./",
options: Options | None = None,
environment: Environment| None = None,
name: str | None = None,
study: Study | None = None,
) -> None:
if study is not None:
warnings.warn(
"Initializing Case() with the study= kwarg is deprecated and will be removed in the future. "
Expand All @@ -28,6 +35,8 @@ def __init__(self, project_repo: ProjectRepo = None, options: Options = None, en

self.name = name

if not isinstance(project_repo, ProjectRepo):
project_repo = ProjectRepo(project_repo)
self.project_repo = project_repo
self.options = options
self.environment = environment
Expand Down