Skip to content

Commit ad98b39

Browse files
committed
[WIP] Rewrite using Derive and new interface
1 parent e63b07d commit ad98b39

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+179
-2630
lines changed

.github/workflows/CI.yml

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

.github/workflows/Documentation.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: "Documentation"
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
tags: '*'
8+
pull_request:
9+
schedule:
10+
- cron: '1 4 * * 4'
11+
12+
concurrency:
13+
group: ${{ github.workflow }}-${{ github.ref }}
14+
cancel-in-progress: ${{ github.ref_name != github.event.repository.default_branch || github.ref != 'refs/tags/v*' }}
15+
16+
jobs:
17+
build-and-deploy-docs:
18+
name: "Documentation"
19+
uses: "ITensor/ITensorActions/.github/workflows/Documentation.yml@main"
20+
with:
21+
localregistry: https://github.com/ITensor/ITensorRegistry.git
22+
secrets:
23+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

.github/workflows/FormatCheck.yml

Lines changed: 7 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,13 @@
1-
name: Format check
1+
name: "Format Check"
2+
23
on:
34
push:
4-
branches: [main]
5-
tags: [v*]
5+
branches:
6+
- 'main'
7+
tags: '*'
68
pull_request:
79

810
jobs:
9-
format:
11+
format-check:
1012
name: "Format Check"
11-
runs-on: ubuntu-latest
12-
steps:
13-
- uses: actions/checkout@v4
14-
- uses: julia-actions/setup-julia@v2
15-
with:
16-
version: 1
17-
- name: Install JuliaFormatter and format
18-
run: |
19-
julia -e 'using Pkg; Pkg.add(PackageSpec(name="JuliaFormatter"))'
20-
julia -e 'using JuliaFormatter; format(".", verbose=true)'
21-
- name: Check format
22-
run: |
23-
julia -e '
24-
out = Cmd(`git diff --name-only`) |> read |> String
25-
if out == ""
26-
exit(0)
27-
else
28-
@error "The following files have not been formatted:"
29-
write(stdout, out)
30-
out_diff = Cmd(`git diff`) |> read |> String
31-
@error "Diff:"
32-
write(stdout, out_diff)
33-
exit(1)
34-
@error ""
35-
end'
13+
uses: "ITensor/ITensorActions/.github/workflows/FormatCheck.yml@main"

.github/workflows/LiterateCheck.yml

Lines changed: 8 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,15 @@
1-
name: Literate check
1+
name: "Literate Check"
2+
23
on:
34
push:
4-
branches: [main]
5-
tags: [v*]
5+
branches:
6+
- 'main'
7+
tags: '*'
68
pull_request:
79

810
jobs:
911
literate:
1012
name: "Literate Check"
11-
runs-on: ubuntu-latest
12-
steps:
13-
- uses: actions/checkout@v4
14-
- uses: julia-actions/setup-julia@v2
15-
with:
16-
version: 1
17-
- name: Install Literate and generate docs
18-
run: |
19-
julia -e '
20-
using Pkg
21-
# TODO: Delete once they are registered.
22-
Pkg.add(url="https://github.com/ITensor/BroadcastMapConversion.jl")
23-
Pkg.add(url="https://github.com/ITensor/NestedPermutedDimsArrays.jl")
24-
Pkg.add(url="https://github.com/ITensor/TypeParameterAccessors.jl")
25-
Pkg.develop(PackageSpec(path=pwd()))
26-
Pkg.instantiate()
27-
Pkg.add(PackageSpec(name="Literate"))'
28-
julia -e 'include("docs/make_readme.jl")'
29-
- name: Check if docs need to be updated
30-
run: |
31-
julia -e '
32-
out = Cmd(`git diff --name-only`) |> read |> String
33-
if out == ""
34-
exit(0)
35-
else
36-
@error "The docs are outdated, rerun Literate to regenerate them."
37-
write(stdout, out)
38-
out_diff = Cmd(`git diff`) |> read |> String
39-
@error "Diff:"
40-
write(stdout, out_diff)
41-
exit(1)
42-
@error ""
43-
end'
13+
uses: "ITensor/ITensorActions/.github/workflows/LiterateCheck.yml@main"
14+
with:
15+
localregistry: https://github.com/ITensor/ITensorRegistry.git

.github/workflows/Tests.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Tests
2+
on:
3+
push:
4+
branches:
5+
- 'master'
6+
- 'main'
7+
- 'release-'
8+
tags: '*'
9+
paths-ignore:
10+
- 'docs/**'
11+
pull_request:
12+
workflow_dispatch:
13+
14+
concurrency:
15+
group: ${{ github.workflow }}-${{ github.ref }}
16+
# Cancel intermediate builds: only if it is a pull request build.
17+
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}
18+
19+
jobs:
20+
tests:
21+
name: "Tests"
22+
strategy:
23+
fail-fast: false
24+
matrix:
25+
version:
26+
- 'lts' # minimal supported version
27+
- '1' # latest released Julia version
28+
# group:
29+
# - 'core'
30+
# - 'optional'
31+
os:
32+
- ubuntu-latest
33+
- macOS-latest
34+
- windows-latest
35+
uses: "ITensor/ITensorActions/.github/workflows/Tests.yml@main"
36+
with:
37+
group: "${{ matrix.group }}"
38+
julia-version: "${{ matrix.version }}"
39+
os: "${{ matrix.os }}"
40+
localregistry: https://github.com/ITensor/ITensorRegistry.git
41+
secrets:
42+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

Project.toml

Lines changed: 6 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,20 @@
11
name = "SparseArraysBase"
2-
uuid = "0d5efcca-f356-4864-8770-e1ed8d78f208"
2+
uuid = "b8770bf0-c4ae-4888-b9b0-956061873092"
33
authors = ["ITensor developers <[email protected]> and contributors"]
44
version = "0.1.0"
55

6-
[deps]
7-
Accessors = "7d9f7c33-5ae7-4f3b-8dc6-eff91059b697"
8-
Adapt = "79e6a3ab-5dfb-504d-930d-738a2a938a0e"
9-
ArrayLayouts = "4c555306-a7a7-4459-81d9-ec55ddd5c99a"
10-
BroadcastMapConversion = "4a4adec5-520f-4750-bb37-d5e66b4ddeb2"
11-
Compat = "34da2185-b29b-5c13-b0c7-acf172513d20"
12-
Dictionaries = "85a47980-9c8c-11e8-2b9f-f7ca1fa99fb4"
13-
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
14-
MacroTools = "1914dd2f-81c6-5fcd-8719-6d5c9610ff09"
15-
NestedPermutedDimsArrays = "2c2a8ec4-3cfc-4276-aa3e-1307b4294e58"
16-
SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf"
17-
TypeParameterAccessors = "7e5a90cf-f82e-492e-a09b-e3e26432c138"
18-
VectorInterface = "409d34a3-91d5-4945-b6ec-7529ddf182d8"
19-
20-
[sources]
21-
BroadcastMapConversion = {url = "https://github.com/ITensor/BroadcastMapConversion.jl"}
22-
NestedPermutedDimsArrays = {url = "https://github.com/ITensor/NestedPermutedDimsArrays.jl"}
23-
TypeParameterAccessors = {url = "https://github.com/ITensor/TypeParameterAccessors.jl"}
24-
256
[compat]
26-
Accessors = "0.1.38"
27-
Adapt = "4.1.1"
287
Aqua = "0.8.9"
29-
ArrayLayouts = "1.10.4"
30-
Compat = "4.16.0"
31-
Dictionaries = "0.4.3"
32-
LinearAlgebra = "1.10"
33-
MacroTools = "0.5.13"
34-
SparseArrays = "1.10"
8+
SafeTestsets = "0.1"
9+
Suppressor = "0.2"
3510
Test = "1.10"
36-
VectorInterface = "0.5.0"
3711
julia = "1.10"
3812

3913
[extras]
4014
Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595"
4115
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
16+
SafeTestsets = "1bc83da4-3b8d-516f-aca4-4fe02f6d838f"
17+
Suppressor = "fd094767-a336-5f1f-9728-57cf17d0bbfb"
4218

4319
[targets]
44-
test = ["Aqua", "Test"]
20+
test = ["Aqua", "Test", "Suppressor", "SafeTestsets"]

README.md

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,31 @@
22

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/)
5-
[![Build Status](https://github.com/ITensor/SparseArraysBase.jl/actions/workflows/CI.yml/badge.svg?branch=main)](https://github.com/ITensor/SparseArraysBase.jl/actions/workflows/CI.yml?query=branch%3Amain)
5+
[![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)
66
[![Coverage](https://codecov.io/gh/ITensor/SparseArraysBase.jl/branch/main/graph/badge.svg)](https://codecov.io/gh/ITensor/SparseArraysBase.jl)
77
[![Code Style: Blue](https://img.shields.io/badge/code%20style-blue-4495d1.svg)](https://github.com/invenia/BlueStyle)
88
[![Aqua](https://raw.githubusercontent.com/JuliaTesting/Aqua.jl/master/badge.svg)](https://github.com/JuliaTesting/Aqua.jl)
99

1010
## Installation instructions
1111

12+
This package resides in the `ITensor/ITensorRegistry` local registry.
13+
In order to install, simply add that registry through your package manager.
14+
This step is only required once.
1215
```julia
1316
julia> using Pkg: Pkg
1417

15-
julia> Pkg.add(url="https://github.com/ITensor/BroadcastMapConversion.jl")
16-
17-
julia> Pkg.add(url="https://github.com/ITensor/NestedPermutedDimsArrays.jl")
18+
julia> Pkg.Registry.add(url="https://github.com/ITensor/ITensorRegistry")
19+
```
20+
or:
21+
```julia
22+
julia> Pkg.Registry.add(url="[email protected]:ITensor/ITensorRegistry.git")
23+
```
24+
if you want to use SSH credentials, which can make it so you don't have to enter your Github ursername and password when registering packages.
1825

19-
julia> Pkg.add(url="https://github.com/ITensor/TypeParameterAccessors.jl")
26+
Then, the package can be added as usual through the package manager:
2027

21-
julia> Pkg.add(url="https://github.com/ITensor/SparseArraysBase.jl")
28+
```julia
29+
julia> Pkg.add("SparseArraysBase")
2230
```
2331

2432
## Examples

0 commit comments

Comments
 (0)