IDEA-CR-53045 [stats-collector] Move python ranking model into python plugin

GitOrigin-RevId: 5b4c2f026a24a3714ddc28ad1fded8f4637a9cf5
This commit is contained in:
Vitaliy.Bibaev
2019-11-29 07:07:42 +00:00
committed by intellij-monorepo-bot
parent 19283ee76f
commit 27ae0dc819
6 changed files with 26 additions and 17 deletions
@@ -22,18 +22,6 @@
</SOURCES>
</library>
</orderEntry>
<orderEntry type="module-library">
<library name="completion-ranking-python" type="repository">
<properties include-transitive-deps="false" maven-id="org.jetbrains.intellij.deps.completion:completion-ranking-python:0.0.4" />
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/org/jetbrains/intellij/deps/completion/completion-ranking-python/0.0.4/completion-ranking-python-0.0.4.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$MAVEN_REPOSITORY$/org/jetbrains/intellij/deps/completion/completion-ranking-python/0.0.4/completion-ranking-python-0.0.4-sources.jar!/" />
</SOURCES>
</library>
</orderEntry>
<orderEntry type="module-library">
<library name="completion-ranking-scala" type="repository">
<properties maven-id="org.jetbrains.intellij.deps.completion:completion-ranking-scala:0.0.1" />
@@ -3,16 +3,12 @@ package com.jetbrains.completion.ranker.metadata
import com.jetbrains.completion.ranker.FallbackKotlinMLRankingProvider
import com.jetbrains.completion.ranker.FallbackScalaMLRankingProvider
import com.jetbrains.completion.ranker.PythonMLRankingProvider
import org.junit.Test
class MetadataConsistencyTest {
@Test
fun testKotlinMetadata() = FallbackKotlinMLRankingProvider().assertModelMetadataConsistent()
@Test
fun testPythonMetadata() = PythonMLRankingProvider().assertModelMetadataConsistent()
@Test
fun testScalaMetadata() = FallbackScalaMLRankingProvider().assertModelMetadataConsistent()
}
@@ -22,5 +22,18 @@
<orderEntry type="library" name="StreamEx" level="project" />
<orderEntry type="module" module-name="intellij.platform.projectModel.impl" />
<orderEntry type="module" module-name="intellij.platform.analysis.impl" />
<orderEntry type="module" module-name="intellij.platform.ide.impl" />
<orderEntry type="module-library">
<library name="completion-ranking-python" type="repository">
<properties include-transitive-deps="false" maven-id="org.jetbrains.intellij.deps.completion:completion-ranking-python:0.0.4" />
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/org/jetbrains/intellij/deps/completion/completion-ranking-python/0.0.4/completion-ranking-python-0.0.4.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$MAVEN_REPOSITORY$/org/jetbrains/intellij/deps/completion/completion-ranking-python/0.0.4/completion-ranking-python-0.0.4-sources.jar!/" />
</SOURCES>
</library>
</orderEntry>
</component>
</module>
@@ -30,6 +30,7 @@
<applicationService serviceImplementation="com.jetbrains.python.codeInsight.PyCodeInsightSettings"/>
<completion.ml.model implementation="com.jetbrains.python.codeInsight.completion.ml.PythonMLRankingProvider"/>
<weigher key="completion" implementationClass="com.jetbrains.python.codeInsight.completion.PythonCompletionWeigher" order="first"/>
<referencesSearch implementation="com.jetbrains.python.psi.search.PyInitReferenceSearchExecutor"/>
@@ -1,5 +1,5 @@
// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package com.jetbrains.completion.ranker
package com.jetbrains.python.codeInsight.completion.ml
import com.completion.ranker.model.python.MLWhiteBox
import com.intellij.internal.ml.DecisionFunction
@@ -0,0 +1,11 @@
package com.jetbrains.python.completion.ml;
import com.jetbrains.python.codeInsight.completion.ml.PythonMLRankingProvider;
import org.junit.Test;
public class PythonModelMetadataTest {
@Test
public void testMetadataConsistent() {
new PythonMLRankingProvider().assertModelMetadataConsistent();
}
}