Avaiga / taipy

Turns Data and AI algorithms into production-ready web applications in no time.
https://www.taipy.io
Apache License 2.0
14.23k stars 1.7k forks source link

Scenario Selector - Scenario without names not appearing and not usable #168

Closed FlorianJacta closed 1 year ago

FlorianJacta commented 1 year ago

Isssue

Scenarios without names do not appear in the Scenario Selector.

image

How to replicate

Run the code

from taipy.config import Config, Frequency
import taipy as tp

import datetime as dt

def f(i):
    return i

d1_cfg = Config.configure_data_node('d1', default_data=1)
d2_cfg = Config.configure_data_node('d2')
task_cfg = Config.configure_task(id="task", function=f, input=d1_cfg, output=d2_cfg)
s = Config.configure_scenario_from_tasks('s', [task_cfg], frequency=Frequency.WEEKLY)

scenario = None

if __name__ == "__main__":
    tp.Core().run()

    [tp.create_scenario(s,
                        creation_date=dt.datetime.now()+dt.timedelta(days=i)) 
                        for i in range(10)]

    tp.Gui('<|{scenario}|scenario_selector|>').run(port=4999)

Expected behavior

The Scenario Selector should display the scenarios created and be usable.

Version

Taipy 2.3.0 Draft

jrobinAV commented 1 year ago

What we display is a label. If a scenario does not have any name, the id is used as a label. So I believe the name does exist in the use case described here, but it is empty.

FlorianJacta commented 1 year ago

This is not really what is happening or at least, there is more to it. For example, I should have ten scenarios here:

image