import-analyzer's People
import-analyzer's Issues
Base module imports are ignored
Imports of the form import tensorflow as tf
are for some reason ignored by the tool's mechanism, as revealed by the following example repository:
vagrant@vagrant:/vagrant$ a run ibab tensorflow-wavenet
tensorflow.python.client.timeline 1
As a result, counts are underestimated. Compare the result to this GitHub query.
Some imports are not parsed properly
This issue is a bit anemic, but see the following example for a revealing of limited generality of the current implementation:
vagrant@vagrant:/vagrant$ a run ethereon caffe-tensorflow
Traceback (most recent call last):
File "/usr/lib/python3.7/runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "/usr/lib/python3.7/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/vagrant/main.py", line 42, in <module>
result = main(organization, repository, TARGET_MODULE)
File "/vagrant/main.py", line 26, in main
imp for imp in analysis.get_imports(python_file)
File "/vagrant/main.py", line 26, in <listcomp>
imp for imp in analysis.get_imports(python_file)
File "/vagrant/analysis.py", line 18, in get_imports
module = node.module.split('.')
AttributeError: 'NoneType' object has no attribute 'split'
Tool is sensitive to whitespace
Analysis of a repository revealed sensitivity to whitespace inconsistencies during abstract syntax tree parsing:
vagrant@vagrant:/vagrant$ a run princewen tensorflow_practice
Traceback (most recent call last):
File "/usr/lib/python3.7/runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "/usr/lib/python3.7/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/vagrant/main.py", line 42, in <module>
result = main(organization, repository, TARGET_MODULE)
File "/vagrant/main.py", line 26, in main
imp for imp in analysis.get_imports(python_file)
File "/vagrant/main.py", line 26, in <listcomp>
imp for imp in analysis.get_imports(python_file)
File "/vagrant/analysis.py", line 12, in get_imports
root = ast.parse(fh.read(), path)
File "/usr/lib/python3.7/ast.py", line 35, in parse
return compile(source, filename, mode, PyCF_ONLY_AST)
File "/tmp/tmp3nkibko0/tensorflow_practice/recommendation/Basic-DIEN-Demo/source_code/train.py", line 109
elif model_type == 'Wide':
^
TabError: inconsistent use of tabs and spaces in indentation
Python2 is not currently supported as an analysis target
Using tensorflow/models as a target reveals that Python2 might not be supported by abstract syntax tree parsing:
vagrant@vagrant:/vagrant$ a run tensorflow models
Traceback (most recent call last):
File "/usr/lib/python3.7/runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "/usr/lib/python3.7/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/vagrant/main.py", line 42, in <module>
result = main(organization, repository, TARGET_MODULE)
File "/vagrant/main.py", line 26, in main
imp for imp in analysis.get_imports(python_file)
File "/vagrant/main.py", line 26, in <listcomp>
imp for imp in analysis.get_imports(python_file)
File "/vagrant/analysis.py", line 12, in get_imports
root = ast.parse(fh.read(), path)
File "/usr/lib/python3.7/ast.py", line 35, in parse
return compile(source, filename, mode, PyCF_ONLY_AST)
File "/tmp/tmpmow8rr2c/models/research/cognitive_planning/viz_active_vision_dataset_main.py", line 98
print world
^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(world)?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.