Skip to content

Commit

Permalink
add get, store and job_number to protocol class
Browse files Browse the repository at this point in the history
  • Loading branch information
mpvanderschelling committed Oct 3, 2023
1 parent 7da5a2a commit 23ca2c3
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/f3dasm/_src/datageneration/datagenerator.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
# Standard
import sys
from functools import partial
from typing import Callable
from typing import Any, Callable

if sys.version_info < (3, 8): # NOQA
from typing_extensions import Protocol # NOQA
Expand All @@ -28,8 +28,15 @@


class ExperimentSample(Protocol):
...
def get(self, key: str) -> Any:
...

def store(object: Any, name: str, to_disk: bool) -> None:
...

@property
def job_number(self) -> int:
...

class DataGenerator:
"""Base class for a data generator"""
Expand Down

0 comments on commit 23ca2c3

Please sign in to comment.