Skip to content
Open
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion shapeflow/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
import diskcache


__version__: str = '0.4.3'
__version__: str = '0.4.4'
"""Library version
"""

Expand Down
7 changes: 7 additions & 0 deletions shapeflow/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -479,6 +479,13 @@ def normalizing_to(version):
# rename parameters -> feature_parameters
if 'parameters' in d:
d['feature_parameters'] = d.pop('parameters')
if before_version(d[VERSION], '0.4.4'):
normalizing_to('0.4.4')
# move video_path & design_path to video.path & design.path
if 'video_path' in d:
d['video'] = {'path': d.pop('video_path')}
if 'design_path' in d:
d['design'] = {'path': d.pop('design_path')}

else:
raise NotImplementedError
Expand Down
12 changes: 9 additions & 3 deletions shapeflow/core/backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
import numpy as np
import pandas as pd

from pydantic import Field
from pydantic import Field, FilePath

from shapeflow import settings, get_logger, get_cache
from shapeflow.api import api
Expand Down Expand Up @@ -486,14 +486,20 @@ def __modify_schema__(cls, field_schema):
)


class FileConfig(BaseConfig):
path: Optional[FilePath] = Field(default=None)
hash: Optional[FilePath] = Field(default=None)


class BaseAnalyzerConfig(BaseConfig):
"""Abstract analyzer configuration.
"""
video_path: Optional[str] = Field(default=None)
design_path: Optional[str] = Field(default=None)
name: Optional[str] = Field(default=None)
description: Optional[str] = Field(default=None)

video: FileConfig = Field(default_factory=FileConfig)
design: FileConfig = Field(default_factory=FileConfig)


class BaseAnalyzer(Instance, RootInstance):
"""Abstract analyzer.
Expand Down