diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e362dd7..c66200a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -3,6 +3,7 @@ on: push: branches: - master + - release-* tags: '*' pull_request: jobs: @@ -13,6 +14,8 @@ jobs: strategy: matrix: version: + - '1.5' + - '1.7' - '1' - 'nightly' os: diff --git a/Project.toml b/Project.toml index fcce2f4..47834e2 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "DataSets" uuid = "c9661210-8a83-48f0-b833-72e62abce419" authors = ["Chris Foster and contributors"] -version = "0.2.6" +version = "0.2.7" [deps] AbstractTrees = "1520ce14-60c1-5f80-bbc7-55ef81b5835c" diff --git a/src/DataSets.jl b/src/DataSets.jl index 37c9cbd..5e02988 100644 --- a/src/DataSets.jl +++ b/src/DataSets.jl @@ -91,7 +91,7 @@ separated with forward slashes. Examples: my_data my_data_1 username/data - organization/project/data + organization-dataset_name/project/data """ function check_dataset_name(name::AbstractString) # DataSet names disallow most punctuation for now, as it may be needed as @@ -100,13 +100,13 @@ function check_dataset_name(name::AbstractString) ^ [[:alpha:]] (?: - [[:alnum:]_] | + [-[:alnum:]_] | / (?=[[:alpha:]]) )* $ "x if !occursin(dataset_name_pattern, name) - error("DataSet name \"$name\" is invalid. DataSet names must start with a letter and can contain only letters, numbers, `_` or `/`.") + error("DataSet name \"$name\" is invalid. DataSet names must start with a letter and can contain only letters, numbers, `-`, `_` or `/`.") end end diff --git a/test/driver_autoload.jl b/test/driver_autoload.jl index 18442e2..1f30236 100644 --- a/test/driver_autoload.jl +++ b/test/driver_autoload.jl @@ -1,6 +1,6 @@ @testset "Automatic code loading for drivers" begin empty!(DataSets.PROJECT) - pushfirst!(LOAD_PATH, abspath("drivers")) + Pkg.develop(path=joinpath(@__DIR__, "drivers", "DummyStorageBackends")) ENV["JULIA_DATASETS_PATH"] = joinpath(@__DIR__, "DriverAutoloadData.toml") DataSets.__init__() @test haskey(DataSets._storage_drivers, "DummyTomlStorage") diff --git a/test/runtests.jl b/test/runtests.jl index ba534a2..190c8d8 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -98,8 +98,9 @@ end @test DataSets.check_dataset_name("δεδομένα") === nothing @test DataSets.check_dataset_name("a/b") === nothing @test DataSets.check_dataset_name("a/b/c") === nothing + @test DataSets.check_dataset_name("a-b-c-") === nothing # Invalid names - @test_throws ErrorException("DataSet name \"a?b\" is invalid. DataSet names must start with a letter and can contain only letters, numbers, `_` or `/`.") DataSets.check_dataset_name("a?b") + @test_throws ErrorException("DataSet name \"a?b\" is invalid. DataSet names must start with a letter and can contain only letters, numbers, `-`, `_` or `/`.") DataSets.check_dataset_name("a?b") @test_throws ErrorException DataSets.check_dataset_name("1") @test_throws ErrorException DataSets.check_dataset_name("a b") @test_throws ErrorException DataSets.check_dataset_name("a.b")