-
Notifications
You must be signed in to change notification settings - Fork 36
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
TypeError when trying to run on current directory #29
Comments
hi @rianwouters Using py2puml with However, I plan to develop the possibility to call py2puml against a specific module but no deadline are set yet. |
Also looking forward to support for this. Thanks. |
I am working on another feature request right now (#32), then I plan to work on this one by the end of the year. I am sorry for the delay, I work on this library on my free time - any help is welcome 😃 |
Any progress on this issue? I hope soon. 😊🙏 |
unfortunately no; family issues are taking precedence over the priorities. I am sorry :/ but I am still aware of this use-case expected by several people. The workaround for now is to structure your project as expected: with a root folder storing the code (see https://docs.python-guide.org/writing/structure/#sample-repository). I know you don't always have this freedom, but it helps separating production code, from automated tests code, from documentation and so on. |
Thanks for your reply and workaround. Take care and we'll commits later. |
I have been looking into this issue as part of a university assignment. I believe that this issue is with the file inspectpackage.py when the call to walk_packages is made and the . for domain path and . for domain module is used. When called this program will try and walk before the root node. I think that it is poor practice to have your class files at the root so the best solution to the problem that I have found is to just add an if statement to alert the user of the program that it is poor practice and abort the program. This is my intended fix for this program from importlib import import_module from py2puml.domain.umlitem import UmlItem def inspect_package( Cheers, |
As there is no requirement whatsoever in Python to put modules in a subpackage I believe the solution proposed by @stvdb914 is insufficient. There may be best practice but should the program not just work correctly for my one and only HelloWorld class in the root directory? |
thank you @stvdb914 and @rianwouters for exchanging views about this issue.
I wrote this tool to document projects involving business domains made of several data structures scattered in different files. All these projects (the ones of my clients) have always been structured following the best practices (https://docs.python-guide.org/writing/structure/#sample-repository); therefore I prefer using the little free time I can spend on I would like to handle this use-case one day. |
I installed with python -m pip install py2puml
I run py2puml . . in a directory containing my python files.
I get the following error:
TypeError: the 'package' argument is required to perform a relative import for '..bk'
Tried many things but cannot get it to work.
The text was updated successfully, but these errors were encountered: