Giter Site home page Giter Site logo

Source code analysis with PyCG about pycg HOT 5 CLOSED

vitsalis avatar vitsalis commented on May 24, 2024
Source code analysis with PyCG

from pycg.

Comments (5)

ani-hovhannisyan avatar ani-hovhannisyan commented on May 24, 2024 2

@jonathanooikwanw Maybe this may help you.
I had forked and added a new branch called "output-line-number", which includes changes for generating function call line numbers, add --dir argument and scan whole directory, skip broken python files from analysing.
You can try to use it by typing:
$ pycg --dir [the analyzable directory absolute path] -o [output path]
Result is:

  • newly generated output path with the ending "_pycg"
  • generated JSON files with the source file plus with the extension of ".json".

Please note: we've tested this branch for our local files and we still didn't add tests. So I'll be happy if you try it and tell me if any error is occured.
The only problem I faced is:

  • by running in medium performance server the PyCG may cause CPU or memory overwork and the OS may stop the script or the script will freeze after analyzing some portion of the files. However, I succeeded to analyze about 40000 files (all together 400MB).

from pycg.

jonathanooikwanw avatar jonathanooikwanw commented on May 24, 2024

An update: Is it possible to use PyCG to analyze source code of large repositories such as Tensorflow, Pytorch and Numpy?

from pycg.

ashwinprasadme avatar ashwinprasadme commented on May 24, 2024

Please see: #8

from pycg.

jonathanooikwanw avatar jonathanooikwanw commented on May 24, 2024

@ashwinprasadme sorry I don't understand, is it not possible then to analyze large source code repositories?

from pycg.

ashwinprasadme avatar ashwinprasadme commented on May 24, 2024

@jonathanooikwanw currently PyCG does not have the instrumentation to analyze external libraries. This does not mean large source code repositories. But rather how PyCG handles external imports, detailed in the issue linked above. Currently work is under progress to handle these as well.

from pycg.

Related Issues (20)

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.