Skip to Content
Softagram
  • Home
  • Services
    • ERP
    • AI Services
    • Security
  • Company
  • Contact
  • Blog
    • News
    • Guides
  • Tech
  • Sign in
  • Contact Us
Softagram
      • Home
      • Services
        • ERP
        • AI Services
        • Security
      • Company
      • Contact
      • Blog
        • News
        • Guides
      • Tech
    • Sign in
    • Contact Us

    Running analysis for ad-hoc code directories locally

    Tutorials
  • All Blogs
  • Oppaat
  • Running analysis for ad-hoc code directories locally
  • October 15, 2020 by
    Running analysis for ad-hoc code directories locally
    Ville Laitila

    The most simple way to run analysis on local (Developer) installation of Softagram, is to create an empty directory, copy the codebase into it, run analysis and use the outputs.

    # Create the directory
    mkdir -p /opt/softagram/input/projects/mycodes/mycodes

    # Copy files
    cp -r mycodes /opt/softagram/input/projects/mycodes/mycodes/

    # Run analysis
    docker exec -ti softagram python3 ui/cli/softagramtools.py fullanalysis --input-dir /opt/softagram/input/projects/mycodes/mycodes

    After waiting for some time, (e.g. 1 MLOC of code to be analyzed = 1 hour), you can open up the results in Softagram Desktop by this.
    Once the output is ready, you can use Softagram Desktop to open the freshly generated model file, .e.g
    ​    /opt/softagram/output/projects/mycodes/master/2019-09-16_10-47-40Z/dependency/modelfile.xml.zip

    Later want to add new repos and re-run analysis for the dir?

    • Just cd to /opt/softagram/input/projects/mycodes/mycodes and do some git clone runs there to get clones into the directory, and re-run the analysis.

    Is your Softagram Desktop running in a different machine?

    • Usually this case is handled by using the usual method of creating the project in web UI, adding Git repository for the project, etc. But you can also scp the output directory to the machine Softagram Desktop is running at.

    your-pc-with-Softagram-Desktop $  scp user@softagram-installation:/opt/softagram/output/projects/mycodes/master/2019-09-16_10-47-40Z .

    When the whole timestamp-based directory is available in your local PC, you may open the model file and all the supplementary attribute files with a single click in Softagram Desktop, by pointing it the modelfile.xml.zip from the dependency directory.
    ​

    Originally published at help.softagram.com

    in Oppaat
    # Softagram Analyzer

    Designed for companies

    We are a team of passionate people whose goal is to improve everyone's life through disruptive products. We build great products to solve your business problems. Our products are designed for small to medium size companies willing to optimize their performance.

    Ota yhteyttä

    Softagram Oy
    Ketolanperäntie 469 
    90450 ​Kempele 

    • +358504836173
    • info@softagram.com
    Follow us
    Copyright © Softagram Oy
    Powered by Odoo - Create a free website