Skip to content

Commit

Permalink
Allow new files in repo
Browse files Browse the repository at this point in the history
  • Loading branch information
richardreeve committed Jul 17, 2024
1 parent 85766e7 commit d95d005
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 2 deletions.
8 changes: 7 additions & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,13 @@ DataFrames = "1"
DataStructures = "0.17, 0.18"
Distances = "0.10"
Distributions = "0.24, 0.25"
Git = "1"
Graphs = "1"
IterableTables = "1"
Logging = "1"
Missings = "1"
ParserCombinator = "2"
Pkg = "1.6"
Plots = "1"
Printf = "1.6"
RCall = "0.13, 0.14"
Expand Down Expand Up @@ -78,9 +81,12 @@ orcid = "0000-0003-0852-2340"

[extras]
DataFrames = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0"
Git = "d7ba0133-e1db-5d97-8f8c-041e4b3a1eb2"
Logging = "56ddb016-857b-54e1-b83d-db4d58db5568"
Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
Plots = "91a5bcdd-55d7-5caf-9e0b-520d859cae80"
RCall = "6f49c342-dc21-5d91-9882-a32aef131414"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[targets]
test = ["DataFrames", "Plots", "RCall", "Test"]
test = ["DataFrames", "Git", "Logging", "Pkg", "Plots", "RCall", "Test"]
3 changes: 3 additions & 0 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
using Random
using Test
using Phylo
using Pkg

Pkg.develop(url = "https://github.com/richardreeve/ResearchSoftwareMetadata.jl.git")

# Identify files in test/ that are testing matching files in src/
# - src/Source.jl will be matched by test/test_Source.jl
Expand Down
23 changes: 22 additions & 1 deletion test/test_Phylo.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,29 @@

module TestPhylo
using Test

using Phylo
using Git
using Logging
using ResearchSoftwareMetadata

function is_repo_clean(repo_path)
# Get the status of the repository
statuses = readlines(`$(Git.git()) status -s $repo_path`)
statuses = filter((!)contains("??"), statuses)

is_clean = isempty(statuses)
is_clean || @error "\n" * join(statuses, "\n")

return is_clean
end

@testset "RSMD" begin
git_dir = readchomp(`$(Git.git()) rev-parse --show-toplevel`)
@test isnothing(ResearchSoftwareMetadata.crosswalk())
global_logger(SimpleLogger(stderr, Logging.Warn))
@test_nowarn ResearchSoftwareMetadata.crosswalk()
@test is_repo_clean(git_dir)
end

@testset "Deprecations" begin
t = NamedTree()
Expand Down

0 comments on commit d95d005

Please sign in to comment.