From 71d572b4e1bf16d4d672f2c18c047c06293d671b Mon Sep 17 00:00:00 2001 From: Tim Holy Date: Sat, 18 Jan 2020 13:05:55 -0600 Subject: [PATCH 1/4] REQUIRE->Project.toml --- Project.toml | 19 +++++++++++++++++++ REQUIRE | 3 --- 2 files changed, 19 insertions(+), 3 deletions(-) create mode 100644 Project.toml delete mode 100644 REQUIRE diff --git a/Project.toml b/Project.toml new file mode 100644 index 0000000..5c37447 --- /dev/null +++ b/Project.toml @@ -0,0 +1,19 @@ +name = "CatIndices" +uuid = "aafaddc9-749c-510e-ac4f-586e18779b91" +author = ["Tim Holy "] +version = "0.2.1" + +[deps] +CustomUnitRanges = "dc8bdbbb-1ca9-579f-8c36-e416f6a65cce" +OffsetArrays = "6fe1bfb0-de20-5000-8ca7-80f57d26f881" + +[compat] +CustomUnitRanges = "0.2, 1" +OffsetArrays = "0.8.1, 0.9, 0.10, 0.11, 1" +julia = "0.7, 1" + +[extras] +Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[targets] +test = ["Test"] diff --git a/REQUIRE b/REQUIRE deleted file mode 100644 index 76d31f8..0000000 --- a/REQUIRE +++ /dev/null @@ -1,3 +0,0 @@ -julia 0.7 -OffsetArrays -CustomUnitRanges From df6afb0bada2c842452339b4aad080b945a021d3 Mon Sep 17 00:00:00 2001 From: Tim Holy Date: Sat, 18 Jan 2020 13:07:31 -0600 Subject: [PATCH 2/4] Update CI --- .travis.yml | 1 + appveyor.yml | 1 + 2 files changed, 2 insertions(+) diff --git a/.travis.yml b/.travis.yml index 10e688e..db98674 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,6 +6,7 @@ os: julia: - 0.7 - 1.0 + - 1 - nightly notifications: email: false diff --git a/appveyor.yml b/appveyor.yml index c2588f1..377f459 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,6 +1,7 @@ environment: matrix: - julia_version: 0.7 + - julia_version: 1.0 - julia_version: 1 - julia_version: nightly From a842acf1a781f0d36793036de57c7a3d74706a0d Mon Sep 17 00:00:00 2001 From: Tim Holy Date: Sat, 18 Jan 2020 13:13:54 -0600 Subject: [PATCH 3/4] Add PkgEval badge --- README.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index a91eeed..5c2c8e9 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,8 @@ # CatIndices [![Build Status](https://travis-ci.org/JuliaArrays/CatIndices.jl.svg?branch=master)](https://travis-ci.org/JuliaArrays/CatIndices.jl) - [![codecov.io](http://codecov.io/github/JuliaArrays/CatIndices.jl/coverage.svg?branch=master)](http://codecov.io/github/JuliaArrays/CatIndices.jl?branch=master) +[![PkgEval][pkgeval-img]][pkgeval-url] A Julia package for concatenating, growing, and shrinking arrays in ways that allow control over the resulting axes. @@ -64,3 +64,6 @@ many items at the beginning or end of the vector, this package exports # Concatenation TODO + +[pkgeval-img]: https://juliaci.github.io/NanosoldierReports/pkgeval_badges/C/CatIndices.svg +[pkgeval-url]: https://juliaci.github.io/NanosoldierReports/pkgeval_badges/report.html From 11f3dc7db81d803c2c8694ae93f7537cbaae3cfa Mon Sep 17 00:00:00 2001 From: Tim Holy Date: Sat, 18 Jan 2020 13:18:04 -0600 Subject: [PATCH 4/4] Mention `PinIndices` in the README --- README.md | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 5c2c8e9..abe87a5 100644 --- a/README.md +++ b/README.md @@ -63,7 +63,28 @@ many items at the beginning or end of the vector, this package exports # Concatenation -TODO +This is still mostly a TODO. For one-dimensional arrays (`AbstractVector`s), +`PinIndices` provides a convenient interface for specifying which indices "win": + +```julia +julia> v = vcat(1:3, PinIndices(4:5), 6:10) +10-element OffsetArray(::Array{Int64,1}, -2:7) with eltype Int64 with indices -2:7: + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + +julia> v[1] +4 +``` + +The array wrapped in `PinIndices` keeps its own indexes, and everything else adjusts to compensate. [pkgeval-img]: https://juliaci.github.io/NanosoldierReports/pkgeval_badges/C/CatIndices.svg [pkgeval-url]: https://juliaci.github.io/NanosoldierReports/pkgeval_badges/report.html