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

dotdicts: just a thought #245

Closed
HolQue opened this issue Mar 19, 2024 · 2 comments
Closed

dotdicts: just a thought #245

HolQue opened this issue Mar 19, 2024 · 2 comments

Comments

@HolQue
Copy link
Collaborator

HolQue commented Mar 19, 2024

What came into my mind recently:

The JsonPreprocessor returns a standard dictionary. Therefore the TestsuitesManagement has to spend effort to convert this standard dictionary to a dotdict. Why is not already the JsonPreprocessor doing this?

Maybe because the Robot Framework works with an own dotdict Implementation? And this dotdict Implementation is not compatible with other dotdict Implementations? Is it so? OK, then we need such a dotdict conversion routine within the TestsuitesManagement.

But now thinking about pure JsonPreprocessor users, working with this application completely outside the scope of Robot Framework. They have the same problem. Maybe they want to have the content parsed from JSON files in dotdict format. Then they have to implement their own dotdict conversion routine. Not really user friendly.

I my opinion we should spend the JsonPreprocessor an additional optional parameter 'dotdict'. Default is False. But in case of a user sets this parameter to True, the JsonPreprocessor returns a dotdict in case of a standard dict.

And in documentation we have to point out which dotdict implementations are supported (link to PIP package).

This would really be a bonus for users.

@test-fullautomation
Copy link
Owner

test-fullautomation commented Mar 19, 2024

Hi Holger,
JsonPreprocessor need to return a dotdict (always be aware that a user can use python-jsonpreprocessor without testsuitesmanagement).
Only problem might be that dotdict of JsonPreprocessor is other than the one used by Robot Framework.
Therefore testsuites-management might need to to a conversion to be fully compatible.
Thank you,
Thomas

@HolQue
Copy link
Collaborator Author

HolQue commented Mar 20, 2024

Because of a successor
#246
is already there, this issue can be closed.

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

No branches or pull requests

2 participants