Giter Club home page Giter Club logo

blackwidow's People

Contributors

madisonmay avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

blackwidow's Issues

Add labels to nodes

Because labels are missing, it's hard to figure out what is what just by looking at it. Tried to ofc add a g and to add the circle and a text label to it. But my d3 skills are next to none, and it turned out to be not working after many attempts.

Couldn't find a better visualizer for my project yet, only this one. So i resorted to using this visualization and editing the image with photoshop. It made me feel like an idiot, but it worked for now ;)

Please provide an exit mechanism

On windows the only way to exit is by using process explorer to kill the process - even control-C does not exit. Tested on Windows 10 Python 2.7.12

Syntax error in package raises uncaught exception

turns out, ast.parse() can raise a syntax error, so the try at line 50 should have a second except to catch errors other than IO error.

In the following, the package code that causes the error was not executed when the interpreter is Python 3, but ast doesn't know that. Actually turns out it isn't even in the current level of PyInstaller, so don't bother trying to reproduce. Just the general point, ast.parse() is capable of throwing a syntax error.

 python -m blackwidow.web PyInstaller
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/runpy.py", line 170, in _run_module_as_main
    "__main__", mod_spec)
  File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/blackwidow/web.py", line 99, in <module>
    web = Web(project_path, exclude=args.exclude)
  File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/blackwidow/web.py", line 27, in __init__
    Node(file, package_root=self.package_root) for file in self.files
  File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/blackwidow/web.py", line 27, in <listcomp>
    Node(file, package_root=self.package_root) for file in self.files
  File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/blackwidow/node.py", line 21, in __init__
    self.edges = imported_modules(filename, package_root=package_root)
  File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/blackwidow/imports.py", line 52, in imported_modules
    tree = ast.parse(fd.read(), filename=filename)
  File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/ast.py", line 35, in parse
    return compile(source, filename, mode, PyCF_ONLY_AST)
  File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/PyInstaller/lib/pefile_py2.py", line 82
    IMAGE_ORDINAL_FLAG              = 0x80000000L
                                                ^
SyntaxError: invalid syntax

Neo4j integreation

Well this is more like a feature that I think will be cool to have. Probably you can place the "nodes" information in something a graph database(Neo4j) and use its browser for visualisation and navigation between the nodes.

Python3 support

Hopefully maintain both 2 and 3 support in the same repo. Time to break out six.

Search interface for modules

To prevent users from having to dig through and hover over each element in order to find the one they're looking for.

Zoom/scaling

For qutebrowser I get this:

2016-06-30-201940_1366x768_scrot

Not sure if there's much that can be done to actually improve the output, but I think a way to zoom in (or to enforce more spacing between nodes?) would help a lot.

ValueError: Not a package

Do you not support modules?

>>> python -m blackwidow.web flask_sockets
ValueError: Not a package: flask_sockets

Test Suite

Needs a collection of sample projects + a unittest suite.

error parsing package setuptools

python -m blackwidow.web setuptools 
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/runpy.py", line 170, in _run_module_as_main
    "__main__", mod_spec)
  File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/blackwidow/web.py", line 99, in <module>
    web = Web(project_path, exclude=args.exclude)
  File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/blackwidow/web.py", line 27, in __init__
    Node(file, package_root=self.package_root) for file in self.files
  File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/blackwidow/web.py", line 27, in <listcomp>
    Node(file, package_root=self.package_root) for file in self.files
  File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/blackwidow/node.py", line 21, in __init__
    self.edges = imported_modules(filename, package_root=package_root)
  File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/blackwidow/imports.py", line 52, in imported_modules
    tree = ast.parse(fd.read(), filename=filename)
  File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/ast.py", line 35, in parse
    return compile(source, filename, mode, PyCF_ONLY_AST)
  File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/setuptools/tests/script-with-bom.py", line 1
    # -*- coding: utf-8 -*-
      ^
SyntaxError: invalid character in identifier

IOError

I tried running your package via the readme instructions on github.com/EntilZha/ScalaFunctional, but got this error (python 2.7.10):

$ python -m blackwidow.web functional --exclude *test*
Traceback (most recent call last):
  File "/usr/local/Cellar/python/2.7.10_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/runpy.py", line 162, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/usr/local/Cellar/python/2.7.10_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/runpy.py", line 72, in _run_code
    exec code in run_globals
  File "/usr/local/lib/python2.7/site-packages/blackwidow/web.py", line 112, in <module>
    web.visualize()
  File "/usr/local/lib/python2.7/site-packages/blackwidow/web.py", line 64, in visualize
    with open(json_file, 'w') as fd:
IOError: [Errno 2] No such file or directory: '/usr/local/lib/python2.7/site-packages/blackwidow/viz/static/graph.json'

On python3, I get a different error, which makes me think that this is a python 2 package?

$ python3 -m blackwidow.web functional --exclude *test*
Traceback (most recent call last):
  File "/usr/local/Cellar/python3/3.5.0/Frameworks/Python.framework/Versions/3.5/lib/python3.5/runpy.py", line 170, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/local/Cellar/python3/3.5.0/Frameworks/Python.framework/Versions/3.5/lib/python3.5/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/usr/local/lib/python3.5/site-packages/blackwidow/web.py", line 12, in <module>
    from blackwidow.viz.server import serve
  File "/usr/local/lib/python3.5/site-packages/blackwidow/viz/server.py", line 6, in <module>
    import SimpleHTTPServer, BaseHTTPServer
ImportError: No module named 'SimpleHTTPServer'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.