2024-07-05 17:42:00 +08:00
|
|
|
from abc import ABC, abstractmethod
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class Scenario(ABC):
|
|
|
|
|
@property
|
|
|
|
|
@abstractmethod
|
2024-07-18 22:36:04 +08:00
|
|
|
def background(self) -> str:
|
2024-07-05 17:42:00 +08:00
|
|
|
"""Background information"""
|
|
|
|
|
|
|
|
|
|
@property
|
|
|
|
|
@abstractmethod
|
2024-07-18 22:36:04 +08:00
|
|
|
def source_data(self) -> str:
|
2024-07-05 17:42:00 +08:00
|
|
|
"""Source data description"""
|
|
|
|
|
|
|
|
|
|
@property
|
|
|
|
|
@abstractmethod
|
2024-07-18 22:36:04 +08:00
|
|
|
def interface(self) -> str:
|
2024-07-05 17:42:00 +08:00
|
|
|
"""Interface description about how to run the code"""
|
|
|
|
|
|
|
|
|
|
@property
|
|
|
|
|
@abstractmethod
|
2024-07-18 22:36:04 +08:00
|
|
|
def output_format(self) -> str:
|
2024-07-05 17:42:00 +08:00
|
|
|
"""Output format description"""
|
|
|
|
|
|
|
|
|
|
@property
|
|
|
|
|
@abstractmethod
|
2024-07-18 22:36:04 +08:00
|
|
|
def simulator(self) -> str:
|
2024-07-05 17:42:00 +08:00
|
|
|
"""Simulator description"""
|
|
|
|
|
|
2024-07-24 10:26:06 +00:00
|
|
|
@property
|
|
|
|
|
@abstractmethod
|
|
|
|
|
def rich_style_description(self) -> str:
|
|
|
|
|
"""Rich style description to present"""
|
|
|
|
|
|
2024-07-05 17:42:00 +08:00
|
|
|
@abstractmethod
|
|
|
|
|
def get_scenario_all_desc(self) -> str:
|
|
|
|
|
"""Combine all the description together"""
|
2024-08-06 16:03:40 +08:00
|
|
|
|
|
|
|
|
@property
|
2024-08-06 17:07:01 +08:00
|
|
|
def experiment_setting(self) -> str | None:
|
|
|
|
|
"""Get experiment setting and return as rich text string"""
|
|
|
|
|
return None
|