Skip to content

Commit 95d049d

Browse files
committed
remove BioCore test dependency
1 parent bdc6897 commit 95d049d

5 files changed

Lines changed: 17 additions & 6 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,4 @@ benchmark/results
99
Manifest.toml
1010
*.swp
1111
extractdata/protein.ff14SB.*
12+
BioFmtSpecimens

benchmark/benchmarks.jl

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,14 @@
88
using BioStructures
99
using BenchmarkTools
1010
using BioAlignments
11-
import BioCore # Imported to avoid clash with BioGenerics distance
1211
using BioSequences
1312
using Graphs
1413
import MMTF # Imported to avoid clash with writemmtf
1514
using MetaGraphs
1615
using Random
1716

1817
# Use files in BioFmtSpecimens
19-
fmtdir = BioCore.Testing.get_bio_fmt_specimens()
18+
fmtdir = BioStructures.get_bio_fmt_specimens()
2019
testfilepath(path::AbstractString...) = joinpath(fmtdir, path...)
2120

2221
# All writing is done to one temporary file

src/download.jl

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -411,3 +411,17 @@ function retrievepdb(pdbid::AbstractString;
411411
end
412412
read(pdbpath, format; structure_name=structure_name, kwargs...)
413413
end
414+
415+
const FMT_SPECIMEN_PATH = joinpath(dirname(dirname(@__FILE__)), "BioFmtSpecimens")
416+
417+
# Get the path to BioFmtSpecimens and download it if required
418+
# See https://github.com/BioJulia/BioCore.jl/blob/master/src/Testing.jl
419+
function get_bio_fmt_specimens(fresh=false)
420+
if fresh
421+
rm(FMT_SPECIMEN_PATH; force=true, recursive=true)
422+
end
423+
if !isdir(FMT_SPECIMEN_PATH)
424+
run(`git clone https://github.com/BioJulia/BioFmtSpecimens.git $FMT_SPECIMEN_PATH`)
425+
end
426+
return FMT_SPECIMEN_PATH
427+
end

test/Project.toml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
[deps]
22
Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595"
33
BioAlignments = "00701ae9-d1dc-5365-b64a-a3a3ebf5695e"
4-
BioCore = "37cfa864-2cd6-5c12-ad9e-b6597d696c81"
54
BioSequences = "7e6ae17a-c86d-528c-b3b9-7f778a29fe59"
65
CodecZlib = "944b1d66-785c-5afd-91f1-9de20f533193"
76
DSSP_jll = "74334e00-59ce-546d-b517-81f3b7e1d491"
@@ -18,5 +17,4 @@ Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
1817

1918
[compat]
2019
Aqua = "0.8"
21-
BioCore = "2"
2220
Test = "1.9"

test/runtests.jl

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ module TestBioStructures
33
using Aqua
44
using BioAlignments
55
using BioSequences
6-
import BioCore # Imported to avoid clash with BioGenerics distance
76
using CodecZlib
87
using DSSP_jll
98
using DataFrames
@@ -54,7 +53,7 @@ using BioStructures:
5453
pdb_download_prefix
5554

5655
# Get the path to BioFmtSpecimens and download it if required
57-
fmtdir = BioCore.Testing.get_bio_fmt_specimens("master", false)
56+
fmtdir = BioStructures.get_bio_fmt_specimens()
5857

5958
# Access files in BioFmtSpecimens to test against
6059
testfilepath(path::AbstractString...) = joinpath(fmtdir, path...)

0 commit comments

Comments
 (0)