-
Notifications
You must be signed in to change notification settings - Fork 114
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
How to use pydeps api. #170
Comments
(it might be possible to set |
An easier to use, and more clearly defined and documented api would probably be a good idea... |
Thank you @thebjorn for your info. I modified the script according to your reply:
It run without any error, but I couldn't find the result file after the call. If this is not the right way, how should I get the run result? |
The The dependency graph is always printed to stdout (https://github.com/thebjorn/pydeps/blob/master/pydeps/pydeps.py#L36) There should probably be a way to override this. |
Could you change the api so the graph is returned for the call, in my case the result needs to be captured and processed further, and also I run parallel on multiple folders to improve perf. Could be able to write code to capture the stdout myself, but it makes sense to return the graph in scenarios when the graph is not the final result and needs further processing, besides it is more perf efficient this way. |
Check out v1.11.2 available on PyPI. |
Thanks so much, sorry for the slow response, I could confirm that it works with specifying an output file. Just want to discuss this a little bit further, as in my original request, in my case save the result to an output file is not a desired way, as this result is only an intermediate result that needs further processing. With this current api design I have to given a temp file name, read the content of the file and deleting the file after processing, this expensive process will make perf pretty bad especially if I need to deal with a large repo where hundreds of directories (i/o on files are slow). Just curious why you couldn't change the api to return the graph map directly? Of course I am totally good that you added support to output the graph to a file, I am sure there are quite some users wanting this, but return the result graph with the api call will make the api much easier to use for certain scenarios like ours. Thanks for your further consideration. |
@thebjorn, cheers:) |
The doc is not clear on how to use the pydeps api.
For example, for command line to scan the current folder:
I guess it should be something like
but it returned with error:
_jb_pytest_runner.py: error: unrecognized arguments: .
Could you kindly advice what should be the proper way to write this api?
Thank you.
The text was updated successfully, but these errors were encountered: