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: README.md
+21-5Lines changed: 21 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -32,13 +32,29 @@ The corresponding path only needs to be un-commented for analysis (all others ha
32
32
33
33
##### 2. Running the tool
34
34
To start the tool via the terminal using the config file, simply enter `python3 code2DFD.py --config_path PATH_TO_CONFIG` in a command line opened in the root directory.
35
-
For example, `python3 code2DFD.py --config_path config/config.ini` for the example config in this repository.
36
-
The extraction will start and some status messages appear on the screen.
37
-
If you want to analyse in application on GitHub, simply put in the GitHub handle, using the `--github_path` option.
38
-
For example, for the repository `https://github.com/sqshq/piggymetrics`, run the command `python3 code2DFD.py --github_path sqshq/piggymetrics`
35
+
For example, `python3 code2DFD.py --config_path config/config.ini` for the [example config](config/config.ini) in this repository.
39
36
37
+
The config file needs to specify the following sections and parameters:
38
+
- Repository
39
+
-`path`: `organization/repository` part of GitHub URL
40
+
-`url`: the full URL of the repository to clone from (may be local path)
41
+
-`local_path`: local directory to clone the repository to (without the repository name itself)
42
+
- Technology profiles: same as in [example config](config/config.ini)
43
+
- DFD: empty section
44
+
- Analysis Settings (optional)
45
+
-`development_mode`: boolean, turns on development mode
46
+
-`commit`: hash of the commit to checkout and analyze; repository will be returned to the same commit it was in before analysis; if commit not provided, attempts to checkout `HEAD`
47
+
48
+
It is possible to provide these parameters also by command line, see `python3 code2DFD.py --help` for exact usage
49
+
50
+
If both config file and CLI arguments provided, CLI arguments take precedence
51
+
52
+
###### 2.1 RESTful service
40
53
To run the tool as a RESTful API service, run `python3 flask_code2DFD.py`.
41
-
This will spawn up a Flask server and you can trigger DFD-extractions by sending a request to or opening your browser at `localhost:5000/dfd?path=*repository/path*`
54
+
55
+
This will spawn up a Flask server and you can trigger DFD-extractions by sending a request to `localhost:5001/dfd` with parameters `url` and optionally `commit`.
56
+
57
+
Currently only GitHub URLs are supported this way.
0 commit comments