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

Any chance I could pass in multiple files or a glob? #1

Open
Taytay opened this issue May 28, 2024 · 1 comment
Open

Any chance I could pass in multiple files or a glob? #1

Taytay opened this issue May 28, 2024 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@Taytay
Copy link

Taytay commented May 28, 2024

(First, nice work! This is fantastic! when it worked on one of my files, it was exactly what I was looking for! Thank you. )

Passing in a single .py entrypoint isn't giving me much, and passing in my internal module doesn't work (because my init.py is empty)
Any chance I could do something like: pyimps my_folder/**/*.py
Or I could use standard shell globbing perhaps to give it a whole list of files to process?
The trick of course would be that it would process each, keep track of which ones overlapped, and then merge the trees together so that it gave me a complete picture of all my imports for a given folder.

@bedbad bedbad self-assigned this Aug 6, 2024
@bedbad bedbad added enhancement New feature or request feature-request and removed enhancement New feature or request feature-request labels Aug 6, 2024
@bedbad
Copy link
Owner

bedbad commented Aug 8, 2024

I really appreciate your comment!
Sorry for taking a while to notice it - I never really put pyimps out except once in archived post discussion so I didn't think to check on it in a while.

I fixed it not working on internal module name (whether the init.py empty or not). Bug from non-updating it last time. python puts its argument path to sys.path[0] while pyimps should've done same not its site-package, obviously -
pyimps was meant to work with sources in same place as python would, making it simple to start using

I would really appreciate if you tell what was your use-case with the files it worked, the module it didn't and how would you see it using with globbing.

I thought about globbing/merging trees when writing this utility for a while and I have a few python static analyses utilities laying around I used some time ago able to output the whole source graph in graph format, so merging the import trees itself is neat, not a problem to add.
It's the question of rendering that graph in the terminal, as pyimps and such was done as terminal utility - the thing that overloaded with features is pydeps - and you can't use it simply in terminal - you have to go through several steps as in getting the graph as file and opening in special gui software to see it properly - there are already utilites that take graph files and render those in terminal and they all looked pretty bad.

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

No branches or pull requests

2 participants