-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
mob next [ci-skip] [ci skip] [skip ci]
lastFile:src/skore/project.py
- Loading branch information
1 parent
2e589f7
commit db49eb5
Showing
1 changed file
with
30 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
Path = None | ||
Item = None | ||
|
||
def get_filepath_from_project_name(project_name) -> Path: | ||
return None | ||
|
||
class Transformer: | ||
@staticmethod | ||
def transform(value) -> Item: | ||
... | ||
|
||
class Project: | ||
def __init__(self, transformer, storage): | ||
self.transformer = transformer | ||
self.storage = storage | ||
|
||
def put(self, key, value): | ||
self.storage.save( | ||
key, | ||
self.transformer.transform(value), | ||
) | ||
|
||
def put_item(self, key, item): | ||
self.storage.save( | ||
key, | ||
item, | ||
) | ||
|
||
def load(project_name: str) -> Project: | ||
filepath = get_filepath_from_project_name(project_name) |