Closed dschiese closed 10 months ago
@dschiese Please check and resolve the merge conflicts.
Generally: Some components require the api-kes, which are likely to be injected within the github-action. This mainly affects NER/NED components.
NER-MeaningCloud
mvn test
were successful:
QB-BirthDataWikidata
QB-PlatypusWrapper
mvn test
were successful:
QB-SimpleRealNameOfSuperhero
mvn test
were successful:
QB-ComicCharacterAlterEgo
QE-SparqlExecuter
mvn test
were successful:
QE-Wikidata
getAllAnnotationOfAnswerInGraph()
method from the QanaryTripleStoreConnector which uses the select_all_AnnotationOfAnswerJSON.rq-file which in this case references to ?graph
while the file asks for graphURI
@dschiese change that and test againTQA-ChatGPTWrapper
I changed the implementation of the TestConfiguration::
String path = TestConfiguration.class.getClassLoader().getResource(testQueryFilename).getPath();
return new String(Files.readAllBytes(Paths.get(path)));
As we use the select queries from the commons and not from the local resource directory this seem not to work for this specific case. I figured out that the old approach is appropriate for files within the filesystem and getPath() fails when it comes to returning a path for a file inside a jar (=> qa.commons and other dependencies). Therefor the file has to be handled as a InputStream (just like the QanaryTripleStoreConnectors do, see https://github.com/WDAqua/Qanary/blob/ba977877097e37b068a56eeae0e17972f1c572b0/qanary_commons/src/main/java/eu/wdaqua/qanary/commons/triplestoreconnectors/QanaryTripleStoreConnector.java#L79-L89).
2023-12-17 17:37:16.758 INFO 24896 --- [ main] e.w.q.c.platypuswrapper.qb.Application : Starting Application v3.3.1 using Java 17.0.9 on fedora.fritz.box with PID 24896 (/home/dschiese/wseresearch/forked_repositories/Qanary-question-answering-components/qanary-component-QB-PlatypusWrapper/target/qanary-component-QB-PlatypusWrapper-3.3.1.jar started by dschiese in /home/dschiese/wseresearch/forked_repositories/Qanary-question-answering-components/qanary-component-QB-PlatypusWrapper)
2023-12-17 17:37:16.761 DEBUG 24896 --- [ main] e.w.q.c.platypuswrapper.qb.Application : Running with Spring Boot v2.7.9, Spring v5.3.25
2023-12-17 17:37:16.761 INFO 24896 --- [ main] e.w.q.c.platypuswrapper.qb.Application : No active profile set, falling back to 1 default profile: "default"
2023-12-17 17:37:18.927 INFO 24896 --- [ main] e.w.q.c.QanaryComponentConfiguration : Current Component Configuration:
server.host = null
server.port = 5555
spring.application.name = PlatypusQueryBuilder
spring.application.description = PlatypusQueryBuilder is a Qanary component
spring.boot.admin.url = http://localhost:8080
spring.boot.admin.client.url = http://localhost:8080
2023-12-17 17:37:18.943 WARN 24896 --- [ main] e.w.q.c.CacheOfRestTemplateResponse : CacheResponse: initialized 2023-12-17 17:37:19.040 WARN 24896 --- [ main] e.w.q.c.RestTemplateWithCaching : eu.wdaqua.qanary.communications.RestTemplateWithCaching was initialized 2023-12-17 17:37:19.105 INFO 24896 --- [ main] e.w.q.c.p.qb.PlatypusQueryBuilder : supportedLang: [en, fr, es] 2023-12-17 17:37:19.108 INFO 24896 --- [ main] w.q.c.p.q.PlatypusQueryBuilderController : Service API docs available at http://0.0.0.0:5555/api-docs 2023-12-17 17:37:19.108 INFO 24896 --- [ main] w.q.c.p.q.PlatypusQueryBuilderController : Service API docs UI available at http://0.0.0.0:5555/swagger-ui.html 2023-12-17 17:37:19.112 INFO 24896 --- [ main] q.c.QanaryComponentDescriptionController : location of component-description.ttl: jar:file:/home/dschiese/wseresearch/forked_repositories/Qanary-question-answering-components/qanary-component-QB-PlatypusWrapper/target/qanary-component-QB-PlatypusWrapper-3.3.1.jar!/BOOT-INF/classes!/component-description.ttl 2023-12-17 17:37:19.549 INFO 24896 --- [ main] q.c.QanaryComponentDescriptionController : result for 'TURTLE': @prefix ISO6391: http://id.loc.gov/vocabulary/iso639-1/ . @prefix qa: https://w3id.org/wdaqua/qanary# . @prefix rdfs: http://www.w3.org/2000/01/rdf-schema# .
qa:Platypus a qa:QanaryComponentQB ; rdfs:label "Qanary component: Platypus Query Builder"@en ; qa:hasInputAnnotations [ a qa:AnnotationQuestion ; qa:supportedLanguages ISO6391:es , ISO6391:fr , ISO6391:en ] ; qa:hasOutputAnnotations [ a qa:AnnotationAnswer ; qa:supportedKnowledgeGraphs http://wikidata.org ] ; qa:hasOutputAnnotations [ a qa:AnnotationOfAnswerType ; qa:supportedKnowledgeGraphs http://wikidata.org ] ; qa:hasOutputAnnotations [ a qa:AnnotationOfAnswerSPARQL ; qa:supportedKnowledgeGraphs http://wikidata.org ] .
2023-12-17 17:37:19.550 INFO 24896 --- [ main] q.c.QanaryComponentDescriptionController : size of loaded model: 16 triples as TURTLE @prefix ISO6391: http://id.loc.gov/vocabulary/iso639-1/ . @prefix qa: https://w3id.org/wdaqua/qanary# . @prefix rdfs: http://www.w3.org/2000/01/rdf-schema# .
qa:Platypus a qa:QanaryComponentQB ; rdfs:label "Qanary component: Platypus Query Builder"@en ; qa:hasInputAnnotations [ a qa:AnnotationQuestion ; qa:supportedLanguages ISO6391:es , ISO6391:fr , ISO6391:en ] ; qa:hasOutputAnnotations [ a qa:AnnotationAnswer ; qa:supportedKnowledgeGraphs http://wikidata.org ] ; qa:hasOutputAnnotations [ a qa:AnnotationOfAnswerType ; qa:supportedKnowledgeGraphs http://wikidata.org ] ; qa:hasOutputAnnotations [ a qa:AnnotationOfAnswerSPARQL ; qa:supportedKnowledgeGraphs http://wikidata.org ] .
2023-12-17 17:37:19.553 INFO 24896 --- [ main] e.w.q.c.p.qb.PlatypusQueryBuilder : supportedLang: [en, fr, es] 2023-12-17 17:37:19.554 INFO 24896 --- [ main] e.w.q.component.QanaryServiceController : qanaryComponent: eu.wdaqua.qanary.component.platypuswrapper.qb.PlatypusQueryBuilder@3e83c18 2023-12-17 17:37:19.564 INFO 24896 --- [ main] e.w.qanary.commons.config.CacheConfig : cacheManager configuration: maximumSize=100000,expireAfterAccess=7d 2023-12-17 17:37:20.374 INFO 24896 --- [ main] org.quartz.impl.StdSchedulerFactory : Using default implementation for ThreadExecutor 2023-12-17 17:37:20.383 INFO 24896 --- [ main] org.quartz.core.SchedulerSignalerImpl : Initialized Scheduler Signaller of type: class org.quartz.core.SchedulerSignalerImpl 2023-12-17 17:37:20.383 INFO 24896 --- [ main] org.quartz.core.QuartzScheduler : Quartz Scheduler v.2.3.2 created. 2023-12-17 17:37:20.384 INFO 24896 --- [ main] org.quartz.simpl.RAMJobStore : RAMJobStore initialized. 2023-12-17 17:37:20.384 INFO 24896 --- [ main] org.quartz.core.QuartzScheduler : Scheduler meta-data: Quartz Scheduler (v2.3.2) 'quartzScheduler' with instanceId 'NON_CLUSTERED' Scheduler class: 'org.quartz.core.QuartzScheduler' - running locally. NOT STARTED. Currently in standby mode. Number of jobs executed: 0 Using thread pool 'org.quartz.simpl.SimpleThreadPool' - with 10 threads. Using job-store 'org.quartz.simpl.RAMJobStore' - which does not support persistence. and is not clustered.
2023-12-17 17:37:20.384 INFO 24896 --- [ main] org.quartz.impl.StdSchedulerFactory : Quartz scheduler 'quartzScheduler' initialized from an externally provided properties instance. 2023-12-17 17:37:20.384 INFO 24896 --- [ main] org.quartz.impl.StdSchedulerFactory : Quartz scheduler version: 2.3.2 2023-12-17 17:37:20.384 INFO 24896 --- [ main] org.quartz.core.QuartzScheduler : JobFactory set to: org.springframework.scheduling.quartz.SpringBeanJobFactory@3fc05ea2 2023-12-17 17:37:20.458 INFO 24896 --- [ main] o.s.s.quartz.SchedulerFactoryBean : Starting Quartz Scheduler now 2023-12-17 17:37:20.458 INFO 24896 --- [ main] org.quartz.core.QuartzScheduler : Scheduler quartzScheduler_$_NON_CLUSTERED started. 2023-12-17 17:37:20.473 INFO 24896 --- [ main] e.w.q.c.platypuswrapper.qb.Application : Started Application in 4.134 seconds (JVM running for 4.749) 2023-12-17 17:37:20.549 WARN 24896 --- [gistrationTask1] d.c.b.a.c.r.ApplicationRegistrator : Failed to register application as Application(name=PlatypusQueryBuilder, managementUrl=http://localhost:5555/actuator, healthUrl=http://localhost:5555/actuator/health, serviceUrl=http://localhost:5555/) at spring-boot-admin ([http://localhost:8080/instances]): I/O error on POST request for "http://localhost:8080/instances": Connect to localhost:8080 [localhost/127.0.0.1, localhost/0:0:0:0:0:0:0:1] failed: Connection refused; nested exception is org.apache.http.conn.HttpHostConnectException: Connect to localhost:8080 [localhost/127.0.0.1, localhost/0:0:0:0:0:0:0:1] failed: Connection refused. Further attempts are logged on DEBUG level
How did you start the component? Additionally: My m2 repository contains `.../jena-base/4.10.0/jena-base-4.10.0.jar` and ` .../jena-arq/4.9.0/jena-arq-4.10.0.jar`
---
6. **QE-SparqlExecuter**
Probably refers to the same problem as **QB-PlatypusWrapper**.
---
7. **QE-Wikidata**
There is a problem with the SELECT-Query for the Type AnnotationOfAnswerJSON. I created a [issue](https://github.com/WSE-research/team-tasks/issues/387) refering this problem. Additionally I adjusted the test too, because the assertion accessed the wrong value.
---
### TL;DR
Adjusted some tests, however, for every component to work it is required to fix the mentioned [problem with the SELECT-Query for the type AnnotationOfAnswerJSON ](https://github.com/WSE-research/team-tasks/issues/387).
With that being said, please don't merge yet.
Added some more changes and for me every tests within that branch works out now.
@caldoe Could you test them on your system once again, please?
Important: Recent changes in the components lead to some merge conflicts, which I will resolve.
Please mention any issues since the changes target several components :-)