README 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. ASTNG
  2. =====
  3. What's this ?
  4. -------------
  5. The aim of this module is to provide a common base representation of
  6. python source code for projects such as pychecker, pyreverse,
  7. pylint... Well, actually the development of this library is essentially
  8. governed by pylint's needs.
  9. It provides a compatible representation which comes from the `_ast` module.
  10. It rebuilds the tree generated by the builtin _ast module by recursively
  11. walking down the AST and building an extended ast (let's call it astng ;). The
  12. new node classes have additional methods and attributes for different usages.
  13. They include some support for static inference and local name scopes.
  14. Furthermore, astng builds partial trees by inspecting living objects.
  15. Main modules are:
  16. * `bases`, `node_classses` and `scoped_nodes` contain the classes for the
  17. different type of nodes of the tree.
  18. * the `manager` contains a high level object to get astng trees from
  19. source files and living objects. It maintains a cache of previously
  20. constructed tree for quick access
  21. Installation
  22. ------------
  23. Extract the tarball, jump into the created directory and run ::
  24. python setup.py install
  25. For installation options, see ::
  26. python setup.py install --help
  27. If you have any questions, please mail the
  28. python-project@lists.logilab.org mailing list for support. See
  29. http://lists.logilab.org/mailman/listinfo/python-projects for
  30. subscription information and archives.
  31. Test
  32. ----
  33. Tests are in the 'test' subdirectory. To launch the whole tests suite
  34. at once, you may use the 'pytest' utility from logilab-common (simply
  35. type 'pytest' from within this directory) or if you're running python
  36. >= 2.7, using discover, for instance::
  37. python -m unittest discover -p "unittest*.py"