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

Tabular Data: support a callback to change unsupported data type to supported one #457

Open
3 tasks
FredLL-Avaiga opened this issue Mar 27, 2023 · 17 comments · May be fixed by #2028
Open
3 tasks

Tabular Data: support a callback to change unsupported data type to supported one #457

FredLL-Avaiga opened this issue Mar 27, 2023 · 17 comments · May be fixed by #2028
Labels
Gui: Back-End hacktoberfest - 100💎 Issues rewarded by 100 points hacktoberfest hacktoberfest issues 🆘 Help wanted Open to participation from the community ✨New feature 🟨 Priority: Medium Not blocking but should be addressed ⚔️ Quest Tracks quest-bot quests

Comments

@FredLL-Avaiga
Copy link
Member

What would that feature address
display unsupported data type

Description of the ideal solution
If a dataframe holds a column with unsupported data, we could handle a user callback that would transform that column to a supported type

Caveats
performance ?

Other options
Raise an error (as of today)

Acceptance Criteria

  • Ensure new code is unit tested, and check code coverage is at least 90%
  • Propagate any change on the demos and run all of them to ensure there is no breaking change
  • Ensure any change is well documented
@FredLL-Avaiga FredLL-Avaiga changed the title Tabular Data: support a callback to change unsupported data type to supoprted one Tabular Data: support a callback to change unsupported data type to supported one Mar 27, 2023
@jrobinAV jrobinAV transferred this issue from Avaiga/taipy-gui Nov 13, 2023
@jrobinAV jrobinAV added 🆘 Help wanted Open to participation from the community hacktoberfest hacktoberfest issues hacktoberfest - 100💎 Issues rewarded by 100 points labels Sep 25, 2024
@ScalarJerk
Copy link

@FredLL-Avaiga to clarify, we're creating a user callback that alerts users of unsupported type errors and then suggests them to convert the data into a supported type as well? (which the user may accept or declineand fix the data by himself)

@FredLL-Avaiga
Copy link
Member Author

FredLL-Avaiga commented Sep 30, 2024

That is not what I had in mind.
The objective is to allow the dev to define a callback that would transform a specific data from an unknown data-type to a supported data-type (that would fit in a DataFrame)
At the moment, we support datetime (ie transform them to str) so that the Dataframe can be jsonified

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 #457 to link your PR to this Quest.

Questions? Check out the docs.

@quest-bot quest-bot bot added the ⚔️ Quest Tracks quest-bot quests label Oct 7, 2024
@eleensmathew
Copy link

Can i work on this?

@FlorianJacta
Copy link
Member

@ScalarJerk Do you aim to work on this issue?

@eleensmathew You have already been assigned to another issue.

@Ujj1225
Copy link

Ujj1225 commented Oct 7, 2024

can i work on this issue?

@FlorianJacta
Copy link
Member

@Ujj1225, I am assigning you this issue. Thank you for your contribution!

@Ujj1225
Copy link

Ujj1225 commented Oct 11, 2024

@FlorianJacta @FredLL-Avaiga
can i get more insights on this?
I checked into the codebase and its huge. Can you tell me in which part of the code is the data is loaded, inspected, or converted into a dataframe?

In a file _data_manager.py
I found a __create method, here there is a point where data_node_config._properties.copy() is used. I feel this might be the right place to handle unsupported data types by adding a check for data types in the props. Since the data nodes are created based on configurations, the place to handle unsupported data types might be during or right after the node's creation or configuration process, right?

Can you please provide me more insights on this?

@FlorianJacta
Copy link
Member

I will let the R&D answer you. Maybe, @FabienLelaquais can also jump on this discussion

@FredLL-Avaiga
Copy link
Member Author

In the code you can check how we use data_accessors to transform different types of data into tabular data that is handled by our front end component.
The indirections are done in the class _DataAccessors

In that class, we return an _InvalidDataAccessor when we cannot handle the type of data.

The aim of this issue is to add a callback to Gui (like on_change or on_action) to let the developer change an unsupported data into a supported data type. I would propose on_invalid_data but I guess @FabienLelaquais might have a better proposition

@Ujj1225
Copy link

Ujj1225 commented Oct 11, 2024

So, gui has to get a function where it should let developers set a custom function that defines how to handle and transform unsupported data types?
I have completed a design which allows the developer to register a function that will change unsupported data types to supported ones
And if developer doesnt define a callback, everything will proceed as it is. Will this work or is there something i am missing here?

@FredLL-Avaiga
Copy link
Member Author

Please create a PR and we can discuss on that base

@Ujj1225
Copy link

Ujj1225 commented Oct 12, 2024

@quest-bot embark

Copy link

quest-bot bot commented Oct 12, 2024

@Ujj1225 has embarked on their Quest. 🗡

  • @Ujj1225 has been on GitHub since 2022.
  • They have merged 26 public PRs in that time.
  • Their swords are blessed with CSS and JavaScript magic ✨
  • They have contributed to this repo before.

This is not an assignment to the issue. Please check the repo’s contribution guidelines before submitting a PR.

Questions? Check out the docs.

Copy link

quest-bot bot commented Oct 12, 2024

🧚 @Ujj1225 has submitted PR #2028 and is claiming the loot.

Keep up the pace, or you'll be left in the shadows.

Questions? Check out the docs.

Copy link
Contributor

This issue has been labelled as "🥶Waiting for contributor" because it has been inactive for more than 14 days. If you would like to continue working on this issue, please add another comment or create a PR that links to this issue. If a PR has already been created which refers to this issue, then you should explicitly mention this issue in the relevant PR. Otherwise, you will be unassigned in 14 days. For more information please refer to the contributing guidelines.

@github-actions github-actions bot added the 🥶Waiting for contributor Issues or PRs waiting for a long time label Oct 26, 2024
Copy link
Contributor

This issue has been unassigned automatically because it has been marked as "🥶Waiting for contributor" for more than 14 days with no activity.

@github-actions github-actions bot removed the 🥶Waiting for contributor Issues or PRs waiting for a long time label Nov 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Gui: Back-End hacktoberfest - 100💎 Issues rewarded by 100 points hacktoberfest hacktoberfest issues 🆘 Help wanted Open to participation from the community ✨New feature 🟨 Priority: Medium Not blocking but should be addressed ⚔️ Quest Tracks quest-bot quests
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants