You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: COMMANDS.md
+53-16Lines changed: 53 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,30 +2,67 @@
2
2
3
3
## Start an analysis
4
4
5
-
Use the following commands in the root directory of this repository to start an analysis manually e.g. for [AxonFramework](./scripts/artifacts/downloadAxonFramework.sh).
Add the command line argument `--profile Neo4jv4` if you want to use the older long term support (june 2023)
18
-
version v4.4.x of Neo4j and compatible versions of plugins and JQAssistant.
39
+
1. Optionally use a script to download artifacts from Maven ([details](#download-maven-artifacts-to-analyze))
40
+
41
+
1. Start the analysis
42
+
43
+
```shell
44
+
./../../scripts/analysis/analyze.sh
45
+
```
46
+
47
+
👉 See [scripts/examples/analyzeAxonFramework.sh](./scripts/examples/analyzeAxonFramework.sh) as an example script that combines all the above steps.
48
+
👉 See [code-reports Pipeline](./.github/workflows/code-reports.yml) on how to do this within a GitHub Actions Workflow.
49
+
50
+
### Command Line Options
51
+
52
+
The [analyze.sh](./scripts/analysis/analyze.sh) command comes with these command line options:
53
+
54
+
- `--report Csv` only generates CSV reports. This speeds up the report generation and doesn't depend on Python, Jupyter Notebook or any other related dependencies. The default value os `All` to generate all reports. `Jupiter` will only generate Jupyter Notebook reports.
55
+
56
+
- `--profile Neo4jv4` uses the older long term support (june 2023) version v4.4.x of Neo4j and suitable compatible versions of plugins and JQAssistant. `Neo4jv5` will explicitly select the newest (june 2023) version 5.x of Neo4j. Without setting
57
+
a profile, the newest versions will be used. Profiles are scripts that can be found in the directory [scripts/profiles](./scripts/profiles/).
58
+
59
+
- `--explore` activates the "explore" mode where no reports are generated. Furthermore, Neo4j won't be stopped at the end of the script and will therefore continue running. This makes it easy to just set everything up but then use the running Neo4j server to explore the data manually.
19
60
20
61
### Notes
21
62
22
-
- Be sure to use Java 11 (Mai 2023 Neo4j v4 requirement) or Java 17 (June 2023 Neo4j v5 and jQAssistant CLI v2)
63
+
- Be sure to use Java 17 forNeo4j v5 and Java 11 forNeo4j v4
23
64
- Use your own initial Neo4j password
24
65
- For more details have a look at the script [analyze.sh](./scripts/analysis/analyze.sh)
25
-
- The script file names (without the prefix "download" and without the file extension) in the directory [scripts/artifacts](./scripts/artifacts) provide all analysis names that are available.
26
-
27
-
28
-
Have a look at [code-reports.yml](./.github/workflows/code-reports.yml) for all details about setup steps and full automation.
- Trigger Artifacts download that contain the code to be analyzed [scripts/artifacts](./scripts/artifacts/)
65
65
- Generate CSV Reports [scripts/reports](./scripts/reports) using the command line JSON parser [jq](https://jqlang.github.io/jq)
66
66
- Generate [Jupyter Notebook](https://jupyter.org) reports using these libraries specified in the [environment.yml](./jupyter/environment.yml):
67
67
-[Python](https://www.python.org)
@@ -97,7 +97,7 @@ The [Code Reports Pipeline](./.github/workflows/code-reports.yml) utilizes [GitH
97
97
## 🤔 Questions & Answers
98
98
99
99
- How can i run an analysis locally?
100
-
👉 See [start-an-analysis](./COMMANDS.md#start-an-analysis) in the [Commands Reference](./COMMANDS.md).
100
+
👉 See [Start an analysis](./COMMANDS.md#start-an-analysis) in the [Commands Reference](./COMMANDS.md).
101
101
102
102
- How can i add an CSV report to the pipeline?
103
103
👉 Put your new cypher query into the [cypher](./cypher) directory or a suitable (new) sub directory.
@@ -109,12 +109,12 @@ The [Code Reports Pipeline](./.github/workflows/code-reports.yml) utilizes [GitH
109
109
👉 Create a new Jupyter report script in the [scripts/reports](./scripts/reports/) directory. Take [OverviewJupyter.sh](./scripts/reports/OverviewJupyter.sh) as a reference for example.
110
110
👉 The script will automatically be included because of the directory and its name ending with "Jupyter.sh".
111
111
112
-
- How can i add another code base to analyze?
113
-
👉 Create an new artifacts download script in the [scripts/artifacts](./scripts/artifacts) directory. Take [downloadAxonFramework.](./scripts/artifacts/downloadAxonFramework.sh) as a reference for example.
114
-
👉 The script will be triggered when the [analyze](./scripts/analysis/analyze.sh)command
112
+
- How can i add another code basis to be analyzed automatically?
113
+
👉 Create a new artifacts download script in the [scripts/artifacts](./scripts/artifacts) directory. Take for example [downloadAxonFramework.sh](./scripts/downloader/downloadAxonFramework.sh) as a reference.
114
+
👉 Run the script separately before executing [analyze.sh](./scripts/analysis/analyze.sh)also in the [pipeline](./.github/workflows/code-reports.yml).
115
115
116
116
- How can i trigger a full rescan of all artifacts?
117
-
👉 Delete the file `artifactsChangeDetectionHash.txt` in the temporary `artifacts` directory.
117
+
👉 Delete the file `artifactsChangeDetectionHash.txt` in the `artifacts` directory.
118
118
119
119
- How can PDF generation be skipped to speed up report generation and not depend on chromium?
120
120
👉 Set environment variable `SKIP_JUPYTER_NOTEBOOK_PDF_GENERATION` to anything except an empty string. Example:
|[copyReportsIntoResults.sh](./copyReportsIntoResults.sh)|| Copies the results from the temp directory to the results directory grouped by the analysis name. |
11
10
|[detectChangedArtifacts.sh](./detectChangedArtifacts.sh)|| Detect changed files in the artifacts directory with a text file containing the last hash code of the contents. |
12
11
|[downloadMavenArtifact.sh](./downloadMavenArtifact.sh)|| Downloads an artifact from Maven Central (https://mvnrepository.com/repos/central)|
|[executeJupyterNotebook.sh](./executeJupyterNotebook.sh)|| Executes all steps in the given Jupyter Notebook (ipynb), stores it and converts it to Markdown (md) and PDF. |
14
14
|[executeQuery.sh](./executeQuery.sh)|| Utilizes Neo4j's HTTP API to execute a Cypher query from an input file and provides the results in CSV format. |
15
15
|[executeQueryFunctions.sh](./executeQueryFunctions.sh)|| Provides functions to execute Cypher queries using either "executeQuery.sh" or Neo4j's "cypher-shell". |
echo"analyze ${analysisName}: Error: No download${analysisName}.sh script in the directory ${SCRIPTS_DIR}/${ARTIFACT_SCRIPTS_DIRECTORY} for analysis name ${analysisName}."
123
-
exit 1
124
-
fi
99
+
echo"analyze: SCRIPTS_DIR=${SCRIPTS_DIR}"
125
100
126
101
# Assure that there is a report compilation script for the given report argument.
echo"analyze${analysisName}: Error: No ${analysisReportCompilation}Reports.sh script in the directory ${SCRIPTS_DIR}/${REPORTS_SCRIPTS_DIRECTORY}/${REPORT_COMPILATIONS_SCRIPTS_DIRECTORY} for report name ${analysisReportCompilation}."
104
+
echo"analyze: Error: No ${analysisReportCompilation}Reports.sh script in the directory ${SCRIPTS_DIR}/${REPORTS_SCRIPTS_DIRECTORY}/${REPORT_COMPILATIONS_SCRIPTS_DIRECTORY} for report name ${analysisReportCompilation}."
130
105
exit 1
131
106
fi
132
107
133
108
# Assure that there is a script file for the given settings profile name.
echo"analyze${analysisName}: Error: No ${settingsProfile}.sh script in the directory ${SCRIPTS_DIR}/${SETTINGS_PROFILE_SCRIPTS_DIRECTORY} for settings profile ${settingsProfile}."
111
+
echo"analyze: Error: No ${settingsProfile}.sh script in the directory ${SCRIPTS_DIR}/${SETTINGS_PROFILE_SCRIPTS_DIRECTORY} for settings profile ${settingsProfile}."
137
112
exit 1
138
113
fi
139
114
140
115
# Execute the settings profile script that sets all the neccessary settings variables (overrideable by environment variables).
141
-
echo"analyze ${analysisName}: Using analysis settings profile script ${SETTINGS_PROFILE_SCRIPT}"
142
-
source"${SETTINGS_PROFILE_SCRIPT}"||exit 1
143
-
144
-
# Create working directory if it hadn't been created yet
0 commit comments