Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

coming should always write coming_result.json at the end of an analysis #124

Closed
monperrus opened this issue Jul 22, 2019 · 5 comments · Fixed by #130
Closed

coming should always write coming_result.json at the end of an analysis #124

monperrus opened this issue Jul 22, 2019 · 5 comments · Fixed by #130

Comments

@monperrus
Copy link
Contributor

monperrus commented Jul 22, 2019

the Coming core should collect all JSON results, process them and write them to disk in coming_result.json.

For this, it'd be nice to have FinalResult be serializable to JSON

@martinezmatias
Copy link
Collaborator

Hi Martin
Right now we have an extension point with one implementation of it that exports the results to JSON.
The interface that represents the extension point is: https://github.com/SpoonLabs/coming/blob/HEAD/src/main/java/fr/inria/coming/core/entities/interfaces/IOutput.java

and one of the implementation is : https://github.com/SpoonLabs/coming/blob/ecfcf05577afdd0ab7a1eeb19d0b471e6ec6f750/src/main/java/fr/inria/coming/core/entities/output/JSonPatternInstanceOutput.java

(Via command line we can pass severals output)

I agree that this part must be improved, e.g., I would add to the entities FinalResults and RevisionResult an abstract method toJSON.
Now, the outputs are completely uncoupled from the analyzers and from the results. Maybe we would add an explicit link e.g., "always that I use an Analyzer X, then the output processor will be Y " .
WDYT?

WDYT?

@monperrus
Copy link
Contributor Author

I would add to the entities FinalResults and RevisionResult an abstract method toJSON.

Yes that would be great. The goal is that every run create by default a JSON file and the last line in the log would be "created 'coming_result.json'": this is the added value of Coming (instead of the log lines, see #115).

(The inspiration for this comes from the great https://github.com/mast-group/mineSStuBs/)

@martinezmatias
Copy link
Collaborator

The goal is that every run create by default a JSON file and the last line in the log would be "created 'coming_result.json'"

Yes, actually we have something similar to that (example). However, as shown in that example, it's each output processor who stores the JSON (and eventually logs the path to the file). I would say that the Coming core must do that instead (i.e., the output processor should only return the json and the core processes them)

@monperrus monperrus changed the title FinalResult should be serializable to JSON coming should always write coming_result.json at the end of an analysis Jul 24, 2019
@monperrus
Copy link
Contributor Author

Fully agree. Updated the title and desc of the PR.

@niloofartrg what about having a look at this in parallel of your experiments?

@monperrus
Copy link
Contributor Author

after discussion with @niloofartrg

it's the responsibility of each mode to save the JSON file at the right place.

#130 makes sure that the features mode do create one JSON file per commit

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants