We are using stories since a while now and are trying to migrate to the latest version.
In v0.15.0 and may other we had an @arguments decorator like this.
@arguments("category_id", "price_id", "user_id")
Using the State object from latest version we do not have anymore an easy way to find initial state values before story execution.
A workaround / implementation I am thinking about is a dataclass allowing extra arguments (See https://github.com/pydantic/pydantic/discussions/7362#discussioncomment-6947058 with pydantic for example) called MyStoryState and we could use it as a type of the State instance to find out easyly initial story arguments.
What do you think about this ?
Is there anything already supported natively in the new version of Stories ?
Hi @proofit404,
We are using stories since a while now and are trying to migrate to the latest version.
In v0.15.0 and may other we had an @arguments decorator like this.
@arguments("category_id", "price_id", "user_id")
Using the State object from latest version we do not have anymore an easy way to find initial state values before story execution.
A workaround / implementation I am thinking about is a dataclass allowing extra arguments (See https://github.com/pydantic/pydantic/discussions/7362#discussioncomment-6947058 with pydantic for example) called MyStoryState and we could use it as a type of the State instance to find out easyly initial story arguments.
What do you think about this ?
Is there anything already supported natively in the new version of Stories ?