Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

the WF engine should resolves escaped variables #513

Closed
FabienArcellier opened this issue Aug 12, 2024 · 2 comments
Closed

the WF engine should resolves escaped variables #513

FabienArcellier opened this issue Aug 12, 2024 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@FabienArcellier
Copy link
Collaborator

FabienArcellier commented Aug 12, 2024

The WF engine no longer resolves escaped variables @{a\.b} to point to a state encoded with a . as a separator:

state = wf.init_state({
    "a.b": 2,
})

image


feature status
the engine resolve the escape variable in text field KO
the engine resolve the escape binding KO
the autocompletion handle escape on "a.b" KO
the state explorer show the variable OK
WriterState should support field mapping to handle dot notation KO

WriterState should support field mapping to handle dot notation

class MyState(wf.WriterState):
    counterA: int = wf.field(key='counter.a', default=0)
    counterB: int = wf.field(key='counter.b', default=0)

    @wf.property(['counter\.a', 'counter\.b'])
    # alternative : @wf.property(['counterA', 'counterB'])
    def counter_sum(self) -> int:
        return self.counterA + self.counterB # equivalent of self['counter.a'] + self['counter.b']
@FabienArcellier FabienArcellier added bug Something isn't working enhancement New feature or request and removed bug Something isn't working labels Aug 12, 2024
@ramedina86 ramedina86 added the wip Work in progress label Aug 22, 2024
@FabienArcellier FabienArcellier self-assigned this Sep 2, 2024
@FabienArcellier FabienArcellier removed the wip Work in progress label Nov 30, 2024
@FabienArcellier
Copy link
Collaborator Author

implement in #568

@FabienArcellier
Copy link
Collaborator Author

it's available in release 0.8.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants