pyrser's People
Forkers
scottwedgepyrser's Issues
Node should be able to test equality of parent attribute
Currently, unittest/pytest throws recursion errors when adding a check for self.parent == other.parent
to __eq__
. Need to find a method to bypass this, as it's going to be important to check the correctness of parent nodes when searching for import locations in the graph
Pyrser.add_calls does not ignore comments
Pyrser.add_calls only works on one call per line
it's calling PyrserHelpers.get_fnc_calls
, which returns List[tuple]
. should be iterating over result and processing each element
pyrser does not pick up function calls made outside of a function
for example, pyrser
wouldn't pick up the call to fnc1
in the below scenario:
if __name__ == '__main__':
fnc1()
refactor needed to assign non-FncNode calls to FileNode itself
Pyrser.add_calls is incomplete
add_calls
is currently being called after each FileNode creation, which means it doesn't have access to functions in files added to the graph later. In addition, more complicated logic is required to determine exactly where a called function comes from from within the package/module. Branch "import-parser" will begin to build out this solution.
Pyrser.add_calls includes class instantiations and doesn't ignore comments and private/dunder calls
The README currently has a good example of this
Pyrser.add_calls doesn't ignore class instantiations
get_fnc_from_line should return falsy if owner function is private/has dunder
In the below example, the call to main
in the main block will return the main
function itself because it's the first function definition found above the call
from test import fnc
def main():
fnc()
if __name__ == "__main__":
main()
Pyrser.add_calls doesn't ignore comments
clean up pathing for unittests
currently hardcoded with absolute paths referencing my HD
Refactor absolute paths in tests directory to relative
add __iter__ to Node for easy DFS traversal
Utils.PyrserHelpers.dfs_generator
is similar to what should be implemented
Pyrser.dir_parser should ignore hidden/empty directories
For example, the current version will pull .git
into the graph (among other things)
Can data classes be used for Node objects?
Pyrser.pyrser should have option to skip directories
desired API enhancement:
skip_dirs = ["tests/", "scratches/"]
graph = Pyrser.pyrser(".", skip=skip_dirs)
Pyrser's INDENT should recognize tabs and spaces
Node.py hashable object
If Node
objects are hashable, we can use lru_cache to speed up graph traversal
Pyrser.add_calls clashes when directory and class names are the same as functions
this issue might be able to be remediated by adding a node_type
argument to Utils.PyrserHelpers.xfs
. otherwise, more complex logic mapping functions to import statements will be required
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.