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

Open ScenarioConfig API to export a scenario config graph as a picture. #1592

Closed
jrobinAV opened this issue Jul 26, 2024 · 13 comments
Closed
Assignees
Labels
⚙️Configuration Related to Taipy Configuration Core: ⚙️ Configuration Core Related to Taipy Core 🆘 Help wanted Open to participation from the community ✨New feature 🟨 Priority: Medium Not blocking but should be addressed

Comments

@jrobinAV
Copy link
Member

jrobinAV commented Jul 26, 2024

The purpose of this issue is to let developers draw a scenario config DAG using matplotlib (or an alternative) and networkx to visualize the graph he just created, helping him understand if it is correct.

Description

In the ScenarioConfig class (located at taipy/core/config/scenario_config.py), we want a new method named draw() that exports the scenario configuration graph (a DAG) as an image file.

The graph comprises the input DataNodeConfigs, the output DataNodeConfigs, and the TaskConfigs as nodes.
There is a directed edge from a DatanodeConfig node to a TaskConfig node if and only if the DatanodeConfig is a TaskConfig input.
A directed edge is from a TaskConfig node to a DatanodeConfig node if and only if the DatanodeConfig is a TaskConfig input.

Implementation constraint.

If a new package is required (matplotlib?, marmaid?, etc.), it must be made optional. The draw function should check the presence of the package before using it. If the package is not installed, the draw function should log a warning message and return doing nothing else.

https://networkx.org/documentation/stable/reference/drawing.html

@jrobinAV jrobinAV added Core Related to Taipy Core Core: ⚙️ Configuration ⚙️Configuration Related to Taipy Configuration ✨New feature 🔒 Staff only Can only be assigned to the Taipy R&D team 🟨 Priority: Medium Not blocking but should be addressed labels Jul 26, 2024
@FabienLelaquais FabienLelaquais added the 💬 Discussion Requires some discussion and decision label Jul 29, 2024
@FabienLelaquais
Copy link
Member

I certainly don't like this idea, involving both the import of another (large) package but also impacts the global product homogeneity, as Taipy GUI and Taipy Studio already provide ways of representing DAGs.
Why chose a technology that we don't already use?

@jrobinAV jrobinAV removed the 🔒 Staff only Can only be assigned to the Taipy R&D team label Aug 23, 2024
@jrobinAV jrobinAV added hacktoberfest hacktoberfest issues hacktoberfest - 100💎 Issues rewarded by 100 points 🆘 Help wanted Open to participation from the community and removed hacktoberfest hacktoberfest issues hacktoberfest - 100💎 Issues rewarded by 100 points labels Sep 25, 2024
@jrobinAV jrobinAV changed the title Draw a scenario config graph. Open ScenarioConfig API to export a scenario config graph as a picture. Sep 26, 2024
@quest-bot quest-bot bot added the ⚔️ Quest Tracks quest-bot quests label Oct 7, 2024
Copy link

quest-bot bot commented Oct 7, 2024

New Quest! image New Quest!

A new Quest has been launched in @Avaiga’s repo.
Merge a PR that solves this issue to loot the Quest and earn your reward.


Some loot has been stashed in this issue to reward the solver!

🗡 Comment @quest-bot embark to check-in for this Quest and start solving the issue. Other solvers will be notified!

⚔️ When you submit a PR, comment @quest-bot loot #1592 to link your PR to this Quest.

Questions? Check out the docs.

@HimangshuYadav
Copy link

@quest-bot loot #1932

Copy link

quest-bot bot commented Oct 8, 2024

⚠️ Oops... You can only loot in a Pull Request!

Check the docs for more info.

@HimangshuYadav
Copy link

@quest-bot embark

Copy link

quest-bot bot commented Oct 8, 2024

@HimangshuYadav has embarked on their Quest. 🗡

  • @HimangshuYadav has been on GitHub since 2024.
  • They have merged 0 public PRs in that time.
  • Their swords are blessed with Python and TypeScript magic ✨
  • They have contributed to this repo before.

Questions? Check out the docs.

@xyfer17
Copy link

xyfer17 commented Oct 8, 2024

@jrobinAV could you please assign this issue to me, I would like to take this up.

@satyyam11
Copy link

@quest-bot loot #1592

Copy link

quest-bot bot commented Oct 8, 2024

⚠️ Oops... You can only loot in a Pull Request!

Check the docs for more info.

@jrobinAV
Copy link
Member Author

jrobinAV commented Oct 9, 2024

Yep sure, you are assigned, @xyfer17 .

@satyyam11
Copy link

Hey can you assign me this

@xyfer17
Copy link

xyfer17 commented Oct 9, 2024

@jrobinAV can you please tell me that image format should be a svg or png ( mention if any other format is suitable ), also what would be the warning log message please specify?

@jrobinAV
Copy link
Member Author

jrobinAV commented Oct 9, 2024

@xyfer17 The functionality is really for developers, not for end-users, so I don't think the image format matters.
Both svg or png are good. By the way, the format could also be an optional parameter to the draw method with one of the two as a default value.

If you need an external package with a specific version range, and if the package is not installed, the log message could be:

f"Package '{package_name}' between version '{min_version}'and '{max_version}' is required to use the draw method. Please install the package first."

satyyam11 added a commit to satyyam11/taipy that referenced this issue Oct 13, 2024
@jrobinAV jrobinAV removed hacktoberfest hacktoberfest issues hacktoberfest - 100💎 Issues rewarded by 100 points ⚔️ Quest Tracks quest-bot quests 💬 Discussion Requires some discussion and decision labels Nov 28, 2024
@jrobinAV jrobinAV assigned jrobinAV and unassigned xyfer17 and satyyam11 Nov 28, 2024
@jrobinAV jrobinAV closed this as completed Dec 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
⚙️Configuration Related to Taipy Configuration Core: ⚙️ Configuration Core Related to Taipy Core 🆘 Help wanted Open to participation from the community ✨New feature 🟨 Priority: Medium Not blocking but should be addressed
Projects
None yet
Development

No branches or pull requests

5 participants