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

Allow the user to input its own parameters #73

Open
jvcoutinho opened this issue Nov 20, 2019 · 0 comments
Open

Allow the user to input its own parameters #73

jvcoutinho opened this issue Nov 20, 2019 · 0 comments
Labels
enhancement New feature or request

Comments

@jvcoutinho
Copy link
Collaborator

Problem
I have to consider some statements when extending the Mining Framework that limitates its usage for my machine.

For example, the implementation of S3M's Handlers Analysis requires the merge-tools repository to be in the parent directory of Mining's.

class OutputProcessor implements main.interfaces.OutputProcessor {
private static final Path ANALYSIS_REPOSITORY_PATH = Paths.get('../merge-tools')
static final String ANALYSIS_REMOTE_URL = "https://github.com/jvcoutinho/merge-tools/tree/master/s3m-handlers-analysis"
@Override
void processOutput() {
stageAndPushData()
println 'Pushed data to remote analysis repository'
}
private static void stageAndPushData() {
// Stage changes.
Utils.runGitCommand(ANALYSIS_REPOSITORY_PATH, 'add', '.')
// Commit changes.
Utils.runGitCommand(ANALYSIS_REPOSITORY_PATH, 'commit', '-m', 'Collected data')
// Push changes.
Utils.runGitCommand(ANALYSIS_REPOSITORY_PATH, 'push', '--force-with-lease')
}

Cause
Mining Framework doesn't allow the developer to parameterize its implementations.

Suggestion
Allow the user to input a map of parameters (for example, ["analysisRepositoryPath":"../merge-tools"]) or a json of parameters. The keys of this map would be defined by the developers and it would be parsed by the MF so that they can use it in their implementations.

@jvcoutinho jvcoutinho added the enhancement New feature or request label Nov 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant