2023-03-16 20:35:54 +00:00
|
|
|
package nu.marginalia.converting;
|
|
|
|
|
|
|
|
import com.google.inject.AbstractModule;
|
|
|
|
import com.google.inject.name.Names;
|
|
|
|
import nu.marginalia.LanguageModels;
|
2023-11-06 15:14:58 +00:00
|
|
|
import nu.marginalia.ProcessConfiguration;
|
2023-03-16 20:35:54 +00:00
|
|
|
import nu.marginalia.WmsaHome;
|
2023-07-10 15:36:12 +00:00
|
|
|
import nu.marginalia.converting.processor.ConverterDomainTypes;
|
2023-11-04 13:24:17 +00:00
|
|
|
import nu.marginalia.service.module.ServiceConfiguration;
|
2023-07-10 15:36:12 +00:00
|
|
|
import org.mockito.Mockito;
|
2023-03-16 20:35:54 +00:00
|
|
|
|
|
|
|
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);
|
2023-11-04 13:24:17 +00:00
|
|
|
bind(ServiceConfiguration.class).toInstance(new ServiceConfiguration(
|
2024-02-20 10:41:14 +00:00
|
|
|
null, 1, "localhost", "localhost", 0, null
|
2023-11-04 13:24:17 +00:00
|
|
|
));
|
2023-11-06 15:14:58 +00:00
|
|
|
bind(ProcessConfiguration.class).toInstance(new ProcessConfiguration(
|
|
|
|
"converting-process", 1, null
|
|
|
|
));
|
2023-03-16 20:35:54 +00:00
|
|
|
bind(LanguageModels.class).toInstance(WmsaHome.getLanguageModels());
|
2023-07-10 15:36:12 +00:00
|
|
|
bind(ConverterDomainTypes.class).toInstance(Mockito.mock(ConverterDomainTypes.class));
|
2023-03-16 20:35:54 +00:00
|
|
|
}
|
|
|
|
}
|