Skip to content

Latest commit

 

History

History
88 lines (58 loc) · 3.04 KB

GETTING_STARTED.md

File metadata and controls

88 lines (58 loc) · 3.04 KB

Code Graph Analysis Pipeline - Getting started guide

This document describes the steps to get started as quickly as possible. For more details on what you can do with this pipeline see README. For more details on how the commands work in detail see COMMANDS.

🛠 Prerequisites

Please read through the Prerequisites in the README file for what is required to run the scripts.

Start an analysis

  1. Create a directory for all analysis projects.

    mkdir temp
    cd temp
  2. Create a working directory for your specific analysis.

    mkdir MyFirstAnalysis
    cd MyFirstAnalysis
  3. Choose an initial password for Neo4j if not already done.

    export NEO4J_INITIAL_PASSWORD=theinitialpasswordthatihavechosenforneo4j
  4. Create the artifacts directory for the code to be analyzed (without cd afterwards).

    mkdir artifacts
  5. Move the artifacts (e.g. Java jars json files) you want to analyze into the artifacts directory.

  6. Optionally, create a source directory and clone the corresponding source code into it to also scan git data.

  7. Alternatively to the steps above, run an already predefined download script

    ./../../scripts/downloader/downloadAxonFramework.sh <version>
  8. Optionally use a script to download artifacts from Maven (details).

  9. Start the analysis.

    • Without any additional dependencies:
    ./../../scripts/analysis/analyze.sh --report Csv
    • Jupyter notebook reports when Python and Conda are installed:
    ./../../scripts/analysis/analyze.sh --report Jupyter
    • Graph visualizations when Node.js and npm are installed:
    ./../../scripts/analysis/analyze.sh --report Jupyter
    • All reports with Python, Conda, Node.js and npm installed:
    ./../../scripts/analysis/analyze.sh
    • To explore the database yourself without any automatically generated reports and no additional requirements:
    ./../../scripts/analysis/analyze.sh --explore

    Then open your browser and login to your local Neo4j Web UI with "neo4j" as user and the initial password you've chosen.

👉 See scripts/examples/analyzeAxonFramework.sh as an example script that combines all the above steps for a Java Project. 👉 See scripts/examples/analyzeReactRouter.sh as an example script that combines all the above steps for a Typescript Project. 👉 See scripts/examples/analyzeAntDesign.sh as an example script that combines all the above steps for a large scale monorepo Typescript Project. 👉 See Code Structure Analysis Pipeline on how to do this within a GitHub Actions Workflow.