Skip to content

Commit 0c1e454

Browse files
authored
Merge pull request #1 from JuliaDiff/ox/create
Create the package
2 parents 138f46f + 6c9660b commit 0c1e454

19 files changed

Lines changed: 171 additions & 154 deletions

.github/workflows/IntegrationTest.yml

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,7 @@ jobs:
1515
julia-version: [1.5]
1616
os: [ubuntu-latest]
1717
package:
18-
- {user: JuliaDiff, repo: ChainRules.jl}
19-
- {user: JuliaMath, repo: SpecialFunctions.jl}
20-
- {user: invenia, repo: BlockDiagonals.jl}
21-
- {user: invenia, repo: PDMatsExtras.jl}
22-
- {user: chrisbrahms, repo: Hankel.jl}
23-
- {user: SciML, repo: DiffEqBase.jl}
24-
- {user: dfdx, repo: Yota.jl}
18+
# - {user: Invenia, repo: Nabla.jl}
2519

2620
steps:
2721
- uses: actions/checkout@v2
@@ -43,7 +37,7 @@ jobs:
4337
# force it to use this PR's version of the package
4438
Pkg.develop(PackageSpec(path=".")) # resolver may fail with main deps
4539
Pkg.update()
46-
Pkg.test() # resolver may fail with test time deps
40+
Pkg.test() # resolver may fail with test time deps
4741
catch err
4842
err isa Pkg.Resolve.ResolverError || rethrow()
4943
# If we can't resolve that means this is incompatible by SemVer and this is fine

LICENSE.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
The ChainRulesCore.jl package is licensed under the MIT "Expat" License:
1+
The ChainRulesOverloadGeneration.jl package is licensed under the MIT "Expat" License:
22

33
> Copyright (c) 2018-2019: Jarrett Revels, and other JuliaDiff Contributors:
4-
> https://github.com/JuliaDiff/ChainRulesCore.jl/contributors
4+
> https://github.com/JuliaDiff/ChainRulesOverloadGeneration.jl/contributors
55
>
66
> Permission is hereby granted, free of charge, to any person obtaining a copy
77
> of this software and associated documentation files (the "Software"), to deal

Project.toml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
name = "ChainRulesOverloadGeneration"
2+
uuid = "f51149dc-2911-5acf-81fc-2076a2a81d4f"
3+
version = "0.1.0"
4+
5+
[deps]
6+
ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4"
7+
8+
[compat]
9+
ChainRulesCore = "0.9"
10+
11+
[extras]
12+
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
13+
14+
[targets]
15+
test = ["Test"]

README.md

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,16 @@
11
<img src="https://rawcdn.githack.com/JuliaDiff/ChainRulesCore.jl/b0b8dbf26807f8f6bc1a3c073b6720b8d90a8cd4/docs/src/assets/logo.svg" width="256"/>
22

3-
# ChainRulesCore
3+
# ChainRulesOverloadGeneration
44

5-
[![Build Status](https://github.com/JuliaDiff/ChainRulesCore.jl/workflows/CI/badge.svg)](https://github.com/JuliaDiff/ChainRulesCore.jl/actions?query=workflow:CI)
6-
[![Coverage](https://codecov.io/gh/JuliaDiff/ChainRulesCore.jl/branch/master/graph/badge.svg)](https://codecov.io/gh/JuliaDiff/ChainRulesCore.jl)
5+
[![Build Status](https://github.com/JuliaDiff/ChainRulesOverloadGeneration.jl/workflows/CI/badge.svg)](https://github.com/JuliaDiff/ChainRulesOverloadGeneration.jl/actions?query=workflow:CI)
6+
[![Coverage](https://codecov.io/gh/JuliaDiff/ChainRulesOverloadGeneration.jl/branch/master/graph/badge.svg)](https://codecov.io/gh/JuliaDiff/ChainRulesOverloadGeneration.jl)
77
[![Code Style: Blue](https://img.shields.io/badge/code%20style-blue-4495d1.svg)](https://github.com/invenia/BlueStyle)
88
[![ColPrac: Contributor's Guide on Collaborative Practices for Community Packages](https://img.shields.io/badge/ColPrac-Contributor's%20Guide-blueviolet)](https://github.com/SciML/ColPrac)
99
[![DOI](https://zenodo.org/badge/199721843.svg)](https://zenodo.org/badge/latestdoi/199721843)
1010

1111
**Docs:**
12-
[![](https://img.shields.io/badge/docs-master-blue.svg)](https://juliadiff.org/ChainRulesCore.jl/dev)
13-
[![](https://img.shields.io/badge/docs-stable-blue.svg)](https://juliadiff.org/ChainRulesCore.jl/stable)
12+
[![](https://img.shields.io/badge/docs-master-blue.svg)](https://juliadiff.org/ChainRulesOverloadGeneration.jl/dev)
13+
[![](https://img.shields.io/badge/docs-stable-blue.svg)](https://juliadiff.org/ChainRulesOverloadGeneration.jl/stable)
1414

15-
The ChainRulesCore package provides a light-weight dependency for defining sensitivities for functions in your packages, without you needing to depend on ChainRules itself.
16-
17-
This will allow your package to be used with [ChainRules.jl](https://github.com/JuliaDiff/ChainRules.jl), which aims to provide a variety of common utilities that can be used by downstream automatic differentiation (AD) tools to define and execute forward-, reverse-, and mixed-mode primitives.
18-
19-
This package is a work in progress; PRs welcome!
15+
The ChainRulesOverloadGeneration package provides a suite of methods for using [ChainRulesCore.jl](https://github.com/JuliaDiff/ChainRulesCore.jl) rules in operator overloading AD systems.
16+
It tracks what rules are defined at any point in time, and lets you trigger functions to which can use `@eval` in order to define the matching operator overloads.

docs/Manifest.toml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,21 @@ uuid = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f"
1111

1212
[[ChainRulesCore]]
1313
deps = ["Compat", "LinearAlgebra", "SparseArrays"]
14-
path = ".."
14+
git-tree-sha1 = "b391f22252b8754f4440de1f37ece49d8a7314bb"
1515
uuid = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4"
1616
version = "0.9.44"
1717

18+
[[ChainRulesOverloadGeneration]]
19+
deps = ["ChainRulesCore"]
20+
path = ".."
21+
uuid = "f51149dc-2911-5acf-81fc-2076a2a81d4f"
22+
version = "0.1.0"
23+
1824
[[Compat]]
1925
deps = ["Base64", "Dates", "DelimitedFiles", "Distributed", "InteractiveUtils", "LibGit2", "Libdl", "LinearAlgebra", "Markdown", "Mmap", "Pkg", "Printf", "REPL", "Random", "SHA", "Serialization", "SharedArrays", "Sockets", "SparseArrays", "Statistics", "Test", "UUIDs", "Unicode"]
20-
git-tree-sha1 = "0900bc19193b8e672d9cd477e6cd92d9e7c02f99"
26+
git-tree-sha1 = "e4e2b39db08f967cc1360951f01e8a75ec441cab"
2127
uuid = "34da2185-b29b-5c13-b0c7-acf172513d20"
22-
version = "3.29.0"
28+
version = "3.30.0"
2329

2430
[[Dates]]
2531
deps = ["Printf"]

docs/Project.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
[deps]
22
ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4"
3+
ChainRulesOverloadGeneration = "f51149dc-2911-5acf-81fc-2076a2a81d4f"
34
Compat = "34da2185-b29b-5c13-b0c7-acf172513d20"
45
DocThemeIndigo = "8bac0ac5-51bf-41f9-885e-2bf1ac2bec5f"
56
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"

docs/make.jl

Lines changed: 11 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -1,72 +1,32 @@
1-
using ChainRulesCore
1+
using ChainRulesOverloadGeneration
2+
using ChainRulesCore: ChainRulesCore
23
using Documenter
34
using DocThemeIndigo
45
using Markdown
56

6-
DocMeta.setdocmeta!(
7-
ChainRulesCore,
8-
:DocTestSetup,
9-
quote
10-
using Random
11-
Random.seed!(0) # frule doctest shows output
12-
13-
using ChainRulesCore
14-
# These rules are all actually defined in ChainRules.jl, but we redefine them here to
15-
# avoid the dependency.
16-
@scalar_rule(sin(x), cos(x)) # frule and rrule doctest
17-
@scalar_rule(sincos(x), @setup((sinx, cosx) = Ω), cosx, -sinx) # frule doctest
18-
@scalar_rule(hypot(x::Real, y::Real), (x / Ω, y / Ω)) # rrule doctest
19-
end
20-
)
21-
22-
indigo = DocThemeIndigo.install(ChainRulesCore)
7+
indigo = DocThemeIndigo.install(ChainRulesOverloadGeneration)
238

249
makedocs(
25-
modules=[ChainRulesCore],
10+
modules=[ChainRulesOverloadGeneration],
2611
format=Documenter.HTML(
2712
prettyurls=false,
2813
assets=[indigo],
29-
mathengine=MathJax3(
30-
Dict(
31-
:tex => Dict(
32-
"inlineMath" => [["\$","\$"], ["\\(","\\)"]],
33-
"tags" => "ams",
34-
# TODO: remove when using physics package
35-
"macros" => Dict(
36-
"ip" => ["{\\left\\langle #1, #2 \\right\\rangle}", 2],
37-
"Re" => "{\\operatorname{Re}}",
38-
"Im" => "{\\operatorname{Im}}",
39-
"tr" => "{\\operatorname{tr}}",
40-
),
41-
),
42-
),
43-
),
4414
),
45-
sitename="ChainRules",
46-
authors="Jarrett Revels and other contributors",
15+
sitename="ChainRules Overload Generation",
16+
authors="Lyndon White and other contributors",
4717
pages=[
4818
"Introduction" => "index.md",
49-
"FAQ" => "FAQ.md",
50-
"Writing Good Rules" => "writing_good_rules.md",
51-
"Complex Numbers" => "complex.md",
52-
"Deriving Array Rules" => "arrays.md",
53-
"Debug Mode" => "debug_mode.md",
54-
"Gradient Accumulation" => "gradient_accumulation.md",
55-
"Usage in AD" => [
56-
"Overview" => "autodiff/overview.md",
57-
"Operator Overloading" => "autodiff/operator_overloading.md",
58-
],
59-
"Design" => [
60-
"Changing the Primal" => "design/changing_the_primal.md",
61-
"Many Differential Types" => "design/many_differentials.md",
19+
"Examples of making AD systems" => [
20+
"Forward Mode" => "examples/forward_mode.md",
21+
"Reverse Mode" => "examples/reverse_mode.md",
6222
],
6323
"API" => "api.md",
64-
],
24+
],
6525
strict=true,
6626
checkdocs=:exports,
6727
)
6828

6929
deploydocs(
70-
repo = "github.com/JuliaDiff/ChainRulesCore.jl.git",
30+
repo = "github.com/JuliaDiff/ChainRulesOverloadGeneration.jl.git",
7131
push_preview=true,
7232
)

docs/src/api.md

Lines changed: 2 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,12 @@
11
# API Documentation
22

3-
## Rules
43
```@autodocs
5-
Modules = [ChainRulesCore]
6-
Pages = ["rules.jl"]
7-
Private = false
8-
```
9-
10-
## Rule Definition Tools
11-
```@autodocs
12-
Modules = [ChainRulesCore]
13-
Pages = ["rule_definition_tools.jl"]
14-
Private = false
15-
```
16-
17-
## Differentials
18-
```@autodocs
19-
Modules = [ChainRulesCore]
20-
Pages = [
21-
"differentials/abstract_zero.jl",
22-
"differentials/one.jl",
23-
"differentials/composite.jl",
24-
"differentials/thunks.jl",
25-
"differentials/abstract_differential.jl",
26-
"differentials/notimplemented.jl",
27-
]
28-
Private = false
29-
```
30-
31-
## Accumulation
32-
```@docs
33-
add!!
34-
ChainRulesCore.is_inplaceable_destination
35-
```
36-
37-
## Ruleset Loading
38-
```@autodocs
39-
Modules = [ChainRulesCore]
4+
Modules = [ChainRulesOverloadGeneration]
405
Pages = ["ruleset_loading.jl"]
416
Private = false
427
```
438

449
## Internal
4510
```@docs
46-
ChainRulesCore.AbstractTangent
47-
ChainRulesCore.debug_mode
48-
ChainRulesCore.clear_new_rule_hooks!
11+
ChainRulesOverloadGeneration.clear_new_rule_hooks!
4912
```

docs/src/assets/logo.png

30.6 KB
Loading

docs/src/assets/logo.svg

Lines changed: 27 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)