Skip to content

Commit

Permalink
fixup docs/compat
Browse files Browse the repository at this point in the history
  • Loading branch information
wsmoses committed May 15, 2024
1 parent afc44a0 commit 89ce6d2
Show file tree
Hide file tree
Showing 5 changed files with 108 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ NNlib = "872c559c-99b0-510c-b3b7-b6c96a88d5cd"
ReactantNNlibExt = "NNlib"

[compat]
CEnum = "0.4"
Cassette = "0.3"
CEnum = "0.4, 0.5"
Enzyme = "0.11, 0.12"
Reactant_jll = "0.0.5"
Preferences = "1.4"
julia = "1"

7 changes: 7 additions & 0 deletions docs/Project.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[deps]
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
Literate = "98b081ad-f1c9-55d3-8b20-4c87d4299306"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[compat]
Documenter = "0.27.8"
50 changes: 50 additions & 0 deletions docs/make.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
pushfirst!(LOAD_PATH, joinpath(@__DIR__, "..")) # add Enzyme to environment stack

using Reactant
using Documenter

DocMeta.setdocmeta!(Reactant, :DocTestSetup, :(using Reactant); recursive=true)

# Generate examples

using Literate

const EXAMPLES_DIR = joinpath(@__DIR__, "..", "examples")
const OUTPUT_DIR = joinpath(@__DIR__, "src/generated")

examples = Pair{String,String}[]

for (_, name) in examples
example_filepath = joinpath(EXAMPLES_DIR, string(name, ".jl"))
Literate.markdown(example_filepath, OUTPUT_DIR, documenter = true)
end

examples = [title => joinpath("generated", string(name, ".md")) for (title, name) in examples]

makedocs(;
modules=[Reactant],
authors="William Moses <[email protected]>, Valentin Churavy <[email protected]>",
repo="https://github.com/EnzymeAD/Reactant.jl/blob/{commit}{path}#{line}",
sitename="Reactant.jl",
format=Documenter.HTML(;
prettyurls=get(ENV, "CI", "false") == "true",
canonical="https://enzymead.github.io/Reactant.jl/",
assets = [
asset("https://plausible.io/js/plausible.js",
class=:js,
attributes=Dict(Symbol("data-domain") => "enzyme.mit.edu", :defer => "")
)
],
),
pages = [
"Home" => "index.md",
],
doctest = true,
strict = true,
)

deploydocs(;
repo="github.com/EnzymeAD/Reactant.jl",
devbranch = "main",
push_preview = true,
)
33 changes: 33 additions & 0 deletions docs/src/assets/logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 13 additions & 0 deletions docs/src/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
```@meta
CurrentModule = Reactant
DocTestSetup = quote
using Reactant
end
```

# Reactant

Documentation for [Reactant.jl](https://github.com/EnzymeAD/Reactant.jl).

This is truly something which we should write docs for.

0 comments on commit 89ce6d2

Please sign in to comment.