mirror of
https://github.com/MarginaliaSearch/MarginaliaSearch.git
synced 2025-02-24 21:29:00 +00:00

Look, this will make the git history look funny, but trimming unnecessary depth from the source tree is a very necessary sanity-preserving measure when dealing with a super-modularized codebase like this one. While it makes the project configuration a bit less conventional, it will save you several clicks every time you jump between modules. Which you'll do a lot, because it's *modul*ar. The src/main/java convention makes a lot of sense for a non-modular project though. This ain't that.
28 lines
1.3 KiB
Java
28 lines
1.3 KiB
Java
package nu.marginalia.converting;
|
|
|
|
import com.google.inject.AbstractModule;
|
|
import com.google.inject.name.Names;
|
|
import nu.marginalia.LanguageModels;
|
|
import nu.marginalia.ProcessConfiguration;
|
|
import nu.marginalia.WmsaHome;
|
|
import nu.marginalia.converting.processor.ConverterDomainTypes;
|
|
import nu.marginalia.service.module.ServiceConfiguration;
|
|
import org.mockito.Mockito;
|
|
|
|
public class ConvertingIntegrationTestModule extends AbstractModule {
|
|
public void configure() {
|
|
bind(Double.class).annotatedWith(Names.named("min-document-quality")).toInstance(-15.);
|
|
bind(Integer.class).annotatedWith(Names.named("min-document-length")).toInstance(250);
|
|
bind(Integer.class).annotatedWith(Names.named("max-title-length")).toInstance(128);
|
|
bind(Integer.class).annotatedWith(Names.named("max-summary-length")).toInstance(255);
|
|
bind(ServiceConfiguration.class).toInstance(new ServiceConfiguration(
|
|
null, 1, "localhost", "localhost", 0, null
|
|
));
|
|
bind(ProcessConfiguration.class).toInstance(new ProcessConfiguration(
|
|
"converting-process", 1, null
|
|
));
|
|
bind(LanguageModels.class).toInstance(WmsaHome.getLanguageModels());
|
|
bind(ConverterDomainTypes.class).toInstance(Mockito.mock(ConverterDomainTypes.class));
|
|
}
|
|
}
|