-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5 from putianyi889/version-0.1.4
Version 0.1.4
- Loading branch information
Showing
7 changed files
with
228 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
name: Compatibility | ||
on: | ||
push: | ||
branches: [master] | ||
pull_request: | ||
paths-ignore: | ||
- 'LICENSE' | ||
- 'README.md' | ||
- '.github/workflows/TagBot.yml' | ||
|
||
concurrency: | ||
group: build-${{ github.event.pull_request.number || github.ref }}-${{ github.workflow }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
pre_job: | ||
# continue-on-error: true # Uncomment once integration is finished | ||
runs-on: ubuntu-latest | ||
# Map a step output to a job output | ||
outputs: | ||
should_skip: ${{ steps.skip_check.outputs.should_skip }} | ||
steps: | ||
- id: skip_check | ||
uses: fkirc/skip-duplicate-actions@v5 | ||
test: | ||
needs: pre_job | ||
if: needs.pre_job.outputs.should_skip != 'true' | ||
name: ${{ matrix.package.group }}/${{ matrix.package.repo }}/${{ matrix.julia-version }} | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: true | ||
matrix: | ||
julia-version: ['1'] | ||
os: [ubuntu-latest] | ||
package: | ||
- {repo: BandedMatrices.jl, group: JuliaLinearAlgebra} | ||
- {repo: CircularArrays.jl, group: Vexatos} | ||
- {repo: ClassicalOrthogonalPolynomials.jl, group: JuliaApproximation} | ||
- {repo: ContinuumArrays.jl, group: JuliaApproximation} | ||
- {repo: InfiniteArrays.jl, group: JuliaArrays} | ||
- {repo: IntervalSets.jl, group: JuliaMath} | ||
- {repo: QuasiArrays.jl, group: JuliaApproximation} | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: julia-actions/setup-julia@v1 | ||
with: | ||
version: ${{ matrix.julia-version }} | ||
arch: x64 | ||
- uses: julia-actions/julia-buildpkg@latest | ||
- name: Clone Downstream | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: ${{ matrix.package.group }}/${{ matrix.package.repo }} | ||
path: downstream | ||
- name: Load this and run the downstream tests | ||
shell: julia --color=yes --project=downstream {0} | ||
run: | | ||
using Pkg | ||
try | ||
# force it to use this PR's version of the package | ||
Pkg.develop(PackageSpec(path=".")) # resolver may fail with main deps | ||
Pkg.update() | ||
Pkg.test(; coverage = true) # resolver may fail with test time deps | ||
catch err | ||
err isa Pkg.Resolve.ResolverError || rethrow() | ||
# If we can't resolve that means this is incompatible by SemVer and this is fine | ||
# It means we marked this as a breaking change, so we don't need to worry about | ||
# Mistakenly introducing a breaking change, as we have intentionally made one | ||
@info "Not compatible with this release. No problem." exception=err | ||
exit(0) # Exit immediately, as a success | ||
end | ||
- uses: julia-actions/julia-processcoverage@v1 | ||
- uses: codecov/codecov-action@v3 | ||
with: | ||
files: lcov.info |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
name = "PTYQoL" | ||
uuid = "551ad714-b11a-4605-8871-12721def4e72" | ||
authors = ["Tianyi Pu <[email protected]> and contributors"] | ||
version = "0.1.3" | ||
version = "0.1.4" | ||
|
||
[weakdeps] | ||
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" | ||
|
@@ -10,6 +10,9 @@ ContinuumArrays = "7ae1f121-cc2c-504b-ac30-9b923412ae5c" | |
IntervalSets = "8197267c-284f-5f27-9208-e0e47529a953" | ||
QuasiArrays = "c4ea9172-b204-11e9-377d-29865faadc5c" | ||
ClassicalOrthogonalPolynomials = "b30e2e7b-c4ee-47da-9d5f-2c5c27239acd" | ||
InfiniteArrays = "4858937d-0d70-526a-a4dd-2d5cb5dd786c" | ||
BandedMatrices = "aae01518-5342-5314-be14-df237901396f" | ||
ArrayLayouts = "4c555306-a7a7-4459-81d9-ec55ddd5c99a" | ||
|
||
[extensions] | ||
PTYQoLLinearAlgebraExt = "LinearAlgebra" | ||
|
@@ -18,6 +21,9 @@ PTYQoLContinuumArraysExt = "ContinuumArrays" | |
PTYQoLIntervalSetsExt = "IntervalSets" | ||
PTYQoLQuasiArraysExt = "QuasiArrays" | ||
PTYQoLClassicalOrthogonalPolynomialsExt = "ClassicalOrthogonalPolynomials" | ||
PTYQoLInfiniteArraysExt = "InfiniteArrays" | ||
PTYQoLBandedMatricesExt = "BandedMatrices" | ||
PTYQoLArrayLayoutsExt = "ArrayLayouts" | ||
|
||
[compat] | ||
julia = "1" | ||
|
@@ -29,6 +35,8 @@ DomainSets = "5b8099bc-c8ec-5219-889f-1d9e522a28bf" | |
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" | ||
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" | ||
ClassicalOrthogonalPolynomials = "b30e2e7b-c4ee-47da-9d5f-2c5c27239acd" | ||
InfiniteArrays = "4858937d-0d70-526a-a4dd-2d5cb5dd786c" | ||
ArrayLayouts = "4c555306-a7a7-4459-81d9-ec55ddd5c99a" | ||
|
||
[targets] | ||
test = ["Test", "LinearAlgebra", "Documenter", "DomainSets", "ContinuumArrays", "ClassicalOrthogonalPolynomials"] | ||
test = ["Test", "LinearAlgebra", "Documenter", "DomainSets", "ContinuumArrays", "ClassicalOrthogonalPolynomials", "InfiniteArrays", "ArrayLayouts"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
module PTYQoLArrayLayoutsExt | ||
|
||
# https://github.com/JuliaLinearAlgebra/ArrayLayouts.jl/pull/184 | ||
import ArrayLayouts: rowsupport, colsupport | ||
|
||
rowsupport(A, i::CartesianIndex{2}) = rowsupport(A, first(i)) | ||
colsupport(A, i::CartesianIndex{2}) = colsupport(A, last(i)) | ||
|
||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
module PTYQoLBandedMatricesExt | ||
|
||
import BandedMatrices: inbands_getindex, inbands_setindex!, AbstractBandedMatrix, bandwidths, MemoryLayout, BandedLayout | ||
import Base: getindex, setindex!, @propagate_inbounds | ||
|
||
# too tedious to test | ||
|
||
MemoryLayout(::Type{<:AbstractBandedMatrix}) = BandedLayout() | ||
|
||
@propagate_inbounds function getindex(A::AbstractBandedMatrix, j::Integer, k::Integer) | ||
@boundscheck checkbounds(A, j, k) | ||
l, u = bandwidths(A) | ||
if -l ≤ k-j ≤ u | ||
inbands_getindex(A, j, k) | ||
else | ||
zero(eltype(A)) | ||
end | ||
end | ||
|
||
@propagate_inbounds function setindex!(A::AbstractBandedMatrix, v, j::Integer, k::Integer) | ||
@boundscheck checkbounds(A, j, k) | ||
l, u = bandwidths(A) | ||
if -l ≤ k-j ≤ u | ||
inbands_setindex!(A, v, j, k) | ||
elseif iszero(v) | ||
zero(eltype(A)) | ||
else | ||
error("out of band.") | ||
end | ||
end | ||
|
||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
module PTYQoLInfiniteArraysExt | ||
|
||
import InfiniteArrays: InfStepRange, AbstractInfUnitRange, Zeros, ∞, diag, Diagonal | ||
#import LinearAlgebra: diag, Diagonal | ||
|
||
infdiag(a, k) = iszero(k) ? copy(a.diag) : Zeros{eltype(a)}(∞) | ||
|
||
for TYP in (InfStepRange, AbstractInfUnitRange) | ||
@eval begin | ||
diag(a::Diagonal{T, <:$TYP}, k::Integer=0) where T = infdiag(a, k) | ||
end | ||
end | ||
|
||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters