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

Pipeline #143

Merged
merged 51 commits into from
Jun 1, 2021
Merged

Pipeline #143

merged 51 commits into from
Jun 1, 2021

Conversation

Furetur
Copy link
Contributor

@Furetur Furetur commented May 20, 2021

Completely replaces old CLI with new pipeline and config

Furetur added 30 commits April 26, 2021 22:52
# Conflicts:
#	src/main/kotlin/astminer/cli/LabelExtractors.kt
# Conflicts:
#	src/main/kotlin/astminer/cli/LabelExtractors.kt
#	src/main/kotlin/astminer/common/model/HandlerModel.kt
#	src/main/kotlin/astminer/examples/Code2VecJavaMethods.kt
# Conflicts:
#	build.gradle.kts
#	src/main/kotlin/astminer/parse/antlr/javascript/JavaScriptMethodSplitter.kt
#	src/test/kotlin/astminer/cli/Code2VecExtractorTest.kt
#	src/test/kotlin/astminer/cli/PathContextsExtractorTest.kt
#	src/test/kotlin/astminer/parse/cpp/FuzzyMethodSplitterTest.kt
#	src/test/kotlin/astminer/parse/gumtree/python/GumTreePythonMethodSplitterTest.kt
# Conflicts:
#	src/main/kotlin/astminer/cli/Code2VecExtractor.kt
#	src/main/kotlin/astminer/cli/LabelExtractors.kt
#	src/main/kotlin/astminer/cli/ProjectParser.kt
#	src/main/kotlin/astminer/cli/utils.kt
#	src/main/kotlin/astminer/common/model/HandlerModel.kt
#	src/main/kotlin/astminer/examples/AllJavaFiles.kt
#	src/main/kotlin/astminer/examples/Code2VecJavaMethods.kt
#	src/main/kotlin/astminer/parse/antlr/javascript/JavaScriptMethodSplitter.kt
#	src/test/kotlin/astminer/cli/LabelExtractorTest.kt
@SpirinEgor SpirinEgor self-requested a review May 23, 2021 14:02
Copy link
Contributor

@SpirinEgor SpirinEgor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some questions:

  • Why do you have an empty file (antlr/javascript/JavaScriptMethodSplitter)
  • There are a lot of warnings from kotlin compiler

configs/function-name-prediction-ast.yml Outdated Show resolved Hide resolved
configs/function-name-prediction-ast.yml Outdated Show resolved Hide resolved
src/main/kotlin/astminer/common/model/ParsingModel.kt Outdated Show resolved Hide resolved
src/main/kotlin/astminer/config/FilterConfigs.kt Outdated Show resolved Hide resolved
src/main/kotlin/astminer/config/FilterConfigs.kt Outdated Show resolved Hide resolved
private fun createStorage(extension: FileExtension): Storage = with(config.storage) {
val storagePath = createStorageDirectory(extension).path

// TODO: should be removed this later and be implemented like filters and problems, once storage constructors have no side effects
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What side effects do you mention here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For example the constructor of CsvAstStorage creates folders on the disk. In this case it is critical because I don't want storageConfig.getStorage() to create directories

src/main/kotlin/astminer/pipeline/PipelineBranch.kt Outdated Show resolved Hide resolved
src/main/kotlin/astminer/pipeline/PipelineBranch.kt Outdated Show resolved Hide resolved
src/main/kotlin/astminer/pipeline/PipelineBranch.kt Outdated Show resolved Hide resolved
Furetur added 7 commits May 24, 2021 15:25
# Conflicts:
#	src/main/kotlin/astminer/cli/FilterPredicates.kt
#	src/main/kotlin/astminer/cli/LabelExtractors.kt
#	src/main/kotlin/astminer/cli/ProjectParser.kt
#	src/main/kotlin/astminer/common/model/ParsingModel.kt
#	src/test/kotlin/astminer/common/TestUtils.kt
@Furetur Furetur requested a review from SpirinEgor May 24, 2021 12:21
Furetur added 5 commits May 24, 2021 17:38
# Conflicts:
#	src/main/kotlin/astminer/cli/Code2VecExtractor.kt
#	src/main/kotlin/astminer/cli/FilterPredicates.kt
#	src/main/kotlin/astminer/cli/LabelExtractors.kt
#	src/main/kotlin/astminer/cli/PathContextsExtractor.kt
#	src/main/kotlin/astminer/cli/ProjectParser.kt
#	src/main/kotlin/astminer/common/model/ParsingModel.kt
#	src/main/kotlin/astminer/examples/AllJavaScriptFiles.kt
#	src/main/kotlin/astminer/examples/AllPythonFiles.kt
#	src/test/kotlin/astminer/cli/LabelExtractorTest.kt
@SpirinEgor SpirinEgor changed the base branch from master-dev to pipeline May 25, 2021 12:29
Copy link
Contributor

@SpirinEgor SpirinEgor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Please rename config extensions. YML corresponds to "Yandex Market Language" and in configs, we use "YAML Ain't Markup Language" or simply YAML.
  • Also, I don't get how you name those configs. I expect more understandable names, like function-name-prediction-path-representation.yaml or file-asts-csv-storage.yaml
  • Create a branch package inside the pipeline package. And move both branches to separate files in this package. I guess storing them all in one file leads to less readability.

configs/function-name-prediction-ast.yml Outdated Show resolved Hide resolved
configs/function-name-prediction-ast.yml Outdated Show resolved Hide resolved
src/main/kotlin/astminer/Main.kt Outdated Show resolved Hide resolved
src/main/kotlin/astminer/Main.kt Outdated Show resolved Hide resolved
src/main/kotlin/astminer/Main.kt Outdated Show resolved Hide resolved
src/main/kotlin/astminer/pipeline/PipelineBranch.kt Outdated Show resolved Hide resolved
src/main/kotlin/astminer/problem/FunctionLevelProblems.kt Outdated Show resolved Hide resolved
src/test/kotlin/astminer/common/TestUtils.kt Outdated Show resolved Hide resolved
src/test/kotlin/astminer/parse/Utils.kt Outdated Show resolved Hide resolved
@Furetur Furetur requested a review from SpirinEgor May 30, 2021 16:51
Copy link
Contributor

@SpirinEgor SpirinEgor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks very good, still some comments about building branches

src/main/kotlin/astminer/filters/Filter.kt Outdated Show resolved Hide resolved
src/main/kotlin/astminer/common/model/HandlerModel.kt Outdated Show resolved Hide resolved
@Furetur Furetur requested a review from SpirinEgor May 31, 2021 14:08
@Furetur Furetur requested a review from SpirinEgor June 1, 2021 13:57
@SpirinEgor SpirinEgor merged commit 2deb5ed into JetBrains-Research:pipeline Jun 1, 2021
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 this pull request may close these issues.

2 participants