You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using manifestoo as a Python library rather than as a command line tool.
That might be a non-common use case, but I find manifestoo way easier to use that its predecessor, acsoo in that particular case, because the usage of classes makes a clear disambiguation between the display, the usage of it as a command line tool and the business logic. So one can import those classes and use them in their own Python script.
One command that is still missing a bit this simplification is the tree command which does not have a clear distinction between its business process and its display, as the last line of it prints the tree.
Wouldn't it be a good idea to have a build_tree function containing all the logic and along with a tree_command function?
This way, one could either print the tree, as it is now but could also fetch the tree and traverse it for its own purpose.
I'm fine with the proposed refactoring. PR welcome.
However, if you use it as an API, do keep in mind this page of the documentation. TL;DR: there is no public documented nor stable API :)
If you want stability guarantees, we need to work on
1/ feedback and fine tuning of the public API to real use cases
2/ refactoring to expose the public API explicitly (e.g. in manifestoo.__init__.py)
3/ making sure we have complete test coverage of the API entry points
4/ generating API documentation with sphinx
Thanks Stéphane, this was duly noted, I pinned the version I am using at a really specific version, because I red the linked page already.
I am still a recent comer in the Python/Odoo world, so I don't feel like I am up to the task just yet. I am planning to start with simpler ones to start with, though.
I am using manifestoo as a Python library rather than as a command line tool.
That might be a non-common use case, but I find manifestoo way easier to use that its predecessor, acsoo in that particular case, because the usage of classes makes a clear disambiguation between the display, the usage of it as a command line tool and the business logic. So one can import those classes and use them in their own Python script.
One command that is still missing a bit this simplification is the tree command which does not have a clear distinction between its business process and its display, as the last line of it prints the tree.
Wouldn't it be a good idea to have a
build_tree
function containing all the logic and along with atree_command
function?This way, one could either print the tree, as it is now but could also fetch the tree and traverse it for its own purpose.
Something like:
The text was updated successfully, but these errors were encountered: