forked from ITensor/Derive.jl
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rename to DerivableInterfaces.jl (#1)
- Loading branch information
Showing
22 changed files
with
95 additions
and
75 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
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
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,25 +1,25 @@ | ||
name = "Derive" | ||
uuid = "a07dfc7f-7d04-4eb5-84cc-a97f051f655a" | ||
name = "DerivableInterfaces" | ||
uuid = "6c5e35bf-e59e-4898-b73c-732dcc4ba65f" | ||
authors = ["ITensor developers <[email protected]> and contributors"] | ||
version = "0.3.6" | ||
version = "0.3.7" | ||
|
||
[deps] | ||
Adapt = "79e6a3ab-5dfb-504d-930d-738a2a938a0e" | ||
ArrayLayouts = "4c555306-a7a7-4459-81d9-ec55ddd5c99a" | ||
BroadcastMapConversion = "4a4adec5-520f-4750-bb37-d5e66b4ddeb2" | ||
ExproniconLite = "55351af7-c7e9-48d6-89ff-24e801d99491" | ||
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" | ||
MLStyle = "d8e11817-5142-5d16-987a-aa16d5891078" | ||
MapBroadcast = "ebd9b9da-f48d-417c-9660-449667d60261" | ||
TypeParameterAccessors = "7e5a90cf-f82e-492e-a09b-e3e26432c138" | ||
|
||
[compat] | ||
Adapt = "4.1.1" | ||
Aqua = "0.8.9" | ||
ArrayLayouts = "1.11.0" | ||
BroadcastMapConversion = "0.1.0" | ||
ExproniconLite = "0.10.13" | ||
LinearAlgebra = "1.10" | ||
MLStyle = "0.4.17" | ||
MapBroadcast = "0.1.5" | ||
SafeTestsets = "0.1" | ||
Suppressor = "0.2" | ||
Test = "1.10" | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
using Derive | ||
using DerivableInterfaces | ||
using BenchmarkTools | ||
|
||
SUITE = BenchmarkGroup() | ||
|
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,4 +1,4 @@ | ||
[deps] | ||
Derive = "a07dfc7f-7d04-4eb5-84cc-a97f051f655a" | ||
DerivableInterfaces = "6c5e35bf-e59e-4898-b73c-732dcc4ba65f" | ||
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4" | ||
Literate = "98b081ad-f1c9-55d3-8b20-4c87d4299306" |
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,18 +1,24 @@ | ||
using Derive: Derive | ||
using DerivableInterfaces: DerivableInterfaces | ||
using Documenter: Documenter, DocMeta, deploydocs, makedocs | ||
|
||
DocMeta.setdocmeta!(Derive, :DocTestSetup, :(using Derive); recursive=true) | ||
DocMeta.setdocmeta!( | ||
DerivableInterfaces, :DocTestSetup, :(using DerivableInterfaces); recursive=true | ||
) | ||
|
||
include("make_index.jl") | ||
|
||
makedocs(; | ||
modules=[Derive], | ||
modules=[DerivableInterfaces], | ||
authors="ITensor developers <[email protected]> and contributors", | ||
sitename="Derive.jl", | ||
sitename="DerivableInterfaces.jl", | ||
format=Documenter.HTML(; | ||
canonical="https://ITensor.github.io/Derive.jl", edit_link="main", assets=String[] | ||
canonical="https://ITensor.github.io/DerivableInterfaces.jl", | ||
edit_link="main", | ||
assets=String[], | ||
), | ||
pages=["Home" => "index.md"], | ||
) | ||
|
||
deploydocs(; repo="github.com/ITensor/Derive.jl", devbranch="main", push_preview=true) | ||
deploydocs(; | ||
repo="github.com/ITensor/DerivableInterfaces.jl", devbranch="main", push_preview=true | ||
) |
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,9 +1,9 @@ | ||
using Literate: Literate | ||
using Derive: Derive | ||
using DerivableInterfaces: DerivableInterfaces | ||
|
||
Literate.markdown( | ||
joinpath(pkgdir(Derive), "examples", "README.jl"), | ||
joinpath(pkgdir(Derive), "docs", "src"); | ||
joinpath(pkgdir(DerivableInterfaces), "examples", "README.jl"), | ||
joinpath(pkgdir(DerivableInterfaces), "docs", "src"); | ||
flavor=Literate.DocumenterFlavor(), | ||
name="index", | ||
) |
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,9 +1,9 @@ | ||
using Literate: Literate | ||
using Derive: Derive | ||
using DerivableInterfaces: DerivableInterfaces | ||
|
||
Literate.markdown( | ||
joinpath(pkgdir(Derive), "examples", "README.jl"), | ||
joinpath(pkgdir(Derive)); | ||
joinpath(pkgdir(DerivableInterfaces), "examples", "README.jl"), | ||
joinpath(pkgdir(DerivableInterfaces)); | ||
flavor=Literate.CommonMarkFlavor(), | ||
name="README", | ||
) |
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,3 +1,3 @@ | ||
[deps] | ||
ArrayLayouts = "4c555306-a7a7-4459-81d9-ec55ddd5c99a" | ||
Derive = "a07dfc7f-7d04-4eb5-84cc-a97f051f655a" | ||
DerivableInterfaces = "6c5e35bf-e59e-4898-b73c-732dcc4ba65f" |
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,9 +1,9 @@ | ||
# # Derive.jl | ||
# # DerivableInterfaces.jl | ||
# | ||
# [![Stable](https://img.shields.io/badge/docs-stable-blue.svg)](https://ITensor.github.io/Derive.jl/stable/) | ||
# [![Dev](https://img.shields.io/badge/docs-dev-blue.svg)](https://ITensor.github.io/Derive.jl/dev/) | ||
# [![Build Status](https://github.com/ITensor/Derive.jl/actions/workflows/Tests.yml/badge.svg?branch=main)](https://github.com/ITensor/Derive.jl/actions/workflows/Tests.yml?query=branch%3Amain) | ||
# [![Coverage](https://codecov.io/gh/ITensor/Derive.jl/branch/main/graph/badge.svg)](https://codecov.io/gh/ITensor/Derive.jl) | ||
# [![Stable](https://img.shields.io/badge/docs-stable-blue.svg)](https://ITensor.github.io/DerivableInterfaces.jl/stable/) | ||
# [![Dev](https://img.shields.io/badge/docs-dev-blue.svg)](https://ITensor.github.io/DerivableInterfaces.jl/dev/) | ||
# [![Build Status](https://github.com/ITensor/DerivableInterfaces.jl/actions/workflows/Tests.yml/badge.svg?branch=main)](https://github.com/ITensor/DerivableInterfaces.jl/actions/workflows/Tests.yml?query=branch%3Amain) | ||
# [![Coverage](https://codecov.io/gh/ITensor/DerivableInterfaces.jl/branch/main/graph/badge.svg)](https://codecov.io/gh/ITensor/DerivableInterfaces.jl) | ||
# [![Code Style: Blue](https://img.shields.io/badge/code%20style-blue-4495d1.svg)](https://github.com/invenia/BlueStyle) | ||
# [![Aqua](https://raw.githubusercontent.com/JuliaTesting/Aqua.jl/master/badge.svg)](https://github.com/JuliaTesting/Aqua.jl) | ||
|
||
|
@@ -47,13 +47,14 @@ julia> Pkg.Registry.add(url="[email protected]:ITensor/ITensorRegistry.git") | |
|
||
#= | ||
```julia | ||
julia> Pkg.add("Derive") | ||
julia> Pkg.add("DerivableInterfaces") | ||
``` | ||
=# | ||
|
||
# ## Examples | ||
|
||
using Derive: Derive, @array_aliases, @derive, @interface, interface | ||
using DerivableInterfaces: | ||
DerivableInterfaces, @array_aliases, @derive, @interface, interface | ||
using Test: @test | ||
|
||
# Define an interface. | ||
|
@@ -106,12 +107,12 @@ function setunstoredindex!(a::SparseArrayDOK, value, I::Int...) | |
end | ||
|
||
# Specify the interface the type adheres to. | ||
Derive.interface(::Type{<:SparseArrayDOK}) = SparseArrayInterface() | ||
DerivableInterfaces.interface(::Type{<:SparseArrayDOK}) = SparseArrayInterface() | ||
|
||
# Define aliases like `SparseMatrixDOK`, `AnySparseArrayDOK`, etc. | ||
@array_aliases SparseArrayDOK | ||
|
||
# Derive the interface for the type. | ||
# DerivableInterfaces the interface for the type. | ||
@derive (T=SparseArrayDOK,) begin | ||
Base.getindex(::T, ::Int...) | ||
Base.setindex!(::T, ::Any, ::Int...) | ||
|
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,4 +1,4 @@ | ||
module Derive | ||
module DerivableInterfaces | ||
|
||
include("interface_function.jl") | ||
include("abstractinterface.jl") | ||
|
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
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
Oops, something went wrong.