Skip to content

Commit 2a7081c

Browse files
authored
Merge pull request #162 from JuliaArrays/cjf/use-project-toml
Upgrade REQUIRE -> Project.toml
2 parents 48ec735 + 93da53e commit 2a7081c

File tree

9 files changed

+48
-23
lines changed

9 files changed

+48
-23
lines changed

.travis.yml

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,30 +5,32 @@ os:
55
julia:
66
- 0.7
77
- 1.0
8+
- 1.1
9+
- 1.2
810
- nightly
911
notifications:
1012
email: false
1113
matrix:
1214
allow_failures:
1315
- julia: nightly
1416

15-
# uncomment the following lines to override the default test script
16-
script:
17-
- if [[ -a .git/shallow ]]; then git fetch --unshallow; fi
18-
- julia --check-bounds=yes --color=yes -e 'import Pkg; Pkg.clone(pwd()); Pkg.build("AxisArrays"); Pkg.test("AxisArrays"; coverage=true)';
17+
# script:
18+
# # Default Travis script uses the more or less the following with Project.toml
19+
# - julia -e 'using Pkg; Pkg.build(); Pkg.test(coverage=true)'
1920

2021
jobs:
2122
include:
22-
- stage: deploy
23-
julia: 1.0
23+
- stage: "Documentation"
24+
julia: 1.1
2425
os: linux
2526
script:
26-
- julia -e 'import Pkg; Pkg.clone(pwd()); Pkg.build("AxisArrays")'
27-
- julia -e 'import Pkg; ps=Pkg.PackageSpec(name="Documenter", version="0.19"); Pkg.add(ps); Pkg.pin(ps); Pkg.add("Unitful")'
28-
- julia -e 'import AxisArrays; ENV["DOCUMENTER_DEBUG"] = "true"; include(joinpath("docs","make.jl"))'
27+
- julia --project=docs/ -e 'using Pkg; Pkg.develop(PackageSpec(path=pwd()));
28+
Pkg.instantiate()'
29+
- julia --project=docs/ docs/make.jl
30+
after_success: skip
2931

3032
after_success:
3133
# - julia -e 'Pkg.add("Unitful")' ?
32-
- if [ $TRAVIS_JULIA_VERSION = "1.0" ] && [ $TRAVIS_OS_NAME = "linux" ]; then
34+
- if [ $TRAVIS_JULIA_VERSION = "1.1" ] && [ $TRAVIS_OS_NAME = "linux" ]; then
3335
julia -e 'using Pkg; Pkg.add("Coverage"); using Coverage; Coveralls.submit(process_folder())';
3436
fi

Project.toml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name = "AxisArrays"
2+
uuid = "39de3d68-74b9-583c-8d2d-e117c070f3a9"
3+
version = "0.3.0"
4+
5+
[deps]
6+
Dates = "ade2ca70-3891-5945-98fb-dc099432e06a"
7+
IntervalSets = "8197267c-284f-5f27-9208-e0e47529a953"
8+
IterTools = "c8e1da08-722c-5040-9ed9-7db0dc04731e"
9+
RangeArrays = "b3c3ace0-ae52-54e7-9d0b-2c1406fd6b9d"
10+
11+
[compat]
12+
IntervalSets = "≥ 0.1.0"
13+
Unitful = "≥ 0.2.6"
14+
julia = "≥ 0.7.0"
15+
16+
[extras]
17+
Dates = "ade2ca70-3891-5945-98fb-dc099432e06a"
18+
OffsetArrays = "6fe1bfb0-de20-5000-8ca7-80f57d26f881"
19+
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
20+
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
21+
Unitful = "1986cc42-f94f-5a68-af5c-568840ba703d"
22+
23+
[targets]
24+
test = ["OffsetArrays", "Unitful", "Dates", "Test", "Random"]

REQUIRE

Lines changed: 0 additions & 5 deletions
This file was deleted.

docs/Project.toml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
[deps]
2+
AxisArrays = "39de3d68-74b9-583c-8d2d-e117c070f3a9"
3+
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
4+
Unitful = "1986cc42-f94f-5a68-af5c-568840ba703d"
5+
6+
[compat]
7+
Documenter = "~0.22"
8+
Unitful = "≥ 0.2.6"

docs/make.jl

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,5 @@ makedocs(
77

88
deploydocs(
99
deps = Deps.pip("mkdocs", "python-markdown-math"),
10-
repo = "github.com/JuliaArrays/AxisArrays.jl.git",
11-
julia = "1.0"
10+
repo = "github.com/JuliaArrays/AxisArrays.jl.git"
1211
)

src/AxisArrays.jl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ using Base: tail
66
import Base.Iterators: repeated
77
using RangeArrays, IntervalSets
88
using IterTools
9-
using Compat
109
using Dates
1110

1211
function axes end

src/core.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ end
280280
function axisdim(::Type{AxisArray{T,N,D,Ax}}, ::Type{<:Axis{name,S} where S}) where {T,N,D,Ax,name}
281281
isa(name, Int) && return name <= N ? name : error("axis $name greater than array dimensionality $N")
282282
names = axisnames(Ax)
283-
idx = Compat.findfirst(isequal(name), names)
283+
idx = findfirst(isequal(name), names)
284284
idx === nothing && error("axis $name not found in array axes $names")
285285
idx
286286
end

src/indexing.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -286,13 +286,13 @@ end
286286

287287
# Categorical axes may be indexed by their elements
288288
function axisindexes(::Type{Categorical}, ax::AbstractVector, idx)
289-
i = Compat.findfirst(isequal(idx), ax)
289+
i = findfirst(isequal(idx), ax)
290290
i === nothing && throw(ArgumentError("index $idx not found"))
291291
i
292292
end
293293
function axisindexes(::Type{Categorical}, ax::AbstractVector, idx::Value)
294294
val = idx.val
295-
i = Compat.findfirst(isequal(val), ax)
295+
i = findfirst(isequal(val), ax)
296296
i === nothing && throw(ArgumentError("index $val not found"))
297297
i
298298
end

test/REQUIRE

Lines changed: 0 additions & 2 deletions
This file was deleted.

0 commit comments

Comments
 (0)