Skip to content

Commit 38fdcd9

Browse files
Automatic Runic.jl run (#71)
Co-authored-by: mtfishman <[email protected]> Co-authored-by: Matt Fishman <[email protected]> Co-authored-by: mtfishman <[email protected]>
1 parent 53191c8 commit 38fdcd9

28 files changed

+1499
-1490
lines changed

.github/workflows/CompatHelper.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: "CompatHelper"
22

33
on:
44
schedule:
5-
- cron: 0 0 * * *
5+
- cron: '0 0 * * *'
66
workflow_dispatch:
77
permissions:
88
contents: write

.github/workflows/FormatCheck.yml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
11
name: "Format Check"
22

33
on:
4-
push:
5-
branches:
6-
- 'main'
7-
tags: '*'
8-
pull_request:
4+
pull_request_target:
5+
paths: ['**/*.jl']
6+
types: [opened, synchronize, reopened, ready_for_review]
7+
8+
permissions:
9+
contents: read
10+
actions: write
11+
pull-requests: write
912

1013
jobs:
1114
format-check:

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@
99
.vscode/
1010
Manifest.toml
1111
benchmark/*.json
12+
dev/
13+
docs/LocalPreferences.toml
1214
docs/Manifest.toml
1315
docs/build/
1416
docs/src/index.md
17+
examples/LocalPreferences.toml
18+
test/LocalPreferences.toml

.pre-commit-config.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
ci:
2-
skip: [julia-formatter]
2+
skip: [runic]
33

44
repos:
55
- repo: https://github.com/pre-commit/pre-commit-hooks
@@ -11,7 +11,7 @@ repos:
1111
- id: end-of-file-fixer
1212
exclude_types: [markdown] # incompatible with Literate.jl
1313

14-
- repo: "https://github.com/domluna/JuliaFormatter.jl"
15-
rev: v2.1.6
14+
- repo: https://github.com/fredrikekre/runic-pre-commit
15+
rev: v2.0.1
1616
hooks:
17-
- id: "julia-formatter"
17+
- id: runic

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "SparseArraysBase"
22
uuid = "0d5efcca-f356-4864-8770-e1ed8d78f208"
33
authors = ["ITensor developers <[email protected]> and contributors"]
4-
version = "0.7.4"
4+
version = "0.7.5"
55

66
[deps]
77
Accessors = "7d9f7c33-5ae7-4f3b-8dc6-eff91059b697"

README.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -43,19 +43,19 @@ julia> Pkg.add("SparseArraysBase")
4343

4444
````julia
4545
using SparseArraysBase:
46-
SparseArrayDOK,
47-
SparseMatrixDOK,
48-
SparseVectorDOK,
49-
eachstoredindex,
50-
getstoredindex,
51-
getunstoredindex,
52-
isstored,
53-
setstoredindex!,
54-
setunstoredindex!,
55-
storedlength,
56-
storedpairs,
57-
storedvalues,
58-
zero!
46+
SparseArrayDOK,
47+
SparseMatrixDOK,
48+
SparseVectorDOK,
49+
eachstoredindex,
50+
getstoredindex,
51+
getunstoredindex,
52+
isstored,
53+
setstoredindex!,
54+
setunstoredindex!,
55+
storedlength,
56+
storedpairs,
57+
storedvalues,
58+
zero!
5959
using Test: @test, @test_throws
6060

6161
a = SparseArrayDOK{Float64}(undef, 2, 2)
@@ -135,14 +135,14 @@ b = a[1:2, 2]
135135
a = SparseArrayDOK{Float64}(undef, 2, 2)
136136
a .= 2
137137
for I in eachindex(a)
138-
@test a[I] == 2
138+
@test a[I] == 2
139139
end
140140
@test storedlength(a) == length(a)
141141

142142
a = SparseArrayDOK{Float64}(undef, 2, 2)
143143
fill!(a, 2)
144144
for I in eachindex(a)
145-
@test a[I] == 2
145+
@test a[I] == 2
146146
end
147147
@test storedlength(a) == length(a)
148148

docs/make.jl

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,23 @@ using SparseArraysBase: SparseArraysBase
22
using Documenter: Documenter, DocMeta, deploydocs, makedocs
33

44
DocMeta.setdocmeta!(
5-
SparseArraysBase, :DocTestSetup, :(using SparseArraysBase); recursive=true
5+
SparseArraysBase, :DocTestSetup, :(using SparseArraysBase); recursive = true
66
)
77

88
include("make_index.jl")
99

1010
makedocs(;
11-
modules=[SparseArraysBase],
12-
authors="ITensor developers <[email protected]> and contributors",
13-
sitename="SparseArraysBase.jl",
14-
format=Documenter.HTML(;
15-
canonical="https://itensor.github.io/SparseArraysBase.jl",
16-
edit_link="main",
17-
assets=["assets/favicon.ico", "assets/extras.css"],
18-
),
19-
pages=["Home" => "index.md", "Reference" => "reference.md"],
11+
modules = [SparseArraysBase],
12+
authors = "ITensor developers <[email protected]> and contributors",
13+
sitename = "SparseArraysBase.jl",
14+
format = Documenter.HTML(;
15+
canonical = "https://itensor.github.io/SparseArraysBase.jl",
16+
edit_link = "main",
17+
assets = ["assets/favicon.ico", "assets/extras.css"],
18+
),
19+
pages = ["Home" => "index.md", "Reference" => "reference.md"],
2020
)
2121

2222
deploydocs(;
23-
repo="github.com/ITensor/SparseArraysBase.jl", devbranch="main", push_preview=true
23+
repo = "github.com/ITensor/SparseArraysBase.jl", devbranch = "main", push_preview = true
2424
)

docs/make_index.jl

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,20 @@ using Literate: Literate
22
using SparseArraysBase: SparseArraysBase
33

44
function ccq_logo(content)
5-
include_ccq_logo = """
5+
include_ccq_logo = """
66
```@raw html
77
<img class="display-light-only" src="assets/CCQ.png" width="20%" alt="Flatiron Center for Computational Quantum Physics logo."/>
88
<img class="display-dark-only" src="assets/CCQ-dark.png" width="20%" alt="Flatiron Center for Computational Quantum Physics logo."/>
99
```
1010
"""
11-
content = replace(content, "{CCQ_LOGO}" => include_ccq_logo)
12-
return content
11+
content = replace(content, "{CCQ_LOGO}" => include_ccq_logo)
12+
return content
1313
end
1414

1515
Literate.markdown(
16-
joinpath(pkgdir(SparseArraysBase), "examples", "README.jl"),
17-
joinpath(pkgdir(SparseArraysBase), "docs", "src");
18-
flavor=Literate.DocumenterFlavor(),
19-
name="index",
20-
postprocess=ccq_logo,
16+
joinpath(pkgdir(SparseArraysBase), "examples", "README.jl"),
17+
joinpath(pkgdir(SparseArraysBase), "docs", "src");
18+
flavor = Literate.DocumenterFlavor(),
19+
name = "index",
20+
postprocess = ccq_logo,
2121
)

docs/make_readme.jl

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,20 @@ using Literate: Literate
22
using SparseArraysBase: SparseArraysBase
33

44
function ccq_logo(content)
5-
include_ccq_logo = """
5+
include_ccq_logo = """
66
<picture>
77
<source media="(prefers-color-scheme: dark)" width="20%" srcset="docs/src/assets/CCQ-dark.png">
88
<img alt="Flatiron Center for Computational Quantum Physics logo." width="20%" src="docs/src/assets/CCQ.png">
99
</picture>
1010
"""
11-
content = replace(content, "{CCQ_LOGO}" => include_ccq_logo)
12-
return content
11+
content = replace(content, "{CCQ_LOGO}" => include_ccq_logo)
12+
return content
1313
end
1414

1515
Literate.markdown(
16-
joinpath(pkgdir(SparseArraysBase), "examples", "README.jl"),
17-
joinpath(pkgdir(SparseArraysBase));
18-
flavor=Literate.CommonMarkFlavor(),
19-
name="README",
20-
postprocess=ccq_logo,
16+
joinpath(pkgdir(SparseArraysBase), "examples", "README.jl"),
17+
joinpath(pkgdir(SparseArraysBase));
18+
flavor = Literate.CommonMarkFlavor(),
19+
name = "README",
20+
postprocess = ccq_logo,
2121
)

examples/README.jl

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# # SparseArraysBase.jl
2-
#
2+
#
33
# [![Stable](https://img.shields.io/badge/docs-stable-blue.svg)](https://itensor.github.io/SparseArraysBase.jl/stable/)
44
# [![Dev](https://img.shields.io/badge/docs-dev-blue.svg)](https://itensor.github.io/SparseArraysBase.jl/dev/)
55
# [![Build Status](https://github.com/ITensor/SparseArraysBase.jl/actions/workflows/Tests.yml/badge.svg?branch=main)](https://github.com/ITensor/SparseArraysBase.jl/actions/workflows/Tests.yml?query=branch%3Amain)
@@ -44,19 +44,19 @@ julia> Pkg.add("SparseArraysBase")
4444
# ## Examples
4545

4646
using SparseArraysBase:
47-
SparseArrayDOK,
48-
SparseMatrixDOK,
49-
SparseVectorDOK,
50-
eachstoredindex,
51-
getstoredindex,
52-
getunstoredindex,
53-
isstored,
54-
setstoredindex!,
55-
setunstoredindex!,
56-
storedlength,
57-
storedpairs,
58-
storedvalues,
59-
zero!
47+
SparseArrayDOK,
48+
SparseMatrixDOK,
49+
SparseVectorDOK,
50+
eachstoredindex,
51+
getstoredindex,
52+
getunstoredindex,
53+
isstored,
54+
setstoredindex!,
55+
setunstoredindex!,
56+
storedlength,
57+
storedpairs,
58+
storedvalues,
59+
zero!
6060
using Test: @test, @test_throws
6161

6262
a = SparseArrayDOK{Float64}(undef, 2, 2)
@@ -127,14 +127,14 @@ b = a[1:2, 2]
127127
a = SparseArrayDOK{Float64}(undef, 2, 2)
128128
a .= 2
129129
for I in eachindex(a)
130-
@test a[I] == 2
130+
@test a[I] == 2
131131
end
132132
@test storedlength(a) == length(a)
133133

134134
a = SparseArrayDOK{Float64}(undef, 2, 2)
135135
fill!(a, 2)
136136
for I in eachindex(a)
137-
@test a[I] == 2
137+
@test a[I] == 2
138138
end
139139
@test storedlength(a) == length(a)
140140

0 commit comments

Comments
 (0)