-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bump to globi libs v0.12.1; add tests for empty access.tsv
- Loading branch information
jhpoelen
committed
Apr 26, 2019
1 parent
22b9808
commit cebfc7e
Showing
9 changed files
with
90 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
43 changes: 43 additions & 0 deletions
43
src/test/java/org/globalbioticinteractions/elton/cmd/CmdInteractionsIT.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
package org.globalbioticinteractions.elton.cmd; | ||
|
||
import com.beust.jcommander.JCommander; | ||
import org.junit.Assert; | ||
import org.junit.Test; | ||
|
||
import java.io.ByteArrayOutputStream; | ||
import java.io.PrintStream; | ||
import java.net.URISyntaxException; | ||
|
||
import static org.hamcrest.CoreMatchers.is; | ||
import static org.hamcrest.core.IsCollectionContaining.hasItem; | ||
import static org.hamcrest.core.StringStartsWith.startsWith; | ||
import static org.junit.Assert.assertThat; | ||
|
||
public class CmdInteractionsIT { | ||
|
||
@Test | ||
public void interactions() throws URISyntaxException { | ||
JCommander jc = new CmdLine().buildCommander(); | ||
jc.parse("interactions", | ||
"--cache-dir=/home/jorrit/proj/parasite-tracker/tmp"); | ||
|
||
Assert.assertEquals(jc.getParsedCommand(), "interactions"); | ||
|
||
JCommander actual = jc.getCommands().get(jc.getParsedCommand()); | ||
Assert.assertEquals(actual.getObjects().size(), 1); | ||
Object cmd = actual.getObjects().get(0); | ||
Assert.assertEquals(cmd.getClass(), CmdInteractions.class); | ||
CmdInteractions cmdInteractions = (CmdInteractions) actual.getObjects().get(0); | ||
assertThat(cmdInteractions.getNamespaces().size(), is(1)); | ||
// assertThat(cmdInteractions.getNamespaces(), hasItem("globalbioticinteractions/template-dataset")); | ||
|
||
if (actual.getObjects().get(0) instanceof Runnable) { | ||
ByteArrayOutputStream out1 = new ByteArrayOutputStream(); | ||
PrintStream out = new PrintStream(out1); | ||
((CmdInteractions) actual.getObjects().get(0)).run(out); | ||
assertThat(out1.toString(), startsWith("\tLeptoconchus incycloseris\t\t\t\t\thttp://purl.obolibrary.org/obo/RO_0002444\tparasiteOf\t\tFungia (Cycloseris) costulata\t\t\t\t\t\t\t\t\t\t10.1007/s13127-011-0039-1\thttps://doi.org/10.1007/s13127-011-0039-1\tGittenberger, A., Gittenberger, E. (2011). Cryptic, adaptive radiation of endoparasitic snails: sibling species of Leptoconchus (Gastropoda: Coralliophilidae) in corals. Org Divers Evol, 11(1), 21–41. doi:10.1007/s13127-011-0039-1\tglobalbioticinteractions/template-dataset\tJorrit H. Poelen. 2014. Species associations manually extracted from literature.\thttps://zenodo.org/record/207958/files/globalbioticinteractions/template-dataset-0.0.2.zip\t2017-09-19T17:01:39Z\t631d3777cf83e1abea848b59a6589c470cf0c7d0fd99682c4c104481ad9a543f\tdev\n")); | ||
} | ||
} | ||
|
||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
4 changes: 4 additions & 0 deletions
4
...actions/template-dataset/1cc8eff62af0e6bb3e7771666e2e4109f351b7dfc6fc1dc8314e5671a8eecb80
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"_comment": "Sample GloBI dataset descriptor. See http://github.com/globalbioticinteractions for more information.", | ||
"citation": "Jorrit H. Poelen. 2014. Species associations manually extracted from literature." | ||
} |
Binary file added
BIN
+4.43 KB
...actions/template-dataset/631d3777cf83e1abea848b59a6589c470cf0c7d0fd99682c4c104481ad9a543f
Binary file not shown.
4 changes: 4 additions & 0 deletions
4
src/test/resources/dataset-cache-empty/globalbioticinteractions/template-dataset/access.tsv
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
globalbioticinteractions/template-dataset https://zenodo.org/record/207958/files/globalbioticinteractions/template-dataset-0.0.2.zip 2017-09-19T17:01:39Z application/globi | ||
globalbioticinteractions/template-dataset https://zenodo.org/record/207958/files/globalbioticinteractions/template-dataset-0.0.2.zip 631d3777cf83e1abea848b59a6589c470cf0c7d0fd99682c4c104481ad9a543f 2017-09-19T17:01:39Z | ||
globalbioticinteractions/template-dataset jar:file:/home/jorrit/proj/globi/globinizer/./datasets/globalbioticinteractions/template-dataset/631d3777cf83e1abea848b59a6589c470cf0c7d0fd99682c4c104481ad9a543f!/globalbioticinteractions-template-dataset-e68f448/globi.json 1cc8eff62af0e6bb3e7771666e2e4109f351b7dfc6fc1dc8314e5671a8eecb80 2017-09-19T17:01:39Z | ||
globalbioticinteractions/template-dataset jar:file:/home/jorrit/proj/globi/globinizer/./datasets/globalbioticinteractions/template-dataset/631d3777cf83e1abea848b59a6589c470cf0c7d0fd99682c4c104481ad9a543f!/globalbioticinteractions-template-dataset-e68f448/interactions.tsv c1b37add5ee5f30916f19811c59c2960e3b68ecf1a3846afe1776014c4c96271 2017-09-19T17:01:39Z |
12 changes: 12 additions & 0 deletions
12
...actions/template-dataset/c1b37add5ee5f30916f19811c59c2960e3b68ecf1a3846afe1776014c4c96271
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
sourceTaxonId sourceTaxonName interactionTypeId interactionTypeName targetTaxonId targetTaxonName localityId localityName decimalLatitude decimalLongitude observationDateTime referenceDoi referenceCitation | ||
Leptoconchus incycloseris RO:0002444 parasite of Fungia (Cycloseris) costulata doi:10.1007/s13127-011-0039-1 Gittenberger, A., Gittenberger, E. (2011). Cryptic, adaptive radiation of endoparasitic snails: sibling species of Leptoconchus (Gastropoda: Coralliophilidae) in corals. Org Divers Evol, 11(1), 21–41. doi:10.1007/s13127-011-0039-1 | ||
Leptoconchus infungites RO:0002444 parasite of Fungia (Fungia) fungites doi:10.1007/s13127-011-0039-1 Gittenberger, A., Gittenberger, E. (2011). Cryptic, adaptive radiation of endoparasitic snails: sibling species of Leptoconchus (Gastropoda: Coralliophilidae) in corals. Org Divers Evol, 11(1), 21–41. doi:10.1007/s13127-011-0039-1 | ||
Leptoconchus ingrandifungi RO:0002444 parasite of Sandalolitha dentata doi:10.1007/s13127-011-0039-1 Gittenberger, A., Gittenberger, E. (2011). Cryptic, adaptive radiation of endoparasitic snails: sibling species of Leptoconchus (Gastropoda: Coralliophilidae) in corals. Org Divers Evol, 11(1), 21–41. doi:10.1007/s13127-011-0039-1 | ||
Leptoconchus ingranulosa RO:0002444 parasite of Fungia (Wellsofungia) granulosa doi:10.1007/s13127-011-0039-1 Gittenberger, A., Gittenberger, E. (2011). Cryptic, adaptive radiation of endoparasitic snails: sibling species of Leptoconchus (Gastropoda: Coralliophilidae) in corals. Org Divers Evol, 11(1), 21–41. doi:10.1007/s13127-011-0039-1 | ||
Leptoconchus inlimax RO:0002444 parasite of Herpolitha limax doi:10.1007/s13127-011-0039-1 Gittenberger, A., Gittenberger, E. (2011). Cryptic, adaptive radiation of endoparasitic snails: sibling species of Leptoconchus (Gastropoda: Coralliophilidae) in corals. Org Divers Evol, 11(1), 21–41. doi:10.1007/s13127-011-0039-1 | ||
Leptoconchus inpileus RO:0002444 parasite of Halomitra pileus doi:10.1007/s13127-011-0039-1 Gittenberger, A., Gittenberger, E. (2011). Cryptic, adaptive radiation of endoparasitic snails: sibling species of Leptoconchus (Gastropoda: Coralliophilidae) in corals. Org Divers Evol, 11(1), 21–41. doi:10.1007/s13127-011-0039-1 | ||
Leptoconchus inpleuractis RO:0002444 parasite of Fungia (Pleuractis) gravis doi:10.1007/s13127-011-0039-1 Gittenberger, A., Gittenberger, E. (2011). Cryptic, adaptive radiation of endoparasitic snails: sibling species of Leptoconchus (Gastropoda: Coralliophilidae) in corals. Org Divers Evol, 11(1), 21–41. doi:10.1007/s13127-011-0039-1 | ||
Leptoconchus inpleuractis RO:0002444 parasite of Fungia (Pleuractis) moluccensis doi:10.1007/s13127-011-0039-1 Gittenberger, A., Gittenberger, E. (2011). Cryptic, adaptive radiation of endoparasitic snails: sibling species of Leptoconchus (Gastropoda: Coralliophilidae) in corals. Org Divers Evol, 11(1), 21–41. doi:10.1007/s13127-011-0039-1 | ||
Leptoconchus inpleuractis RO:0002444 parasite of Fungia (Pleuractis) paumotensis doi:10.1007/s13127-011-0039-1 Gittenberger, A., Gittenberger, E. (2011). Cryptic, adaptive radiation of endoparasitic snails: sibling species of Leptoconchus (Gastropoda: Coralliophilidae) in corals. Org Divers Evol, 11(1), 21–41. doi:10.1007/s13127-011-0039-1 | ||
Leptoconchus massini RO:0002444 parasite of Fungia (Verrillofungia) concinna doi:10.1007/s13127-011-0039-1 Gittenberger, A., Gittenberger, E. (2011). Cryptic, adaptive radiation of endoparasitic snails: sibling species of Leptoconchus (Gastropoda: Coralliophilidae) in corals. Org Divers Evol, 11(1), 21–41. doi:10.1007/s13127-011-0039-1 | ||
Leptoconchus massini RO:0002444 parasite of Fungia (Verrillofungia) repanda doi:10.1007/s13127-011-0039-1 Gittenberger, A., Gittenberger, E. (2011). Cryptic, adaptive radiation of endoparasitic snails: sibling species of Leptoconchus (Gastropoda: Coralliophilidae) in corals. Org Divers Evol, 11(1), 21–41. doi:10.1007/s13127-011-0039-1 |