diff --git a/.github/workflows/typescript-code-analysis.yml b/.github/workflows/typescript-code-analysis.yml index 7a6f851a0..392e6b929 100644 --- a/.github/workflows/typescript-code-analysis.yml +++ b/.github/workflows/typescript-code-analysis.yml @@ -65,7 +65,7 @@ jobs: distribution: 'adopt' java-version: ${{ matrix.java }} - - name: Setup Node.js for Graph Visualization + - name: Setup Node.js uses: actions/setup-node@v4 with: node-version-file: 'graph-visualization/.nvmrc' @@ -112,6 +112,11 @@ jobs: key: ${{ runner.os }}-${{ hashFiles('**/*.sh') }} + - name: Setup pnpm for react-router + uses: pnpm/action-setup@v3.0.0 + with: + version: 8.10.5 + - name: Download ${{ env.PROJECT_NAME }}-${{ env.REACT_ROUTER_VERSION }} working-directory: temp run: | diff --git a/jupyter/NodeEmbeddingsTypescript.ipynb b/jupyter/NodeEmbeddingsTypescript.ipynb index b65333e0d..775c77733 100644 --- a/jupyter/NodeEmbeddingsTypescript.ipynb +++ b/jupyter/NodeEmbeddingsTypescript.ipynb @@ -243,7 +243,7 @@ "source": [ "def prepare_node_embeddings_for_2d_visualization(embeddings: pd.DataFrame) -> pd.DataFrame:\n", " \"\"\"\n", - " Reduces the dimensionality of the node embeddings (e.g. 64 floating point numbers in an array)\n", + " Reduces the dimensionality of the node embeddings (e.g. 32 floating point numbers in an array)\n", " to two dimensions for 2D visualization.\n", " see https://scikit-learn.org/stable/modules/generated/sklearn.manifold.TSNE.html#sklearn.manifold.TSNE\n", " \"\"\"\n", @@ -448,7 +448,7 @@ " \"dependencies_projection_node\": \"Module\",\n", " \"dependencies_projection_weight_property\": \"lowCouplingElement25PercentWeight\",\n", " \"dependencies_projection_write_property\": \"embeddingsHashGNN\",\n", - " \"dependencies_projection_embedding_dimension\":\"64\"\n", + " \"dependencies_projection_embedding_dimension\":\"32\"\n", "}\n", "embeddings = create_node_embeddings(\"../cypher/Node_Embeddings/Node_Embeddings_2d_Hash_GNN_Stream.cypher\", typescript_module_embeddings_parameters)\n", "node_embeddings_for_visualization = prepare_node_embeddings_for_2d_visualization(embeddings)\n", diff --git a/jupyter/OverviewJava.ipynb b/jupyter/OverviewJava.ipynb index ebdb30148..1b1fd4e2d 100644 --- a/jupyter/OverviewJava.ipynb +++ b/jupyter/OverviewJava.ipynb @@ -492,6 +492,7 @@ "name": "JohT" } ], + "code_graph_analysis_pipeline_data_validation": "ValidateJavaTypes", "kernelspec": { "display_name": "Python 3 (ipykernel)", "language": "python", diff --git a/scripts/downloader/downloadReactRouter.sh b/scripts/downloader/downloadReactRouter.sh index a8d6e2c6d..941d52d4d 100755 --- a/scripts/downloader/downloadReactRouter.sh +++ b/scripts/downloader/downloadReactRouter.sh @@ -9,8 +9,13 @@ # Note: This script is meant to be started within the temporary analysis directory (e.g. "temp/AnalysisName/") +# Note: react-router uses pnpm as package manager which needs to be installed + # Requires downloadMavenArtifact.sh +# Fail on any error (errexit = exit on first error, errtrace = error inherited from sub-shell ,pipefail exist on errors within piped commands) +set -o errexit -o errtrace -o pipefail + # Get the analysis name from the middle part of the current file name (without prefix "download" and without extension) SCRIPT_FILE_NAME="$(basename -- "${BASH_SOURCE[0]}")" SCRIPT_FILE_NAME_WITHOUT_EXTENSION="${SCRIPT_FILE_NAME%%.*}" @@ -29,15 +34,18 @@ fi PROJECT_VERSION=$1 echo "download${ANALYSIS_NAME}: PROJECT_VERSION=${PROJECT_VERSION}" +# Create runtime logs directory if it hasn't existed yet +mkdir -p ./runtime/logs + ################################################################ # Download react-router source files to be analyzed ################################################################ git clone https://github.com/remix-run/react-router.git source ( cd source || exit - git checkout "react-router@${PROJECT_VERSION}" - yarn install || yarn - npx --yes @jqassistant/ts-lce >jqassostant-typescript-scan.log + git checkout "react-router@${PROJECT_VERSION}" || exit + pnpm install --frozen-lockfile || exit + npx --yes @jqassistant/ts-lce >./../runtime/logs/jqassostant-typescript-scan.log 2>&1 || exit ) mkdir -p artifacts mv -nv "source/.reports/jqa/ts-output.json" "artifacts/ts-react-router-${PROJECT_VERSION}.json" diff --git a/scripts/reports/NodeEmbeddingsCsv.sh b/scripts/reports/NodeEmbeddingsCsv.sh index 7e08928c4..53ef49b8a 100755 --- a/scripts/reports/NodeEmbeddingsCsv.sh +++ b/scripts/reports/NodeEmbeddingsCsv.sh @@ -190,7 +190,7 @@ MODULE_PROJECTION="dependencies_projection=typescript-module-embeddings" MODULE_NODE="dependencies_projection_node=Module" MODULE_WEIGHT="dependencies_projection_weight_property=lowCouplingElement25PercentWeight" MODULE_DIMENSIONS="dependencies_projection_embedding_dimension=32" -MODULE_DIMENSIONS_HASHGNN="dependencies_projection_embedding_dimension=64" +MODULE_DIMENSIONS_HASHGNN="dependencies_projection_embedding_dimension=32" if createUndirectedDependencyProjection "${MODULE_PROJECTION}" "${MODULE_NODE}" "${MODULE_WEIGHT}"; then time nodeEmbeddingsWithFastRandomProjection "${MODULE_PROJECTION}" "${MODULE_NODE}" "${MODULE_WEIGHT}" "${MODULE_DIMENSIONS}"