Skip to content

Commit

Permalink
Merge pull request #27 from EBI-IntAct/uniplex-import
Browse files Browse the repository at this point in the history
Update dependencies
  • Loading branch information
jmedinaebi authored Aug 20, 2024
2 parents c45ecd3 + c7cce2a commit a7190c1
Show file tree
Hide file tree
Showing 13 changed files with 57 additions and 21 deletions.
11 changes: 11 additions & 0 deletions intact-cv-update/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@
<artifactId>intact-cv-update</artifactId>
<name>IntAct Database Update :: CV Update</name>

<properties>
<retry.maxAttempts>5</retry.maxAttempts>
<retry.multiplier>2</retry.multiplier>
<retry.maxDelay>5000</retry.maxDelay>
</properties>

<dependencies>
<dependency>
<groupId>uk.ac.ebi.intact.core</groupId>
Expand Down Expand Up @@ -45,5 +51,10 @@
<artifactId>spring-beans</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.retry</groupId>
<artifactId>spring-retry</artifactId>
<version>${spring.retry.version}</version>
</dependency>
</dependencies>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.annotation.DirtiesContext;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.TestPropertySource;
import org.springframework.transaction.TransactionStatus;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
Expand All @@ -27,6 +28,7 @@
@ContextConfiguration(locations = {"classpath*:/META-INF/intact.spring.xml",
"classpath*:/META-INF/standalone/*-standalone.spring.xml",
"classpath*:/META-INF/beanscv*.spring.xml"})
@TestPropertySource(locations="classpath:/META-INF/cv-update.properties")
public class CvUpdateManagerTest extends IntactBasicTestCase{

@Autowired
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.annotation.DirtiesContext;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.TestPropertySource;
import org.springframework.transaction.TransactionStatus;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
Expand All @@ -28,6 +29,7 @@
"classpath*:/META-INF/standalone/*-standalone.spring.xml",
"classpath*:/META-INF/beanscv*.spring.xml"
})
@TestPropertySource(locations="classpath:/META-INF/cv-update.properties")
public class GlobalCvUpdateRunnerTest extends IntactBasicTestCase {

@Autowired
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.annotation.DirtiesContext;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.TestPropertySource;
import org.springframework.transaction.TransactionStatus;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
Expand Down Expand Up @@ -35,6 +36,7 @@
@ContextConfiguration(locations = {"classpath*:/META-INF/intact.spring.xml",
"classpath*:/META-INF/standalone/*-standalone.spring.xml",
"classpath*:/META-INF/beanscv*.spring.xml"})
@TestPropertySource(locations="classpath:/META-INF/cv-update.properties")
public class CvImporterTest extends IntactBasicTestCase{

private CvUpdateManager cvManager;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.annotation.DirtiesContext;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.TestPropertySource;
import org.springframework.transaction.TransactionStatus;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
Expand Down Expand Up @@ -35,6 +36,7 @@
@ContextConfiguration(locations = {"classpath*:/META-INF/intact.spring.xml",
"classpath*:/META-INF/standalone/*-standalone.spring.xml",
"classpath*:/META-INF/beanscv*.spring.xml"})
@TestPropertySource(locations="classpath:/META-INF/cv-update.properties")
public class ObsoleteCvRemapperTest extends IntactBasicTestCase {

private CvUpdateManager cvManager;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.annotation.DirtiesContext;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.TestPropertySource;
import org.springframework.transaction.TransactionStatus;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
Expand All @@ -32,6 +33,7 @@
@ContextConfiguration(locations = {"classpath*:/META-INF/intact.spring.xml",
"classpath*:/META-INF/standalone/*-standalone.spring.xml",
"classpath*:/META-INF/beanscv*.spring.xml"})
@TestPropertySource(locations="classpath:/META-INF/cv-update.properties")
public class CvUpdaterTest extends IntactBasicTestCase{

private CvUpdateManager cvManager;
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
update.report=reports
update.report=reports
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ public void updateByACs(List<String> protACsToUpdate) throws ProcessorException
for (String ac : chunkIntactProteins) {
log.fatal("FATAL: We failed to update the protein " + ac, e);
ProteinUpdateError fatalError = errorFactory.createFatalUpdateError(ac, null, e);
fireOnProcessErrorFound(new UpdateErrorEvent(this, dataContext, fatalError, null, ac));
fireOnProcessErrorFound(new UpdateErrorEvent(this, dataContext, fatalError, null, null, ac));
}
dataContext.rollbackTransaction(transactionStatus);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public String getErrorMessage(){
}

if (uniprotAc != null){
error.append("attached to the uniprot entry ");
error.append(" attached to the uniprot entry ");
error.append(uniprotAc);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,29 +24,32 @@ public class UpdateErrorEvent extends EventObject implements ProteinProcessorEve
private DataContext dataContext;
private Protein protein;
private String uniprotAc;
private String proteinAc;

public UpdateErrorEvent(Object source, DataContext dataContext, ProteinUpdateError error, Protein protein) {
public UpdateErrorEvent(Object source,
DataContext dataContext,
ProteinUpdateError error,
Protein protein,
String uniprotAc,
String proteinAc) {
super(source);
this.error = error;
this.dataContext = dataContext;
this.protein = protein;
this.uniprotAc = null;
}

public UpdateErrorEvent(Object source, DataContext dataContext, ProteinUpdateError error, String uniprotAc) {
super(source);
this.error = error;
this.dataContext = dataContext;
this.protein = null;
this.uniprotAc = uniprotAc;
this.proteinAc = proteinAc;
}

public UpdateErrorEvent(Object source, DataContext dataContext, ProteinUpdateError error, Protein protein, String uniprotAc) {
super(source);
this.error = error;
this.dataContext = dataContext;
this.protein = protein;
this.uniprotAc = uniprotAc;
this(source, dataContext, error, protein, uniprotAc, null);
}

public UpdateErrorEvent(Object source, DataContext dataContext, ProteinUpdateError error, Protein protein) {
this(source, dataContext, error, protein, null, null);
}

public UpdateErrorEvent(Object source, DataContext dataContext, ProteinUpdateError error, String uniprotAc) {
this(source, dataContext, error, null, uniprotAc, null);
}

public ProteinUpdateError getError() {
Expand All @@ -73,4 +76,12 @@ public String getUniprotAc() {
public void setUniprotAc(String uniprotAc) {
this.uniprotAc = uniprotAc;
}

public String getProteinAc() {
return proteinAc;
}

public void setProteinAc(String proteinAc) {
this.proteinAc = proteinAc;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -323,14 +323,17 @@ public void onProcessErrorFound(UpdateErrorEvent evt) throws ProcessorException{
if (evt.getProtein() != null){
proteinAc = evt.getProtein().getAc();
proteinShortlablel = evt.getProtein().getShortLabel();
} else if (evt.getProteinAc() != null) {
proteinAc = evt.getProteinAc();
}

writer.writeHeaderIfNecessary("Protein ac",
"Protein shortlabel",
"Uniprot ac",
"error type",
"error description");
writer.writeColumnValues(proteinAc,
writer.writeColumnValues(
proteinAc,
proteinShortlablel,
uniprotAc,
errorType,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ public String toString(){
}

if (uniprotAc != null){
error.append("attached to the uniprot entry ");
error.append(" attached to the uniprot entry ");
error.append(uniprotAc);
}

Expand Down
5 changes: 3 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,14 @@
<url>http://www.ebi.ac.uk/~intact/devsite/dbupdate</url>

<properties>
<core.version>3.0.2-SNAPSHOT</core.version>
<core.version>3.1.0-SNAPSHOT</core.version>
<bridges.version>2.2.3-SNAPSHOT</bridges.version>
<intact.tools.version>2.0.1-SNAPSHOT</intact.tools.version>
<uniprot.japi.version>1.1.2</uniprot.japi.version>
<spring.version>4.3.30.RELEASE</spring.version>
<chebi.ws.version>2.4</chebi.ws.version>
<jami.version>3.5.2-SNAPSHOT</jami.version>
<jami.version>3.6.0-SNAPSHOT</jami.version>
<spring.retry.version>1.3.4</spring.retry.version>
</properties>

<scm>
Expand Down

0 comments on commit a7190c1

Please sign in to comment.